/* Followire — the app's own kit tokens, so the site and the product read as
   one thing. Values taken from lib/core/theme/app_theme.dart, not re-picked. */

:root {
  --paper:  #FBF7F0;
  --sheet:  #FFFFFF;
  --sunk:   #F1EFE6;
  --ink:    #1C3A34;
  --ink2:   #5F706A;
  --mute:   #8A9A94;
  --line:   #E3E1D5;
  --line2:  #EDEBE0;
  --accent: #E8B33E;
  --accent-ink:  #8A5C08;
  --accent-soft: #F6E6C0;
  --gold-panel:  #FDF8EC;
  --gold-line:   #F0E1BF;
  --positive:    #1F7A63;
  --shadow: 0 1px 2px rgba(30, 22, 8, .05), 0 4px 16px rgba(30, 22, 8, .07);
  --shadow-lift: 0 2px 6px rgba(30, 22, 8, .06), 0 18px 44px rgba(30, 22, 8, .10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:  #0F1F17;
    --sheet:  #162A23;
    --sunk:   #1B322A;
    --ink:    #F1EFE6;
    --ink2:   #B4C3BC;
    --mute:   #83948C;
    --line:   #2A463D;
    --line2:  #21382F;
    --accent: #E8B33E;
    --accent-ink:  #F2C868;
    --accent-soft: #3A2A10;
    --gold-panel:  #241A08;
    --gold-line:   #4A3714;
    --positive:    #4FB394;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .28);
    --shadow-lift: 0 2px 8px rgba(0, 0, 0, .4), 0 22px 52px rgba(0, 0, 0, .34);
  }
}

:root[data-theme="dark"] {
  --paper:  #0F1F17;
  --sheet:  #162A23;
  --sunk:   #1B322A;
  --ink:    #F1EFE6;
  --ink2:   #B4C3BC;
  --mute:   #83948C;
  --line:   #2A463D;
  --line2:  #21382F;
  --accent: #E8B33E;
  --accent-ink:  #F2C868;
  --accent-soft: #3A2A10;
  --gold-panel:  #241A08;
  --gold-line:   #4A3714;
  --positive:    #4FB394;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .28);
  --shadow-lift: 0 2px 8px rgba(0, 0, 0, .4), 0 22px 52px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 720px; }

/* ── Top bar ───────────────────────────────────────────────────────── */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: 16px 0;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.top.stuck {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand b { font-size: 17.5px; font-weight: 800; letter-spacing: -.015em; color: #F1EFE6; }
.top.stuck .brand b { color: var(--ink); }

.mark { width: 30px; height: 30px; flex: none; }

.top-cta {
  font-size: 13.5px; font-weight: 700;
  color: #0F1F17; background: var(--accent);
  padding: 8px 16px; border-radius: 999px;
  text-decoration: none;
  transition: transform .15s;
}
.top-cta:active { transform: scale(.97); }

/* ── Hero — always dark. A night sky does not have a light mode. ────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #0B1A14;
  color: #F1EFE6;
  overflow: hidden;
  text-align: center;
}
#clusters {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero .inner {
  position: relative; z-index: 2;
  padding: 120px 28px 96px;
  max-width: 860px;
}
.eyebrow {
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(38px, 7.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 800;
  margin: 0 0 22px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  font-size: clamp(16.5px, 2.1vw, 20px);
  color: #B4C3BC;
  max-width: 46ch;
  margin: 0 auto 34px;
}
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: #6E8078;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint span {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, #6E8078, transparent);
  animation: drop 2.2s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { opacity: .2; transform: scaleY(.6); transform-origin: top; }
  50%      { opacity: 1;  transform: scaleY(1);   transform-origin: top; }
}

/* ── Sections ──────────────────────────────────────────────────────── */
section { padding: 104px 0; }
section.tight { padding: 76px 0; }

.kicker {
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 16px;
}
h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.024em;
  font-weight: 800;
  margin: 0 0 18px;
  text-wrap: balance;
}
h3 { font-size: 17.5px; font-weight: 700; letter-spacing: -.008em; margin: 0 0 8px; }
.lede { font-size: clamp(16.5px, 2vw, 19px); color: var(--ink2); max-width: 60ch; margin: 0 0 20px; }
p { color: var(--ink2); margin: 0 0 16px; max-width: 62ch; }
strong { color: var(--ink); font-weight: 700; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ── The derivation strip ──────────────────────────────────────────── */
.derive {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 26px;
  align-items: center;
  margin: 40px 0 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13.5px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px;
  background: var(--sheet); border: 1px solid var(--line);
  color: var(--ink);
}
.chip.derived {
  background: var(--gold-panel);
  border-color: var(--gold-line);
  color: var(--accent-ink);
}
.arrow {
  color: var(--mute); font-size: 22px;
  display: grid; place-items: center;
}
.derive-note { font-size: 13.5px; color: var(--mute); margin: 18px 0 0; }

/* ── The wire demo ─────────────────────────────────────────────────── */
/*
 * The section is tall; the panel inside it is sticky. Scrolling the tall
 * section therefore holds the wire on screen while the tour advances, which
 * is the app's own gesture rather than a carousel.
 *
 * The sticky element carries NO transform. A transform creates a containing
 * block and fights `position: sticky`, so the reveal animation lives on the
 * children instead — which is also why nothing was visible here at first.
 */
.stage-hold { position: relative; min-height: 260vh; padding: 0; }
.stage-hold .sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 72px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stage-hold .sticky h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 10px; }
.stage-hold .sticky .lede { font-size: clamp(15px, 1.7vw, 17px); margin-bottom: 18px; }
.stage {
  position: relative;
  /* Takes what the screen can spare rather than a fixed 560, so the panel
     never runs off the bottom on a laptop. */
  flex: 1;
  min-height: 420px;
  /* Edge to edge. A wire that stops short of the sides reads as a diagram
     in a box; running it off both edges says it carries on past the screen,
     which is the point of the thing. No border, no radius, no shadow —
     nothing that draws the frame back in. */
  width: 100%;
  background: var(--sheet);
  overflow: hidden;
}
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.node {
  position: absolute;
  width: 0; height: 0;
  transition: transform .8s cubic-bezier(.22, 1, .36, 1),
              opacity .6s;
  will-change: transform, opacity;
}
.node .disc {
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 2px solid var(--sheet);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: width .5s cubic-bezier(.22,1,.36,1),
              height .5s cubic-bezier(.22,1,.36,1),
              margin .5s cubic-bezier(.22,1,.36,1),
              border-color .4s, background .4s, color .4s;
}
.node .name {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, 34px);
  white-space: nowrap;
  font-size: 12.5px; font-weight: 700;
  color: var(--ink);
  background: var(--sheet);
  padding: 1px 8px; border-radius: 999px;
  transition: transform .5s, color .4s;
  pointer-events: none;
}
.node.is-centre .disc {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  font-size: 24px;
  background: var(--accent);
  color: #2A1F07;
  border-color: var(--accent);
}
.node.is-centre .name { transform: translate(-50%, 54px); font-size: 14px; }
.node.dim { opacity: .28; }
.node.dim .disc { box-shadow: none; }

.edge-label {
  position: absolute;
  /* Small enough to sit between the centre and a face without either one
     covering it — DAUGHTER was being eaten by the centre disc. */
  font-size: 9px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--sheet);
  padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--gold-line);
  transform: translate(-50%, -50%);
  transition: opacity .5s;
  pointer-events: none;
  white-space: nowrap;
}

.stage-hint {
  position: absolute; left: 24px; bottom: 20px;
  font-size: 12px; color: var(--mute);
  background: var(--sheet);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
}

/* ── Feature grid ──────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 42px;
}
.card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card p { font-size: 14.5px; margin: 0; }
.card .ic {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--gold-panel); border: 1px solid var(--gold-line);
  display: grid; place-items: center; margin-bottom: 14px;
}
.card .ic svg { width: 19px; height: 19px; stroke: var(--accent-ink); }

/* ── Vision band ───────────────────────────────────────────────────── */
.band {
  background: #0B1A14;
  color: #F1EFE6;
  position: relative;
  overflow: hidden;
}
.band h2 { color: #F1EFE6; }
.band p  { color: #B4C3BC; }
.band .kicker { color: var(--accent); }
#merge {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .55;
}
.band .wrap { position: relative; z-index: 2; }

/* ── Contact ───────────────────────────────────────────────────────── */
.contact-rows { display: grid; gap: 2px; margin-top: 26px; max-width: 560px; }
.crow {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  padding: 15px 0; border-top: 1px solid var(--line);
  font-size: 15px;
}
.crow b { min-width: 110px; font-weight: 700; color: var(--ink); }
.crow span, .crow a { color: var(--ink2); text-decoration: none; }
.crow a:hover { color: var(--accent-ink); }

/* ── Footer ────────────────────────────────────────────────────────── */
footer {
  background: var(--sunk);
  border-top: 1px solid var(--line);
  padding: 46px 0 30px;
}
.foot-top {
  display: flex; flex-wrap: wrap; gap: 22px;
  justify-content: space-between; align-items: flex-start;
}
.foot-top p { font-size: 13.5px; margin: 10px 0 0; max-width: 40ch; }
.foot-legal {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--mute);
  align-items: center;
}
.foot-legal a { color: var(--mute); text-decoration: none; }
.foot-legal a:hover { color: var(--ink2); text-decoration: underline; }
.foot-legal .sep { opacity: .45; }

/* ── Legal pages ───────────────────────────────────────────────────── */
.legal { padding: 132px 0 40px; }
.legal h1 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.024em; font-weight: 800;
  margin: 0 0 10px;
}
.legal .stamp { font-size: 13px; color: var(--mute); margin: 0 0 34px; }
.legal h2 { font-size: 20px; margin: 38px 0 10px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { color: var(--ink2); margin-bottom: 7px; }
.legal a { color: var(--accent-ink); }
.tablewrap { overflow-x: auto; margin: 8px 0 22px; }
table { border-collapse: collapse; width: 100%; min-width: 460px; }
th, td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px; vertical-align: top;
}
th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--mute); font-weight: 800;
}
td { color: var(--ink2); }
td:first-child { color: var(--ink); font-weight: 600; width: 36%; }

.back-home {
  display: inline-block; margin-bottom: 28px;
  font-size: 13.5px; font-weight: 700;
  color: var(--accent-ink); text-decoration: none;
}

/* Body links were falling back to the browser's blue-and-purple, which
   showed up as a violet "Read the privacy policy" against the dark band.
   Anything that is not deliberately styled elsewhere takes the gold ink. */
section p a, .legal p a, .legal li a { color: var(--accent-ink); }
.band p a { color: var(--accent); }

a:focus-visible, button:focus-visible, .disc:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

@media (max-width: 720px) {
  .derive { grid-template-columns: 1fr; gap: 14px; }
  .arrow { transform: rotate(90deg); }
  .stage { min-height: 380px; }
  section { padding: 76px 0; }
}

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