/* ==========================================================================
   Risenex home page (index.html only).
   Hand-written source, linked directly by index.html; not part of the
   css/styles.css -> css/pages/ split. The shared header, mobile menu and
   footer keep their styles from css/pages/index.css.

   Motion contract:
   - The CSS load intro (hero words, marquee) runs inside
     @media (min-width: 768px) and (prefers-reduced-motion: no-preference).
   - html.hm-motion  set in <head> under the same conditions (and no data
                     saver); gates loading GSAP, Lenis and js/home.min.js.
   - html.hm-js      set by js/home.js once GSAP is running. Enables the
                     scroll-driven states (pinning, dim/active steps, tilt).
   Without either class every section is static and fully visible.
   ========================================================================== */

/* The Instrument Serif @font-face is inline in index.html's <head>, so its
   URL is content-stamped like the preload that fetches it. */

.hm-page {
  --royal: #1f4fb8;
  --royal-2: #2a5fd0;
  --royal-hi: #5b8ff5;
  --royal-deep: #143a8a;
  --navy: #0a1a3a;
  --navy-2: #0f2552;
  --ink: #0b1630;
  --text: #3b475b;
  --muted: #5b6779;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --line: rgba(11, 22, 48, 0.08);
  --line-2: rgba(11, 22, 48, 0.14);
  --gold: #c08a1e;
  --gold-text: #8f6210;
  --gold-grad: linear-gradient(110deg, #7f4f08 0%, #b8801f 12%, #e9bd5c 22%, #fff2c7 30%, #f0c766 37%, #c08a1e 50%, #9c6510 58%, #e4b453 70%, #fbe3a1 77%, #cf9a35 86%, #8a560a 100%); /* metallic: same as css/work.css */
  --gold-sheen: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 249, 226, 0.75) 46%, rgba(255, 240, 200, 0.3) 54%, rgba(255, 255, 255, 0) 68%);
  --royal-grad: linear-gradient(140deg, #2a5fd0 0%, #1f4fb8 40%, #143a8a 100%);
  --sh-1: 0 1px 1px rgba(11, 22, 48, 0.04), 0 2px 4px rgba(11, 22, 48, 0.04), 0 8px 16px -4px rgba(11, 22, 48, 0.06);
  --sh-2: 0 1px 2px rgba(11, 22, 48, 0.05), 0 4px 8px rgba(11, 22, 48, 0.05), 0 16px 32px -8px rgba(11, 22, 48, 0.08), 0 32px 64px -16px rgba(11, 22, 48, 0.1);
  --sh-3: 0 2px 4px rgba(11, 22, 48, 0.05), 0 8px 16px rgba(11, 22, 48, 0.06), 0 24px 48px -12px rgba(11, 22, 48, 0.14), 0 56px 96px -24px rgba(11, 22, 48, 0.2);
  --sh-gold: inset 0 1px 0 rgba(255, 252, 235, 0.85), inset 0 -2px 0 rgba(90, 55, 0, 0.22), inset 0 0 0 1px rgba(120, 76, 6, 0.18), 0 1px 2px rgba(90, 55, 0, 0.25), 0 10px 24px -8px rgba(176, 120, 20, 0.6);
  --sh-gold-hover: inset 0 1px 0 rgba(255, 252, 235, 0.9), inset 0 -2px 0 rgba(90, 55, 0, 0.22), inset 0 0 0 1px rgba(120, 76, 6, 0.18), 0 2px 4px rgba(90, 55, 0, 0.25), 0 18px 36px -10px rgba(176, 120, 20, 0.7);
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: 'Geist', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; /* Geist Mono is not loaded on this page */
  --wrap: 1240px;

  padding-top: 0 !important;
  background: var(--bg);
  color: var(--text);
  /* Size-matched fallbacks (defined with the Geist @font-face) so text does not
     re-wrap, and the hero does not grow, when Geist arrives. */
  font-family: 'Geist', 'Geist Fallback Roboto', 'Geist Fallback Segoe', 'Geist Fallback Arial', 'Geist Fallback Helvetica', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
html.lenis, .lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.hm { display: block; overflow-x: clip; }
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
.hm img { max-width: 100%; display: block; }
/* .hm i, .hm em { font-style: normal } lives in the inline <style> in index.html's
   <head>: it must apply at first layout, or the empty decorative <i> boxes pull in
   the 72 KB Geist Italic before first paint. */
:where(.hm) :where(ol, ul) { list-style: none; margin: 0; padding: 0; } /* zero specificity: component margins win */
:where(.hm) :where(h1, h2, h3, p, figure, blockquote) { margin: 0; }
.hm :where(h3, h4) { line-height: 1.22; } /* never the body's 1.65 */

.hm-wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ---------- type ---------- */
.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--royal-2);
  margin-bottom: 20px;
}
.hm-eyebrow::before {
  content: ''; width: 24px; height: 2px; border-radius: 2px;
  background: var(--gold-grad); box-shadow: 0 1px 4px rgba(176, 120, 20, 0.4);
}
.hm-eyebrow--light { color: rgba(255, 255, 255, 0.78); }

.hm-h2 {
  font-size: clamp(34px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -0.042em;
  font-weight: 650; color: var(--ink); max-width: 17ch; text-wrap: balance;
}
.hm-serif {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.01em; padding-right: 0.06em;
}
.hm-gold-text {
  background: var(--gold-grad); background-size: 220% 100%; background-position: 30% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.hm-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15.5px; color: var(--royal); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: 3px; transition: background-size 0.35s var(--ease), color 0.2s;
}
.hm-link span { transition: transform 0.35s var(--ease); }
.hm-link:hover { background-size: 100% 1.5px; }
.hm-link:hover span { transform: translateX(4px); }
.hm-link--light { color: #f3d891; }
.hm a:focus-visible, .hm button:focus-visible {
  outline: 3px solid #e2ad3b; outline-offset: 3px; border-radius: 8px;
}

/* ---------- buttons ---------- */
.hm-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 28px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.6s var(--ease);
  white-space: nowrap;
}
.hm-btn--gold {
  color: #1d1404; background: var(--gold-grad); background-size: 220% 100%; background-position: 20% 0;
  box-shadow: var(--sh-gold);
}
.hm-btn--gold:hover { background-position: 80% 0; transform: translateY(-2px); box-shadow: var(--sh-gold-hover); }
.hm-btn--gold { overflow: hidden; isolation: isolate; }
.hm-btn--gold::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--gold-sheen) no-repeat; background-size: 260% 100%; background-position: 140% 0;
  transition: background-position 0.9s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .hm-btn--gold:hover::after { background-position: -40% 0; }
  .hm-btn:active { transform: translateY(0) scale(0.975); transition-duration: 0.12s; }
  .hm-btn--glass:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 14px 30px -12px rgba(2, 11, 36, 0.7); }
}
.hm-btn--gold svg { transition: transform 0.3s var(--ease); }
.hm-btn--gold:hover svg { transform: translateX(3px); }
.hm-btn--glass {
  color: #fff; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -10px rgba(2, 11, 36, 0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hm-btn--glass:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.hm-btn--xl { height: 66px; padding: 0 36px; font-size: 18px; }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hm-hero { padding: 88px 12px 0; }
.hm-hero__panel {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 34px; min-height: min(calc(100svh - 100px), 860px);
  display: flex; align-items: center;
  /* Blues sampled from assets/risenex-logo.png: highlight #1b5bba, royal
     #164da5 / #154394, deep #122e5f, darkest #102a5e. */
  background:
    radial-gradient(110% 85% at 88% 8%, rgba(27, 91, 186, 0.9) 0%, rgba(27, 91, 186, 0) 58%),
    radial-gradient(90% 80% at 8% 100%, #0c2150 0%, rgba(12, 33, 80, 0) 62%),
    linear-gradient(160deg, #164da5 0%, #154394 34%, #12347a 68%, #102a5e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -40px 80px -40px rgba(3, 12, 40, 0.6),
    0 2px 4px rgba(16, 47, 117, 0.12),
    0 24px 48px -16px rgba(16, 42, 94, 0.4),
    0 60px 120px -40px rgba(16, 42, 94, 0.5);
}
.hm-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hm-hero__glow { position: absolute; border-radius: 50%; }
.hm-hero__glow--a {
  width: 760px; height: 760px; right: -160px; top: -260px;
  background: radial-gradient(circle, rgba(70, 125, 215, 0.4) 0%, rgba(70, 125, 215, 0) 65%);
}
.hm-hero__glow--b {
  width: 620px; height: 620px; left: -220px; bottom: -320px;
  background: radial-gradient(circle, rgba(226, 173, 59, 0.28) 0%, rgba(226, 173, 59, 0) 65%);
}
.hm-hero__grid {
  position: absolute; inset: -10% 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 70% 40%, #000 0%, transparent 75%);
}
.hm-hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center; gap: 40px; padding: 72px 0 96px;
}
.hm-hero__title {
  font-size: clamp(52px, 7.2vw, 112px); line-height: 0.98; letter-spacing: -0.048em;
  font-weight: 680; color: #fff; margin-bottom: 28px;
  text-shadow: 0 2px 30px rgba(3, 12, 40, 0.25);
}
.hm-hero__title .w {
  display: inline-block; vertical-align: bottom; overflow: hidden;
  padding: 0.04em 0.03em 0.13em; margin: -0.04em -0.03em -0.13em;
}
.hm-hero__title .w > span { display: inline-block; }
.hm-hero__title .w--serif > span { font-size: 1.08em; line-height: 0.9; text-shadow: none; filter: drop-shadow(0 4px 14px rgba(30, 16, 0, 0.35)); }
.hm-hero__lede {
  font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: rgba(255, 255, 255, 0.82);
  max-width: 34em; margin-bottom: 36px;
}
.hm-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hm-hero__note { font-size: 14px; color: rgba(255, 255, 255, 0.74); }

/* ---------- hero visual: particle morph (canvas drawn by js/home.js) ----------
   The box keeps its size without JS, so nothing shifts when the canvas
   arrives; it stays invisible until the motion script is running. */
.hm-hero__art { position: relative; width: 100%; max-width: 560px; margin-left: auto; visibility: hidden; }
.hm-js .hm-hero__art { visibility: visible; }
.hm-morph { position: relative; aspect-ratio: 560 / 470; }
.hm-morph::before {
  content: ''; position: absolute; inset: 6% 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(27, 91, 186, 0.55), rgba(27, 91, 186, 0));
}
.hm-morph__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hm-morph__label {
  display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.88);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.hm-morph__label.is-out { opacity: 0; transform: translateY(6px); }
.hm-morph__num {
  font-variant-numeric: tabular-nums; background: var(--gold-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hm-morph__num::after { content: ''; display: inline-block; width: 18px; height: 1px; margin-left: 12px; vertical-align: middle; background: rgba(243, 213, 138, 0.6); }

/* ---------- load intro (desktop, motion allowed) ---------- */
@keyframes hmWordUp { from { transform: translate3d(0, 112%, 0); } to { transform: none; } }
@keyframes hmFadeUp { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes hmGoldShift { 0%, 100% { background-position: 10% 0; } 50% { background-position: 90% 0; } }


/* Load intro, marquee loop and gold shimmer: wide screens, motion allowed.
   A media query, not the .hm-motion class, so the critical-CSS step (which
   measures the page with JavaScript off) still inlines these rules. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .hm-hero__title .w > span {
    transform: translate3d(0, 112%, 0);
    animation: hmWordUp 1s var(--ease) forwards;
    animation-delay: calc(0.12s + var(--i) * 0.085s);
}
  .hm-intro {
  opacity: 0; animation: hmFadeUp 0.9s var(--ease) forwards;
  animation-delay: calc(0.55s + var(--d) * 0.1s);
}
  .hm-gold-text { animation: hmGoldShift 7s ease-in-out infinite; }
  .hm-marquee__track { animation: hmMarquee 34s linear infinite; }
  .hm-marquee:hover .hm-marquee__track { animation-play-state: paused; }
}

/* Phones (2026-11-23): a lighter intro. The lede is the phone LCP element,
   so it only moves and never starts invisible; the title words rise from
   half-way inside their mask, so they paint on the first frame as well. */
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .hm-hero__title .w > span { animation: hmWordLite 0.8s var(--ease) both; animation-delay: calc(0.05s + var(--i) * 0.06s); }
  .hm-intro { animation: hmFadeUpLite 0.7s var(--ease) both; animation-delay: calc(0.2s + var(--d) * 0.08s); }
  .hm-hero__lede.hm-intro { animation-name: hmNudge; }
}
@keyframes hmWordLite { from { transform: translate3d(0, 45%, 0); } to { transform: none; } }
@keyframes hmFadeUpLite { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes hmNudge { from { transform: translate3d(0, 8px, 0); } to { transform: none; } }

/* ==========================================================================
   2. GOLD MARQUEE
   ========================================================================== */
.hm-marquee {
  position: relative; z-index: 2; margin: -34px 0 0; padding: 0;
  transform: rotate(-1.4deg); transform-origin: 50% 50%;
}
.hm-marquee__track {
  display: flex; width: max-content;
  background: var(--gold-grad); background-size: 100% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(90, 55, 0, 0.2),
    0 2px 4px rgba(90, 55, 0, 0.18), 0 24px 48px -18px rgba(120, 78, 8, 0.55);
}
.hm-marquee__list { display: flex; align-items: center; flex-shrink: 0; }
.hm-marquee__list li {
  display: flex; align-items: center; gap: 34px; padding: 22px 0 22px 34px;
  font-size: clamp(18px, 1.7vw, 24px); font-weight: 650; letter-spacing: -0.02em;
  color: #1a1204; white-space: nowrap;
}
.hm-marquee__list li::after {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7aa6ff, #2a5fd0 55%, #0f2f7a);
  box-shadow: 0 2px 4px rgba(15, 47, 122, 0.4);
}
@keyframes hmMarquee { to { transform: translate3d(-33.3333%, 0, 0); } }

/* ==========================================================================
   3. STORY: wireframe to dashboard
   ========================================================================== */
.hm-story { padding: 150px 0 120px; }
.hm-story__pin {
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 64px; align-items: center;
}
.hm-story__steps { margin-top: 36px; display: grid; gap: 6px; counter-reset: st; }
.hm-story__steps li {
  position: relative; padding: 14px 0 14px 50px; font-size: 16px; line-height: 1.55; color: var(--text);
  counter-increment: st; transition: opacity 0.4s var(--ease), color 0.4s;
}
.hm-story__steps li::before {
  content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 15px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--gold-text);
  width: 34px; height: 24px; display: grid; place-items: center; border-radius: 6px;
  background: #fbf3df; box-shadow: inset 0 0 0 1px rgba(192, 138, 30, 0.25);
}
.hm-story__steps b { display: block; color: var(--ink); font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 4px; }
.hm-js .hm-story__steps li { opacity: 0.8; } /* dimmed, but still above 4.5:1 */
.hm-js .hm-story__steps li.is-on b { color: var(--royal); }
.hm-js .hm-story__steps li.is-on { opacity: 1; }

.hm-story__stage { position: relative; }
.hm-js .hm-story__stage { perspective: 1400px; }
.hm-chip {
  position: absolute; z-index: 3; top: -16px; left: 22px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-text); background: #fffaf0; padding: 8px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(192, 138, 30, 0.35), var(--sh-1);
}
.hm-story__cap { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* the dashboard */
.hm-dash {
  --f: 1;
  position: relative; border-radius: 20px; background: #fff; padding: 14px;
  font-size: 12.5px; color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
.hm-js .hm-dash { transform-style: preserve-3d; }
.hm-dash::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  box-shadow: var(--sh-3); opacity: var(--f);
}
.hm-dash::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1.5px dashed #b9c3d6; opacity: calc(1 - var(--f));
}
.pc { position: relative; border-radius: 12px; }
.pc > * { opacity: var(--p, 1); }
.pc::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 1.5px dashed #c4cddd;
  background: repeating-linear-gradient(135deg, #f2f4f8 0 10px, #eceff5 10px 20px);
  opacity: calc(1 - var(--p, 1));
}
.hm-dash__top {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin-bottom: 12px;
  background: #f6f8fc; box-shadow: inset 0 0 0 1px var(--line);
}
.hm-dash__brand { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.hm-dash__brand i { width: 18px; height: 18px; border-radius: 6px; background: var(--royal-grad); box-shadow: 0 2px 6px rgba(31, 79, 184, 0.4); }
.hm-dash__search {
  flex: 1; padding: 7px 12px; border-radius: 8px; background: #fff; color: #8a94a6;
  box-shadow: inset 0 0 0 1px var(--line);
}
.hm-dash__user { font-weight: 600; color: var(--muted); }
.hm-dash__body { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; }
.hm-dash__side { padding: 8px; background: #0f2552; color: rgba(255, 255, 255, 0.7); display: grid; gap: 2px; align-content: start; }
.hm-dash__side li { padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.hm-dash__side li.is-on { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 2px 0 0 #e2ad3b; }
.hm-dash__main { display: grid; gap: 12px; min-width: 0; }
.hm-dash__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-kpi {
  display: grid; gap: 4px; padding: 12px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px -8px rgba(11, 22, 48, 0.18);
}
.hm-kpi span { color: var(--muted); font-size: 11.5px; }
.hm-kpi b { font-size: 18px; letter-spacing: -0.02em; font-weight: 700; }
.hm-kpi em { font-style: normal; font-size: 11px; color: var(--muted); }
.hm-kpi em.up { color: #15803d; }
.hm-kpi em.warn { color: #b45309; }
.hm-dash__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.hm-dash__chart, .hm-dash__table { padding: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px -8px rgba(11, 22, 48, 0.18); }
.hm-dash__label { display: block; font-weight: 650; margin-bottom: 8px; }
.hm-dash__chart svg { width: 100%; height: 130px; display: block; }
.hm-dash__line { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 1)); }
.hm-dash__table table { width: 100%; border-collapse: collapse; }
.hm-dash__table td { padding: 7px 4px; border-top: 1px solid var(--line); white-space: nowrap; }
.hm-dash__table td:first-child { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.hm-dash__table td:nth-child(3) { text-align: right; font-weight: 600; }
.hm-dash__table td:last-child { text-align: right; }
.hm-dash__table i { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.hm-dash__table i.ok { background: #e8f6ee; color: #166534; }
.hm-dash__table i.due { background: #fdf3e2; color: #92400e; }

/* ==========================================================================
   4. SELECTED WORK
   ========================================================================== */
.hm-work { padding: 120px 0 80px; background: linear-gradient(180deg, var(--bg), #edf1f8); }
.hm-work__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 40px; align-items: end;
  margin-bottom: 48px;
}
.hm-work__aside p { font-size: 17px; line-height: 1.6; margin-bottom: 14px; }
.hm-work__viewport {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 20px 0 40px; scrollbar-width: thin;
}
.hm-work__track {
  display: flex; gap: 28px; width: max-content;
  padding-inline: max(24px, calc((100vw - var(--wrap)) / 2));
}
.hm-case { position: relative; width: clamp(340px, 34vw, 500px); scroll-snap-align: start; }
.hm-case__card {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; height: 100%;
  padding: 14px 14px 26px; border-radius: 26px; background: #fff; color: var(--text); text-decoration: none;
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
  transition: box-shadow 0.4s var(--ease);
}
.hm-case__card:hover { box-shadow: var(--sh-3), inset 0 0 0 1px var(--line-2); }
.hm-case__media {
  display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; margin-bottom: 22px;
  background: #e9eef6; box-shadow: inset 0 0 0 1px var(--line);
}
.hm-case__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.8s var(--ease); }
.hm-case__card:hover .hm-case__media img { transform: scale(1.04); }
.hm-case__meta, .hm-case__title, .hm-case__text, .hm-case__more { padding-inline: 10px; }
.hm-case__meta {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 10px;
}
.hm-case__meta i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.hm-case__title { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 10px; }
.hm-case__text { font-size: 15.5px; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.hm-case__more { font-weight: 600; color: var(--royal); font-size: 15px; }
.hm-case__card--end {
  overflow: hidden; justify-content: flex-end; min-height: 100%; padding: 36px;
  background: radial-gradient(120% 80% at 100% 0%, #2a5fd0 0%, rgba(42, 95, 208, 0) 60%), linear-gradient(160deg, #143a8a, #0a1a3a);
  color: rgba(255, 255, 255, 0.8);
}
.hm-case__card--end .hm-case__title { color: #fff; font-size: 34px; }
.hm-case__card--end .hm-case__more { color: #f3d891; }
.hm-case__card--end .hm-case__meta, .hm-case__card--end .hm-case__title, .hm-case__card--end .hm-case__text, .hm-case__card--end .hm-case__more { padding-inline: 0; }
.hm-case__card--end .hm-case__text { flex: 0; }
.hm-case__endmark {
  position: absolute; right: -60px; top: -40px; width: 320px; height: 320px; border-radius: 50%;
  border: 44px solid transparent; border-top-color: rgba(91, 143, 245, 0.55); border-right-color: rgba(226, 173, 59, 0.7);
  transform: rotate(-20deg); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
}

/* Pinned 3D floor (desktop, JS running). The stage holds the perspective;
   cards lie on a floor tilted back 60deg, hinged at their bottom edge, and
   js/home.js stands up the one nearest the centre. The grid is drawn on a
   canvas (.hm-floor) with the same perspective, so it needs no huge layer. */
.hm-js .hm-work { padding: 0; background: linear-gradient(180deg, var(--bg) 0%, #eef2f9 55%, #e7edf7 100%); }
.hm-js .hm-work__pin { height: 100vh; display: flex; flex-direction: column; padding-top: 104px; }
.hm-js .hm-work__head { margin-bottom: 0; flex: none; }
.hm-js .hm-work__viewport {
  position: relative; flex: 1; min-height: 0; overflow: visible; padding: 0; scroll-snap-type: none;
  perspective: 1500px; perspective-origin: 50% 0%;
}
.hm-floor { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hm-js .hm-work__track {
  --cw: min(400px, 30vw);
  position: absolute; left: 0; bottom: 9vh; display: flex; align-items: flex-end; gap: 44px;
  padding-inline: calc(50vw - var(--cw) / 2); transform-style: preserve-3d; will-change: transform;
}
.hm-js .hm-case { width: var(--cw); height: min(460px, 50vh); transform-style: preserve-3d; scroll-snap-align: none; }
.hm-js .hm-case__card {
  height: 100%; transform-origin: 50% 100%; backface-visibility: hidden; will-change: transform;
  -webkit-box-reflect: below 2px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.22));
}
.hm-js .hm-case__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 110px; margin-bottom: 18px; }
.hm-js .hm-case__text { flex: none; }
.hm-case__shadow {
  position: absolute; left: 3%; right: 3%; bottom: 0; height: 100%; border-radius: 26px; pointer-events: none;
  transform-origin: 50% 100%; transform: rotateX(60deg);
  background: linear-gradient(to top, rgba(10, 26, 58, 0.34) 0%, rgba(10, 26, 58, 0.1) 50%, rgba(10, 26, 58, 0) 90%);
  filter: blur(10px); opacity: 0; will-change: opacity;
}

/* ==========================================================================
   5. SERVICES: stacking cards
   ========================================================================== */
.hm-services { padding: 140px 0 120px; }
.hm-head { margin-bottom: 56px; }
.hm-head--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr); gap: 40px; align-items: end; }
.hm-head__aside { font-size: 17px; line-height: 1.6; }
.hm-stack { display: grid; gap: 28px; }
.hm-svc { position: sticky; top: calc(104px + var(--k) * 16px); }
.hm-svc__card {
  --dim: 0;
  position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) 200px; gap: 32px; align-items: center;
  min-height: 330px; padding: 44px 48px; border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  box-shadow: var(--sh-3), inset 0 0 0 1px var(--line), inset 0 1px 0 #fff;
  transform-origin: 50% 0;
}
.hm-svc__card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: #0a1a3a; opacity: var(--dim);
}
.hm-svc__num {
  align-self: start; font-size: 88px; font-weight: 700; letter-spacing: -0.06em; line-height: 0.9;
  background: linear-gradient(180deg, #2a5fd0, #0f2552); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hm-svc__body h3 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 650; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 14px; }
.hm-svc__body p { font-size: 17px; line-height: 1.6; max-width: 36em; margin-bottom: 20px; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hm-tags li {
  font-size: 13px; font-weight: 550; color: var(--royal-deep); padding: 7px 13px; border-radius: 999px;
  background: #eef3fc; box-shadow: inset 0 0 0 1px rgba(31, 79, 184, 0.14);
}
.hm-svc__icon {
  justify-self: end; width: 168px; height: 168px; border-radius: 40px; display: grid; place-items: center;
  color: #fff; background: var(--royal-grad);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -10px 24px rgba(5, 18, 60, 0.4),
    0 4px 8px rgba(20, 58, 138, 0.2), 0 24px 40px -12px rgba(20, 58, 138, 0.5);
  position: relative; transform: rotate(-6deg);
}
.hm-svc__icon::before {
  content: ''; position: absolute; inset: 10px; border-radius: 32px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 50%);
}
.hm-svc__icon::after {
  content: ''; position: absolute; right: -10px; bottom: -10px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-grad); box-shadow: var(--sh-gold);
}
.hm-svc__icon svg { width: 72px; height: 72px; position: relative; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); }

/* ==========================================================================
   6. PRODUCTS
   ========================================================================== */
.hm-products { padding: 80px 0 140px; }
.hm-prod-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 28px; }
.hm-prod {
  position: relative; overflow: hidden; border-radius: 30px; padding: 44px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hm-prod__top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.hm-prod__name { font-size: 40px; font-weight: 700; letter-spacing: -0.045em; }
.hm-prod__sub { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; }
.hm-prod__text { font-size: 17px; line-height: 1.6; margin-bottom: 22px; max-width: 30em; }
.hm-status {
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.02em; padding: 6px 12px; border-radius: 999px;
}
.hm-status--soon { color: #1d1404; background: var(--gold-grad); background-size: 220% 100%; box-shadow: var(--sh-gold); }
.hm-status--dev { color: var(--royal-deep); background: #eef3fc; box-shadow: inset 0 0 0 1px rgba(31, 79, 184, 0.25); }
.hm-status--live { color: #146c3c; background: #eaf7ef; box-shadow: inset 0 0 0 1px rgba(31, 157, 85, 0.3); }

.hm-prod--billing {
  color: rgba(255, 255, 255, 0.78);
  background: radial-gradient(100% 70% at 100% 0%, rgba(42, 95, 208, 0.65) 0%, rgba(42, 95, 208, 0) 60%), linear-gradient(160deg, #143a8a 0%, #0f2552 50%, #0a1a3a 100%);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.hm-prod--billing .hm-prod__name { color: #fff; }
.hm-prod--billing .hm-prod__sub { color: #f3d891; }
.hm-prod__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; margin-bottom: 30px; }
.hm-prod__list li { position: relative; padding-left: 22px; font-size: 15px; color: #fff; }
.hm-prod__list li::before {
  content: ''; position: absolute; left: 0; top: 0.45em; width: 10px; height: 10px; border-radius: 3px;
  background: var(--gold-grad); box-shadow: 0 0 0 3px rgba(226, 173, 59, 0.15);
}
.hm-invoice {
  width: min(100%, 440px); margin: 4px 0 28px; padding: 18px; border-radius: 16px;
  background: #fff; color: var(--ink); font-size: 13px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.4);
  transform: perspective(1000px) rotateX(10deg) rotateY(-8deg) rotateZ(1deg); transform-origin: 0 100%;
}
.hm-invoice__head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.hm-invoice__head b { font-size: 14px; }
.hm-invoice__head span { font-family: var(--mono); font-size: 10.5px; color: var(--gold-text); text-transform: uppercase; letter-spacing: 0.1em; }
.hm-invoice__row { display: grid; grid-template-columns: 1fr 60px 80px; padding: 7px 0; border-top: 1px solid var(--line); }
.hm-invoice__row span:nth-child(2) { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.hm-invoice__row span:last-child { text-align: right; font-weight: 600; }
.hm-invoice__row:first-of-type { color: var(--muted); font-size: 11.5px; border-top: 0; }
.hm-invoice__row--tax { color: var(--muted); }
.hm-invoice__total { display: flex; justify-content: space-between; padding-top: 10px; border-top: 2px solid var(--ink); font-size: 15px; }

.hm-prod--soriva {
  background: linear-gradient(180deg, #ffffff, #f6f8fd);
  box-shadow: var(--sh-3), inset 0 0 0 1px var(--line);
}
.hm-prod--soriva .hm-prod__name { color: var(--ink); }
.hm-prod--soriva .hm-prod__sub { color: var(--royal-2); }
.hm-modes { display: grid; gap: 10px; width: 100%; margin-bottom: 28px; }
.hm-modes li {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 14px;
  background: #fff; box-shadow: var(--sh-1), inset 0 0 0 1px var(--line);
}
.hm-modes b { color: var(--ink); font-size: 16px; }
.hm-modes span { font-size: 14px; color: var(--muted); }
.hm-prod__logo {
  position: absolute; right: -40px; top: -40px; width: 200px; opacity: 0.12; pointer-events: none;
  filter: saturate(0.4);
}
.hm-prod__go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: auto; }
.hm-prod__site { font-size: 14.5px; color: var(--muted); }
.hm-prod__site b { color: var(--ink); font-weight: 650; }
@media (max-width: 560px) { .hm-prod__go .hm-btn { width: 100%; justify-content: center; } }

/* ==========================================================================
   7. NUMBERS
   ========================================================================== */
.hm-numbers { padding: 0 0 140px; }
.hm-numbers__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 30px; background: #fff; box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
}
.hm-numbers__grid li { padding: 48px 36px; display: grid; gap: 6px; }
.hm-numbers__grid li + li { box-shadow: inset 1px 0 0 var(--line); }
.hm-count {
  font-size: clamp(60px, 6.4vw, 104px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.95;
  background: linear-gradient(180deg, #2a5fd0 0%, #0f2552 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 10px 18px rgba(20, 58, 138, 0.18));
}
.hm-count span { display: inline-block; min-width: 1ch; }
.hm-numbers__label { font-size: 19px; font-weight: 650; color: var(--ink); letter-spacing: -0.02em; margin-top: 10px; }
.hm-numbers__sub { font-size: 15px; color: var(--muted); }

/* ==========================================================================
   8. PROCESS
   ========================================================================== */
.hm-process { padding: 0 0 140px; position: relative; }
.hm-process__rail { position: relative; height: 2px; background: var(--line-2); border-radius: 2px; margin: 0 0 -27px; }
.hm-process__fill { position: absolute; inset: 0; background: var(--gold-grad); transform-origin: 0 50%; border-radius: 2px; box-shadow: 0 0 12px rgba(226, 173, 59, 0.5); }
.hm-js .hm-process__fill { transform: scaleX(0); }
.hm-process__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; position: relative; }
.hm-process__num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 26px;
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--royal-deep); background: #fff;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px rgba(192, 138, 30, 0.45), var(--sh-2);
}
.hm-process__grid h3 { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 10px; }
.hm-process__grid p { font-size: 16px; line-height: 1.6; }

/* ==========================================================================
   9. FOUNDER
   ========================================================================== */
.hm-founder { padding: 40px 0 150px; }
.hm-founder__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; align-items: center; }
.hm-founder__media { position: relative; max-width: 440px; }
.hm-founder__frame {
  position: relative; z-index: 1; border-radius: 30px; overflow: hidden; aspect-ratio: 4 / 5; background: #dfe5ef;
  box-shadow: var(--sh-3);
}
.hm-founder__frame img { width: 100%; height: 100%; object-fit: cover; }
.hm-founder__plate {
  position: absolute; z-index: 0; inset: 28px -28px -28px 28px; border-radius: 30px;
  background: var(--gold-grad); background-size: 200% 200%;
  box-shadow: var(--sh-gold);
}
.hm-founder__plate::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 70%);
}
.hm-founder__quote {
  font-size: clamp(38px, 4.6vw, 68px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 650;
  color: var(--ink); margin: 6px 0 30px; text-wrap: balance;
}
.hm-founder__quote .hm-serif { font-size: 1.12em; }
.hm-founder__text { font-size: 18px; line-height: 1.65; max-width: 34em; margin-bottom: 26px; }
.hm-founder__cite { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.hm-founder__cite b { color: var(--ink); margin-right: 8px; }
.hm-js .hm-founder__frame { clip-path: inset(100% 0 0 0 round 30px); }
.hm-js .hm-founder__frame img { transform: scale(1.18); }



/* ==========================================================================
   10. FAQ  (js/home-lead.js)
   Closed answers collapse with a grid row (0fr -> 1fr), so phones get a
   smooth height change with no script measuring anything. On wide screens
   with motion, js/home-lead.js adds .hm-faq--gsap and GSAP drives the
   height and the answer's fade instead.
   ========================================================================== */
.hm-faq { padding: 20px 0 140px; }
.hm-faq__grid { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 72px; align-items: start; }
.hm-faq__head { position: sticky; top: 112px; }
.hm-faq__head .hm-h2 { max-width: 9ch; }
.hm-faq__aside { font-size: 17px; line-height: 1.6; max-width: 24em; margin: 26px 0 24px; }

.hm-faq__list { border-top: 1px solid var(--line-2); }
.hm-faq__item {
  position: relative; border-bottom: 1px solid var(--line-2);
  background-color: rgba(42, 95, 208, 0); transition: background-color 0.45s var(--ease);
}
/* Gold bar on the open item's left edge. */
.hm-faq__item::before {
  content: ''; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #e9bd5c 0%, #c08a1e 55%, #9c6510 100%);
  transform: scaleY(0); transform-origin: 50% 0; transition: transform 0.55s var(--ease);
}
/* Gold line that grows along the divider on hover (wide screens). */
.hm-faq__item::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; pointer-events: none;
  background: linear-gradient(90deg, #c08a1e 0%, #e9bd5c 45%, rgba(233, 189, 92, 0) 100%);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.7s var(--ease);
}
.hm-faq__item.is-open { background-color: rgba(42, 95, 208, 0.05); }
.hm-faq__item.is-open::before { transform: scaleY(1); }

.hm-faq__q { font: inherit; }
.hm-faq__btn {
  -webkit-appearance: none; appearance: none; display: flex; align-items: center; gap: 24px;
  width: 100%; margin: 0; padding: 30px 28px; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent;
}
.hm .hm-faq__btn:focus-visible { outline-offset: -3px; border-radius: 4px; }
.hm-faq__lead { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 26px; transition: transform 0.45s var(--ease); }
.hm-faq__num {
  flex: none; width: 34px; font-family: var(--mono); font-size: 15px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--gold-text); font-variant-numeric: tabular-nums;
}
.hm-faq__text {
  font-size: clamp(20px, 1.85vw, 27px); line-height: 1.25; letter-spacing: -0.028em; font-weight: 650;
  color: var(--ink); text-wrap: balance; transition: color 0.3s var(--ease);
}
.hm-faq__icon {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background-color: #fff; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.55s var(--ease), background-color 0.35s, box-shadow 0.35s;
}
.hm-faq__icon::before, .hm-faq__icon::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px;
  border-radius: 2px; background: var(--royal); transition: background-color 0.35s;
}
.hm-faq__icon::after { transform: rotate(90deg); }
.hm-faq__item.is-open .hm-faq__icon {
  transform: rotate(135deg); background-color: var(--royal);
  box-shadow: inset 0 0 0 1px var(--royal), 0 10px 22px -10px rgba(31, 79, 184, 0.75);
}
.hm-faq__item.is-open .hm-faq__icon::before, .hm-faq__item.is-open .hm-faq__icon::after { background: #fff; }

.hm-faq__a {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.42s var(--ease), visibility 0s linear 0.42s;
}
.hm-faq__item.is-open .hm-faq__a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.42s var(--ease), visibility 0s; }
.hm-faq__clip { min-height: 0; overflow: hidden; }
.hm-faq__body { padding: 0 98px 32px 88px; font-size: 17px; line-height: 1.7; max-width: 46em; }
.hm-faq__body a { color: var(--royal); font-weight: 600; text-underline-offset: 3px; }
/* GSAP mode: height is a number GSAP tweens, never a transition. */
.hm-faq--gsap .hm-faq__a, .hm-faq--gsap .hm-faq__item.is-open .hm-faq__a { display: block; height: 0; overflow: hidden; transition: none; }
.hm-faq--gsap .hm-faq__item.is-open .hm-faq__a { height: auto; }

@media (min-width: 768px) {
  /* The answer fades and rises a little (the CSS path; GSAP takes over when loaded). */
  .hm-faq__body { opacity: 0; transform: translateY(12px); transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
  .hm-faq__item.is-open .hm-faq__body { opacity: 1; transform: none; transition-delay: 0.1s; }
  .hm-faq--gsap .hm-faq__body, .hm-faq--gsap .hm-faq__item.is-open .hm-faq__body { transition: none; }
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .hm-faq__btn:hover .hm-faq__lead { transform: translateX(8px); }
  .hm-faq__btn:hover .hm-faq__text { color: var(--royal); }
  .hm-faq__btn:hover .hm-faq__icon { box-shadow: inset 0 0 0 1px var(--royal-2); }
  .hm-faq__item.is-open .hm-faq__btn:hover .hm-faq__icon { box-shadow: inset 0 0 0 1px var(--royal), 0 10px 22px -10px rgba(31, 79, 184, 0.75); }
  .hm-faq__item:hover::after { transform: scaleX(1); }
}

/* ==========================================================================
   11. FREE CALL FORM  (js/home-lead.js)
   ========================================================================== */
.hm-lead { padding: 0 0 140px; }
.hm-lead__card {
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  border-radius: 34px; overflow: hidden; background: #fff;
  box-shadow: var(--sh-3), inset 0 0 0 1px var(--line);
}
.hm-lead__intro {
  position: relative; isolation: isolate; padding: 64px 52px; color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(70% 55% at 100% 0%, rgba(91, 143, 245, 0.35), rgba(91, 143, 245, 0) 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(226, 173, 59, 0.22), rgba(226, 173, 59, 0) 70%),
    linear-gradient(160deg, #164da5 0%, #102a5e 58%, #0a1a3a 100%);
}
.hm-lead__intro::after {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 70% at 85% 10%, #000, transparent 75%); mask-image: radial-gradient(80% 70% at 85% 10%, #000, transparent 75%);
}
.hm-lead__intro .hm-eyebrow { color: #f3d891; }
.hm-lead__title {
  font-size: clamp(34px, 3.5vw, 52px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 650;
  color: #fff; margin-bottom: 22px; text-wrap: balance;
}
.hm-lead__title .hm-serif { font-size: 1.08em; }
.hm-lead__text { font-size: 17px; line-height: 1.65; max-width: 28em; margin-bottom: 36px; }
.hm-lead__steps { display: grid; gap: 14px; }
.hm-lead__steps li { display: flex; align-items: center; gap: 14px; font-size: 15.5px; font-weight: 500; color: #fff; }
.hm-lead__step {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-size: 13.5px; font-weight: 650; color: #1d1404;
  background: var(--gold-grad); background-size: 220% 100%; background-position: 25% 0; box-shadow: var(--sh-gold);
}

.hm-lead__form { padding: 56px 52px; }
.hm-lead__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.hm-lead__f { display: grid; gap: 8px; align-content: start; min-width: 0; }
.hm-lead__f--wide { grid-column: 1 / -1; }
.hm-lead label { font-size: 14px; font-weight: 600; color: var(--ink); }
.hm-lead__req { color: var(--gold-text); }
.hm-lead__opt { font-weight: 500; color: var(--muted); }
.hm-lead input:not([type="checkbox"]), .hm-lead select, .hm-lead textarea {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 54px; margin: 0; padding: 0 16px;
  border: 0; border-radius: 14px; background-color: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2);
  font: inherit; font-size: 16px; color: var(--ink); transition: box-shadow 0.25s var(--ease), background-color 0.25s;
}
.hm-lead textarea { height: auto; min-height: 124px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.hm-lead select {
  padding-right: 46px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f4fb8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.hm-lead ::placeholder { color: var(--muted); opacity: 1; }
.hm-lead input:not([type="checkbox"]):hover, .hm-lead select:hover, .hm-lead textarea:hover { box-shadow: inset 0 0 0 1px rgba(31, 79, 184, 0.35); }
.hm-lead input:not([type="checkbox"]):focus, .hm-lead select:focus, .hm-lead textarea:focus {
  outline: none; background-color: #fff; box-shadow: inset 0 0 0 2px var(--royal-2), 0 0 0 5px rgba(42, 95, 208, 0.12);
}
.hm-lead .is-bad input:not([type="checkbox"]) { box-shadow: inset 0 0 0 2px #c2412d; background-color: #fff; }
.hm-lead__err { font-size: 13.5px; line-height: 1.45; color: #a3361f; }
.hm-lead__err:empty { display: none; }
.hm-lead__consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px 12px; align-items: start; }
.hm-lead__consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--royal); cursor: pointer; }
.hm-lead__consent label { font-size: 14.5px; font-weight: 500; line-height: 1.5; color: var(--text); }
.hm-lead__consent a { color: var(--royal); font-weight: 600; text-underline-offset: 3px; }
.hm-lead__consent .hm-lead__err { grid-column: 2; }
.hm-lead input[type="checkbox"]:focus-visible { outline: 3px solid #e2ad3b; outline-offset: 2px; }
.hm-lead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.hm-lead__submit { border: 0; cursor: pointer; font-family: inherit; }
.hm-lead__submit[disabled] { opacity: 0.72; cursor: progress; transform: none; }
.hm-lead__note { font-size: 14px; color: var(--muted); }
.hm-lead__status { margin-top: 20px; padding: 14px 18px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.hm-lead__status:empty { display: none; }
.hm-lead__status.is-ok { color: #12572f; background: #eaf6ef; box-shadow: inset 0 0 0 1px rgba(20, 108, 60, 0.18); }
.hm-lead__status.is-err { color: #8f2a15; background: #fdeeeb; box-shadow: inset 0 0 0 1px rgba(163, 54, 31, 0.2); }
.hm-lead__status a { color: inherit; font-weight: 650; }

/* The phone content-visibility rules (html.hm-cv) also live in the inline
   <style> in index.html's <head>, for the same first-layout reason. */

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1100px) {
  .hm-hero__inner { grid-template-columns: minmax(0, 1fr); padding: 64px 0 96px; }
  .hm-hero__art { max-width: 520px; margin: 8px auto 0; }
  .hm-story__pin { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hm-svc__card { grid-template-columns: 90px minmax(0, 1fr); }
  .hm-svc__icon { display: none; }
  .hm-svc__num { font-size: 64px; }
  .hm-prod-grid { grid-template-columns: minmax(0, 1fr); }
  .hm-founder__grid { gap: 56px; }
  .hm-process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .hm-process__rail { display: none; }
  .hm-faq__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hm-faq__head { position: static; }
  .hm-faq__head .hm-h2 { max-width: 17ch; }
  .hm-lead__card { grid-template-columns: minmax(0, 1fr); }
}
/* Four numbers: 2 x 2 between phone and desktop. */
@media (min-width: 768px) and (max-width: 1100px) {
  .hm-numbers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-numbers__grid li + li { box-shadow: none; }
  .hm-numbers__grid li:nth-child(2n) { box-shadow: inset 1px 0 0 var(--line); }
  .hm-numbers__grid li:nth-child(3) { box-shadow: inset 0 1px 0 var(--line); }
  .hm-numbers__grid li:nth-child(4) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
}

/* ==========================================================================
   Phone (< 768px): stacked, static, instant
   ========================================================================== */
@media (max-width: 767px) {
  .hm-wrap { width: calc(100% - 32px); }
  .hm-hero { padding: 76px 8px 0; }
  .hm-hero__panel { border-radius: 26px; min-height: 0; }
  .hm-hero__inner { padding: 44px 0 72px; gap: 28px; }
  .hm-hero__title { font-size: clamp(44px, 12.6vw, 60px); margin-bottom: 20px; }
  .hm-hero .hm-eyebrow { font-size: 11.5px; letter-spacing: 0.1em; gap: 10px; }
  .hm-hero .hm-eyebrow::before { width: 18px; }
  .hm-hero__lede { font-size: 17px; margin-bottom: 28px; }
  .hm-hero__ctas { flex-direction: column; align-items: stretch; }
  .hm-hero__ctas .hm-btn { justify-content: center; }
  .hm-hero__glow--a { width: 420px; height: 420px; right: -160px; top: -160px; }
  .hm-hero__art { display: none; } /* phones: no hero visual, the copy carries the hero */

  .hm-marquee { transform: none; margin-top: -24px; }
  .hm-marquee__track { width: auto; justify-content: center; }
  .hm-marquee__list { flex-wrap: wrap; flex-shrink: 1; width: 100%; justify-content: center; padding: 14px 12px; gap: 4px 0; } /* it was clipped after two items */
  .hm-marquee__list[aria-hidden] { display: none; }
  .hm-marquee__list li { padding: 6px 0 6px 14px; gap: 14px; font-size: 16px; }
  .hm-marquee__list li:last-child::after { display: none; }

  .hm-h2 { font-size: clamp(30px, 8.6vw, 40px); }
  .hm-story { padding: 88px 0 64px; }
  .hm-story__steps li { padding-left: 46px; }
  .hm-dash { padding: 10px; font-size: 12px; }
  .hm-dash__body { grid-template-columns: minmax(0, 1fr); }
  .hm-dash__side, .hm-dash__search, .hm-dash__table { display: none; } /* phones: KPIs and the chart tell the story */
  .hm-dash__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-dash__row { grid-template-columns: minmax(0, 1fr); }

  .hm-work { padding: 72px 0 40px; }
  .hm-work__head { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
  /* one swipeable row (it was a 7-card stack): a card per screen, the next one peeking in */
  .hm-work__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 4px 0 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hm-work__viewport::-webkit-scrollbar { display: none; }
  .hm-work__track { flex-direction: row; align-items: stretch; width: max-content; gap: 14px; padding-inline: 16px; }
  .hm-case { width: min(84vw, 360px); flex: none; perspective: none; scroll-snap-align: start; }
  .hm-case__card { padding: 12px 12px 22px; border-radius: 22px; }
  .hm-case__media, .hm-case__meta, .hm-case__title, .hm-case__text, .hm-case__more { transform: none; }
  .hm-case__card::after { display: none; }
  .hm-case__title { font-size: 23px; }
  .hm-case--end .hm-case__card { min-height: 220px; padding: 28px; }

  .hm-services { padding: 80px 0 72px; }
  .hm-head { margin-bottom: 32px; }
  .hm-head--split { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hm-stack { gap: 16px; }
  .hm-svc { position: static; }
  .hm-svc__card { grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; padding: 28px 24px; border-radius: 24px; box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); }
  .hm-svc__num { font-size: 44px; }

  .hm-products { padding: 40px 0 72px; }
  .hm-prod { padding: 30px 24px; border-radius: 24px; }
  .hm-prod__name { font-size: 32px; }
  .hm-prod__list { grid-template-columns: minmax(0, 1fr); }
  .hm-invoice { transform: none; }

  .hm-numbers { padding: 0 0 72px; }
  .hm-numbers__grid { grid-template-columns: minmax(0, 1fr); border-radius: 24px; }
  .hm-numbers__grid li { padding: 28px 24px; }
  .hm-numbers__grid li + li { box-shadow: inset 0 1px 0 var(--line); }
  .hm-count { font-size: 64px; }

  .hm-process { padding: 0 0 72px; }
  .hm-process__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .hm-process__num { margin-bottom: 16px; }

  .hm-founder { padding: 0 0 80px; }
  .hm-founder__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hm-founder__media { max-width: none; margin-right: 20px; }
  .hm-founder__plate { inset: 16px -16px -16px 16px; }
  .hm-founder__text { font-size: 17px; }


  /* FAQ: open/close and the icon turn only. */
  .hm-faq { padding: 0 0 72px; }
  .hm-faq__grid { gap: 28px; }
  .hm-faq__aside { font-size: 16px; margin: 18px 0 18px; }
  .hm-faq__btn { gap: 14px; padding: 22px 14px 22px 16px; }
  .hm-faq__lead { gap: 12px; }
  .hm-faq__num { width: 24px; font-size: 13.5px; }
  .hm-faq__text { font-size: 18px; letter-spacing: -0.02em; }
  .hm-faq__icon { width: 38px; height: 38px; }
  .hm-faq__icon::before, .hm-faq__icon::after { width: 14px; margin-left: -7px; }
  .hm-faq__body { padding: 0 16px 24px 52px; font-size: 16px; line-height: 1.65; }
  .hm-faq__item, .hm-faq__item::before, .hm-faq__text, .hm-faq__icon::before, .hm-faq__icon::after { transition: none; }

  .hm-lead { padding: 0 0 72px; }
  .hm-lead__card { border-radius: 26px; }
  .hm-lead__intro { padding: 40px 24px 36px; }
  .hm-lead__text { font-size: 16px; margin-bottom: 26px; }
  .hm-lead__form { padding: 30px 20px 32px; }
  .hm-lead__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hm-lead__actions { margin-top: 24px; }
  .hm-lead__submit { width: 100%; justify-content: center; }
}

/* Wide screens with reduced motion: no canvas, so the hero is one column,
   and the selected work is a simple vertical list. */
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .hm-hero__art { display: none; }
  .hm-hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hm-work__viewport { overflow: visible; scroll-snap-type: none; padding: 0 0 20px; }
  .hm-work__track { flex-direction: column; width: auto; max-width: 760px; margin-inline: auto; gap: 24px; padding-inline: 24px; }
  .hm-case { width: 100%; }
}

/* Reduced motion: nothing moves, whatever the screen size. */
@media (prefers-reduced-motion: reduce) {
  .hm-page *, .hm-page *::before, .hm-page *::after { animation: none !important; transition: none !important; }
}

/* Phones (2026-11-23): body copy at least 16px, links and the consent box
   thumb-sized, a hint that the work row swipes. */
@media (max-width: 767px) {
  .hm-case__text, .hm-lead__steps li { font-size: 16px; }
  .hm-hero__note, .hm-founder__cite { font-size: 15px; }
  .hm-lead__consent label { font-size: 15px; }
  .hm-lead__consent { grid-template-columns: 22px minmax(0, 1fr); }
  .hm-lead__consent input { width: 22px; height: 22px; }
  .hm-link { min-height: 44px; }
  .hm-work__head { margin-bottom: 18px; }
}
