/* ==========================================================================
   XpressGrow — site design system
   --------------------------------------------------------------------------
   Visual language is borrowed directly from the product's own Command Center:
   near-black canvas, hairline rules, mono eyebrows, tabular numerals,
   green = money, red = risk. Deliberately avoids the generic SaaS-landing
   look (violet gradients, blurred blobs, emoji bullets, centred everything).
   ========================================================================== */

/* ── Fonts (self-hosted; no third-party CDN) ────────────────────────────── */
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("../fonts/jbm-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrainsMono";
  src: url("../fonts/jbm-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────────────────────
   EVERY colour the page uses lives here. themes.css swaps this block wholesale
   via :root[data-theme="…"], so a hard-coded hex anywhere else is a bug: it
   survives the swap and wrecks whichever theme it wasn't chosen for. The
   defaults below ARE the Midnight theme.
   The one deliberate exception is the shelf packs in merch.css — those depict
   real product packaging, which doesn't repaint itself because you picked a
   light UI.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  /* canvas */
  /* --bg-rgb exists because the sticky nav and the sticky page-index are
     translucent: rgba(var(--bg-rgb), .82). Hard-coded as rgba(6,9,15,.82) the
     header stayed Midnight-black on a white theme the moment you scrolled —
     the page looked correct until it didn't. */
  --bg-rgb:    6, 9, 15;
  --bg:        #06090F;
  --bg-2:      #0A0F1A;
  --surface:   #0E1421;
  --surface-2: #131B2B;
  --surface-3: #1A2334;

  /* rules — white-alpha on dark themes, black-alpha on light ones, which is
     why these must be tokens and not literals: rgba(255,255,255,.07) is
     invisible on a white canvas. */
  --line:   rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);
  /* faint panel wash (was a literal rgba(255,255,255,.017) in three places) */
  --fill:   rgba(255, 255, 255, 0.017);
  --fill-2: rgba(255, 255, 255, 0.028);
  /* hover wash on ghost buttons / index links — must invert on light themes or
     it is a white smear on white. */
  --hover:  rgba(255, 255, 255, 0.05);

  /* ink */
  --ink:   #EAEEF7;
  --ink-2: #9AA5BB;
  --ink-3: #616C81;
  --ink-4: #3D4657;

  /* meaning — used ONLY for meaning, never decoration.
     The -rgb triplets exist so alpha variants (glows, soft fills, focus rings)
     can be composed per theme: rgba(var(--brand-rgb), .16). Literal
     rgba(46,107,255,.16) survives a theme swap and paints a blue glow on a
     terracotta page — which is exactly what Parchment did. Triplets rather
     than color-mix() so this keeps working on older browsers instead of
     silently dropping the effect. */
  --brand-rgb: 46, 107, 255;
  --money-rgb: 22, 199, 132;
  --risk-rgb:  255, 77, 94;
  --warn-rgb:  255, 162, 58;
  --brand:      #2E6BFF;
  --brand-soft: rgba(46, 107, 255, 0.14);
  --brand-line: rgba(46, 107, 255, 0.35);
  --brand-hi:   #4480ff;   /* button hover */
  --brand-ink:  #7FA8FF;   /* brand-tinted icon/glyph on a soft brand fill */
  --money:      #16C784;
  --money-soft: rgba(22, 199, 132, 0.12);
  --money-a:    #1FD891;   /* money fill gradient */
  --money-b:    #12B274;
  --risk:       #FF4D5E;
  --risk-soft:  rgba(255, 77, 94, 0.12);
  --risk-a:     #FF5F6E;   /* risk fill gradient */
  --risk-b:     #E23445;
  --warn:       #FFA23A;

  /* text ON a filled swatch. #fff is right on a blue button in every theme so
     far, but a pale-brand theme would need dark ink here — hence a token. */
  --on-brand: #fff;
  --on-money: #04120C;
  --on-risk:  #fff;

  /* the hero wordmark gradient */
  --accent-a: #4E86FF;
  --accent-b: #5CC8FF;

  /* the rebuilt product consoles (hero, phone, voice, doctor, lens, arch) —
     these are a *panel* colour, distinct from --surface, because they read as
     an inset device screen rather than page furniture. */
  --console-a: #0C1526;
  --console-b: #080D18;
  --shelf-a:   #10182a;   /* ShelfLens shelf stripes */
  --shelf-b:   #0b1220;

  /* Ink and rules INSIDE a console. Separate from --ink because a console
     stays dark on a light theme — it's a device screen. Using --ink there put
     near-black text on a near-black panel and the hero's headline number
     vanished completely on Daylight. These stay light in every theme; the
     .console/.phone/... rule below rebinds --ink/--line to them locally, so
     every child picks it up without touching a single component rule. */
  --console-ink:   #EAEEF7;
  --console-ink-2: #9AA5BB;
  --console-ink-3: #616C81;
  --console-ink-4: #3D4657;
  --console-line:   rgba(255, 255, 255, 0.07);
  --console-line-2: rgba(255, 255, 255, 0.13);
  --console-line-3: rgba(255, 255, 255, 0.22);
  --console-fill:   rgba(255, 255, 255, 0.017);

  /* elevation — near-black is right under a dark canvas and a smudge under a
     light one, so shadows are themed too. */
  --shadow:      rgba(0, 0, 0, 0.85);
  --shadow-deep: rgba(0, 0, 0, 0.9);
  --shadow-soft: rgba(0, 0, 0, 0.6);

  /* type */
  --sans: "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrainsMono", "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
          "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  /* metrics */
  --page:   1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-sm: 9px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.1; }
p { margin: 0; }
::selection { background: var(--brand); color: var(--on-brand); }

/* Numbers are data — always tabular so columns line up and digits don't jitter. */
.num, table td, .tile-val, .metric-val { font-variant-numeric: tabular-nums; }

/* ── Console scope ──────────────────────────────────────────────────────────
   A console is a dark device screen embedded in the page, and it stays dark on
   light themes. Rebinding the ink/line tokens LOCALLY means every descendant
   that says var(--ink-3) or var(--line) resolves to the console's palette
   automatically — no component rule has to know it lives inside a console, and
   a new console gets it for free by adding its selector here.
   Without this, Daylight rendered near-black text on the near-black console:
   the hero's "QAR 17.6k", every tile value and the whole Action Queue were
   invisible while the page looked, at a glance, fine.
   ────────────────────────────────────────────────────────────────────────── */
.console, .phone, .lensbox, .voice, .doc, .arch, .lens,
.tkt, .ordc, .stopc, .audc, .camv, .vcb {
  --ink:   var(--console-ink);
  --ink-2: var(--console-ink-2);
  --ink-3: var(--console-ink-3);
  --ink-4: var(--console-ink-4);
  --line:   var(--console-line);
  --line-2: var(--console-line-2);
  --line-3: var(--console-line-3);
  --fill:   var(--console-fill);
  color: var(--ink);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(72px, 10vw, 132px); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

/* ── Type primitives ────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line-3);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.display {
  font-size: clamp(2.4rem, 6.2vw, 4.35rem);
  letter-spacing: -0.035em;
  line-height: 1.03;
  font-weight: 620;
}
.h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.h3 { font-size: clamp(1.12rem, 1.7vw, 1.32rem); letter-spacing: -0.02em; }
.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  color: var(--ink-2);
  line-height: 1.66;
  max-width: 62ch;
}
.muted { color: var(--ink-2); }
.dim   { color: var(--ink-3); }
.money { color: var(--money); }
.risk  { color: var(--risk); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--on-brand);
  font-size: 0.94rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--brand-hi); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--hover); border-color: var(--line-3); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow, .lnk:hover .arrow { transform: translateX(3px); }

.lnk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease);
}
.lnk:hover { color: var(--ink); }

/* ── Surfaces ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.card--hover:hover { border-color: var(--line-2); background: var(--surface-2); }

/* Hairline grid backdrop — a data-console texture, not decoration for its own sake */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--fill-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--fill-2) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 62% at 50% 34%, #000 35%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 80% 62% at 50% 34%, #000 35%, transparent 76%);
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              backdrop-filter 0.25s var(--ease);
}
.nav.is-stuck {
  background: rgba(var(--bg-rgb), 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-in {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links a {
  font-size: 0.9rem;
  color: var(--ink-2);
  transition: color 0.16s var(--ease);
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
/* .nav-links a is more specific than .btn, so without this the nav CTA
   renders in the link colour on top of the brand fill — invisible on any
   theme whose --ink-2 is dark. It looked fine on Midnight by luck. */
.nav-links a.nav-cta { color: var(--on-brand); }
.nav-cta { margin-left: 4px; }

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

/* ── Brand mark ─────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-name {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.028em;
}
.brand-name em { font-style: normal; color: var(--ink-3); font-weight: 500; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-block: 64px 44px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
  padding-block: 6px;
  transition: color 0.16s var(--ease);
}
.footer-col a:hover { color: var(--ink); }
.footer-base {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-3);
  flex-wrap: wrap;
}

/* ── Placeholder marker ─────────────────────────────────────────────────
   Company facts we do not have yet. Deliberately loud so nothing false can
   ship unnoticed. Remove the class once the real value is filled in.        */
.ph {
  display: inline-block;
  justify-self: start;      /* never stretch to fill a grid track */
  background: rgba(var(--warn-rgb), 0.13);
  border-bottom: 1px dashed var(--warn);
  color: var(--warn);
  padding: 0 4px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.86em;
}

/* ── Spacing utilities ──────────────────────────────────────────────────
   These exist so the markup carries no style="" attributes. The Content
   Security Policy sets `style-src 'self'` with no 'unsafe-inline', which
   blocks inline style attributes outright — a strict CSP is only worth
   having if the site doesn't need an exception carved out of it.          */
.u-mt-xs { margin-top: 14px; }
.u-mt-s  { margin-top: 24px; }
.u-mt-m  { margin-top: 30px; }
.u-mt-l  { margin-top: 38px; }
.u-mt-xl { margin-top: 44px; }
.u-mb-s  { margin-bottom: 14px; }
.u-flush-top { border-top: 0; }

/* ── Reveal on scroll ───────────────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-block: 1px solid var(--line);
    padding: 10px var(--gutter) 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding-block: 13px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .burger { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
