/* ==========================================================================
   NotebookLM.work — design system
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --bg-elev:       #fbfbfd;
  --bg-sunken:     #f5f5f7;
  --text:          #08080a;
  --text-2:        #47474f;
  --text-3:        #86868b;
  --line:          rgba(0, 0, 0, 0.09);
  --line-strong:   rgba(0, 0, 0, 0.16);
  --accent:        #4f46e5;
  --accent-2:      #7c3aed;
  --accent-soft:   rgba(79, 70, 229, 0.09);
  --card:          #ffffff;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.03);
  --shadow-md:     0 4px 16px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg:     0 24px 60px -18px rgba(8,8,20,.22), 0 2px 8px rgba(0,0,0,.05);
  --header-bg:     rgba(255,255,255,.72);
  --radius:        16px;
  --radius-lg:     24px;
  --maxw:          1080px;
  --ease:          cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #08080b;
    --bg-elev:     #0e0e12;
    --bg-sunken:   #121217;
    --text:        #f5f5f7;
    --text-2:      #b4b4bd;
    --text-3:      #7c7c86;
    --line:        rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent:      #8b85f5;
    --accent-2:    #a78bfa;
    --accent-soft: rgba(139, 133, 245, 0.14);
    --card:        #0f0f14;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.5);
    --shadow-md:   0 4px 20px rgba(0,0,0,.5);
    --shadow-lg:   0 24px 70px -20px rgba(0,0,0,.8);
    --header-bg:   rgba(8,8,11,.72);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.sunken { background: var(--bg-sunken); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 0 0 10px 0; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 640;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: var(--text);
}
h1 { font-size: clamp(2.25rem, 4.6vw, 3rem); letter-spacing: -0.036em; text-wrap: balance; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); letter-spacing: -0.033em; }
h3 { font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.35; }
p  { margin: 0 0 1.1em; color: var(--text-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft);
  padding: 7px 14px; border-radius: 100px; margin-bottom: 22px;
}
.lede { font-size: clamp(1.06rem, 2vw, 1.28rem); color: var(--text-2); line-height: 1.58; }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 100px;
  font-size: .97rem; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .22s var(--ease), background .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease), opacity .22s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { opacity: .86; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-sunken); border-color: var(--text-3); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg);
  padding: 11px 22px 11px 18px; border-radius: 14px;
  text-decoration: none !important;
  transition: transform .22s var(--ease), opacity .22s;
  box-shadow: var(--shadow-md);
}
.appstore:hover { transform: translateY(-2px); opacity: .9; }
.appstore svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.appstore .as-txt { display: flex; flex-direction: column; line-height: 1.15; }
.appstore .as-1 { font-size: .66rem; letter-spacing: .04em; opacity: .82; }
.appstore .as-2 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 20px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 640; font-size: 1.02rem; letter-spacing: -0.028em;
  color: var(--text); text-decoration: none !important; flex: none;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 1.9; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--text-2); font-size: .92rem; font-weight: 500;
  text-decoration: none !important; transition: color .18s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; margin-right: -8px;
  cursor: pointer; color: var(--text); border-radius: 8px;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-cta .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 84px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -20% auto; height: 620px;
  background:
    radial-gradient(48% 52% at 22% 34%, rgba(79,70,229,.16), transparent 68%),
    radial-gradient(44% 48% at 78% 22%, rgba(124,58,237,.13), transparent 68%);
  filter: blur(8px); pointer-events: none; z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.14fr .86fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { max-width: 30em; }
.hero-note { margin-top: 22px; font-size: .85rem; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }

@media (max-width: 900px) {
  .hero { padding: 64px 0 56px; text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .btn-row { justify-content: center; }
  .hero-note { justify-content: center; }
}

/* ---------- Phone mockup ---------- */
.phone {
  width: 270px; margin: 0 auto; position: relative;
  border-radius: 42px; padding: 11px;
  background: linear-gradient(160deg, #3a3a44, #131318 55%, #2c2c34);
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  border-radius: 32px; overflow: hidden; background: var(--bg-elev);
  border: 1px solid rgba(255,255,255,.06); aspect-ratio: 9 / 19;
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 22px; background: #0b0b0f; border-radius: 100px; z-index: 2;
}
.ps-top { padding: 42px 18px 12px; border-bottom: 1px solid var(--line); }
.ps-title { font-size: .95rem; font-weight: 640; letter-spacing: -.02em; }
.ps-sub { font-size: .68rem; color: var(--text-3); }
.ps-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.ps-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 11px; box-shadow: var(--shadow-sm);
}
.ps-card .t { font-size: .7rem; font-weight: 640; letter-spacing: -.01em; display: flex; align-items: center; gap: 6px; }
.ps-card .t i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; font-style: normal; }
.ps-line { height: 5px; border-radius: 100px; background: var(--line-strong); opacity: .5; margin-top: 7px; }
.ps-chip {
  display: inline-block; font-size: .6rem; font-weight: 600; padding: 4px 9px;
  border-radius: 100px; background: var(--accent-soft); color: var(--accent);
}
.ps-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: 12px 12px 12px 4px; padding: 10px 11px; margin-top: auto;
}
.ps-bubble .t { font-size: .66rem; font-weight: 600; opacity: .85; }
.ps-bubble .ps-line { background: #fff; opacity: .55; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .945rem; line-height: 1.58; }

.icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line-strong); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: .78rem; font-weight: 660; letter-spacing: .08em; color: var(--accent);
  position: absolute; top: -11px; background: var(--bg); padding-right: 12px;
}
.sunken .step::before { background: var(--bg-sunken); }
.step h3 { margin: 6px 0 8px; }
.step p { margin: 0; font-size: .94rem; }

/* ---------- Privacy band ---------- */
.band {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 52px 48px; background: var(--card);
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 820px) { .band { grid-template-columns: 1fr; padding: 36px 26px; gap: 28px; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--text-2); }
.checklist svg {
  width: 20px; height: 20px; flex: none; margin-top: 2px;
  stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative;
  font-weight: 600; font-size: 1.02rem; letter-spacing: -.018em; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 10px; height: 10px; margin-top: -6px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 22px; font-size: .96rem; max-width: 68ch; }

/* ---------- CTA ---------- */
.cta-band {
  text-align: center; border-radius: var(--radius-lg); padding: 72px 32px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); max-width: 46ch; margin: 0 auto 30px; }
.cta-band .appstore { background: #fff; color: #111; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 62px 0 42px; background: var(--bg-elev); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 840px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand p { font-size: .9rem; margin: 16px 0 0; max-width: 32ch; }
.foot-col h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 640; margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { color: var(--text-2); font-size: .92rem; text-decoration: none !important; }
.foot-col a:hover { color: var(--text); }
.foot-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-3);
}
.foot-bottom p { margin: 0; color: var(--text-3); font-size: .82rem; }
.disclaimer { margin-top: 14px !important; max-width: 78ch; line-height: 1.55; }

/* ---------- Legal / prose pages ---------- */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin-bottom: 14px; }
.page-head .lede { max-width: 60ch; margin: 0; }
.stamp {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: .82rem; color: var(--text-3); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 100px; background: var(--card);
}

.legal { padding: 52px 0 96px; }
.legal-layout { display: grid; grid-template-columns: 232px 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .legal-layout { grid-template-columns: 1fr; gap: 32px; } }
.toc { position: sticky; top: 86px; }
@media (max-width: 900px) {
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--card); }
}
.toc h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; counter-reset: toc; }
.toc a {
  color: var(--text-2); font-size: .875rem; text-decoration: none !important;
  display: block; line-height: 1.4; border-left: 2px solid transparent; padding-left: 12px;
  transition: color .18s, border-color .18s;
}
.toc a:hover { color: var(--text); border-left-color: var(--accent); }

.prose { max-width: 72ch; }
.prose h2 {
  font-size: 1.35rem; letter-spacing: -.022em; margin: 44px 0 14px;
  scroll-margin-top: 92px; padding-top: 4px;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.03rem; margin: 26px 0 8px; }
.prose p, .prose li { font-size: .965rem; line-height: 1.68; color: var(--text-2); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); font-weight: 620; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--bg-sunken); border-radius: 10px;
  padding: 18px 22px; margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: .93rem; }

.table-wrap { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 620; color: var(--text); background: var(--bg-sunken); font-size: .82rem; letter-spacing: .01em; }
td { color: var(--text-2); }
tr:last-child td { border-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: .87rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 12px 14px;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: .78rem; color: var(--text-3); }
.form-note { font-size: .82rem; color: var(--text-3); margin-top: 14px; }
.aside-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; background: var(--card); box-shadow: var(--shadow-sm);
}
.aside-card + .aside-card { margin-top: 20px; }
.aside-card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.aside-card p { font-size: .92rem; margin-bottom: 0; }
.mail-link { font-weight: 600; font-size: 1rem; word-break: break-word; }

/* ---------- 404 ---------- */
.center-page {
  min-height: 66vh; display: grid; place-items: center; text-align: center; padding: 80px 0;
}
.center-page .code {
  font-size: clamp(4rem, 14vw, 7rem); font-weight: 700; letter-spacing: -.05em;
  line-height: 1; margin: 0 0 14px;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
