/* Scenefy site — shared design system
   Dark-first, drawn from the app icon: teal ring on near-black, cool blue secondary. */

:root {
  color-scheme: dark light;

  --bg:        #08090c;
  --bg-2:      #0d0f14;
  --surface:   rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.06);
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);

  --fg:        #f4f6f8;
  --fg-2:      #a8b0bb;
  --fg-3:      #6d7683;

  --teal:      #5fe3e0;
  --teal-deep: #2bb8c4;
  --blue:      #6ea8ff;
  --violet:    #9b8cff;

  --accent:    var(--teal);
  --glow:      0 0 0 1px rgba(95,227,224,.24), 0 18px 60px -20px rgba(95,227,224,.35);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;

  --ease: cubic-bezier(.22,.72,.24,1);
  --page: 68rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #fbfcfd;
    --bg-2:      #f2f5f8;
    --surface:   rgba(10,20,35,.03);
    --surface-2: rgba(10,20,35,.055);
    --line:      rgba(10,20,35,.10);
    --line-2:    rgba(10,20,35,.18);

    --fg:        #0d1420;
    --fg-2:      #4a5564;
    --fg-3:      #7d8794;

    --teal:      #0f9aa8;
    --teal-deep: #0b7c88;
    --blue:      #2f6fe0;
    --violet:    #6f5fe0;
    --glow:      0 0 0 1px rgba(15,154,168,.20), 0 18px 50px -22px rgba(15,154,168,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Aurora backdrop ---------- */

.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { width: 46rem; height: 46rem; top: -16rem; left: -10rem; background: radial-gradient(circle, var(--teal), transparent 62%); }
.aurora span:nth-child(2) { width: 38rem; height: 38rem; top: 22%; right: -14rem; background: radial-gradient(circle, var(--blue), transparent 62%); animation-delay: -8s; }
.aurora span:nth-child(3) { width: 34rem; height: 34rem; bottom: -12rem; left: 28%; background: radial-gradient(circle, var(--violet), transparent 62%); animation-delay: -15s; }
@media (prefers-color-scheme: light) { .aurora span { opacity: .22; } }

@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(4rem,-3rem,0) scale(1.12); }
  100% { transform: translate3d(-3rem,4rem,0) scale(.95); }
}

/* ---------- Reading progress ---------- */

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--violet));
}

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.nav .brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.nav .brand:hover { text-decoration: none; }
.nav .brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav .links { margin-left: auto; display: flex; gap: .35rem; align-items: center; }
.nav .links a {
  color: var(--fg-2); font-size: .93rem; padding: .45rem .8rem; border-radius: 999px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav .links a:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.nav .links a.active { color: var(--fg); background: var(--surface-2); }
@media (max-width: 34rem) { .nav .links a { padding: .4rem .55rem; font-size: .86rem; } }

/* ---------- Hero ---------- */

.hero { padding: 6rem 0 4rem; text-align: center; position: relative; }
.hero .appicon {
  width: 116px; height: 116px; border-radius: 26px; margin: 0 auto 2rem; display: block;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,.85), 0 0 0 1px var(--line);
  animation: floaty 7s var(--ease) infinite alternate;
}
@keyframes floaty { from { transform: translateY(-6px); } to { transform: translateY(8px); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; margin-bottom: 1.5rem;
  background: var(--surface);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.03; letter-spacing: -.035em;
  margin: 0 0 1.1rem; font-weight: 700;
}
h1 .grad {
  background: linear-gradient(120deg, var(--teal), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { font-size: clamp(1.05rem, 2.1vw, 1.32rem); color: var(--fg-2); max-width: 40rem; margin: 0 auto 2.2rem; }

.badges { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.badge {
  font-size: .87rem; color: var(--fg-2); border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; padding: .42rem .95rem;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.badge:hover { border-color: var(--line-2); color: var(--fg); transform: translateY(-2px); }

/* ---------- Sections ---------- */

section { padding: 4.5rem 0; position: relative; }
section + section { border-top: 1px solid var(--line); }

h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.025em; line-height: 1.12; margin: 0 0 .7rem; font-weight: 650; }
h3 { font-size: 1.06rem; margin: 0 0 .45rem; font-weight: 600; letter-spacing: -.01em; }
.lede { color: var(--fg-2); max-width: 44rem; margin: 0 0 2.4rem; font-size: 1.06rem; }
.section-head { margin-bottom: 2.4rem; }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 1.5rem; overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s var(--ease), background .45s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(38rem 38rem at var(--mx,50%) var(--my,0%), color-mix(in oklab, var(--teal) 16%, transparent), transparent 45%);
  transition: opacity .5s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card p { margin: 0; color: var(--fg-2); font-size: .97rem; }
.card .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  margin-bottom: 1rem; font-size: 19px;
  background: linear-gradient(145deg, color-mix(in oklab, var(--teal) 26%, transparent), color-mix(in oklab, var(--blue) 20%, transparent));
  border: 1px solid var(--line);
}

/* ---------- Checklist ---------- */

ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
ul.checks li { padding-left: 1.9rem; position: relative; color: var(--fg-2); }
ul.checks li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: var(--bg);
  background: linear-gradient(140deg, var(--teal), var(--blue));
}

/* ---------- Plans ---------- */

.plans { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.plan { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.8rem; background: var(--surface); position: relative; }
.plan.pro { border-color: color-mix(in oklab, var(--teal) 45%, transparent); box-shadow: var(--glow); }
.plan .flag {
  position: absolute; top: 1.4rem; right: 1.4rem; font-size: .74rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--bg); background: linear-gradient(140deg, var(--teal), var(--blue));
  padding: .25rem .6rem; border-radius: 999px; font-weight: 700;
}
.plan h3 { font-size: 1.3rem; margin-bottom: .15rem; }
.plan .tag { display: block; color: var(--fg-3); font-size: .86rem; margin-bottom: 1.2rem; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.plan li { color: var(--fg-2); font-size: .97rem; padding-left: 1.4rem; position: relative; }
.plan li::before { content: "–"; position: absolute; left: 0; color: var(--fg-3); }
.plan.pro li::before { content: "✓"; color: var(--teal); font-weight: 700; }

/* ---------- FAQ / accordion ---------- */

.faq { display: grid; gap: .7rem; }
details.qa {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 0 1.25rem; transition: border-color .35s var(--ease), background .35s var(--ease);
}
details.qa[open] { border-color: var(--line-2); background: var(--surface-2); }
details.qa summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 550; letter-spacing: -.01em;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: ""; position: absolute; right: .2rem; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .35s var(--ease), border-color .35s var(--ease);
}
details.qa[open] summary::after { transform: translateY(-25%) rotate(-135deg); border-color: var(--teal); }
details.qa .body { padding: 0 0 1.25rem; color: var(--fg-2); animation: unfold .45s var(--ease); }
details.qa .body p:first-child { margin-top: 0; }
details.qa .body p:last-child { margin-bottom: 0; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Search ---------- */

.search {
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1.6rem;
  border: 1px solid var(--line); border-radius: 999px; padding: .7rem 1.15rem;
  background: var(--surface); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.search:focus-within { border-color: color-mix(in oklab, var(--teal) 50%, transparent); box-shadow: var(--glow); }
.search input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: .98rem;
}
.search input::placeholder { color: var(--fg-3); }
.search .hint { color: var(--fg-3); font-size: .85rem; }
.noresults { color: var(--fg-3); padding: 1.5rem 0; display: none; }

/* ---------- Contact panel ---------- */

.panel {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.8rem;
  background: linear-gradient(160deg, var(--surface-2), transparent);
}
.panel .mail {
  display: inline-flex; align-items: center; gap: .55rem; margin: .4rem 0 .8rem;
  font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
}
.copy-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--fg-2);
  border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .82rem; cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.copy-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface-2); }
.copy-btn.done { color: var(--teal); border-color: color-mix(in oklab, var(--teal) 45%, transparent); }

/* ---------- Legal / TOC layout ---------- */

.legal { display: grid; grid-template-columns: 15rem 1fr; gap: 3rem; align-items: start; }
@media (max-width: 56rem) { .legal { grid-template-columns: 1fr; gap: 1.5rem; } .toc { position: static !important; } }

.toc { position: sticky; top: 5.5rem; }
.toc p { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 .8rem; }
.toc a {
  display: block; color: var(--fg-2); font-size: .93rem; padding: .38rem 0 .38rem .9rem;
  border-left: 2px solid var(--line); transition: color .3s var(--ease), border-color .3s var(--ease);
}
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a.active { color: var(--teal); border-left-color: var(--teal); }

.doc h2 { font-size: 1.45rem; margin: 2.6rem 0 .6rem; scroll-margin-top: 5.5rem; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--fg-2); }
.doc ul { color: var(--fg-2); padding-left: 1.2rem; }
.doc li { margin: .4rem 0; }
.doc strong { color: var(--fg); font-weight: 600; }

.callout {
  border: 1px solid color-mix(in oklab, var(--teal) 32%, transparent);
  background: linear-gradient(160deg, color-mix(in oklab, var(--teal) 10%, transparent), transparent);
  border-radius: var(--r); padding: 1.25rem 1.4rem; margin: 0 0 2.2rem;
}
.callout p { margin: 0; color: var(--fg); }

/* ---------- Footer ---------- */

footer.site { border-top: 1px solid var(--line); padding: 3rem 0 4rem; margin-top: 2rem; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
footer.site .flinks { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer.site a { color: var(--fg-2); font-size: .93rem; }
footer.site a:hover { color: var(--fg); }
footer.site .fine { color: var(--fg-3); font-size: .87rem; margin: 1.8rem 0 0; }
footer.site .fbrand { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
footer.site .fbrand img { width: 26px; height: 26px; border-radius: 7px; }

/* ---------- Back to top ---------- */

.totop {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 40;
  width: 2.7rem; height: 2.7rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--fg-2); cursor: pointer; font-size: 1rem;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { color: var(--fg); border-color: var(--line-2); }

/* ---------- Scroll reveal ---------- */

/* Gated on a class that only JavaScript can add. Without it every `.reveal` element is simply
   visible — a broken script, a blocked file, or an old browser costs the animation, never the
   content. A page whose text depends on JS running is a page that can review as blank. */
html.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- Motion & print ---------- */

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

@media print {
  .nav, .aurora, .totop, .progress, .toc, .search { display: none !important; }
  body { background: #fff; color: #000; }
  .legal { grid-template-columns: 1fr; }
}

/* Four numbered steps should read as one row on a desktop width — the default 16rem minimum
   wraps them 3+1, which reads as a dropped item rather than a sequence. */
.grid.steps { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }
.grid.steps .ico { font-weight: 700; font-size: 17px; }
