/* Brise: the page is calm air; the only colour is the sky inside the two demo lanes, which takes
   the chip's temperature exactly like the app does. */

:root {
  --air: #eef2f9;
  --air-deep: #e2e8f4;
  --ink: #1a1e44;
  --mist: #5a628c;
  --line: #d3dbea;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 34rem;
  --gutter: clamp(20px, 5vw, 56px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--air);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--round); margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid #3890f5; outline-offset: 3px; border-radius: 6px; }

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

/* Header */

.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  max-width: 1200px; margin: 0 auto;
}
.mark {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 1.3rem var(--round); text-decoration: none; letter-spacing: -0.01em;
}
.mark-fan { width: 22px; height: 22px; color: #6b58e0; }
.bar-link { font-weight: 600; text-decoration: none; color: var(--mist); }
.bar-link:hover { color: var(--ink); }

main { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* Hero */

.hero { padding: clamp(28px, 6vh, 72px) 0 clamp(32px, 5vh, 52px); }
.hero h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lede {
  max-width: var(--measure);
  margin-top: 26px;
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--mist);
}
.cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px 15px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 700 1.08rem var(--round);
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgb(26 30 68 / 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button svg { width: 20px; height: 20px; transition: transform 0.6s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgb(26 30 68 / 0.6); }
.button:hover svg { transform: rotate(240deg); }
.fine { font-size: 0.95rem; color: var(--mist); }

/* Demo: two skies */

.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 22px); }

.lane {
  --top: rgb(84 107 240);
  --bottom: rgb(54 61 194);
  position: relative;
  margin: 0;
  min-height: 300px;
  padding: 22px 24px 0;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, var(--top), var(--bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr;
  isolation: isolate;
}
.lane::after {
  /* A soft glow in the corner, like the app's sky. */
  content: ""; position: absolute; inset: -30% -20% auto auto; width: 60%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.28), transparent);
  z-index: -1;
}
.lane-name { font: 600 1rem var(--round); opacity: 0.9; grid-column: 1 / -1; }
.temp {
  font: 300 clamp(3.6rem, 7vw, 5.2rem)/1 var(--round);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.fan {
  align-self: end; justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
  border: 0.5px solid rgb(255 255 255 / 0.3);
  font: 600 0.98rem var(--round);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.fan-glyph { width: 18px; height: 18px; }

.chart-wrap {
  grid-column: 1 / -1;
  align-self: end;
  position: relative;
  height: 150px;
  margin: 18px -24px 0;
}
.chart { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .job { fill: rgb(255 255 255 / 0.08); }
.chart .line { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .fan-area { fill: rgb(255 255 255 / 0.22); }
.head {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.25);
}
.peak {
  position: absolute; transform: translate(-50%, calc(-100% - 10px));
  padding: 3px 9px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font: 700 0.85rem var(--round); white-space: nowrap;
}
.peak::after {
  content: ""; position: absolute; left: 50%; bottom: -12px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: #fff;
}

/* Wind streaks drift faster as the fans spin up. */
.wind { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.wind span {
  position: absolute; left: 0; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent);
  will-change: transform;
}

.demo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.replay {
  font: 600 1rem var(--round);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
}
.replay:hover { border-color: var(--mist); }
.verdict { font: 600 1.1rem var(--round); }
.note { margin-left: auto; font-size: 0.85rem; color: var(--mist); }

/* Sections */

.how, .why, .safe { padding-top: clamp(80px, 13vh, 140px); }
.how h2, .why h2, .safe h2, .last h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* How: work → foresight → fans, as the app draws it. */
.chain {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  position: relative;
}
.chain::before {
  /* The flow between the nodes. */
  content: ""; position: absolute; top: 48px; left: 16.6%; right: 16.6%; height: 3px;
  background: repeating-linear-gradient(90deg, #8f5ae0 0 10px, transparent 10px 20px);
  background-size: 20px 3px;
  animation: flow 0.9s linear infinite;
  opacity: 0.55;
}
@keyframes flow { to { background-position: 20px 0; } }
.chain li { display: grid; justify-items: center; gap: 14px; position: relative; }
.node {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 16px 34px -16px rgb(26 30 68 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.node svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.node-work { background: linear-gradient(160deg, #f57345, #cc3d30); }
.node-work svg { fill: currentColor; stroke: none; }
.node-see { background: linear-gradient(160deg, #9457e0, #6630ad); }
.node-fan { background: linear-gradient(160deg, #3890f5, #1c54d1); }
.node-fan svg { fill: currentColor; stroke: none; width: 46px; height: 46px; }
.spin { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.node-label { font: 700 1.25rem var(--round); letter-spacing: -0.01em; }

/* Why: one picture, one number, one line. */
.facts { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.fact {
  margin: 0;
  padding: 26px 26px 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.viz { width: 100%; height: auto; display: block; margin-bottom: 18px; overflow: visible; }
.viz .track { fill: var(--air-deep); }
.viz .fill-hot { fill: #f57345; }
.viz .mark { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.viz .tick { font: 600 13px var(--round); fill: var(--mist); }
.viz .bar-cool { fill: #3890f5; }
.viz .bar-hot { fill: #f57345; }
.viz .wave-hot, .viz .wave-cool { fill: none; stroke-width: 4; stroke-linecap: round; }
.viz .wave-hot { stroke: #f57345; opacity: 0.35; }
.viz .wave-cool { stroke: #3890f5; }
.big { font: 700 clamp(2rem, 3.6vw, 2.7rem)/1 var(--round); letter-spacing: -0.03em; }
.fact figcaption { margin-top: 10px; color: var(--mist); }
.fact figcaption a { color: var(--ink); font-size: 0.85rem; font-weight: 600; text-underline-offset: 3px; margin-left: 4px; }
.facts-note { margin-top: 18px; font-size: 0.9rem; color: var(--mist); }

/* Safe: four short promises. */
.rules {
  margin: 40px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 20px);
}
.rules li {
  display: grid; gap: 14px; align-content: start;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  font: 600 1.05rem/1.3 var(--round);
}
.rules svg {
  width: 30px; height: 30px; fill: none; stroke: #546bf0; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.last {
  margin: clamp(80px, 14vh, 140px) 0 0;
  padding: clamp(40px, 7vw, 72px);
  border-radius: 32px;
  background: linear-gradient(160deg, #3890f5 0%, #546bf0 55%, #8f5ae0 100%);
  color: #fff;
  display: grid; justify-items: start; gap: 24px;
}
.last .button { background: #fff; color: var(--ink); box-shadow: 0 12px 30px -14px rgb(0 0 0 / 0.5); }
.last .button svg { color: #6b58e0; }
.last .fine { color: rgb(255 255 255 / 0.86); max-width: 36rem; }

.foot {
  max-width: 1200px; margin: 0 auto;
  padding: 40px var(--gutter) 56px;
  font-size: 0.9rem; color: var(--mist);
  display: grid; gap: 6px;
}
.foot code { font-size: 0.82rem; word-break: break-all; }
.foot summary { cursor: pointer; width: fit-content; }
.foot details p { margin-top: 8px; }

/* Narrow screens */

@media (max-width: 760px) {
  .lanes, .facts { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr 1fr; }
  .node { width: 76px; height: 76px; }
  .node svg { width: 32px; height: 32px; }
  .chain::before { top: 38px; }
  .node-label { font-size: 1rem; text-align: center; }
  .lane { min-height: 290px; }
  .chart-wrap { height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .button svg { transition: none; }
  .chain::before, .spin { animation: none; }
}
