/* =============================================================================
   Dispatcher Strong — chaosinnovations.com
   Palette, type scale and dark-first bias are taken from the shipped app shell
   (res/values/colors.xml) so the site and the product read as one thing.
   Night-shift friendly: dark by default, low glare, no emergency hues.
   ========================================================================== */

:root {
  --bg:        #0A141E;
  --surface:   #132433;
  --surface-2: #1B3141;
  --line:      #243747;
  --text:      #EAE7DC;
  --dim:       #A7B2BC;
  --gold:      #D8B25E;
  --gold-soft: #F4E3B0;
  --amber:     #E8AC60;
  --teal:      #57A79E;   /* physical  */
  --sage:      #86C06A;   /* mindful   */
  --indigo:    #8F9BE8;   /* cognitive */
  --cream:     #F1EAD9;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);

  /* Fluid type: no webfont request, so first paint is immediate. */
  --f-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: clamp(16px, 0.55vw + 14.2px, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- utilities */

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #12212e; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0; font-weight: 650; text-decoration: none;
}
.skip:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------- header */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,20,30,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 1.02rem; font-weight: 700; letter-spacing: .012em; }
.brand span { display: block; font-size: .7rem; color: var(--dim); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

nav.site { margin-left: auto; }
nav.site ul { display: flex; gap: clamp(.5rem, 2vw, 1.6rem); list-style: none; margin: 0; padding: 0; align-items: center; }
nav.site a { color: var(--dim); text-decoration: none; font-size: .93rem; font-weight: 550; padding: .4rem .2rem; }
nav.site a:hover { color: var(--text); }
nav.site a.cta {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #12212e; padding: .52rem 1rem; border-radius: 999px; font-weight: 700;
}
nav.site a.cta:hover { filter: brightness(1.06); color: #12212e; }
@media (max-width: 640px) { nav.site li.hide-sm { display: none; } }

/* --------------------------------------------------------------------- hero */

.hero { padding: clamp(2.6rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
              grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); font-weight: 650; margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.08; letter-spacing: -.02em; margin: 0 0 1rem; font-weight: 750;
}
h1 .tint { color: var(--gold); }

.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--dim); margin: 0 0 1.6rem; max-width: 34em; }
.lede strong { color: var(--text); font-weight: 650; }

.btnrow { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.4rem; border-radius: 999px; text-decoration: none;
  font-weight: 680; font-size: .97rem; border: 1px solid transparent; cursor: pointer;
  min-height: 48px;                     /* same 44px+ target rule as the app */
}
.btn-primary { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #12212e; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--gold); }

.note { font-size: .84rem; color: var(--dim); margin: 1rem 0 0; }

/* ----------------------------------------------------------- the triangle */

.triangle { position: relative; }
.triangle svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }

/* Nodes breathe gently — the app's own visual language. Stilled for users who
   have asked for reduced motion. */
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .95; transform: scale(1.045); } }
.triangle .halo { transform-box: fill-box; transform-origin: center; animation: pulse 5.5s ease-in-out infinite; }
.triangle .halo.b { animation-delay: -1.8s; }
.triangle .halo.c { animation-delay: -3.6s; }

/* ----------------------------------------------------------------- sections */

section { padding: clamp(2.8rem, 7vw, 5rem) 0; }
section.alt { background: linear-gradient(180deg, var(--surface) 0%, rgba(19,36,51,.35) 100%); border-block: 1px solid var(--line); }

h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.16; letter-spacing: -.015em; margin: 0 0 .7rem; font-weight: 720; }
h3 { font-size: 1.1rem; margin: 0 0 .45rem; font-weight: 670; letter-spacing: -.005em; }
.sub { color: var(--dim); max-width: 56ch; margin: 0 0 2.2rem; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

.grid { display: grid; gap: 1.1rem; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.4rem;
}
.card p { color: var(--dim); margin: 0; font-size: .95rem; }
.card .ico { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: .8rem; }

/* pillar cards carry their lane colour as a top rule */
.pillar { border-top: 3px solid var(--line); }
.pillar.phys { border-top-color: var(--teal); }
.pillar.mind { border-top-color: var(--sage); }
.pillar.cog  { border-top-color: var(--indigo); }
.pillar .lane { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 680; margin-bottom: .5rem; }
.pillar.phys .lane { color: var(--teal); }
.pillar.mind .lane { color: var(--sage); }
.pillar.cog  .lane { color: var(--indigo); }

/* feature list */
.feat { display: grid; gap: .1rem; }
.feat > div { display: grid; grid-template-columns: 2rem 1fr; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.feat > div:last-child { border-bottom: 0; }
.feat .ico { font-size: 1.3rem; line-height: 1.3; }
.feat b { display: block; font-weight: 650; margin-bottom: .15rem; }
.feat p { margin: 0; color: var(--dim); font-size: .93rem; }

/* privacy emphasis */
.privacy { background:
  radial-gradient(1200px 380px at 50% -10%, rgba(216,178,94,.10), transparent 70%), var(--bg); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.plist li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .8rem; align-items: start; }
.plist svg { width: 20px; height: 20px; margin-top: .28rem; flex: none; color: var(--teal); }
.plist b { font-weight: 650; }
.plist span { color: var(--dim); }

.quote {
  border-left: 3px solid var(--gold); padding: .2rem 0 .2rem 1.2rem;
  margin: 0; color: var(--cream); font-size: 1.05rem;
}
.quote cite { display: block; margin-top: .6rem; font-size: .84rem; color: var(--dim); font-style: normal; }

/* callout / disclaimer */
.callout {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 10px; padding: 1.15rem 1.3rem; color: var(--dim); font-size: .93rem;
}
.callout b { color: var(--text); }
.callout a { color: var(--gold-soft); }

/* ------------------------------------------------------------------- footer */

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 2.6rem 0 2rem; margin-top: 1rem; }
footer.site .cols { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 720px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
footer.site h4 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem; font-weight: 680; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
footer.site a { color: var(--dim); text-decoration: none; font-size: .92rem; }
footer.site a:hover { color: var(--text); text-decoration: underline; }
footer.site .fine { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--dim); font-size: .84rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* ------------------------------------------------------- long-form (legal) */

.doc { max-width: 76ch; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.doc .meta { color: var(--dim); font-size: .88rem; margin: 0 0 2.4rem; }
.doc h2 { font-size: 1.28rem; margin: 2.4rem 0 .6rem; }
.doc h3 { font-size: 1.04rem; margin: 1.6rem 0 .4rem; }
.doc p, .doc li { color: var(--dim); }
.doc strong { color: var(--text); }
.doc a { color: var(--gold-soft); }
.doc ul, .doc ol { padding-left: 1.3rem; display: grid; gap: .45rem; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2.6rem 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .93rem; }
.doc th, .doc td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--text); font-weight: 650; }
.doc td { color: var(--dim); }

/* ----------------------------------------------------------- light override */
/* Respect a stated preference for light, mirroring the app's Parchment theme. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #E8E0CD; --surface: #F1EAD9; --surface-2: #E4DAC2;
    --line: #C3B795; --text: #23201A; --dim: #5C5443;
    --gold: #8A6A1F; --gold-soft: #A8842C; --amber: #9A6B24;
    --teal: #2F6B64; --sage: #4C7A3A; --indigo: #4A55A8;
  }
  header.site { background: rgba(241,234,217,.9); }
  .btn-primary { background: linear-gradient(180deg, #D8B25E, #BE9538); color: #21190a; }
  nav.site a.cta { background: linear-gradient(180deg, #D8B25E, #BE9538); color: #21190a; }
  .privacy { background: radial-gradient(1200px 380px at 50% -10%, rgba(138,106,31,.10), transparent 70%), var(--bg); }
  .quote { color: #2c2718; }
}
