/* ==========================================================================
   HPA — APEX edition (v3) · maximum design
   DM Sans · brand spectrum on living-aurora near-black · interactive
   ========================================================================== */

:root {
  --aqua: #5FD0DF; --aqua-bright: #8BEAF4; --teal: #4AB3C8; --ocean: #0099B0;
  --sage: #6DC8A0; --forest: #2FA777; --gold: #E7B24A; --gold-soft: #C4902A;

  --bg: #060809; --bg-1: #0B0F13; --bg-2: #11171D;
  --line: rgba(255,255,255,0.08); --line-bright: rgba(255,255,255,0.18);
  --fg: #F2F6F8; --fg-dim: #A7B3BC; --fg-faint: #69757E;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1260px; --narrow: 940px;
  --grad: linear-gradient(100deg, var(--aqua) 0%, var(--sage) 52%, var(--gold) 100%);
  --grad-cool: linear-gradient(120deg, var(--aqua-bright), var(--ocean));
  --r: 18px; --r-lg: 28px; --r-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--fg);
  line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

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

/* ── Living aurora background ──────────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.aurora b {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.45; will-change: transform;
}
.aurora .b1 { width: 60vw; height: 60vw; left: -15vw; top: -20vw; background: radial-gradient(circle, rgba(95,208,223,0.6), transparent 65%); animation: drift1 26s ease-in-out infinite; }
.aurora .b2 { width: 50vw; height: 50vw; right: -10vw; top: 10vh; background: radial-gradient(circle, rgba(109,200,160,0.5), transparent 65%); animation: drift2 32s ease-in-out infinite; }
.aurora .b3 { width: 55vw; height: 55vw; left: 20vw; bottom: -25vw; background: radial-gradient(circle, rgba(231,178,74,0.34), transparent 65%); animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(8vw,6vh) scale(1.15);} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1.1);} 50%{transform:translate(-7vw,8vh) scale(0.95);} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(5vw,-7vh) scale(1.2);} }
/* grain + vignette */
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 0%, transparent 40%, rgba(6,8,9,0.7) 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Spotlight cursor (desktop) ───────────────────────────────────────────── */
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  transition: opacity 0.6s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 30%), rgba(95,208,223,0.10), transparent 70%);
}
@media (pointer: fine) { .spotlight { opacity: 1; } }

/* ── Scroll progress rail ─────────────────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: var(--grad); box-shadow: 0 0 16px rgba(95,208,223,0.6); }

/* ── Type ─────────────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }
.display { font-size: clamp(3rem, 8.2vw, 7.4rem); font-weight: 700; line-height: 0.94; letter-spacing: -0.04em; }
.h-section { font-size: clamp(2.1rem, 4.8vw, 3.8rem); font-weight: 700; letter-spacing: -0.032em; line-height: 1.03; }
.lead { font-size: clamp(1.05rem, 1.55vw, 1.32rem); color: var(--fg-dim); line-height: 1.66; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text.animated { background-size: 200% auto; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.cool-text { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--aqua); }
.eyebrow::before { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, transparent, var(--aqua)); }
.eyebrow.center::after { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, var(--aqua), transparent); }
.eyebrow.center::before { background: linear-gradient(90deg, var(--aqua), transparent); }

section { position: relative; z-index: 1; }
.band { padding: clamp(96px, 13vw, 180px) 0; }
.band-tight { padding: clamp(60px, 8vw, 110px) 0; }
.section-head { max-width: 780px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head .h-section { margin-top: 20px; }
.section-head .lead { margin-top: 22px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 17px 32px; border-radius: var(--r-pill); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; cursor: pointer; border: 1px solid transparent; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s; will-change: transform; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(6px); }
.btn-primary { background: var(--grad-cool); color: #04161A; box-shadow: 0 10px 44px rgba(95,208,223,0.30); }
.btn-primary:hover { box-shadow: 0 18px 66px rgba(95,208,223,0.55); }
.btn-ghost { background: rgba(255,255,255,0.05); border-color: var(--line-bright); color: var(--fg); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-lg { padding: 21px 42px; font-size: 1.1rem; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(6,8,9,0.7); backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 86px; }
.brand-logo img { height: 38px; }
.site-nav { display: flex; gap: 34px; }
.site-nav a { font-size: 0.95rem; color: var(--fg-dim); font-weight: 500; position: relative; transition: color 0.25s; }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--aqua); transition: width 0.3s var(--ease); }
.site-nav a:hover { color: var(--fg); } .site-nav a:hover::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { padding: 11px 22px; font-size: 0.92rem; }
.nav-toggle { display: none; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-top: 86px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; width: 100%; }
.hero-copy { max-width: 640px; }
.hero h1 { margin: 22px 0 26px; }
.hero .lead { max-width: 540px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }
.hero-trust { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 26px; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust b { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-trust span { font-size: 0.8rem; color: var(--fg-faint); }

.reveal-word { display: inline-block; overflow: hidden; vertical-align: top; }
.reveal-word > span { display: inline-block; transform: translateY(115%); transition: transform 0.95s var(--ease); }
.hero.in .reveal-word > span { transform: translateY(0); }
.hero.in .reveal-word:nth-child(2) > span { transition-delay: 0.06s; }
.hero.in .reveal-word:nth-child(3) > span { transition-delay: 0.12s; }
.hero.in .reveal-word:nth-child(4) > span { transition-delay: 0.18s; }
.hero.in .reveal-word:nth-child(5) > span { transition-delay: 0.24s; }
.hero-fade { opacity: 0; transform: translateY(20px); transition: opacity 1s ease 0.5s, transform 1s var(--ease) 0.5s; }
.hero.in .hero-fade { opacity: 1; transform: none; }

/* hero floating estimator preview card */
.hero-card { position: relative; }
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(18px); position: relative; overflow: hidden;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, rgba(95,208,223,0.5), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ── Estimator (interactive showpiece) ────────────────────────────────────── */
.estimator { padding: 34px; }
.estimator .est-label { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--aqua); }
.estimator h3 { font-size: 1.5rem; margin: 8px 0 22px; letter-spacing: -0.02em; }
.est-slider-val { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.est-slider-val small { font-size: 0.9rem; color: var(--fg-faint); font-weight: 500; }
input[type="range"].est-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; margin: 16px 0 26px; background: rgba(255,255,255,0.12); outline: none; }
input[type="range"].est-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grad-cool); cursor: grab; box-shadow: 0 0 0 6px rgba(95,208,223,0.18), 0 6px 18px rgba(0,0,0,0.4); border: 2px solid #fff; }
input[type="range"].est-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--aqua); cursor: grab; border: 2px solid #fff; }
.est-rows { display: grid; gap: 14px; }
.est-row { }
.est-row .est-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.est-row .est-cap { font-size: 0.85rem; color: var(--fg-dim); }
.est-row .est-num { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.est-bar { height: 12px; border-radius: 8px; background: rgba(255,255,255,0.08); overflow: hidden; }
.est-bar i { display: block; height: 100%; width: 0; border-radius: 8px; transition: width 0.9s var(--ease); }
.est-bar.now i { background: linear-gradient(90deg, var(--teal), var(--ocean)); }
.est-bar.hpa i { background: var(--grad); }
.est-delta { margin-top: 22px; padding: 16px 18px; border-radius: var(--r); background: rgba(109,200,160,0.1); border: 1px solid rgba(109,200,160,0.3); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.est-delta b { font-size: 1.35rem; } .est-delta .cool-text { font-size: 1.5rem; }
.est-note { font-size: 0.74rem; color: var(--fg-faint); margin-top: 16px; line-height: 1.5; }
.est-cta { margin-top: 22px; }

/* ── Marquee ──────────────────────────────────────────────────────────────── */
.marquee { border-block: 1px solid var(--line); padding: 24px 0; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: inline-flex; gap: 56px; animation: scrollx 34s linear infinite; }
.marquee-track span { font-size: clamp(1.1rem, 2vw, 1.75rem); font-weight: 600; color: var(--fg-faint); display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--aqua); font-size: 0.8em; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ── Reveal ───────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; } .reveal.d2 { transition-delay: 0.2s; } .reveal.d3 { transition-delay: 0.3s; }

/* ── Manifesto ────────────────────────────────────────────────────────────── */
.manifesto { text-align: center; }
.manifesto-stat { font-size: clamp(4.5rem, 13vw, 10rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; }
.manifesto .kicker { font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.manifesto .kicker .muted { color: var(--fg-faint); }

/* ── Tilt cards / bento ───────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tilt { transform-style: preserve-3d; transition: transform 0.25s var(--ease); will-change: transform; }
.cell { padding: 34px; }
.cell-2 { grid-column: span 2; } .cell-3 { grid-column: span 3; } .cell-4 { grid-column: span 4; }
.cell .cell-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: rgba(95,208,223,0.1); border: 1px solid rgba(95,208,223,0.25); color: var(--aqua); margin-bottom: 22px; }
.cell .cell-icon svg { width: 27px; height: 27px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cell h3 { font-size: 1.4rem; margin-bottom: 10px; }
.cell p { color: var(--fg-dim); font-size: 0.98rem; }
.cell .big-num { font-size: clamp(2.8rem, 5vw, 4.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }

/* ── Value Runway ─────────────────────────────────────────────────────────── */
.runway-card { padding: clamp(28px, 4vw, 52px); border-radius: var(--r-lg); }
.runway-svg { width: 100%; height: auto; overflow: visible; }
.runway-svg text { font-family: var(--font); }
.rw-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s var(--ease) 0.2s; }
.runway-card.in .rw-line { stroke-dashoffset: 0; }
.rw-area { opacity: 0; transition: opacity 1.1s ease 1.8s; }
.runway-card.in .rw-area { opacity: 1; }
.rw-ms { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.runway-card.in .rw-ms { opacity: 1; transform: none; }
.runway-card.in .rw-ms-1 { transition-delay: 0.55s; } .runway-card.in .rw-ms-2 { transition-delay: 0.9s; }
.runway-card.in .rw-ms-3 { transition-delay: 1.25s; } .runway-card.in .rw-ms-4 { transition-delay: 1.6s; }
.runway-card.in .rw-ms-5 { transition-delay: 1.95s; } .runway-card.in .rw-ms-6 { transition-delay: 2.3s; }
.rw-glow { animation: rwpulse 2.8s ease-in-out 2.6s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes rwpulse { 0%,100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.25); } }
.runway-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; }
.runway-legend span { display: inline-flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--fg-dim); }
.runway-legend b { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: #04161A; }

/* ── Journey ──────────────────────────────────────────────────────────────── */
.journey { display: grid; margin-top: 56px; }
.jstep { display: grid; grid-template-columns: minmax(120px,0.4fr) 1fr; gap: clamp(24px,5vw,70px); padding: 46px 0; border-top: 1px solid var(--line); align-items: start; }
.jstep:last-child { border-bottom: 1px solid var(--line); }
.jstep-num { font-size: clamp(3.5rem,8vw,7rem); font-weight: 700; line-height: 0.8; letter-spacing: -0.05em; -webkit-text-stroke: 1.5px var(--line-bright); -webkit-text-fill-color: transparent; transition: -webkit-text-fill-color 0.6s; }
.jstep.in .jstep-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke-color: transparent; }
.jstep-phase { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--aqua); margin-bottom: 6px; display: block; }
.jstep h3 { font-size: clamp(1.5rem,2.6vw,2.1rem); margin-bottom: 14px; }
.jstep p { color: var(--fg-dim); max-width: 620px; margin-bottom: 18px; }
.jstep-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jstep-tags i { font-style: normal; font-size: 0.82rem; color: var(--fg-dim); padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: rgba(255,255,255,0.02); }

/* ── Metrics ──────────────────────────────────────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.metric { background: rgba(11,15,19,0.7); padding: 42px 28px; text-align: center; }
.metric .m-num { font-size: clamp(2.4rem,4vw,3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.metric .m-label { color: var(--fg-dim); font-size: 0.9rem; margin-top: 12px; }

/* ── Final CTA ────────────────────────────────────────────────────────────── */
.final-card { position: relative; border-radius: var(--r-lg); padding: clamp(52px,9vw,110px) 30px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 130% at 50% 0%, rgba(95,208,223,0.2), transparent 55%), radial-gradient(100% 120% at 82% 100%, rgba(231,178,74,0.14), transparent 55%), linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); }
.final-card .lead { max-width: 560px; margin: 0 auto 38px; }
.reassure { margin-top: 26px; font-size: 0.88rem; color: var(--fg-faint); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.reassure span { display: inline-flex; align-items: center; gap: 7px; }
.reassure span::before { content: "✓"; color: var(--sage); font-weight: 700; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid img { height: 34px; margin-bottom: 16px; }
.footer-grid p, .footer-grid a { color: var(--fg-dim); font-size: 0.92rem; }
.footer-grid h4 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a:hover { color: var(--aqua); }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--fg-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 520px; }
  .bento { grid-template-columns: repeat(2,1fr); }
  .cell-2,.cell-3,.cell-4 { grid-column: span 2; }
  .metrics { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-nav, .header-cta .btn-secondary { display: none; }
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 24px; height: 2px; background: var(--fg); border-radius: 2px; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 86px; left: 0; right: 0; background: rgba(6,8,9,0.97); backdrop-filter: blur(16px); padding: 24px 30px; gap: 20px; border-bottom: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; } .cell-2,.cell-3,.cell-4 { grid-column: span 1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .jstep { grid-template-columns: 1fr; gap: 12px; } .jstep-num { font-size: 4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .tilt { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal, .hero-fade { opacity: 1 !important; transform: none !important; }
  .reveal-word > span { transform: none !important; }
  .rw-line { stroke-dashoffset: 0 !important; }
  .aurora b { animation: none !important; }
}
