/* Predict landing page. One dark blue field throughout, with real parts and screens layered on top
   and a soft glow behind each. Tokens follow the Predict Design System (sapphire, gold, ink;
   Rajdhani display, Open Sans body). See ../../Predict Website Brief.md, section 5.7. */

@font-face { font-family: 'Rajdhani'; src: url('../fonts/rajdhani-500-normal-latin.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rajdhani'; src: url('../fonts/rajdhani-600-normal-latin.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rajdhani'; src: url('../fonts/rajdhani-700-normal-latin.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/open-sans-normal-latin.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
  /* Field: the hero concept's dark blue, used for the whole page */
  --bg: #0b1015;
  --bg-mid: #131c22;
  --bg-lift: #1f2f39;
  --glow: rgba(77, 135, 164, 0.38);

  /* Brand (design system) */
  --sapphire-100: #d6e5ee;
  --sapphire-200: #aecadb;
  --sapphire-300: #7da9c2;
  --sapphire-500: #216182;
  --sapphire-600: #1c5471;
  --gold: #d69954;

  /* Text on the dark field */
  --ink-strong: #eef3f6;
  --ink: #c4d1d8;
  --ink-muted: #8fa2ac;

  /* Lines and surfaces */
  --line: rgba(238, 243, 246, 0.12);
  --surface: linear-gradient(180deg, rgba(31, 47, 57, 0.72) 0%, rgba(19, 28, 34, 0.58) 100%);
  --surface-border: rgba(238, 243, 246, 0.09);

  /* Type */
  --font-display: 'Rajdhani', 'Arial Narrow', sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step-h1: clamp(2.5rem, 1.25rem + 3.5vw, 4.5rem);
  --step-h2: clamp(2rem, 1.35rem + 2vw, 3.25rem);
  --step-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;

  /* Space and shape */
  --container: 80rem;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --section-y: clamp(3.75rem, 0.5rem + 5.5vw, 5.75rem);
  --header-h: 4.5rem;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-float: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 8px 20px -8px rgba(0, 0, 0, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* responses: starts fast, settles calmly */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* things travelling across the screen */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--ink-strong); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
figure { margin: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: absolute; left: var(--gutter); top: -6rem; z-index: 100;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  background: var(--ink-strong); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 1.625rem; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--sm { height: 40px; padding: 0 1.125rem; font-size: 1rem; }
.btn--light { background: var(--ink-strong); color: var(--bg); }
.btn--light:hover { background: var(--sapphire-100); }
.btn--primary { background: var(--sapphire-500); color: #f6f9fb; }
.btn--primary:hover { background: var(--sapphire-600); }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); color: var(--ink-strong); }
.site-header.is-fixed { position: fixed; border-bottom: 1px solid transparent; transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out); }
.site-header.is-solid { background: var(--bg); border-bottom-color: var(--line); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 2.5rem; }
.brand { display: inline-flex; }
.brand img { height: 1.875rem; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-block; padding: 0.625rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  position: relative; color: var(--ink); text-decoration: none; transition: color 160ms var(--ease-out);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.3rem; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center; transition: transform 200ms var(--ease-out);
}
.site-nav a:hover { color: var(--ink-strong); }

/* ---------- Sections ---------- */
.section { position: relative; isolation: isolate; padding-block: var(--section-y); overflow-x: clip; }
/* Section title with its one-sentence subtitle directly underneath */
.section-head { max-width: 46rem; }
.section-head h2 { max-width: 16em; font-size: var(--step-h2); line-height: 1.02; }
.section-head p { max-width: 36em; margin-top: 1.25rem; font-size: var(--step-lead); line-height: 1.65; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(42rem, 100svh, 60rem);
  background: radial-gradient(ellipse 75% 85% at 82% 48%, var(--bg-lift) 0%, var(--bg-mid) 52%, var(--bg) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 16, 21, 0), var(--bg));
}
/* The part stands on the field at concept-B scale, with a glow behind it: cropped by the right edge on
   laptops, fully in view (centred in the space right of the text) on wide screens. Never a near-miss with the edge. */
.hero__part {
  --part-w: min(56vw, 51rem, calc(100svh - 6rem));
  position: absolute; z-index: 0;
  top: calc(50% + 1rem); right: calc(var(--part-w) * -0.275); width: var(--part-w);
  transform: translateY(-45%);
}
@media (min-width: 1800px) {
  .hero__part { --part-w: min(48rem, calc(100svh - 6rem)); right: auto; left: 75%; transform: translate(-48%, -45%); }
}
.hero__part::before {
  content: ""; position: absolute; inset: -22%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow) 0%, rgba(77, 135, 164, 0.12) 55%, rgba(77, 135, 164, 0) 100%);
}
.hero__part img { width: 100%; }   /* the photo's own floor shadow is part of the image */
.hero__part figcaption {
  position: absolute; left: 0; bottom: 4%; transform: translateX(calc(-100% - 1rem));
  display: flex; align-items: center; gap: 0.75rem;
  font-size: var(--text-small); color: var(--ink-muted); white-space: nowrap;
}
.hero__part figcaption::after { content: ""; width: 2.5rem; height: 1px; background: rgba(238, 243, 246, 0.35); }
.hero__content { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 4rem); padding-bottom: clamp(4rem, 11vh, 7rem); }
.hero h1 { max-width: 10em; position: relative; font-size: var(--step-h1); line-height: 0.98; letter-spacing: -0.015em; }
.hl { color: var(--gold); }
.hero__lead { max-width: 32em; margin-top: 1.75rem; font-size: var(--step-lead); line-height: 1.65; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.hero__note { font-size: var(--text-small); color: var(--ink-muted); }

/* ---------- Problem ---------- */
.problem::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; right: -10%; width: 60%; height: 80%;
  background: radial-gradient(closest-side, rgba(31, 47, 57, 0.9), rgba(31, 47, 57, 0));
}
.compare { width: 100%; margin: clamp(2.5rem, 5vw, 4rem) 0 0; border-collapse: collapse; table-layout: fixed; }
.compare th {
  padding: 0 2.5rem 1rem 0; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; line-height: 1.2;
  color: var(--ink-muted);
}
.compare th + th { color: var(--ink-strong); }
.th-logo { display: inline-block; height: 1.24em; width: auto; margin-left: 0.35rem; vertical-align: -0.11em; }   /* letters match the height of 'With' */
.compare td { padding: 1.25rem 2.5rem 1.25rem 0; border-top: 1px solid var(--line); vertical-align: top; font-size: 1.0625rem; line-height: 1.5; }
.compare tr:last-child td { border-bottom: 1px solid var(--line); }
.compare td:first-child { color: var(--ink-muted); }
.compare td:last-child {
  padding-left: 1.875rem; border-top-color: rgba(125, 169, 194, 0.4); color: var(--ink-strong);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2343b07f' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") 0 1.5rem / 1.125rem no-repeat;   /* green tick, centred on the first line */
}

/* ---------- Results ---------- */
.results__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; row-gap: 3rem; }
.results__copy { grid-column: 1 / span 5; }
.results h2 { font-size: var(--step-h2); line-height: 1.02; }
.results__copy > p { max-width: 34em; margin-top: 1.5rem; }

.ledger { margin: 2.5rem 0 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.ledger li { padding: 1rem 0; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.5rem); line-height: 1.2; color: var(--ink-strong); }
.ledger li:last-child { border-bottom: 1px solid var(--line); }

.chart { position: relative; grid-column: 7 / -1; align-self: start; container: chart / inline-size; }

/* Bar chart in HTML: positions are fractions of a 78-week axis, so text stays a fixed size at any width */
.chart__plot { --span: 78; --top: clamp(6rem, 5rem + 2vw, 7.5rem); position: relative; padding-top: var(--top); font-variant-numeric: tabular-nums; }
.chart__label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; line-height: 1.1; color: rgba(238, 243, 246, 0.75); }
.chart__avg { position: absolute; top: 0; left: calc(54 / var(--span) * 100% + 0.75rem); margin: 0; color: var(--gold); }
.chart__avg .chart__label { margin-top: 0.5rem; color: var(--gold); }
.chart__numeral { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 2.6rem + 3.6vw, 6.5rem); line-height: 0.8; letter-spacing: -0.02em; }
.chart__fixed { position: absolute; left: calc(26 / var(--span) * 100% + 0.5rem); bottom: calc(100% - var(--top) + 0.75rem); margin: 0; }
/* Pump axis: sits in the plot's left margin, its line meeting the week axis */
.chart__plot { margin-left: 1.75rem; }
.chart__y {
  position: absolute; top: calc(var(--top) - 0.5rem); bottom: 2rem; right: 100%; width: 1.75rem; margin: 0;
  display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(238, 243, 246, 0.25);
}
.chart__y span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 500; font-size: 0.8125rem; line-height: 1; color: rgba(238, 243, 246, 0.55); white-space: nowrap; }   /* matches the week axis labels */
.chart__rows li::before { content: ""; position: absolute; top: 50%; left: -6px; width: 5px; height: 1px; background: rgba(238, 243, 246, 0.25); }
.chart__rows {
  position: relative; display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none;
  background-image: linear-gradient(90deg, rgba(238, 243, 246, 0.07) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}
.chart__rows::before, .chart__rows::after { content: ""; position: absolute; z-index: 1; bottom: -0.75rem; pointer-events: none; }
.chart__rows::before { top: -0.5rem; left: calc(26 / var(--span) * 100%); border-left: 1.5px dashed rgba(238, 243, 246, 0.55); }
.chart__rows::after { top: calc(-1 * var(--top)); left: calc(54 / var(--span) * 100%); width: 2px; background: var(--gold); }
.chart__rows li { position: relative; height: 1.375rem; }
.bar-base, .bar-ext { position: absolute; top: 0; bottom: 0; }
.bar-base { left: 0; width: calc(26 / var(--span) * 100%); background: rgba(238, 243, 246, 0.12); }
.bar-ext {
  left: calc(26 / var(--span) * 100%); width: calc((var(--v) - 26) / var(--span) * 100%);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 0.375rem;
  background: #5f95b3; transform-origin: 0 50%;
  transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms);
}
.bar-value { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; line-height: 1; color: #0b1820; transition: opacity 400ms var(--ease-out); transition-delay: calc(500ms + var(--i, 0) * 70ms); }
.chart__axis { position: relative; height: 2rem; margin-top: 0.75rem; border-top: 1px solid rgba(238, 243, 246, 0.25); }
.chart__axis span { position: absolute; top: 0.5rem; left: calc(var(--x) / var(--span) * 100%); transform: translateX(-50%); font-family: var(--font-display); font-weight: 500; font-size: 0.8125rem; color: rgba(238, 243, 246, 0.55); white-space: nowrap; }
.chart__axis span:first-child { transform: none; }
.chart__axis span:last-child { transform: translateX(-100%); }
.chart.is-pending .bar-ext { transform: scaleX(0); }
.chart.is-pending .bar-value { opacity: 0; }
@container chart (max-width: 480px) {
  .chart__axis span:nth-child(even) { display: none; }
}


/* ---------- How it works: three cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: clamp(5.5rem, 8vw, 7rem); }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 0 clamp(1.25rem, 2vw, 1.75rem) 2rem;
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
  transition: border-color 280ms ease;
}
.card__visual {
  position: relative; isolation: isolate;
  height: clamp(11rem, 7rem + 7vw, 14rem); margin: -3.5rem -0.25rem 0;
  display: flex; align-items: center; justify-content: center;
}
.card__visual--part::before {
  content: ""; position: absolute; inset: -6% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(77, 135, 164, 0.3), rgba(77, 135, 164, 0) 100%);
  opacity: 0.8; transition: opacity 280ms ease;
}
.card__visual--part img {
  width: min(62%, 16rem); height: auto; max-width: none;
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.6));
}
.card__visual--screen img {
  width: 100%; height: 100%; object-fit: cover; object-position: left top;
  border-radius: var(--radius); border: 1px solid rgba(238, 243, 246, 0.16); box-shadow: var(--shadow-float);
}
/* Simple diagrams for the model and plan cards, in a small floating panel */
.mini {
  width: 92%; padding: 0.5rem 0.625rem;
  background: linear-gradient(180deg, #1c3341 0%, #142530 100%);
  border: 1px solid rgba(125, 169, 194, 0.3); border-radius: 10px; box-shadow: var(--shadow-float);
}
.mini svg { display: block; width: 100%; height: auto; overflow: visible; }
.mini svg text { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; }
.mini__label { fill: var(--ink-muted); }
.mini__band { fill: rgba(125, 169, 194, 0.16); }
.mini__limit { stroke: rgba(238, 243, 246, 0.7); stroke-width: 2; }
.mini__trend { stroke: var(--sapphire-300); stroke-width: 2; stroke-dasharray: 6 5; }
.mini__pt { fill: var(--sapphire-200); stroke: var(--sapphire-300); stroke-width: 2; }
.mini__pt--open { fill: #142530; }
.mini__eol { stroke: var(--ink-strong); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.mini__window { fill: rgba(125, 169, 194, 0.16); stroke: rgba(125, 169, 194, 0.45); stroke-dasharray: 4 4; }
.mini__lane { stroke: rgba(238, 243, 246, 0.09); stroke-width: 1; }
.mini__move { stroke-width: 3; stroke-linecap: round; }
.mini__dot { stroke-width: 0; }
.mini__diamond { fill: #142530; stroke-width: 2.5; }
.mini--out { stroke: #5f95b3; fill: #5f95b3; }
.mini__diamond.mini--out, .mini__diamond.mini--forward { fill: #142530; }
.mini--forward { stroke: #e0705f; fill: #e0705f; }
.mini--ok { fill: #43b07f; }
.card h3 { min-height: 2.3em; margin-top: 1.75rem; font-size: var(--step-h3); line-height: 1.15; }
.card p { margin-top: 0.625rem; font-size: 1rem; line-height: 1.65; }

/* ---------- Software and engineers: text left, the opened pump with one recommendation right ---------- */
.platform__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; row-gap: 3rem; align-items: center; }
.platform__copy { grid-column: 1 / span 5; }
.platform h2 { font-size: var(--step-h2); line-height: 1.02; }
.platform__items { display: grid; gap: 1.5rem; margin-top: 2rem; }
.platform__item { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.platform__item h3 { font-size: var(--step-h3); }
.platform__item p { margin-top: 0.5rem; max-width: 30em; }
.platform__visual { position: relative; grid-column: 6 / -1; display: flex; justify-content: flex-end; margin: 0; padding-bottom: 2.5rem; }
.platform__visual::before {
  content: ""; position: absolute; inset: -24% -16% -14% 2%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(77, 135, 164, 0.5), rgba(77, 135, 164, 0.16) 60%, rgba(77, 135, 164, 0) 100%);
}
.platform__part { width: min(80%, 36rem); filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.6)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }
/* One recommendation, from the platform to the site's decision, floating over the pump */
.rec {
  position: absolute; left: 1.5rem; bottom: 0; width: min(23.5rem, 70%); padding: 1rem 1.25rem 1.125rem;
  background: linear-gradient(180deg, #1c3341 0%, #142530 100%);
  border: 1px solid rgba(125, 169, 194, 0.3); border-radius: 12px; box-shadow: var(--shadow-float);
}
.rec__pump { padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.2; color: var(--ink-strong); }
.rec__steps { display: grid; gap: 0.875rem; margin: 1rem 0 0; }
.rec__step { position: relative; padding-left: 1.5rem; }
.rec__step::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 9px; height: 9px; border-radius: 50%; background: #142530; border: 2px solid var(--sapphire-300); transition: background-color 160ms ease, box-shadow 160ms ease; }
.rec__step:not(:last-child)::after {
  content: ""; position: absolute; left: 4px; top: calc(0.3rem + 11px); bottom: calc(-0.875rem - 0.3rem + 2px); width: 1px;
  background: linear-gradient(var(--sapphire-300), var(--sapphire-300)) top / 1px 0 no-repeat, rgba(125, 169, 194, 0.45);
  transition: background-size 160ms ease;
}
.rec__step--done::before { background: #43b07f; border-color: #43b07f; }
.rec dt { font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; line-height: 1.2; color: var(--ink-muted); }
.rec dd { margin: 0.125rem 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-strong); }

/* ---------- Questions ---------- */
.questions__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
.questions h2 { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 2rem); font-size: var(--step-h2); line-height: 1.02; }
.qa { grid-column: 6 / -1; }
.qa details { border-top: 1px solid var(--line); }
.qa details:last-child { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.5rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem); line-height: 1.2;
  color: var(--ink-strong); transition: color 160ms var(--ease-out);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--sapphire-300), var(--sapphire-300)) center / 14px 2px no-repeat,
    linear-gradient(var(--sapphire-300), var(--sapphire-300)) center / 2px 14px no-repeat;
}
.qa summary::after { transition: background-size 200ms var(--ease-out); }
.qa details[open] summary::after { background-size: 14px 2px, 2px 0; }
.qa details[open] p { animation: qa-reveal 240ms var(--ease-out); }
@keyframes qa-reveal { from { opacity: 0; transform: translateY(-4px); } }
.qa summary:hover { color: var(--sapphire-200); }
.qa details p { max-width: 40em; padding-bottom: 1.75rem; }

/* ---------- Book a demo ---------- */
.book__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; row-gap: 3rem; align-items: center; }
.book__copy { grid-column: 1 / span 6; }
.book h2 { font-size: var(--step-h2); line-height: 1.02; }
.book__copy > p { max-width: 32em; margin-top: 1.5rem; font-size: var(--step-lead); line-height: 1.6; }
.start { margin: 2.5rem 0 0; padding: 0; list-style: none; }
.start li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1.125rem 0; border-top: 1px solid var(--line); }
.start li:last-child { border-bottom: 1px solid var(--line); }
.start__name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.4; color: var(--ink-strong); }
/* Booking card: flat like the other panels on the page, with the same sapphire glow behind it */
.book__panel {
  position: relative; grid-column: 8 / -1;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  background: #16232b; border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
  color: var(--ink);
}
.book__panel::before {
  content: ""; position: absolute; inset: -32% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(77, 135, 164, 0.5), rgba(77, 135, 164, 0.16) 60%, rgba(77, 135, 164, 0) 100%);
}
.book__panel h3 { font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem); line-height: 1.1; color: var(--ink-strong); }
.book__panel p { margin-top: 0.75rem; line-height: 1.65; }
.book__panel .btn { width: 100%; margin-top: 1.75rem; }
.book__panel.has-scheduler { padding: 0; }
.book__panel.has-scheduler [data-scheduler-slot] { overflow: hidden; border-radius: inherit; }   /* clip the calendar here so the glow stays visible */

/* ---------- Footer ---------- */
.site-footer { padding-block: 3.5rem; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: var(--text-small); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.site-footer img { height: 1.625rem; width: auto; }
.site-footer a { color: var(--ink); transition: color 160ms var(--ease-out); }
.site-footer a:hover { color: var(--ink-strong); }
.site-footer__group { display: flex; align-items: center; gap: 0.75rem; }
.site-footer img.site-footer__snef { height: 2.5rem; border-radius: 2px; }
.site-footer__legal { margin-left: auto; }

/* ---------- Tablet ---------- */
@media (max-width: 1099px) {
  .results__copy, .chart { grid-column: 1 / -1; }
  .chart { max-width: 44rem; }
  .platform__copy, .platform__visual { grid-column: 1 / -1; }
  .platform__visual { justify-content: center; width: 100%; max-width: 40rem; margin-inline: auto; }
  .rec { left: 0; }
  .platform__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
  .questions h2 { grid-column: 1 / -1; position: static; margin-bottom: 1.5rem; }
  .qa { grid-column: 1 / -1; }
  .book__copy, .book__panel { grid-column: 1 / -1; }
  .book__panel { max-width: 34rem; }
}

@media (max-width: 1023px) {
  .hero { display: block; min-height: 0; background: radial-gradient(ellipse 110% 55% at 75% 26%, var(--bg-lift) 0%, var(--bg-mid) 52%, var(--bg) 100%); }
  .hero__part { position: relative; top: auto; left: auto; right: auto; transform: none; width: min(86vw, 34rem); margin: calc(var(--header-h) + 0.5rem) auto 0; }
  .hero__part figcaption { position: static; transform: none; margin-top: 0.75rem; }
  .hero__content { padding-top: 2.5rem; padding-bottom: 4.5rem; }
}

@media (max-width: 899px) {
  .card h3 { min-height: 0; }

  .cards { grid-template-columns: 1fr; row-gap: 5rem; max-width: 34rem; }
}

/* ---------- Phone ---------- */
@media (max-width: 759px) {
  :root { --header-h: 4rem; }
  .site-nav { display: none; }
  .site-header .btn { margin-left: auto; }

  .compare, .compare thead, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare { margin: 2.5rem 0 0; }
  .compare thead { display: none; }
  /* Each pair becomes a card: today on top, the Predict answer in a tinted band below */
  .compare tbody { display: grid; gap: 0.875rem; }
  .compare tr { overflow: hidden; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); }
  .compare td, .compare tr:last-child td { padding: 1.125rem 1.25rem; border: 0; }
  .compare td:first-child { font-size: 1rem; }
  .compare td:last-child, .compare tr:last-child td:last-child { padding-left: 3rem; border-top: 1px solid rgba(125, 169, 194, 0.25); background-color: rgba(77, 135, 164, 0.1); background-position: 1.25rem 3rem; }
  .compare td:first-child::before { content: "Today"; display: block; margin-bottom: 0.25rem; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; color: var(--ink-muted); }
  .compare td:last-child::before { content: "With"; display: block; width: fit-content; margin: 0 0 0.25rem -1.75rem; padding-right: 4.5em; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; color: var(--ink-strong); background: url("../img/predict-white.svg") right -0.09em / auto 1.24em no-repeat; }
  .platform__items { grid-template-columns: 1fr; }
  .platform__visual { flex-direction: column; align-items: center; padding-bottom: 0; }
  .platform__part { width: 92%; }
  .rec { position: relative; left: 0; width: auto; align-self: stretch; margin-top: -3rem; padding-inline: 1rem; }
  .rec__step { padding-left: 1.375rem; }
  .start li { grid-template-columns: 1fr; gap: 0.25rem; }
  .site-footer__legal { margin-left: 0; }
}

/* ---------- Motion on hover: only where a mouse can hover, never on keyboard focus ---------- */
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover::after { transform: scaleX(1); }

  /* Cards: the border comes up, and the part's glow with it (no lift) */
  .card:hover { border-color: rgba(125, 169, 194, 0.3); }
  .card:hover .card__visual--part::before { opacity: 1; }

  /* Recommendation: trace it from the platform, through the engineer, to your team's decision */
  .platform__visual:hover .rec__step:not(.rec__step--done)::before { background-color: var(--sapphire-300); }
  .platform__visual:hover .rec__step:not(:last-child)::after { background-size: 1px 100%; transition: background-size 240ms var(--ease-in-out); }
  .platform__visual:hover .rec__step:nth-child(1)::after { transition-delay: 120ms; }
  .platform__visual:hover .rec__step:nth-child(2)::before { transition-delay: 360ms; }
  .platform__visual:hover .rec__step:nth-child(2)::after { transition-delay: 480ms; }
  .platform__visual:hover .rec__step--done::before { box-shadow: 0 0 0 4px rgba(67, 176, 127, 0.24); transition-delay: 720ms; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-ext, .bar-value { transition: none; }
  .btn:active { transform: none; }
  .site-nav a::after, .rec__step::before, .rec__step::after { transition: none !important; }
  .qa details[open] p { animation: qa-fade 200ms ease; }
  @keyframes qa-fade { from { opacity: 0; } }
}
