/* Florilla website. Layout: one walk down the page: a live meadow, a trail of seven stations,
   the screenshots, then the paperwork. Colors are the game's own Ink (dark) and Paper (light) themes. */
:root {
  color-scheme: dark;
  --bg: #0E1512;
  --surface: #17211C;
  --raised: #222E28;
  --line: #2B3832;
  --fg: #F2EADB;
  --muted: #A7B5AB;
  --faint: #6E7E74;
  --accent: #EF6445;
  --accent-text: #FF8A6E;
  --on-accent: #FFFFFF;
  --soil: #9C6B43;
  --rose: #E8698D;
  --marigold: #EFA73A;
  --iris: #8C7CF0;
  --mint: #2FB483;
  --sky: #3D9BE0;
  --scrim: 14, 21, 18;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .75);
  --frame: #050807;

  /* Hero scene (dusk on the prairie) */
  --sc-sky1: #0B1619; --sc-sky2: #2A3238; --sc-glow: #E57A52; --sc-sun: #F7B27C;
  --sc-far: #1E3029; --sc-mid: #19291F; --sc-ground1: #1D3523; --sc-ground2: #12241A;
  --sc-trail1: #6A4A32; --sc-trail2: #463121; --sc-crown: #1D3826; --sc-crown2: #284A31;
  --sc-trunk: #2B2119; --sc-grass: #3E6B39; --sc-mote: 255, 214, 160;

  --display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: .8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.2vw, 4.25rem);
  --radius: 18px;
  --wrap: 72rem;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F3ECDF; --surface: #FBF7EF; --raised: #ECE3D2; --line: #E0D5C2;
    --fg: #1C2721; --muted: #5D6B62; --faint: #8E998F;
    --accent: #EF6445; --accent-text: #C8432B; --on-accent: #FFFFFF; --soil: #B07F52;
    --scrim: 243, 236, 223;
    --shadow: 0 30px 60px -30px rgba(58, 46, 26, .45);
    --frame: #101513;
    --sc-sky1: #7FAFE4; --sc-sky2: #DCE7EC; --sc-glow: #FFF0CF; --sc-sun: #FFF9EA;
    --sc-far: #AFC9A0; --sc-mid: #93BC79; --sc-ground1: #7DB259; --sc-ground2: #5F9A43;
    --sc-trail1: #C49668; --sc-trail2: #A87B50; --sc-crown: #3D7838; --sc-crown2: #4F8D45;
    --sc-trunk: #5B4330; --sc-grass: #93C66A; --sc-mote: 255, 255, 255;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3ECDF; --surface: #FBF7EF; --raised: #ECE3D2; --line: #E0D5C2;
  --fg: #1C2721; --muted: #5D6B62; --faint: #8E998F;
  --accent: #EF6445; --accent-text: #C8432B; --on-accent: #FFFFFF; --soil: #B07F52;
  --scrim: 243, 236, 223;
  --shadow: 0 30px 60px -30px rgba(58, 46, 26, .45);
  --frame: #101513;
  --sc-sky1: #7FAFE4; --sc-sky2: #DCE7EC; --sc-glow: #FFF0CF; --sc-sun: #FFF9EA;
  --sc-far: #AFC9A0; --sc-mid: #93BC79; --sc-ground1: #7DB259; --sc-ground2: #5F9A43;
  --sc-trail1: #C49668; --sc-trail2: #A87B50; --sc-crown: #3D7838; --sc-crown2: #4F8D45;
  --sc-trunk: #5B4330; --sc-grass: #93C66A; --sc-mote: 255, 255, 255;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:not([class]) { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not([class]):hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font: 600 .75rem/1.2 var(--body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.lede { font-size: var(--step-1); color: var(--muted); max-width: 36rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(var(--scrim), .72);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(var(--scrim), .86); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.375rem/1 var(--display); }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: .9375rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--raised); }
.theme-toggle, .menu-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  cursor: pointer; transition: transform .2s, background-color .2s;
}
.theme-toggle:hover, .menu-toggle:hover { transform: rotate(-12deg); background: var(--raised); }
.theme-toggle svg, .menu-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: block; }
}
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: rgba(var(--scrim), .97);
    border-bottom: 1px solid var(--line);
    transform-origin: top; transform: scaleY(.6); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .2s, visibility .25s;
  }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .site-header.open .nav { transform: none; opacity: 1; visibility: visible; }
  .header-tools { margin-left: auto; }
}
.header-tools { display: flex; gap: 8px; align-items: center; }
.read-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px var(--accent); }
.btn-quiet { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--raised); transform: translateY(-2px); }
.btn[aria-disabled="true"] { cursor: default; }

/* ---------- Phone frame (landscape iPhone) ---------- */
.phone {
  position: relative;
  aspect-ratio: 2868 / 1320;
  max-width: 100%;
  padding: 1.6%;
  border-radius: 9% / 19%;
  background: linear-gradient(145deg, #3a423e, #121715 40%, #262d2a);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone .screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 7.6% / 16.5%; overflow: hidden; background: var(--frame);
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Reveal on scroll (content is never hidden: it starts dimmed and low) ---------- */
.reveal-pre { opacity: .3; transform: translateY(26px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding-block: 48px 40px; color: var(--muted); font-size: .9375rem; }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
.site-footer h2 { font: 600 .75rem/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; font-size: .8125rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-brand p { margin-top: 12px; max-width: 26rem; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Copyable email ---------- */
.email-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 500 .9375rem/1.2 var(--mono); color: var(--fg);
}
.email-chip span { user-select: all; overflow-wrap: anywhere; }
.email-chip button {
  border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer;
  background: var(--raised); color: var(--fg); font: 600 .8125rem/1 var(--body);
  transition: background-color .2s;
}
.email-chip button:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc-hero { padding-block: 64px 36px; position: relative; overflow: hidden; isolation: isolate; }
.doc-hero canvas.doc-petals { width: 100%; height: 100%; }
.doc-hero h1 { font-size: var(--step-4); margin-top: 12px; }
.doc-hero .lede { margin-top: 18px; }
.doc-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--faint); font-size: .875rem; }
.doc-petals { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.doc-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .875rem; }
.toc h2 { font: 600 .75rem/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--fg); border-left-color: var(--accent); }
.doc { max-width: 44rem; min-width: 0; }
.doc section { padding-bottom: 12px; }
.doc section + section { border-top: 1px solid var(--line); padding-top: 36px; margin-top: 28px; }
.doc h2 { font-size: var(--step-3); margin-bottom: 16px; }
.doc h3 { font-size: var(--step-1); margin: 26px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p, .doc p + ul, .doc ul + p, .doc p + .table-scroll, .doc .table-scroll + p { margin-top: 14px; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc ul { padding-left: 1.2rem; margin: 0; display: grid; gap: 8px; }
.doc li::marker { color: var(--accent); }
.summary-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 40px;
}
.summary-card h2 { font-size: var(--step-2); margin-bottom: 14px; }
.summary-card ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.summary-card li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--fg); }
.summary-card li svg { width: 18px; height: 18px; margin-top: 4px; color: var(--mint); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 34rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { font: 600 .75rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); background: var(--surface); }
.doc td { color: var(--muted); }
.doc td:first-child { color: var(--fg); font-weight: 500; }
.doc tr:last-child td { border-bottom: 0; }
.callout { border-left: 3px solid var(--accent); background: var(--surface); padding: 16px 18px; border-radius: 0 12px 12px 0; margin-top: 16px; }
.callout p { color: var(--fg); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .toc { position: static; margin-bottom: 24px; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); border-left: 0; gap: 4px; }
  .toc a { border-left: 0; background: var(--surface); border-radius: 10px; margin-left: 0; }
  .toc a.active { background: var(--raised); }
}

/* FAQ accordions (shared) */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: background-color .2s; }
.faq details[open] { background: var(--raised); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative;
  font: 600 var(--step-0)/1.4 var(--body); color: var(--fg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg); transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq .answer { padding: 0 20px 20px; color: var(--muted); display: grid; gap: 10px; }
.faq .answer p, .faq .answer li { color: var(--muted); }
.faq details[open] .answer { animation: drop .35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal-pre { opacity: 1; transform: none; }
}

/* Support page extras */
.support-contact { margin-top: 26px; display: grid; gap: 10px; justify-items: start; }
.support-contact p { color: var(--muted); font-size: .9375rem; max-width: 34rem; }
.doc .steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.doc .steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.doc .steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 1rem/1 var(--display);
}
.doc .faq + p, .doc p + .faq { margin-top: 16px; }

/* Press kit */
.doc .facts-table { min-width: 0; }
.doc .facts-table th { width: 34%; background: var(--surface); text-transform: none; letter-spacing: 0; font: 600 .9375rem/1.4 var(--body); color: var(--fg); }
.press-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.press-grid a { display: grid; gap: 8px; text-decoration: none; color: var(--muted); font-size: .875rem; }
.press-grid img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.press-grid a:hover img { transform: translateY(-3px); }
.press-grid a:hover span { color: var(--fg); }
.posters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.press-assets { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 20px; align-items: end; margin-top: 8px; }
.press-assets figure { margin: 0; display: grid; gap: 8px; }
.press-assets img { width: 100%; height: auto; border-radius: 14px; }
.press-assets figure:first-child img { border-radius: 22%; }
.press-assets figcaption { font-size: .875rem; }
@media (max-width: 560px) { .press-grid, .posters-grid { grid-template-columns: minmax(0, 1fr); } .press-assets { grid-template-columns: minmax(0, 1fr); } .press-assets figure:first-child { max-width: 140px; } }
