/* The home page's finish: the intro, one continuous backdrop behind every section, glass panels and the
   reveal on scroll. Every rule's resting state is the finished page: content is hidden only under
   html.reveal-on, which js/site/reveal.js adds once it is running. Loaded by index.html only. */
:root {
  --edge: rgba(120, 150, 180, 0.16);
  --glass: linear-gradient(160deg, rgba(24, 36, 47, 0.8), rgba(11, 17, 24, 0.76));
  --live: #3be0a0;
  --violet: #8b7bff;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- the backdrop: a fixed wash, and over it either the star canvas (js/site/backdrop.js, the animated
   rung) or a still star texture (every other rung). Both sit under all content and never move layout. ---- */
body::before { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(120% 60% at 50% 0%, #0d1620, #070b10 70%); }
.backdrop { position: fixed; inset: 0; z-index: -1; inline-size: 100%; block-size: 100%; pointer-events: none; }
html[data-backdrop="static"] body::before {
  background:
    radial-gradient(1px 1px at 24px 36px, rgba(231, 238, 245, 0.7) 50%, transparent 51%) 0 0 / 230px 230px,
    radial-gradient(1px 1px at 142px 88px, rgba(231, 238, 245, 0.5) 50%, transparent 51%) 0 0 / 230px 230px,
    radial-gradient(1.5px 1.5px at 196px 180px, rgba(52, 224, 207, 0.6) 50%, transparent 51%) 0 0 / 230px 230px,
    radial-gradient(1px 1px at 60px 250px, rgba(231, 238, 245, 0.55) 50%, transparent 51%) 0 0 / 310px 310px,
    radial-gradient(1.5px 1.5px at 228px 64px, rgba(231, 238, 245, 0.45) 50%, transparent 51%) 0 0 / 310px 310px,
    radial-gradient(1px 1px at 280px 208px, rgba(52, 224, 207, 0.45) 50%, transparent 51%) 0 0 / 310px 310px,
    radial-gradient(120% 60% at 50% 0%, #0d1620, #070b10 70%);
}

/* ---- a soft colour glow for each section ---- */
section.block { position: relative; border-top-color: var(--edge); }
#how { background: radial-gradient(50% 40% at 85% 12%, rgba(74, 141, 255, 0.10), transparent 70%); }
#proof { background: radial-gradient(50% 60% at 10% 30%, rgba(15, 180, 168, 0.12), transparent 70%); }
#pricing { background: radial-gradient(45% 60% at 90% 50%, rgba(139, 123, 255, 0.12), transparent 70%); }
#about { background: radial-gradient(45% 70% at 12% 50%, rgba(255, 180, 84, 0.08), transparent 70%); }
#start { background: radial-gradient(60% 70% at 50% 100%, rgba(15, 180, 168, 0.14), transparent 70%); }
footer { border-top-color: var(--edge); }

/* ---- glass: translucent gradients, a fine border and an inset highlight. No backdrop-filter anywhere over the
   canvas: a blur there is re-computed on every scroll frame. ---- */
.card, .start .composer { background: var(--glass); border-color: rgba(120, 150, 180, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.card { border-radius: 16px; padding: 22px; transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s; }
.start .composer { border-radius: 16px; padding: 22px; }
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: rgba(52, 224, 207, 0.45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 44px -24px rgba(15, 180, 168, 0.7); }
}

/* ---- section headings: a short line under each, and the section's top border lights up ---- */
section.block::before { content: ''; position: absolute; inset: -1px 0 auto; block-size: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--signal), transparent); opacity: 0.5; transition: transform 1.2s var(--ease-out), opacity 1.6s ease; }
section.block:not(.life) h2 { position: relative; padding-block-end: 14px; }
section.block:not(.life) h2::after { content: ''; position: absolute; inset: auto auto 0 0; inline-size: 72px; block-size: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--teal), var(--violet)); transform-origin: left; transition: transform 0.9s var(--ease-out) 0.25s; }

/* ---- reveal on scroll: only while the script is running (html.reveal-on) ---- */
html.reveal-on .rv { opacity: 0; transform: translateY(22px); transition: none; }
html.reveal-on .rv.is-in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out) var(--rv-d, 0ms), transform 0.7s var(--ease-out) var(--rv-d, 0ms); }
html.reveal-on section.block:not(.is-seen)::before { transform: scaleX(0); opacity: 0; }
html.reveal-on section.block h2.rv:not(.is-in)::after { transform: scaleX(0); }

/* ---- the intro: shown only while the world is on (the classic page has its own hero). One column: words, then the world, so the demo stays as near the top as it can.
   Wide landscape: the world fills the first screen, then the words follow as a band below it. ---- */
#intro { display: none; }
html[data-world] #intro { display: block; padding: 24px 16px 20px; border-bottom: 1px solid var(--edge); background: radial-gradient(60% 90% at 8% 10%, rgba(15, 180, 168, 0.16), transparent 62%); }
#intro .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; letter-spacing: 0.08em; }
#intro .eyebrow::before { content: ''; flex: none; inline-size: 16px; block-size: 1px; background: var(--teal); }
#intro h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 650; line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 12px; padding-block-end: 0.08em; text-wrap: balance; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #intro h1 { background: linear-gradient(100deg, #f4f9fd 30%, #9fe9e1 70%, #b9aefc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
#intro .lede { font-size: 17px; line-height: 1.5; max-width: 52ch; margin: 0 0 18px; }
.intro-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.intro-ctas [hidden] { display: none; }
.intro-ctas .cta { flex: 1 1 auto; margin: 0; text-align: center; border: 1px solid transparent; box-shadow: 0 0 0 1px rgba(52, 224, 207, 0.35), 0 12px 34px -12px rgba(15, 180, 168, 0.75); }
.intro-ctas .cta.secondary { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: #2b3b4d; box-shadow: none; }
.intro-demo { display: inline-block; margin-top: 16px; padding-bottom: 2px; font-size: 14px; font-weight: 500; color: var(--signal); text-decoration: none; border-bottom: 1px solid rgba(52, 224, 207, 0.45); }
.intro-demo::after { content: ' \2192'; }
.intro-demo:hover { border-bottom-color: var(--signal); }
.intro-demo:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }

/* the status: two short lines with a dot each on a phone (every pixel above the demo counts), chips from 700 px */
.intro-status { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.status-chip { display: flex; align-items: baseline; gap: 7px; flex: 1 0 100%; font: 11.5px/1.5 var(--font-mono); color: var(--muted); text-align: start; }
.status-chip::before { content: ''; flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; transform: translateY(-1px); }
.status-chip.is-live::before { background: var(--live); box-shadow: 0 0 10px var(--live); }
.status-chip.is-pending::before { background: var(--amber); box-shadow: 0 0 10px rgba(239, 159, 39, 0.8); }

@media (min-width: 700px) {
  html[data-world] #intro { padding: 28px 32px 22px; }
  #intro .eyebrow { gap: 10px; letter-spacing: 0.1em; }
  #intro .eyebrow::before { inline-size: 26px; }
  #intro .lede { font-size: 18px; }
  .intro-ctas .cta { flex: 0 1 auto; }
  .intro-status { gap: 8px; margin-top: 20px; }
  .status-chip { flex: 0 1 auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 22, 32, 0.7); font-size: 12.5px; line-height: 1.4; }
}
@media (min-width: 1180px) and (min-aspect-ratio: 3/2) {
  /* Wide, landscape screens: the world fills the first screen; the words and the panel follow as one centred band. */
  html[data-world] .stage { display: flex; flex-direction: column; }
  html[data-world] #world { order: 1; }
  html[data-world] #intro { order: 2; padding: 84px max(48px, calc((100% - 1100px) / 2)) 84px; border-top: 1px solid var(--edge); text-align: center; }
  .intro-words { display: grid; justify-items: center; }
  #intro h1 { margin-bottom: 16px; }
  #intro .lede { max-width: 60ch; margin-bottom: 24px; }
  .intro-demo { margin-top: 20px; }
  .intro-status { margin-top: 24px; }
  .intro-ctas, .intro-status { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .card, section.block::before, section.block h2::after { transition: none; }
  .card:hover { transform: none; }
  html.reveal-on .rv, html.reveal-on .rv.is-in { opacity: 1; transform: none; transition: none; }
  html.reveal-on section.block:not(.is-seen)::before, html.reveal-on section.block h2.rv:not(.is-in)::after { transform: none; opacity: 0.5; }
}
