/* Predict Gap — site styles */

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Display";
  src: url("/assets/fonts/noto-sans-display.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #F6F3EA;
  --surface: #FFFFFF;
  --navy: #07164A;
  --navy-raised: #12265E;
  --navy-soft: #EAF0FA;
  --gold: #F4C247;
  --gold-soft: #FFF4D6;
  --gold-ink: #634800;
  --cyan: #39B8CD;
  --ice: #DCECF5;
  --text: #171A24;
  --text-2: #5E6878;
  --line: #E0D9C8;
  --line-cool: #D9E0EA;
  --negative: #B42318;
  --positive: #147A52;

  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Noto Sans Display", "Noto Sans", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --r-card: 12px;
  --r-panel: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────── Header ───────── */
.top { padding-block: 22px; }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); font: 600 21px/1 var(--display); letter-spacing: -0.01em; }
.brand__tile { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; flex: none; }
.brand__tile svg { width: 27px; height: 27px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--navy); padding-block: 8px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }
@media (max-width: 760px) { .nav a:not(.nav__keep) { display: none; } }

/* ───────── Store button ───────── */
.store {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 10px 26px 10px 20px;
  border-radius: 30px; background: var(--navy); color: #fff; text-decoration: none;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store__text { display: grid; line-height: 1.2; text-align: left; }
.store__small { font-size: 12.5px; color: var(--ice); }
.store__big { font: 600 19px/1.2 var(--display); }
.store[aria-disabled="true"] { cursor: default; }
a.store:hover { background: var(--navy-raised); }
.store--gold { background: var(--gold); color: var(--navy); }
.store--gold .store__small { color: var(--gold-ink); }
a.store--gold:hover { background: #F7CD63; }

/* ───────── Hero ───────── */
.hero { padding-block: clamp(20px, 3.4vw, 44px) clamp(48px, 7vw, 88px); }
.hero h1 {
  font: 600 clamp(2.7rem, 7.6vw, 5.9rem)/0.97 var(--display);
  letter-spacing: -0.03em; color: var(--navy);
  max-width: 11.5em; text-wrap: balance;
}
.hero__sub { margin-top: clamp(22px, 2.6vw, 34px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hero__lede { font-size: clamp(1.06rem, 1.4vw, 1.22rem); line-height: 1.5; color: var(--text-2); max-width: 31em; flex: 1 1 22em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero__facts { font-size: 14.5px; color: var(--text-2); max-width: 13em; line-height: 1.4; }

/* The instrument */
.gauge {
  margin-top: clamp(28px, 3.6vw, 48px);
  background: var(--navy); color: #fff; border-radius: 28px;
  padding: clamp(20px, 3.2vw, 44px);
  display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 3.4vw, 52px); align-items: center;
}
.gauge__dial { position: relative; aspect-ratio: 1; width: 100%; max-width: 300px; margin-inline: auto; }
.gauge__dial svg { width: 100%; height: 100%; }
.gauge .track { fill: none; stroke: var(--navy-raised); }
.gauge .arc { fill: none; stroke-linecap: butt; }
.gauge .arc--a { stroke: var(--gold); }
.gauge .arc--b { stroke: var(--cyan); }
.gauge .wedge { fill: rgba(255, 255, 255, 0.14); stroke: #fff; stroke-width: 1.5; stroke-dasharray: 5 4; }
.gauge__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.gauge__gap { display: block; font: 600 clamp(2rem, 3.6vw, 2.7rem)/1 var(--display); letter-spacing: -0.02em; }
.gauge__gap-label { margin-top: 6px; font-size: 13px; color: var(--ice); }

.pair { background: var(--surface); color: var(--text); border-radius: var(--r-card); padding: 20px 20px 18px 26px; position: relative; }
.pair::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 2px 2px 0; background: var(--gold); }
.pair__status { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-2); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pair__score { font: 700 19px/1 var(--display); color: var(--navy); }
.pair__title { margin-top: 10px; font: 700 19px/1.3 var(--display); color: var(--text); min-height: 2.6em; }
.pair__rows { margin-top: 14px; display: grid; gap: 8px; font-size: 16px; }
.pair__row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pair__src { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot--a { background: var(--gold); }
.dot--b { background: var(--cyan); }
.pair__gap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-cool); display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text-2); }
.pair__gap strong { font: 700 20px/1 var(--display); color: var(--gold-ink); }
.pair__meta { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }

.gauge__side-title { font: 600 15px/1.3 var(--sans); color: var(--ice); }
.picker { margin-top: 12px; display: grid; gap: 8px; }
.picker button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  min-height: 48px; padding: 8px 18px; border-radius: 24px; cursor: pointer;
  background: transparent; border: 1px solid rgba(220, 236, 245, 0.35); color: #fff; font-size: 15px; font-weight: 600;
}
.picker button:hover { border-color: #fff; }
.picker button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.gauge__note { margin-top: 16px; font-size: 13px; line-height: 1.45; color: var(--ice); }

@media (max-width: 1020px) {
  .gauge { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); }
  .gauge__side { grid-column: 1 / -1; }
  .picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .gauge { grid-template-columns: 1fr; }
  .gauge__dial { max-width: 250px; }
  .picker { grid-template-columns: 1fr; }
}

/* ───────── Sections ───────── */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--rule { border-top: 1px solid var(--line); }
.section h2 { font: 600 clamp(1.9rem, 3.6vw, 3rem)/1.06 var(--display); letter-spacing: -0.02em; color: var(--navy); text-wrap: balance; }
.section__lede { margin-top: 18px; color: var(--text-2); max-width: 34em; }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.how__head { position: sticky; top: 32px; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 20px; padding-block: 26px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 6px; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--navy); color: var(--navy); font: 700 18px/1 var(--display);
}
.steps h3 { font: 700 21px/1.3 var(--display); color: var(--navy); align-self: end; }
.steps p { color: var(--text-2); max-width: 36em; grid-column: 2; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } .how__head { position: static; } }

/* Gap Score */
.score { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(20px, 3vw, 34px); }
.calc__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.calc__label { font-size: 14px; color: var(--text-2); }
.calc__total { font: 600 clamp(3rem, 6vw, 4.2rem)/0.9 var(--display); color: var(--navy); letter-spacing: -0.03em; }
.calc__of { font-size: 15px; color: var(--text-2); padding-bottom: 6px; }
.bar { margin-top: 18px; display: grid; grid-template-columns: 50fr 35fr 15fr; gap: 4px; }
.bar__seg { height: 18px; border-radius: 4px; background: var(--navy-soft); overflow: hidden; }
.bar__fill { height: 100%; width: 0; transition: width 0.25s ease; }
.bar__fill--gap { background: var(--gold); }
.bar__fill--match { background: var(--navy); }
.bar__fill--fresh { background: var(--cyan); }
.bar__keys { margin-top: 8px; display: grid; grid-template-columns: 50fr 35fr 15fr; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.bar__keys span { white-space: nowrap; }
.bar__keys span:last-child { justify-self: end; }
.controls { margin-top: 26px; display: grid; gap: 22px; }
.control__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.control__name { font-weight: 600; color: var(--navy); }
.control__val { font-size: 14.5px; color: var(--text-2); text-align: right; }
.control__val b { color: var(--text); font-weight: 600; }
.control input[type="range"] { width: 100%; margin: 10px 0 0; accent-color: var(--navy); height: 28px; }
.ages { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ages label { position: relative; }
.ages input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ages span { display: inline-flex; align-items: center; min-height: 38px; padding: 4px 14px; border-radius: 19px; border: 1px solid var(--line-cool); font-size: 14px; font-weight: 600; color: var(--navy); }
.ages input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.ages input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.calc__note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-cool); font-size: 14px; color: var(--text-2); }
@media (max-width: 860px) { .score { grid-template-columns: 1fr; } }

/* Screens */
.screens__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.strip {
  margin-top: 36px; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); padding-bottom: 18px;
  scrollbar-width: thin; scrollbar-color: var(--navy) transparent;
}
.strip li { flex: none; width: min(74vw, 300px); scroll-snap-align: center; }
.strip img { width: 100%; height: auto; border-radius: var(--r-panel); background: var(--navy-soft); }

/* Boundaries (gold panel) */
.bounds { background: var(--gold); color: var(--navy); border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.bounds h2 { color: var(--navy); }
.bounds__lede { margin-top: 18px; color: var(--navy); max-width: 26em; }
.bounds__list li { padding-block: 16px; border-top: 1px solid rgba(7, 22, 74, 0.22); display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; }
.bounds__list li:first-child { border-top: 0; padding-top: 4px; }
.bounds__list svg { width: 22px; height: 22px; margin-top: 3px; }
.bounds__list b { font: 700 18px/1.3 var(--display); display: block; }
.bounds__list span { font-size: 15.5px; line-height: 1.5; }
@media (max-width: 860px) { .bounds { grid-template-columns: 1fr; } }

/* Closing band */
.closing { background: var(--navy); color: #fff; overflow: hidden; position: relative; }
.closing__in { padding-block: clamp(64px, 9vw, 120px); position: relative; z-index: 1; max-width: 640px; }
.closing h2 { font: 600 clamp(2.1rem, 4.4vw, 3.6rem)/1.02 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.closing p { margin-top: 18px; color: var(--ice); max-width: 28em; }
.closing .store { margin-top: 32px; }
.closing__mark { position: absolute; right: -120px; top: 50%; width: min(70vw, 620px); transform: translateY(-50%); opacity: 0.95; }
@media (max-width: 760px) { .closing__mark { right: -42vw; top: auto; bottom: -24vw; transform: none; opacity: 0.35; } }

/* Footer */
.foot { padding-block: 34px 44px; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; align-items: center; font-size: 14.5px; color: var(--text-2); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { color: var(--navy); font-weight: 600; text-decoration: none; padding-block: 6px; }
.foot a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ───────── Document pages (privacy, terms, contact) ───────── */
.doc { padding-block: clamp(24px, 4vw, 56px) clamp(64px, 8vw, 104px); }
.doc__in { max-width: 720px; }
.doc h1 { font: 600 clamp(2.2rem, 5vw, 3.4rem)/1.03 var(--display); letter-spacing: -0.025em; color: var(--navy); }
.doc__date { margin-top: 14px; color: var(--text-2); font-size: 15px; }
.doc__sum { margin-top: 28px; background: var(--gold-soft); border-radius: var(--r-card); padding: 18px 20px; color: var(--gold-ink); }
.doc h2 { margin-top: 44px; font: 700 21px/1.3 var(--display); color: var(--navy); }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { list-style: disc; padding-left: 1.25em; }
.doc li { margin-top: 6px; }
.doc li::marker { color: var(--gold-ink); }
.doc a { color: var(--navy); font-weight: 600; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Contact form */
.form { margin-top: 34px; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; color: var(--navy); font-size: 15px; }
.field input, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-cool); border-radius: var(--r-card);
  padding: 13px 15px; font: 400 16px/1.45 var(--sans); color: var(--text);
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; border-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.btn {
  justify-self: start; min-height: 52px; padding: 12px 30px; border: 0; border-radius: 26px; cursor: pointer;
  background: var(--gold); color: var(--navy); font: 600 17px/1 var(--display);
}
.btn:hover { background: #F7CD63; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.form__msg { min-height: 1.5em; font-weight: 600; }
.form__msg[data-state="ok"] { color: var(--positive); }
.form__msg[data-state="err"] { color: var(--negative); }
.form__fine { font-size: 14px; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar__fill { transition: none; }
}
