/* =====================================================================
   AI New Tab — marketing site design system
   Warm-charcoal editorial · violet aurora · grain · glass
   ===================================================================== */

/* ---- tokens ---------------------------------------------------------- */
:root {
  --bg:        #14110f;          /* warm near-black */
  --bg-2:      #1b1714;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.14);

  --text:      #f4efe9;          /* warm white */
  --muted:     #b9afa4;
  --faint:     #877d72;

  --violet:    #6e56cf;          /* brand accent */
  --violet-lt: #9a83f0;
  --violet-glow: rgba(123, 92, 240, 0.45);
  --gold:      #e0b15a;          /* sparing warm highlight */

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1140px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Hanken Grotesque", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
}

/* ---- reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* ---- atmosphere: aurora glows + grain -------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% -5%, var(--violet-glow), transparent 60%),
    radial-gradient(45% 40% at 12% 8%, rgba(224, 177, 90, 0.12), transparent 60%),
    radial-gradient(55% 50% at 50% 110%, rgba(123, 92, 240, 0.18), transparent 60%);
  pointer-events: none;
}
body::after { /* film grain */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet-lt);
}

/* ---- nav ------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(20, 17, 15, 0.62);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.brand .mark { width: 28px; height: 28px; }
.brand b { font-weight: 800; font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); }

/* ---- buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  border: 1px solid transparent; transition: transform 0.18s var(--ease), box-shadow 0.25s, background 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--violet-lt), var(--violet));
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--violet-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--violet-glow), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }

/* ---- hero ------------------------------------------------------------ */
.hero { padding: 96px 0 60px; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted); margin-bottom: 30px;
}
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 auto 24px;
  max-width: 13ch;
  font-optical-sizing: auto;
}
.hero h1 em { font-style: italic; color: var(--violet-lt); }
.hero .lede {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 56ch; margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--faint); font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ---- prompt demo (hero showcase) ------------------------------------- */
.demo {
  margin: 64px auto 0; max-width: 920px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.2); }
.demo-bar .traffic { display: flex; gap: 7px; }
.demo-bar .traffic i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.demo-bar .url {
  flex: 1; text-align: center; font-family: var(--font-mono); font-size: 12.5px; color: var(--faint);
  background: var(--surface); border-radius: 7px; padding: 5px 12px;
}
.demo-stage { padding: 30px; min-height: 320px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.prompt-card { text-align: left; }
.prompt-card .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.prompt-box {
  font-family: var(--font-mono); font-size: 15px; line-height: 1.7;
  background: rgba(0,0,0,0.28); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px; color: var(--text);
}
.prompt-box .caret { display: inline-block; width: 9px; height: 19px; background: var(--violet-lt); vertical-align: -3px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.gen-preview {
  border-radius: 14px; aspect-ratio: 4 / 3; position: relative; overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(123,92,240,0.5), transparent 55%),
    radial-gradient(120% 100% at 0% 100%, rgba(224,177,90,0.35), transparent 55%),
    #0d0b0a;
  display: flex; flex-direction: column; justify-content: space-between; padding: 20px;
}
.gen-preview .clock { font-family: var(--font-display); font-size: clamp(34px, 6vw, 54px); font-weight: 600; letter-spacing: -0.02em; }
.gen-preview .meta { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.7); }
.gen-preview .dock { display: flex; gap: 8px; }
.gen-preview .dock span { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.14); backdrop-filter: blur(6px); }

/* ---- section heading ------------------------------------------------- */
.section { padding: 84px 0; }
.section-head { max-width: 60ch; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.022em;
  margin: 14px 0 16px;
}
.section-head p { color: var(--muted); font-size: 18px; }

/* ---- steps ----------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step .num { font-family: var(--font-mono); font-size: 13px; color: var(--violet-lt); letter-spacing: 0.1em; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 14px 0 8px; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 15.5px; }

/* ---- feature grid ---------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}
.feature:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--surface-2); }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(123,92,240,0.16); border: 1px solid rgba(123,92,240,0.3); margin-bottom: 16px; color: var(--violet-lt); }
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 7px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---- pricing --------------------------------------------------------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  position: relative;
}
.plan.featured { border-color: rgba(123,92,240,0.55); background: linear-gradient(180deg, rgba(123,92,240,0.1), var(--surface)); box-shadow: 0 30px 80px -40px var(--violet-glow); }
.plan .tag { position: absolute; top: -11px; left: 30px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 11px; border-radius: 100px; background: var(--violet); color: #fff; }
.plan .pname { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.plan .price { font-family: var(--font-display); font-weight: 600; font-size: 52px; letter-spacing: -0.03em; margin: 12px 0 2px; }
.plan .price span { font-size: 17px; color: var(--faint); font-family: var(--font-body); font-weight: 500; }
.plan .credits { color: var(--violet-lt); font-weight: 600; font-size: 15px; margin-bottom: 20px; }
.plan ul { display: grid; gap: 11px; margin-bottom: 26px; }
.plan li { display: flex; gap: 10px; color: var(--muted); font-size: 15px; }
.plan li svg { flex-shrink: 0; margin-top: 4px; color: var(--violet-lt); }
.plan .btn { margin-top: auto; justify-content: center; }
.pricing-foot { text-align: center; margin-top: 26px; color: var(--faint); font-size: 14px; }
.pricing-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---- faq ------------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 4px; font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { color: var(--violet-lt); font-size: 24px; transition: transform 0.25s var(--ease); font-weight: 400; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 16px; padding: 0 4px 22px; max-width: 64ch; }
.faq details p a { color: var(--violet-lt); text-decoration: underline; text-underline-offset: 3px; }

/* ---- cta band -------------------------------------------------------- */
.cta-band { text-align: center; padding: 96px 0; }
.cta-band h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 5.5vw, 60px); letter-spacing: -0.025em; line-height: 1.04; margin-bottom: 18px; }
.cta-band h2 em { font-style: italic; color: var(--violet-lt); }
.cta-band p { color: var(--muted); font-size: 19px; margin-bottom: 32px; }

/* ---- footer ---------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 60px 0 40px; background: rgba(0,0,0,0.2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; margin-bottom: 44px; }
.footer .brand { margin-bottom: 14px; }
.footer-about { color: var(--faint); font-size: 14.5px; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--muted); font-size: 15px; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; flex-wrap: wrap; }
.footer-bottom .pay { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); }

/* ---- legal / prose pages --------------------------------------------- */
.legal { padding: 70px 0 90px; }
.legal-head { max-width: 760px; margin: 0 auto 44px; }
.legal-head .eyebrow { margin-bottom: 14px; display: block; }
.legal-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.025em; line-height: 1.05; }
.legal-head .updated { margin-top: 14px; color: var(--faint); font-family: var(--font-mono); font-size: 13px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.015em; margin: 44px 0 14px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 16.5px; margin-bottom: 14px; }
.prose ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; margin-bottom: 18px; }
.prose a { color: var(--violet-lt); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose .placeholder { color: var(--gold); font-family: var(--font-mono); font-size: 0.92em; }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin: 22px 0; }
.callout p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- reveal animation ------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(22px); animation: rise 0.9s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.14s; } .d3 { animation-delay: 0.23s; }
.d4 { animation-delay: 0.32s; } .d5 { animation-delay: 0.41s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } .prompt-box .caret { animation: none; } }

/* ---- responsive ------------------------------------------------------ */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 66px; left: 0; right: 0; padding: 16px 24px 22px;
    background: rgba(20,17,15,0.96); border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { padding: 10px 0; font-size: 17px; }
  .demo-stage { grid-template-columns: 1fr; }
  .steps, .features, .pricing { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 40px; }
}
