/* ==========================================================
   heyXpert — landing page styles
   ========================================================== */

:root {
  --navy-900: #0f1a26;
  --navy-800: #14212f;
  --navy-700: #1b2b3c;
  --slate-600: #3a5266;
  --slate-500: #4a6479;
  --slate-400: #6c8698;
  --mist-200: #c9d4dc;
  --mist-100: #e6ecf0;
  --sand-400: #b3a184;
  --sand-300: #c8b899;
  --sand-200: #dccfb6;
  --yellow: #fbc024;          /* heyXpert brand yellow */
  --yellow-dark: #e0a90f;
  --logo-ink: #101f2b;        /* logo text on light surfaces */
  --white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --line: rgba(251, 192, 36, 0.55);

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 6px;
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  /* Keep focused or linked-to content clear of the sticky header (WCAG 2.4.11) */
  scroll-padding-top: 88px;
}

/* Keyboard focus: a clear brand-yellow ring; dark ring on light sections */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.how :focus-visible,
main:focus { outline: none; }

/* Skip link: hidden until it receives keyboard focus */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--white);
  background: var(--navy-800);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Logo ---------- */
/* The logo is the exact artwork from "heyXpert Logo.svg" (Manrope, outlined),
   embedded once as <symbol id="logo"> in index.html.
   - The wordmark uses currentColor: white on dark surfaces, dark navy on
     light ones. Force it with .logo--on-dark / .logo--on-light.
   - The star is always brand yellow #FBC024.
   Size it with font-size: the capital X is ~0.72em tall, like text. */
.logo {
  display: inline-block;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}
.logo-mark {
  display: inline-block;
  height: 1.57em;
  width: auto;
  aspect-ratio: 1089 / 345;
  vertical-align: -0.241em;   /* puts the wordmark on the text baseline */
}
.logo--on-dark { color: var(--white); }
.logo--on-light { color: var(--logo-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 500 0.85rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--yellow); color: var(--navy-900); }
.btn-primary:hover { background: var(--yellow-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 26, 38, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); border-color: var(--white); }
.nav-actions { display: flex; gap: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
  padding: 6px;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-800);
  padding: 96px 0 110px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero .logo { font-size: clamp(2.6rem, 5vw, 3.6rem); margin: 0 0 22px; }

/* Hero star intro, matching the end of the promo films: the star pops in turned
   45deg (a "+" sparkle) with a small bounce, holds for a moment, then snaps into place.
   html.star-intro is set in <head> before first paint (every home page load,
   never with reduced motion); script.js starts the animation. */
.hero-star { transform-box: fill-box; transform-origin: 50% 50%; }
/* The turned star sticks out past the logo's box: let it show instead of being clipped */
.hero .logo-mark { overflow: visible; }
.star-intro .hero-star { transform: rotate(-45deg) scale(0); }
.star-intro .hero-star.is-falling { animation: hx-star-intro 1.15s forwards; }
@keyframes hx-star-intro {
  0%   { transform: rotate(-45deg) scale(0);    animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  14%  { transform: rotate(-45deg) scale(1.15); animation-timing-function: ease-in-out; }   /* pop, ~0.16s */
  21%  { transform: rotate(-45deg) scale(1); }                                             /* settle */
  80%  { transform: rotate(-45deg) scale(1);    animation-timing-function: cubic-bezier(.5, 0, .3, 1); } /* hold ~0.7s */
  100% { transform: rotate(0deg) scale(1); }                                               /* snap into place, ~0.23s */
}
@media (prefers-reduced-motion: reduce) {
  .star-intro .hero-star { transform: none; animation: none; }
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 440px;
  margin: 0 0 32px;
  text-wrap: pretty;   /* avoid a single word alone on the last line */
}
/* Brand line above the descriptive H1 */
.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 14px;
}
.hero-points { list-style: none; padding: 0; margin: -12px 0 32px; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.98rem; }
.hero-points svg {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  fill: none; stroke: var(--yellow); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.hero-cta { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: center; }
/* Lower-weight action: a text link, not a second button */
.hero-link {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  padding: 10px 0;
}
.hero-link:hover { text-decoration-color: var(--yellow); }

/* ---------- Hero chat animation (from heyxpert-chat-animation.html) ---------- */
.hero-chat {
  position: relative;
  justify-self: end;
  width: min(440px, 100%);
}
.hx-chat {
  --hx-bg: var(--navy-800);  /* must match the hero background (tail cut-out) */
  --hx-line: #6b8a9b;
  --hx-text: #ffffff;
  --hx-border: 4px;
  width: 100%;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 8px 0 40px;
}
.hx-bubble {
  position: relative;
  width: min(350px, 82%);
  padding: 14px 28px 18px;
  border: var(--hx-border) solid var(--hx-line);
  border-radius: 10px;
  background: var(--hx-bg);
  color: var(--hx-text);
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .3, 1.2);
}
.hx-bubble.is-visible { opacity: 1; transform: none; }
.hx-user { transform-origin: 30px 100%; }
.hx-bot  { margin-left: auto; transform-origin: calc(100% - 30px) 100%; }

/* The tail starts exactly at the top of the bubble's bottom border. Its lines
   run up into the border and are clipped at the border's top edge, so the
   joins are seamless; the fill erases the border inside the tail opening. */
.hx-tail {
  position: absolute;
  top: 100%;
  width: 36px;
  height: 34px;
  overflow: visible;
}
.hx-user .hx-tail { left: 26px; }
.hx-bot  .hx-tail { right: 26px; transform: scaleX(-1); }
.hx-tail-fill { fill: var(--hx-bg); }
.hx-tail-line { fill: none; stroke: var(--hx-line); stroke-width: var(--hx-border); stroke-linejoin: miter; }

.hx-name {
  display: flex;
  align-items: flex-start;
  font: 400 10px/1.2 var(--font-sans);
  margin-bottom: 6px;
}
/* Real heyXpert logo at label size; beats the big ".hero .logo" rule */
.hero .hx-logo { font-size: 11px; margin: 0; }

.hx-msg {
  position: relative;
  font: italic 400 13.5px/1.3 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .02em;
  min-height: 1.3em;
}
.hx-ghost { visibility: hidden; }
.hx-typed { position: absolute; inset: 0; }
.hx-caret::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--hx-line);
  animation: hx-blink .9s steps(1) infinite;
}
@keyframes hx-blink { 50% { opacity: 0; } }

.hx-bot .hx-msg { height: 1.3em; transition: height .3s ease; overflow: hidden; }
.hx-dots { position: absolute; left: 0; top: 0; display: flex; gap: .45em; padding-top: .55em; transition: opacity .15s; }
.hx-dots span { width: 3px; height: 3px; border-radius: 50%; background: var(--hx-text); animation: hx-dot 1s ease-in-out infinite; }
.hx-dots span:nth-child(2) { animation-delay: .15s; }
.hx-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes hx-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.hx-bot:not(.is-thinking) .hx-dots { opacity: 0; }

/* Paused: freeze the blinking caret and the dots too */
.hx-chat.is-paused .hx-caret::after,
.hx-chat.is-paused .hx-dots span { animation-play-state: paused; }

/* Pause / play control (WCAG 2.2.2) */
/* Round, centred pause / play button, matching the videos (WCAG 2.2.2).
   Shows while the pointer is over the animation or the button has keyboard
   focus. Touch screens can't hover, so there it shows while paused, and
   tapping the animation pauses / resumes it. */
.hero-chat .hx-chat { cursor: pointer; }
.hx-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(15, 26, 38, 0.7);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: background 0.2s, opacity 0.25s;
}
.hero-chat:hover .hx-toggle,
.hx-toggle:focus-visible { opacity: 1; }
@media (hover: none) {
  .hx-toggle[aria-pressed="true"] { opacity: 1; }
}
.hx-toggle:hover { background: rgba(15, 26, 38, 0.9); }
.hx-toggle svg { width: 26px; height: 26px; display: block; }
.hx-toggle .icon-play,
.hx-toggle[aria-pressed="true"] .icon-pause { display: none; }
.hx-toggle[aria-pressed="true"] .icon-play { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hx-bubble, .hx-bot .hx-msg { transition: none; }
  .hx-caret::after, .hx-dots span { animation: none; }
  .hx-toggle { display: none; }   /* nothing moves, so nothing to pause */
}

/* ---------- Section basics ---------- */
.section { padding: 96px 0; scroll-margin-top: 72px; }
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 400;
  margin: 0 0 18px;
}
.section-rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0 0 56px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 10px;
}

/* ---------- Roles (Operator / Expert) ---------- */
.roles { background: var(--slate-600); }
.role + .role { margin-top: 110px; }
/* Video takes two thirds, the points one third */
.role-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: center;
}
.role-grid.reverse { grid-template-columns: 1fr 2fr; }
.role-grid.reverse .role-media { order: 2; }
.roles-intro { text-align: center; margin: 0 auto 72px; max-width: 620px; }
.roles-lead { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.45; margin: 0; }
.role-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.role-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.role-points strong { color: var(--white); font-weight: 600; }
.role-points svg {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  fill: none; stroke: var(--yellow); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

/* Photo placeholders — swap the inner SVG for an <img> */
.photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(251, 192, 36, 0.18), transparent 55%),
    linear-gradient(135deg, var(--navy-700), var(--slate-500));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Video frames (Operator / Expert) */
.video-frame { aspect-ratio: 16 / 9; background: var(--navy-900); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sound-toggle,
.play-pause,
.fullscreen-toggle {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 26, 38, 0.7);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, opacity 0.25s;
}
.sound-toggle {
  right: 54px;                         /* leaves room for the full-screen button */
  bottom: 26px;                        /* sits above the scrubber */
  font: 0.7rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  height: 34px;
  padding: 0 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0;
  transition: background 0.2s, gap 0.2s;
}
/* Icon only; the label slides out on hover or keyboard focus. It stays in the
   page (just clipped), so screen readers and voice control still get
   "Turn sound on/off" as the button's name. */
.sound-toggle span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.25s ease, opacity 0.2s;
}
.sound-toggle:hover,
.sound-toggle:focus-visible { gap: 6px; }
.sound-toggle:hover span,
.sound-toggle:focus-visible span { max-width: 12em; opacity: 1; }
.sound-toggle svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle .icon-sound,
.sound-toggle.is-on .icon-muted { display: none; }
.sound-toggle.is-on .icon-sound { display: block; }
/* One play / pause button in the centre (WCAG 2.2.2). It shows while the
   pointer is over the video or the button has keyboard focus. Touch screens
   can't hover, so there it shows whenever the video is stopped. Clicking or
   tapping the video itself also plays and pauses. */
.play-pause {
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.video-frame:hover .play-pause,
.play-pause:focus-visible { opacity: 1; }
@media (hover: none) {
  .video-frame.idle .play-pause { opacity: 1; }
}
/* Triangle is drawn optically centred inside its own 24×24 box */
.play-pause svg { width: 26px; height: 26px; display: block; }
.play-pause .icon-pause,
.play-pause.is-playing .icon-play { display: none; }
.play-pause.is-playing .icon-pause { display: block; }
.video-frame video { cursor: pointer; }
.sound-toggle:hover,
.play-pause:hover,
.fullscreen-toggle:hover { background: rgba(15, 26, 38, 0.9); }
/* Full-screen button, bottom-right corner, same style as the sound button */
.fullscreen-toggle {
  right: 12px;
  bottom: 26px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-toggle[hidden] { display: none; }
/* Scrubber along the bottom: a thin progress bar in the spark yellow that thickens
   and shows a handle and the time on hover, keyboard focus or while dragging.
   The 20px-tall input is the hit area; the bar is drawn as a background on it. */
.scrub {
  --p: 0%;
  --bar: 4px;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  width: calc(100% - 16px);
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: none;
}
.scrub::-webkit-slider-runnable-track {
  height: 20px;
  border-radius: 2px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 50% / var(--p) var(--bar) no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)) 0 50% / 100% var(--bar) no-repeat;
  transition: background-size 0.15s;
}
.scrub::-moz-range-track {
  height: 20px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 50% / var(--p) var(--bar) no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)) 0 50% / 100% var(--bar) no-repeat;
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;                     /* (20 - 14) / 2: centred on the bar */
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  transform: scale(0);
  transition: transform 0.15s;
}
.scrub::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  transform: scale(0);
  transition: transform 0.15s;
}
.scrub:hover,
.scrub:focus-visible,
.is-scrubbing .scrub { --bar: 6px; }
.scrub:hover::-webkit-slider-thumb,
.scrub:focus-visible::-webkit-slider-thumb,
.is-scrubbing .scrub::-webkit-slider-thumb { transform: scale(1); }
.scrub:hover::-moz-range-thumb,
.scrub:focus-visible::-moz-range-thumb,
.is-scrubbing .scrub::-moz-range-thumb { transform: scale(1); }
.scrub:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; border-radius: 4px; }
.scrub-time {
  position: absolute;
  left: 12px;
  bottom: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(15, 26, 38, 0.8);
  color: var(--white);
  font: 0.7rem var(--font-mono);
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.scrub:hover + .scrub-time,
.scrub:focus-visible + .scrub-time,
.is-scrubbing .scrub-time { opacity: 1; }
/* Touch screens can't hover: show the handle whenever the video is stopped */
@media (hover: none) {
  .video-frame.idle .scrub { --bar: 6px; }
  .video-frame.idle .scrub::-webkit-slider-thumb { transform: scale(1); }
  .video-frame.idle .scrub::-moz-range-thumb { transform: scale(1); }
}
.fullscreen-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-toggle .icon-fs-exit,
.fullscreen-toggle.is-fs .icon-fs-enter { display: none; }
.fullscreen-toggle.is-fs .icon-fs-exit { display: block; }
/* In full screen, show the whole film (no cropping) on black.
   Kept as two rules: an unknown selector would void a combined rule. */
.video-frame:fullscreen { aspect-ratio: auto; background: #000; border-radius: 0; }
.video-frame:fullscreen video { object-fit: contain; }
.video-frame:-webkit-full-screen { aspect-ratio: auto; background: #000; border-radius: 0; }
.video-frame:-webkit-full-screen video { object-fit: contain; }

.photo-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- How it works ---------- */
.how {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, #8fa3b2 0%, #a9b8c3 45%, #93a7b5 100%);
  color: var(--navy-900);
}
.how-head { text-align: center; margin-bottom: 56px; }
.how .eyebrow { color: var(--navy-900); }
.how-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.how-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

/* Steps as a timeline: a line joins the numbered circles */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 30px 56px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--navy-900);
  border-radius: 50%;
  background: #a9b8c3;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-900);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17.25px;
  top: 36px;
  bottom: 0;
  width: 1.5px;
  background: rgba(15, 26, 38, 0.35);
}
/* The step the phone screenshot shows */
.steps li.is-shown::before { background: var(--navy-900); color: var(--yellow); }
.steps h3 { font-size: 1.25rem; font-weight: 600; margin: 4px 0 4px; }
.steps p { margin: 0; font-size: 0.95rem; color: rgba(15, 26, 38, 0.82); max-width: 460px; }

/* App screenshot (iPhone) + caption tying it to step 3 */
.phone { width: min(320px, 80%); margin: 0 auto; }  /* fits 320px screens (WCAG 1.4.10) */
.phone img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 40px 50px rgba(15, 26, 38, 0.45));
}
.phone figcaption {
  margin-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(15, 26, 38, 0.85);
}
.phone-step {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.try-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* Apple's official "Download on the App Store" badge (images/app-store-badge.svg) */
.store-badge { display: inline-block; line-height: 0; border-radius: 8px; }
.store-badge img { height: 48px; width: auto; }
.store-badge:hover img { opacity: 0.85; }

.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.qr svg.qr-code {
  width: 126px;
  height: 126px;
  background: var(--white);
  padding: 6px;
  border-radius: 4px;
}

@media (max-width: 960px) {
  .how-head { margin-bottom: 40px; }
  /* Steps first, then a smaller phone, so the process is visible straight away */
  .how-grid .phone { order: 2; width: min(240px, 70%); }
}
@media (max-width: 640px) {
  .qr { display: none; }              /* can't scan your own screen */
}


/* ---------- Security cards (used by Secure and ready for enterprise) ---------- */
.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 48px;
  max-width: 560px;
}
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.security-item {
  padding: 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.security-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(251, 192, 36, 0.12);
  color: var(--yellow);
}
.security-icon svg { width: 30px; height: 30px; }
.security-grid h3 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.security-grid p {
  font-family: var(--font-sans);   /* readable body text */
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.security-grid p strong { color: var(--white); font-weight: 600; }
.security-links {
  margin: 36px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.security-links a { color: var(--white); text-decoration-color: var(--yellow); text-underline-offset: 3px; margin: 0 4px; }
.security-links a:hover { color: var(--yellow); }
@media (max-width: 960px) {
  .security-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .security-grid { grid-template-columns: 1fr; }
}

/* ---------- Benefits ---------- */
.benefits { background: var(--navy-800); }
.benefits .section-title { margin-bottom: 18px; }
.benefits .section-title .logo { font-size: inherit; vertical-align: baseline; }
.benefit-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.benefit { text-align: left; }
.benefit-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(251, 192, 36, 0.14);
  color: var(--yellow);
}
.benefit-icon svg { width: 22px; height: 22px; }
.benefit-icon { margin-bottom: 16px; }
.benefit h3 { font-size: 1.12rem; font-weight: 600; margin: 0 0 8px; }
.benefit p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.55; margin: 0; }

.benefits-cta {
  margin: 56px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  font-size: 1.1rem;
  color: var(--white);
}

@media (max-width: 960px) {
  .benefit-row { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
}
@media (max-width: 560px) {
  .benefit-row { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Plans ---------- */
.plans { background: var(--navy-800); }
.plan-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}
.plans .section-title { margin-bottom: 12px; }
.try-yourself {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 32px 26px 28px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
}
.try-yourself h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 18px; }
.mini-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-plan {
  padding: 16px;
  border-radius: 8px;
  background: var(--navy-700);
}
.mini-plan h4 { font-size: 1rem; font-weight: 600; margin: 0 0 2px; }
.mini-plan .mini-meta { font-size: 0.8rem; color: var(--yellow); margin: 0 0 8px; }
.mini-plan p { font-size: 0.86rem; line-height: 1.5; color: var(--text-muted); margin: 0; }
.try-note { font-size: 0.86rem; color: var(--text-muted); margin: 16px 0 24px; }
.try-yourself .try-actions { margin-top: auto; flex-wrap: wrap; }
@media (max-width: 480px) {
  .mini-plans { grid-template-columns: 1fr; }
  .try-yourself { padding: 28px 20px 24px; }
}
/* All cards share one style and the same border width, so their titles line
   up; Enterprise is singled out by colour, not by a different shape. */
.plan {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 36px 26px 28px;
  background: var(--navy-700);
  color: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.6); }
.plan.enterprise {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(251, 192, 36, 0.15), 0 24px 48px -28px rgba(251, 192, 36, 0.35);
}
.plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy-900);
  font: 700 0.7rem/1.2 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan h3 {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.plan-price {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 6px;
}
.plan .plan-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  min-height: 3.1em;          /* room for two lines, keeps feature rows aligned */
}
.plan-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  font-size: 0.88rem;
  flex: 1;
}
.plan-features li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.plan-features li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.plan-features .val { font-weight: 600; text-align: right; }
.plan-features li.no { color: var(--text-muted); }
.plan-features li.no .val { font-weight: 400; }
.plan .btn { align-self: stretch; }

/* Screen-reader-only text (used for ✓ / – in the plan rows) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Secure and ready for enterprise ---------- */
.enterprise-section {
  background: var(--navy-900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.enterprise-section .eyebrow { text-align: center; }
.enterprise-section .section-title { margin-bottom: 12px; }
.enterprise-section .section-lead { max-width: 640px; }
@media (min-width: 961px) {
  .enterprise-section .security-grid { grid-template-columns: repeat(3, 1fr); }
}
.enterprise-section .benefits-cta { margin-top: 40px; }

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(180deg, var(--slate-600), var(--slate-500));
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
.contact .photo { aspect-ratio: 3 / 2; }
.form-card {
  background: var(--navy-800);
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.form-card h2 { text-align: center; font-weight: 500; font-size: 1.6rem; margin: 0 0 4px; }
.form-card > p { text-align: center; color: var(--text-muted); font-size: 0.88rem; margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--mist-100);
  color: var(--navy-900);
  font: 0.92rem var(--font-sans);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(251, 192, 36,0.3); }
.form-card .btn { width: 60%; margin: 12px auto 0; display: flex; }
.field .req { color: var(--text-muted); font-size: 0.9em; }
.field input[aria-invalid="true"] { border-color: var(--yellow); }
.form-status { text-align: center; font-size: 0.85rem; color: var(--yellow); min-height: 1.3em; margin: 12px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-800); padding: 56px 0 40px; }
/* Logo + copyright on the left, stacked link menu on the right */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer-top { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-top .logo { font-size: clamp(2.5rem, 14vw, 4rem); }  /* 4rem = double size; shrinks on small phones */
.footer-top small { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
/* Space Mono draws © as a tiny superscript; use Manrope's full-size © so it
   matches the height of the digits. */
.footer-top .copy-mark { font-family: var(--font-sans); font-size: 0.98em; line-height: 1; }
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--white); }

/* Footer "Cookies" is a button (it opens the cookie pop-up) styled like the links */
.footer-link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--white); }

/* ---------- Cookie notice (no tracking, so no consent choices) ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: var(--navy-900);
  color: var(--white);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.cookie-banner h2:focus { outline: none; }
.cookie-banner p { margin: 0 0 16px; font-size: 0.9rem; color: var(--text-muted); }
.cookie-banner p a { color: var(--white); }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cookie-btn {
  padding: 10px 28px;
  background: var(--white);
  color: var(--navy-900);
  font-weight: 600;
}
.cookie-btn:hover { background: var(--mist-200); }
.cookie-btn[hidden] { display: none; }

/* ---------- Text pages (About, Terms, Privacy, Data Ethics) ---------- */
.page-hero {
  background: var(--navy-800);
  padding: 88px 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin: 0; }
.page-meta { margin-top: 18px !important; font-family: var(--font-mono); font-size: 0.8rem !important; }

.page-body { background: var(--slate-600); padding: 64px 0 96px; }
/* Comfortable reading width, but left-aligned with the page title */
.prose > * { max-width: 720px; }
.prose h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 48px 0 12px;
  scroll-margin-top: 96px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin: 28px 0 8px; }
.prose p,
.prose li { color: rgba(255, 255, 255, 0.86); font-size: 1rem; line-height: 1.7; }
.prose p { margin: 0 0 14px; }
.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--white); text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.prose a:hover { color: var(--yellow); }
.prose strong { color: var(--white); }
.prose blockquote {
  margin: 0 0 18px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--yellow);
}
.prose blockquote p { font-style: italic; }
.prose blockquote p:last-child { font-style: normal; font-size: 0.9rem; color: var(--text-muted); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 0.92rem; }
.prose th,
.prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.prose th { color: var(--white); font-weight: 600; }
.prose td { color: rgba(255, 255, 255, 0.86); }
.table-scroll { overflow-x: auto; }

/* Draft notice + [placeholders] on the legal pages */
/* Highlighted safety notice in the Terms of Use */
.legal-callout {
  border-left: 3px solid var(--yellow);
  background: rgba(15, 26, 38, 0.35);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 32px;
}
.legal-callout p { margin: 0; }
.legal-footnote { margin-top: 48px; font-size: 0.85rem; color: var(--text-muted); }
.draft-note {
  margin: 0 0 40px;
  padding: 16px 18px;
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  background: rgba(15, 26, 38, 0.45);
  color: var(--white);
  font-size: 0.92rem;
}
.draft-note strong { color: var(--yellow); }
.ph {
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(251, 192, 36, 0.18);
  color: #ffe08a;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.page-cta {
  margin-top: 56px;
  padding: 28px;
  border-radius: 12px;
  background: var(--navy-800);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-cta p { margin: 0; color: var(--white); font-size: 1.1rem; }

/* ---------- Support page ---------- */
.support-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 8px 0 20px;
}
.support-card {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(15, 26, 38, 0.35);
}
.prose .support-card h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.prose .support-card p { margin: 0; font-size: 1.05rem; }
.prose .support-card a { word-break: break-all; }
.prose .btn-primary { color: var(--navy-900); text-decoration: none; }
.prose .btn-primary:hover { color: var(--navy-900); }
.support-tip {
  padding: 14px 16px;
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  background: rgba(15, 26, 38, 0.35);
}

/* About: founder quote and "Powered by Virsabi" */
.prose .founder { margin: 0 0 28px; }
.prose .founder blockquote { margin: 0 0 12px; }
.prose .founder blockquote p { margin: 0; font-style: italic; font-size: inherit; color: inherit; }
.founder figcaption { padding-left: 23px; font-size: 0.92rem; color: var(--text-muted); }
.founder figcaption strong { color: var(--white); font-weight: 600; }
.powered-by {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(15, 26, 38, 0.35);
}
/* The logo is made for a white background, so it sits on a white tile */
.powered-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 128px;
  height: 104px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
}
.powered-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.prose .powered-by h3 { margin: 0 0 6px; font-size: 1.1rem; }
.prose .powered-by p { margin: 0; color: var(--text-muted); }
@media (max-width: 560px) {
  .powered-by { flex-direction: column; align-items: flex-start; }
}

/* Support: FAQ group headings */
.prose h3.faq-group {
  margin: 36px 0 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  scroll-margin-top: 88px;
}
.prose h2#contact-us { margin-top: 64px; }

/* FAQ: native <details>, so it works with keyboard and screen readers */
.faq { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.faq summary {
  position: relative;
  display: block;
  padding: 18px 44px 18px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--yellow);
  border-bottom: 2px solid var(--yellow);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--yellow); }
.faq summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.faq details > p { margin: 0 0 20px; padding-right: 44px; }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links,
  .site-header.open .nav-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    background: var(--navy-900);
    padding: 20px 24px;
    gap: 18px;
  }
  .site-header.open .nav-links { top: 72px; }
  .site-header.open .nav-actions { top: 250px; flex-direction: row; padding-top: 0; }

  .hero-grid,
  .role-grid,
  .how-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .role-grid.reverse { grid-template-columns: 1fr; }
  .role-grid.reverse .role-media { order: 0; }
  .hero-chat { justify-self: start; }
  .how-grid { gap: 56px; }
  .plan-layout { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 72px; }
  .hero .logo { display: none; }   /* the header already shows the logo; saves room on phones */
  .container { padding: 0 16px; }
  .form-card { padding: 32px 22px; }
  .form-card .btn { width: 100%; }
  .footer-inner { flex-direction: column; gap: 32px; }
}

/* Contact form honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
