/* Rootcrown website (Oct 2026). Colours, type and shapes come from the app:
   lilac and peach in light mode, night plum in dark mode, ember accents,
   Sora headings and Inter text, soft rounded cards and pill buttons. The
   hero is always a night "island", like the app icon. */

:root {
  color-scheme: light;
  --bg: #d2c3e1;            /* app light primaryBackground (lilac) */
  --bg-end: #ffdcbe;        /* fades to peach, as the app's pages do */
  --card: #ffdcbe;          /* secondaryBackground (peach) */
  --card-2: #ffe7d4;
  --ink: #463c50;           /* primaryText */
  --muted: #4b565e;         /* secondaryText */
  --accent: #ec9c4b;        /* primary (ember) */
  --accent-ink: #9a4f12;    /* links and small accent text */
  --on-accent: #463c50;     /* inkOnPrimary */
  --line: rgba(70, 60, 80, 0.14);
  --shadow: 0 1px 3px rgba(34, 28, 40, 0.12);
  --night: #221c28;
  --dusk: #2e2733;
  --glow: rgba(233, 133, 60, 0.28);
  --radius: 16px;
  --radius-lg: 24px;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #221c28;          /* app dark primaryBackground (night) */
    --bg-end: #221c28;
    --card: #2e2733;        /* secondaryBackground (dusk) */
    --card-2: #362e3d;
    --ink: #ece5f2;
    --muted: #b6a9c4;
    --accent: #f2a95a;
    --accent-ink: #f2a95a;
    --on-accent: #463c50;
    --line: rgba(180, 167, 200, 0.18);
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 16px/1.65 var(--text);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 55%, var(--bg-end) 100%) fixed;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 16px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.25rem/1 var(--display); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand .root { color: #6f5ba8; }
.brand .crown { color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .brand .root { color: #c3a6cc; } .brand .crown { color: #f19b4c; } }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-ink); }
@media (max-width: 600px) {
  .site-header .wrap { flex-wrap: wrap; gap: 4px 16px; padding: 10px 0 6px; }
  .nav { width: 100%; gap: 0 18px; font-size: 0.92rem; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 1rem/1 var(--display); text-decoration: none; border: 1.5px solid transparent; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { border-color: currentColor; color: var(--accent-ink); }

/* Hero: always night, like the app icon */
.hero { margin: 28px auto 0; border-radius: var(--radius-lg); background: radial-gradient(520px 360px at 22% 50%, var(--glow), transparent 70%), radial-gradient(600px 420px at 90% 0%, rgba(164, 145, 214, 0.16), transparent 70%), var(--night); color: #ece5f2; padding: clamp(28px, 6vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero .mark { width: min(300px, 100%); justify-self: center; }
.hero .eyebrow { color: #f2a95a; }
.hero h1 { color: #ece5f2; }
.hero h1 .root { color: #c3a6cc; }
.hero h1 .crown { color: #f19b4c; }
.hero p { color: #d9cfe3; font-size: 1.1rem; max-width: 46ch; }
.hero .copy { display: flex; flex-direction: column; gap: 18px; }
.hero .btn-primary { background: #f2a95a; color: #463c50; }
.hero .btn-ghost { color: #f2a95a; }
.hero .small { color: #b6a9c4; font-size: 0.9rem; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; text-align: left; } .hero .mark { width: 180px; justify-self: start; } }

.eyebrow { font: 600 0.78rem/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }

/* Sections */
section.block { padding: clamp(48px, 8vw, 88px) 0 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; max-width: 62ch; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.card p { color: var(--muted); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-ink); }
.card .icon svg { width: 24px; height: 24px; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps .card::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 1rem/1 var(--display); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-ink); font: 600 0.8rem/1.4 var(--text); }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.ticks li { position: relative; padding-left: 28px; }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: rotate(-45deg); }

.note { background: var(--card-2); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); }
.note strong { font-family: var(--display); }

/* Long text pages (privacy, terms, deletion) */
.doc { padding: 40px 0 0; display: flex; flex-direction: column; gap: 16px; }
.doc .meta { color: var(--muted); font-size: 0.95rem; }
.doc h2 { font-size: 1.35rem; margin-top: 18px; }
.doc h3 { font-size: 1.05rem; margin-top: 6px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.doc .card { margin-top: 8px; }

/* FAQ */
details { background: var(--card); border-radius: var(--radius); padding: 0 20px; box-shadow: var(--shadow); }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 18px 0; font: 600 1.02rem/1.35 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-ink); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 18px; color: var(--muted); display: grid; gap: 10px; }

/* Footer */
.site-footer { margin-top: clamp(56px, 9vw, 96px); padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer .links a { color: var(--ink); }
.crisis { color: var(--ink); }

/* The logo's seven lenses: deeper tones on light pages, brand tones on night. */
:root { --l1: #c9651c; --l2: #d27a2e; --l3: #d98f44; --l4: #d69a6a; --l5: #b5848a; --l6: #93799f; --l7: #6f5ba8; }
@media (prefers-color-scheme: dark) { :root { --l1: #e9853c; --l2: #f19b4c; --l3: #f8b262; --l4: #ffc88f; --l5: #e3b3b4; --l6: #c3a6cc; --l7: #a491d6; } }
.on-night { --l1: #e9853c; --l2: #f19b4c; --l3: #f8b262; --l4: #ffc88f; --l5: #e3b3b4; --l6: #c3a6cc; --l7: #a491d6; }
.logo path { stroke-width: 1.5; stroke-linejoin: round; }
.logo .l1 { fill: var(--l1); stroke: var(--l1); } .logo .l2 { fill: var(--l2); stroke: var(--l2); } .logo .l3 { fill: var(--l3); stroke: var(--l3); }
.logo .l4 { fill: var(--l4); stroke: var(--l4); } .logo .l5 { fill: var(--l5); stroke: var(--l5); } .logo .l6 { fill: var(--l6); stroke: var(--l6); }
.logo .l7 { fill: var(--l7); stroke: var(--l7); }
