/* NoteStar website. Colours come from the app's "Constellation" palette (ui/theme/Color.kt).
   Gold is the spark: it marks AI and the logo, never decoration. No web fonts: the system
   stack is Roboto on Android and SF on Apple devices, and nothing loads from third parties. */

:root {
  --night: #0D1B4C;
  --dusk: #2E3FA8;
  --indigo: #3A4FC4;
  --teal: #1F8E84;
  --gold: #FFC233;

  --bg: #FBFAFF;
  --surface: #FFFFFF;
  --surface-2: #F5F3FF;
  --surface-3: #EFEDFA;
  --text: #1A1B22;
  --muted: #45464F;
  --rule: #E2E1EC;
  --accent: #3A4FC4;
  --accent-soft: #DEE0FF;
  --on-accent: #FFFFFF;
  --teal-soft: #D8F3EE;
  --shadow: 0 1px 2px rgb(13 27 76 / 6%), 0 12px 32px rgb(13 27 76 / 8%);
  --shadow-lg: 0 30px 80px rgb(13 27 76 / 25%);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --max: 1160px;
  --read: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F17;
    --surface: #161722;
    --surface-2: #1C1D2B;
    --surface-3: #232436;
    --text: #E4E1F1;
    --muted: #C7C5D0;
    --rule: #2C2D3E;
    --accent: #BBC3FF;
    --accent-soft: #2333AB;
    --on-accent: #071692;
    --teal-soft: #0F3B36;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 30%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); }
.center { text-align: center; }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; display: grid; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--rule); box-shadow: 0 4px 20px rgb(13 27 76 / 6%); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--text); }
.header-cta img { height: 44px; width: auto; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; color: var(--text); cursor: pointer; min-width: 48px; min-height: 48px; }
.menu-toggle svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .nav, .site-header .header-cta { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header.open .nav {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px 20px 20px;
  }
  .site-header.open .nav a { padding: 12px 4px; font-size: 17px; }
}

/* ---------- Night sky (hero, closing band, page bands) ---------- */
.sky {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 50% at 78% 18%, rgb(255 194 51 / 16%), transparent 70%),
    radial-gradient(70% 60% at 10% 100%, rgb(31 142 132 / 22%), transparent 70%),
    linear-gradient(135deg, var(--night) 0%, #16257a 55%, var(--dusk) 100%);
}
.sky .constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.constellation use { stroke: rgb(255 255 255 / 15%); stroke-width: 1.2; } /* inherited by the lines inside the symbol */
.constellation circle { fill: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .constellation circle { animation: twinkle 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .constellation circle:nth-child(3n) { animation-delay: -1.3s; }
  .constellation circle:nth-child(3n+1) { animation-delay: -2.6s; animation-duration: 5s; }
  @keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 0; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; padding-bottom: clamp(48px, 8vw, 110px); }
.hero-mark { width: 84px; height: 84px; filter: drop-shadow(0 0 28px rgb(255 194 51 / 35%)); }
.hero h1 { color: #fff; }
.hero h1 .spark { background: linear-gradient(90deg, #8B8CFF, #4FC3F7 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgb(255 255 255 / 82%); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.play-badge img { height: 64px; width: auto; }
.play-badge { display: inline-block; border-radius: 12px; }
.text-link { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { text-decoration: underline; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: rgb(255 255 255 / 72%); font-size: 15px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: #7FE3D6; }
.hero-copy, .hero-visual, .feature > *, .step, .card, .plan { min-width: 0; }
.hero-visual { position: relative; align-self: end; justify-self: center; width: min(100%, 380px); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; text-align: center; justify-items: center; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-visual { width: min(100%, 320px); }
}

/* Phone frame around real screenshots */
.phone {
  position: relative;
  border-radius: 46px;
  padding: 30px 12px 14px;
  background: linear-gradient(160deg, #2b2f45, #0b0d18);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgb(255 255 255 / 10%);
}
.phone img { border-radius: 18px 18px 34px 34px; width: 100%; height: auto; aspect-ratio: 720 / 1460; background: #FBFAFF; }
.phone::before { /* camera */
  content: ""; position: absolute; top: 10px; left: 50%; width: 11px; height: 11px; translate: -50% 0;
  border-radius: 50%; background: #05060c; box-shadow: 0 0 0 2px rgb(255 255 255 / 8%); z-index: 2;
}
.hero .phone { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 0; }
.hero .phone img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; aspect-ratio: 720 / 1180; object-fit: cover; object-position: top; }

.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: rgb(255 255 255 / 92%); color: #1A1B22; box-shadow: 0 12px 30px rgb(0 0 0 / 22%);
  white-space: nowrap;
}
.chip .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.chip .dot svg { width: 17px; height: 17px; }
.chip-book { top: 18%; left: -18%; }
.chip-book .dot { background: #DEE0FF; color: var(--indigo); }
.chip-cards { top: 46%; right: -14%; }
.chip-cards .dot { background: #AFF3E8; color: #0F6E64; }
.chip-ai { top: 72%; left: -10%; }
.chip-ai .dot { background: #FFE08A; color: #7A5900; }
@media (prefers-reduced-motion: no-preference) {
  .chip { animation: float 6s ease-in-out infinite; }
  .chip-cards { animation-delay: -2s; }
  .chip-ai { animation-delay: -4s; }
  @keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}
@media (max-width: 520px) {
  .chip { font-size: 12.5px; padding: 8px 12px 8px 8px; }
  .chip-book { left: -2%; } .chip-cards { right: -2%; } .chip-ai { left: 0; }
}

/* ---------- Audience strip ---------- */
.audience { padding: 28px 0; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.audience .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.audience p { font-weight: 700; color: var(--muted); margin-right: 6px; }
.pill { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); font-size: 14.5px; font-weight: 600; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 20px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.step .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.step .icon svg { width: 24px; height: 24px; }
.step .icon.ai { background: #FFE08A; color: #7A5900; }
.step h3::before { counter-increment: step; content: counter(step) " · "; color: var(--muted); font-weight: 600; }
.step p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 1080px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 10vw, 128px); }
.feature.reverse .feature-media { order: -1; }
.feature-copy { display: grid; gap: 18px; }
.feature-copy ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; }
.feature-copy li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--muted); }
.feature-copy li svg { width: 22px; height: 22px; color: var(--teal); margin-top: 3px; }
.feature-media { position: relative; display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg); background: radial-gradient(80% 70% at 50% 20%, var(--accent-soft), transparent 70%), var(--surface-2); }
.feature-media .phone { width: min(100%, 330px); }
.feature-media.gold { background: radial-gradient(80% 70% at 50% 20%, rgb(255 194 51 / 26%), transparent 70%), var(--surface-2); }
.feature-media.teal { background: radial-gradient(80% 70% at 50% 20%, var(--teal-soft), transparent 70%), var(--surface-2); }
.tag { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.tag.ai { background: #FFE08A; color: #5C4300; }
.tag svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
}

/* More features grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card .icon svg { width: 22px; height: 22px; }
.card .icon.teal { background: var(--teal-soft); color: var(--teal); }
.card p { color: var(--muted); font-size: 15.5px; }
@media (prefers-color-scheme: dark) { .card .icon.teal { color: #93D6CC; } }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Principles ---------- */
.principles { background: var(--surface-2); border-block: 1px solid var(--rule); }
.principles .cards { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .principles .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .principles .cards { grid-template-columns: 1fr; } }

/* ---------- Plans ---------- */
.billing { display: inline-flex; margin: 0 auto 36px; padding: 5px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--rule); }
.billing button { border: 0; background: none; color: var(--muted); font: 700 15px var(--font); padding: 10px 20px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.billing button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.billing .save { color: var(--teal); font-weight: 800; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 30px 28px; display: grid; gap: 18px; align-content: start; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--accent); }
.plan .badge { position: absolute; top: -14px; left: 28px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.plan h3 { font-size: 24px; }
.plan .for { color: var(--muted); font-size: 15.5px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price .amount { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price .per { color: var(--muted); font-weight: 600; }
.price .alt { width: 100%; color: var(--muted); font-size: 14.5px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15.5px; }
.plan li svg { width: 20px; height: 20px; color: var(--teal); margin-top: 2px; }
@media (prefers-color-scheme: dark) { .plan li svg, .feature-copy li svg { color: #93D6CC; } }
.plans-note { margin-top: 24px; color: var(--muted); font-size: 14.5px; text-align: center; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0 24px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); rotate: 45deg; translate: 0 -3px; transition: rotate .2s; flex: none; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 0 22px; color: var(--muted); }

/* ---------- Closing band ---------- */
.closing { text-align: center; padding: clamp(80px, 10vw, 120px) 0; }
.closing .wrap { display: grid; gap: 22px; justify-items: center; }
.closing h2 { color: #fff; max-width: 760px; }
.closing p { color: rgb(255 255 255 / 80%); max-width: 560px; font-size: 19px; }
.closing img.mark { width: 72px; height: 72px; filter: drop-shadow(0 0 24px rgb(255 194 51 / 40%)); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--rule); padding: 56px 0 40px; font-size: 15px; color: var(--muted); }
.site-footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer .brand { margin-bottom: 10px; }
.site-footer h4 { margin: 0 0 12px; color: var(--text); font-size: 15px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; }
@media (max-width: 720px) { .site-footer .top { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ---------- Document pages (privacy, terms, deletion) ---------- */
.page-band { padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 6vw, 64px); }
.page-band .wrap { display: grid; gap: 12px; max-width: calc(220px + 56px + var(--read)); padding-left: calc(220px + 56px); }
@media (max-width: 960px) { .page-band .wrap { max-width: var(--read); padding-left: 0; } }
.page-band h1 { color: #fff; font-size: clamp(34px, 5vw, 52px); }
.page-band p { color: rgb(255 255 255 / 78%); }
.doc { padding: clamp(40px, 6vw, 64px) 0 clamp(64px, 8vw, 96px); }
.doc .layout { display: grid; grid-template-columns: 220px minmax(0, var(--read)); gap: 56px; justify-content: center; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14.5px; }
.toc p { font-weight: 800; color: var(--text); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; border-left: 2px solid var(--rule); }
.toc a { color: var(--muted); text-decoration: none; display: block; padding-left: 14px; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-color: var(--accent); }
.prose h2 { font-size: 26px; margin: 44px 0 12px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text); }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.prose .summary { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.prose th { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 960px) { .doc .layout { grid-template-columns: 1fr; } .toc { display: none; } }

.steps-list { counter-reset: n; list-style: none; padding: 0 !important; display: grid; gap: 14px !important; }
.steps-list li { counter-increment: n; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps-list li::before { content: counter(n); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost .wrap { display: grid; gap: 18px; justify-items: center; }
.lost h1 { color: #fff; font-size: clamp(36px, 6vw, 60px); }
.lost p { color: rgb(255 255 255 / 80%); max-width: 520px; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lost .button { background: #fff; color: var(--night); }
.lost .button.ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 60%); }
.lost img.mark { width: 96px; filter: drop-shadow(0 0 28px rgb(255 194 51 / 40%)); }
