/* ============================================================
   Rebrained Stack — landing. Deliberately single-theme (dark,
   cinematic). Grounded in the Account hub palette (#0C0E12 ground,
   #0073E6 primary, #8B5CF6 violet, cyan glow) and extended so each
   of the seven products carries its own hue.
   ============================================================ */

:root {
  --bg: #0a0b0f;
  --bg-2: #0c0e12;
  --surface: #16181d;
  --surface-2: #1e2229;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #f4f5f7;
  --fg-dim: #b6bbc6;
  --fg-mute: #7c8393;
  --primary: #2b8bff;
  --primary-deep: #0073e6;
  --violet: #8b5cf6;
  --cyan: #35d6ff;
  --coral: #ff6b5e;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 22px;
  --radius-lg: 30px;

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

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* radial vignette + top glow baked into the ground */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(43, 139, 255, 0.16), transparent 55%),
    radial-gradient(90% 60% at 85% 20%, rgba(139, 92, 246, 0.1), transparent 60%),
    var(--bg);
}

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

::selection { background: rgba(43, 139, 255, 0.32); color: #fff; }

/* ---------- ambient layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: -2; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5;
  will-change: transform;
}
.orb-1 { width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(43, 139, 255, 0.5), transparent 70%); }
.orb-2 { width: 460px; height: 460px; top: 40%; right: -160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.42), transparent 70%); }
.orb-3 { width: 400px; height: 400px; bottom: -120px; left: 30%;
  background: radial-gradient(circle, rgba(53, 214, 255, 0.3), transparent 70%); }

/* ---------- shared ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute); margin: 0 0 26px;
}
.eyebrow-line { width: 34px; height: 1px; background: var(--line-strong); display: inline-block; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.italic { font-style: italic; }
.accent {
  background: linear-gradient(100deg, var(--cyan), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  --bh: 210 100% 45%;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; position: relative; isolation: isolate;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #348cff, #0073e6);
  box-shadow: 0 8px 26px -8px rgba(43, 139, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 14px 40px -8px rgba(43, 139, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-primary:hover svg { transform: translateY(2px); }
.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
.btn-ghost:hover svg { transform: translateX(2px); }
.btn-lg { font-size: 16px; padding: 17px 30px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 13px var(--pad);
  background: rgba(10, 11, 15, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-mark {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em;
}
.nav-mark-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--primary), var(--violet), var(--cyan), var(--primary));
  box-shadow: 0 0 14px rgba(43, 139, 255, 0.7);
}
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 14.5px; color: var(--fg-dim); position: relative; padding: 4px 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--primary); transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }
.nav-cta svg { transition: transform 0.3s var(--ease); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 140px var(--pad) 90px; max-width: var(--maxw); margin: 0 auto; position: relative;
}
.hero-inner { max-width: 900px; }
.eyebrow-line { transform-origin: left; }
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(52px, 9.5vw, 132px);
  line-height: 0.96; letter-spacing: -0.035em; margin: 0 0 32px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; will-change: transform; }
.hero-title .italic {
  font-style: italic;
  background: linear-gradient(100deg, var(--cyan) 10%, var(--primary) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.08em;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px); color: var(--fg-dim); max-width: 620px;
  line-height: 1.62; margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 60px; }
.hero-meta {
  display: flex; align-items: center; gap: 26px; color: var(--fg-mute);
}
.hero-meta > div { display: flex; align-items: baseline; gap: 9px; }
.hero-meta .num {
  font-family: var(--font-display); font-size: 30px; color: var(--fg); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hero-meta .lbl { font-size: 13.5px; letter-spacing: 0.02em; }
.hero-meta .sep { width: 1px; height: 26px; background: var(--line); }

.hero-scroll {
  position: absolute; bottom: 34px; left: var(--pad);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-mute);
}
.hero-scroll-track { width: 46px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero-scroll-thumb { position: absolute; inset: 0; width: 40%; background: var(--primary); animation: scrollThumb 2.2s var(--ease) infinite; }
@keyframes scrollThumb { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------- thesis ---------- */
.thesis {
  max-width: 1100px; margin: 0 auto; padding: clamp(90px, 16vh, 200px) var(--pad);
}
.thesis-line {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 5.2vw, 66px); line-height: 1.14; letter-spacing: -0.02em;
  margin: 0; color: var(--fg-mute); text-wrap: balance;
}
.thesis-line em { font-style: italic; color: var(--fg); }
.thesis-line .accent { font-style: normal; }
.thesis-line [data-word] { display: inline-block; }

/* ---------- the stack (pinned) ---------- */
.stack { position: relative; }
.stack-pin {
  min-height: 100svh; display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
  gap: 40px; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 90px var(--pad);
}
.stack-head { position: relative; }
.stack-head .section-title { margin-bottom: 22px; }
.stack-progress {
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.stack-progress-i { color: var(--primary); }

.stack-cards {
  position: relative; height: 480px;
}
.pcard {
  position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto;
  width: min(100%, 540px); height: 300px;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  /* near-opaque so a front card fully hides the ones stacked behind it */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, hsl(var(--hue) / 0.14), hsl(var(--hue) / 0.05)),
    #111319;
  border: 1px solid hsl(var(--hue) / 0.45);
  box-shadow:
    0 26px 70px -28px hsl(var(--hue) / 0.6),
    0 2px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  display: flex; flex-direction: column;
  transform-origin: center bottom;
  will-change: transform, opacity;
  overflow: hidden;
}
.pcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 110% at 100% 0%, hsl(var(--hue) / 0.22), transparent 52%);
}
.pcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.pcard-kind {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: hsl(var(--hue) / 1); filter: brightness(1.4);
}
.pcard-status {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 7px;
}
.pcard-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pcard-status.live { color: #37e0a3; }
.pcard-status.soon { color: #f5b544; }
.pcard h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 34px; letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.pcard p { margin: 0; color: var(--fg-dim); font-size: 16px; line-height: 1.55; max-width: 44ch; }
.pcard-dot {
  position: absolute; right: 30px; bottom: 30px; width: 40px; height: 40px; border-radius: 50%;
  background: hsl(var(--hue) / 0.9); filter: blur(1px) brightness(1.25);
  box-shadow: 0 0 30px hsl(var(--hue) / 0.9);
  opacity: 0.85;
}

/* ---------- method ---------- */
.method { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vh, 150px) var(--pad); }
.method-head { max-width: 720px; margin-bottom: 64px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mstep {
  padding: 34px 30px 38px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line); position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.mstep:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.mstep-n {
  font-family: var(--font-mono); font-size: 13px; color: var(--primary); letter-spacing: 0.1em;
}
.mstep h3 { font-family: var(--font-display); font-weight: 500; font-size: 27px; margin: 20px 0 12px; letter-spacing: -0.01em; }
.mstep p { margin: 0; color: var(--fg-dim); font-size: 15.5px; line-height: 1.6; }

/* ---------- studio ---------- */
.studio { position: relative; padding: clamp(90px, 14vh, 170px) var(--pad); }
.studio-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.studio-inner .eyebrow { justify-content: center; }
.studio .section-title { font-size: clamp(64px, 12vw, 160px); }
.studio-sub {
  font-size: clamp(18px, 2.1vw, 23px); color: var(--fg-dim); line-height: 1.6;
  max-width: 660px; margin: 32px auto 0; text-wrap: balance;
}
.studio-offices { display: flex; justify-content: center; gap: 60px; margin-top: 56px; }
.office { display: flex; flex-direction: column; gap: 6px; }
.office-city { font-family: var(--font-display); font-size: 26px; font-weight: 500; }
.office-note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fg-mute); text-transform: uppercase; }

/* ---------- cta ---------- */
.cta { padding: 0 var(--pad) clamp(90px, 12vh, 150px); }
.cta-card {
  max-width: var(--maxw); margin: 0 auto; text-align: center;
  padding: clamp(56px, 9vw, 110px) var(--pad); border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(43, 139, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px -50px rgba(43, 139, 255, 0.6);
}
.cta-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 8vw, 96px); letter-spacing: -0.03em; margin: 0; }
.cta-sub { color: var(--fg-dim); font-size: clamp(16px, 2vw, 19px); margin: 18px 0 40px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px var(--pad) 48px; max-width: var(--maxw); margin: 0 auto; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-products { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-products a { font-size: 14.5px; color: var(--fg-dim); transition: color 0.3s var(--ease); }
.footer-products a:hover { color: var(--fg); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; color: var(--fg-mute); font-size: 13.5px; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { color: var(--fg-mute); transition: color 0.3s var(--ease); }
.footer-legal a:hover { color: var(--fg-dim); }

/* ---------- reveal defaults (JS-driven) ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); }
.reveal-ready [data-reveal] { will-change: opacity, transform; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .stack-pin { grid-template-columns: 1fr; gap: 30px; }
  .stack-cards { height: 380px; }
  .pcard { height: 280px; }
  .method-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 18px; }
  .studio-offices { gap: 36px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .pcard { padding: 24px 24px; height: 264px; }
  .pcard h3 { font-size: 28px; }
  .hero { padding-top: 120px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .orb { animation: none !important; }
  .hero-scroll-thumb { animation: none; }
  .hero-title .word { transform: none !important; }
}
