/* ============================================================
   Credix — landing page
   Dark, editorial, motion-rich. Single stylesheet, no build step.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg:        #08090B;
  --bg-2:      #0B0C0F;
  --bg-3:      #101217;
  --bg-4:      #15171D;

  /* Hairlines */
  --line:      rgba(255, 255, 255, 0.07);
  --line-2:    rgba(255, 255, 255, 0.10);
  --line-3:    rgba(255, 255, 255, 0.16);

  /* Text */
  --text:      #EDEEF1;
  --text-2:    #B4B9C3;
  --text-3:    #7C828F;
  --text-4:    #767D8A;  /* AA-passing (~4.7:1 on --bg); was #494F5A which failed contrast */

  /* Brand + status */
  --accent:        #0A84FF;
  --accent-bright: #4DA3FF;
  --accent-soft:   rgba(10, 132, 255, 0.13);
  --amber:     #FFB23E;
  --green:     #30D158;
  --red:       #FF5D6B;

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Layout */
  --maxw: 1440px;
  --nav-h: 68px;
  --gutter: clamp(16px, 3vw, 30px);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: clamp(40px, 6vw, 64px);
  --sp-8: clamp(56px, 8vw, 88px);
  --sp-9: clamp(72px, 10vw, 120px);
  --sp-10: clamp(88px, 12vw, 150px);
  --sp-11: clamp(104px, 14vw, 184px);

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
::selection { background: var(--accent); color: #fff; }

/* Visible keyboard focus (mouse clicks don't trigger :focus-visible) */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

/* ---------- Layout helpers ---------- */
.shell { position: relative; z-index: 1; }
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Atmosphere: aurora + grain ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora .a1 {
  width: 52vw; height: 52vw;
  top: -16vw; left: -10vw;
  background: radial-gradient(circle at 30% 30%, rgba(10,132,255,0.55), transparent 62%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.aurora .a2 {
  width: 44vw; height: 44vw;
  top: 8vh; right: -12vw;
  background: radial-gradient(circle at 60% 40%, rgba(125,90,255,0.40), transparent 64%);
  animation: drift2 32s var(--ease) infinite alternate;
}
.aurora .a3 {
  width: 38vw; height: 38vw;
  bottom: -14vw; left: 28vw;
  background: radial-gradient(circle at 50% 50%, rgba(48,209,88,0.18), transparent 66%);
  animation: drift3 30s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-6vw, 10vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(4vw, -8vh, 0) scale(1.15); } }

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */
.cursor-ring, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.3s, width 0.25s var(--ease), height 0.25s var(--ease),
              background 0.25s, border-color 0.25s;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--line-3);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--text);
}
body.cursor-ready .cursor-ring,
body.cursor-ready .cursor-dot { opacity: 1; }
body.cursor-hover .cursor-ring {
  width: 56px; height: 56px;
  background: var(--accent-soft);
  border-color: rgba(10,132,255,0.5);
}
body.cursor-hover .cursor-dot { opacity: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  justify-self: end;
}
.nav-links.center { justify-self: center; }
.nav-link {
  font-size: 14px;
  font-weight: 450;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent) 0%, #0A6FE0 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(10,132,255,0.4);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Pure wordmark (logo 3) — "credix" with an accented x */
.brand.wordmark { gap: 0; }
.wordmark .wm-name {
  font-family: "Plus Jakarta Sans", var(--font-sans);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
}
.wordmark .wm-x { color: var(--accent-bright); }
.footer-col .wordmark .wm-name { font-size: 21px; }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--text-3);
  transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: #fff; background: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
  will-change: transform;
}
.btn-lg { padding: 15px 26px; font-size: 15px; border-radius: 13px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 24px -6px rgba(10,132,255,0.6);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 10px 32px -6px rgba(10,132,255,0.7);
}
.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--line-3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--line-3);
}
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 11vh, 120px));
  padding-bottom: var(--sp-8);
  min-height: min(100vh, 860px);
  display: flex;
  flex-direction: column;
}
.hero-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}
.hero-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(48,209,88,0.18);
}

.hero-title {
  font-size: clamp(2.6rem, 8.5vw, 6.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-top: clamp(20px, 3vw, 34px);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero-title .word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: wordRise 0.9s var(--ease-out) forwards;
}
.hero-title .line:nth-child(1) .word:nth-child(1) > span { animation-delay: 0.18s; }
.hero-title .line:nth-child(1) .word:nth-child(2) > span { animation-delay: 0.24s; }
.hero-title .line:nth-child(1) .word:nth-child(3) > span { animation-delay: 0.30s; }
.hero-title .line:nth-child(2) .word:nth-child(1) > span { animation-delay: 0.40s; }
.hero-title .line:nth-child(2) .word:nth-child(2) > span { animation-delay: 0.46s; }
.hero-title .line:nth-child(2) .word:nth-child(3) > span { animation-delay: 0.52s; }
.accent-word > span {
  color: var(--accent-bright); /* fallback if background-clip:text is unsupported */
  background: linear-gradient(100deg, var(--accent-bright), #B79CFF 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes wordRise { to { transform: translateY(0); } }

.hero-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-top: clamp(32px, 5vw, 56px);
}
.hero-lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-2);
  max-width: 52ch;
  line-height: 1.65;
}
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* floating product chip */
.hero-float {
  position: absolute;
  top: calc(var(--nav-h) + 8vh);
  right: clamp(20px, 5vw, 40px);
  width: 290px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(21,23,29,0.92), rgba(13,14,18,0.92));
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  will-change: transform;
  opacity: 0;
  animation: heroFloatIn 1s var(--ease-out) 0.8s forwards;
}
/* opacity-only entrance so the JS parallax transform stays in control */
@keyframes heroFloatIn { to { opacity: 1; } }

.hero-scrollcue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-4);
}
.hero-scrollcue .bar {
  width: 1px; height: 38px;
  background: linear-gradient(var(--text-3), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scrollcue .bar::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--text);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- Generic fade-up (JS reveals also use .reveal) ---------- */
.fade-up { opacity: 0; animation: fadeUp 0.9s var(--ease-out) forwards; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 20px;
  overflow: hidden;
  margin-block: var(--sp-7) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}
.marquee-item .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section headings ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 54px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}
.eyebrow.no-line { display: inline-flex; }
.eyebrow.no-line::before { display: none; }
.sec-title {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.03em;
}
.sec-title .muted { color: var(--text-3); }
.sec-sub {
  margin-top: 18px;
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--text-2);
  line-height: 1.65;
}

/* ---------- Cells (problem + bento) ---------- */
.cell {
  position: relative;
  padding: 30px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  min-height: 200px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
  transform-style: preserve-3d;
}
.cell:hover { border-color: var(--line-3); }
.cell-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-bright);
  margin-bottom: 18px;
}
.cell h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cell p { font-size: 14.5px; color: var(--text-3); line-height: 1.6; }
.cell em { color: var(--text-2); font-style: normal; font-weight: 500; }
.cell-tag {
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  z-index: 2;
}
.cell-glow {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  left: var(--mx, 50%); top: var(--my, 50%);
  transform: translate(-50%, -50%);
}
.cell:hover .cell-glow { opacity: 1; }

/* ---------- Problem grid (3 cells) ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: 14px;
}
.cell-c4 { grid-column: span 4; }
.cell-c2 { grid-column: span 2; }
.cell-r2 { grid-row: span 2; }

.sms-stack { margin-top: 22px; }
.sms-bubble {
  position: relative;
  padding: 13px 16px;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--text);
  max-width: 320px;
  line-height: 1.5;
}
.sms-bubble .from {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 5px;
}
.ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}
.ccy-demo { margin-top: 18px; }
.ccy-big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ccy-small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

/* ---------- Metrics ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.metric {
  padding: clamp(24px, 3vw, 40px);
  background: var(--bg-2);
}
.metric-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: flex-start;
}
.metric-num .suffix { font-size: 0.5em; margin-top: 0.2em; color: var(--accent-bright); }
.metric-label { font-size: 14px; color: var(--text-2); margin-top: 12px; line-height: 1.4; }
.metric-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-4);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ---------- Pinned showcase ---------- */
.showcase { position: relative; }
.showcase-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* matches window.innerHeight under iOS' dynamic toolbar */
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  overflow: hidden;
}
.showcase-text { position: relative; min-height: 320px; }
.showcase-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}
.showcase-step.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.showcase-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent-bright);
  margin-bottom: 18px;
}
.showcase-step h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.showcase-step p {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--text-2);
  line-height: 1.65;
  max-width: 46ch;
}
.showcase-progress { display: flex; gap: 8px; margin-top: 30px; }
.showcase-progress .seg {
  width: 46px; height: 3px;
  border-radius: 3px;
  background: var(--line-2);
  overflow: hidden;
}
.showcase-progress .seg i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s linear;
}

.showcase-visual { position: relative; height: clamp(360px, 60vh, 520px); }
.showcase-pane {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96) translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}
.showcase-pane.active { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
.surface-card {
  width: 100%;
  max-width: 420px;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ---------- Horizontal flow ---------- */
.horiz { position: relative; }
.horiz-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* matches window.innerHeight under iOS' dynamic toolbar */
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.horiz-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-inline: auto;
  width: 100%;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.horiz-track {
  display: flex;
  gap: 22px;
  padding-inline: var(--gutter);
  width: max-content;
  will-change: transform;
}
.step-card {
  width: clamp(300px, 38vw, 420px);
  padding: 36px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-3);
}
.step-rule {
  height: 1px;
  background: var(--line-2);
  margin: 18px 0 22px;
}
.step-card h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.step-card p { font-size: 15px; color: var(--text-2); line-height: 1.6; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  text-align: center;
  padding-block: var(--sp-11) var(--sp-9);
  overflow: hidden;
}
.cta-title {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.cta-title .accent {
  color: var(--accent-bright); /* fallback if background-clip:text is unsupported */
  background: linear-gradient(100deg, var(--accent-bright), #B79CFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-sub {
  max-width: 56ch;
  margin: 22px auto 36px;
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-2);
  line-height: 1.65;
}
.watermark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6rem, 26vw, 22rem);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-top: clamp(40px, 7vw, 90px);
  color: rgba(255,255,255,0.05); /* fallback if background-clip:text is unsupported */
  background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent 75%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  user-select: none;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  padding-block: var(--sp-8) var(--sp-9);
}
.contact-sub { margin-inline: auto; max-width: 46ch; }
.contact-cards {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2);
  text-align: left;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
  will-change: transform;
}
.contact-card:hover { border-color: var(--line-3); background: var(--bg-4); }
.contact-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.contact-meta { display: flex; flex-direction: column; gap: 3px; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact-value { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-8) var(--sp-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: var(--sp-7);
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .brand { margin-bottom: 4px; }
.footer-blurb { font-size: 14px; color: var(--text-3); line-height: 1.6; max-width: 36ch; }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 4px;
}
.footer-col a { font-size: 14px; color: var(--text-2); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-4);
  flex-wrap: wrap;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-c4, .cell-c2 { grid-column: span 2; }
  .cell-r2 { grid-row: span 1; }
  .hero-float { display: none; }            /* avoid overlap with headline */
  .hero-bottom { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 820px) {
  .nav-links.center { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .hero { min-height: auto; }
  .hero-bottom { grid-template-columns: 1fr; align-items: start; }
  .hero-scrollcue { display: none; }

  /* problem grid + metrics collapse */
  .problem-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }

  /* unpin the showcase — stack steps + panes vertically */
  .showcase { height: auto !important; }
  .showcase-pin {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    padding-block: var(--sp-8);
    gap: 0;
  }
  .showcase-text { min-height: 0; display: flex; flex-direction: column; gap: 0; }
  .showcase-step {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding-bottom: 26px;
  }
  .showcase-step .showcase-progress { display: none; }
  .showcase-visual { height: auto; margin-top: 8px; }
  .showcase-pane {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-bottom: 26px;
  }

  /* unpin horizontal flow — let it scroll sideways naturally */
  .horiz { height: auto !important; }
  .horiz-pin { position: static; height: auto; padding-block: var(--sp-8); }
  .horiz-track {
    transform: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .step-card { scroll-snap-align: start; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell-c4, .cell-c2 { grid-column: span 1; }
  .metrics { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; justify-content: center; }
  .hero-cta { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .nav-signin { display: none; }          /* Get started already routes to login */
  .contact-cards { flex-direction: column; }
  .contact-card { width: 100%; }
}

/* ---------- Touch / coarse pointer: no custom cursor ---------- */
@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-title .word > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .fade-up { opacity: 1; }
  .aurora i { animation: none; }
  .marquee-track { animation: none; }
}
