/* Uplean — tokens come straight from the final logo board */
:root {
  --night: #080F1F;
  --night-2: #0D1830;
  --paper: #F2F5FA;
  --white: #FFFFFF;
  --ink: #001F43;
  --muted: #55617A;
  --muted-dark: #A9B6CC;
  --line: #DDE3EC;
  --sky: #33A8E7;
  --mid: #266EB8;
  --deep: #183388;
  --yellow: #F6B219;
  --orange: #F77D00;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Navy behind the page (overscroll); paper on the body so light sections never show a seam between them. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg, canvas { display: block; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 10px;
  background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 22px var(--gutter);
  color: var(--white);
}

.lockup { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; min-height: 44px; }
.lockup-mark { width: 34px; height: 34px; flex: none; }
.lockup-word { width: 98px; height: 34px; fill: currentColor; flex: none; }
.lockup-ink { color: var(--ink); }


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -0.005em;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(51,168,231,.55); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--muted-dark); font-weight: 500; text-decoration: none; transition: color .2s;
}
.link-arrow::after { content: "\2193"; transition: transform .25s var(--ease-out); }
.link-arrow:hover { color: var(--white); }
.link-arrow:hover::after { transform: translateY(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: max(640px, min(100vh, 940px)); /* fallback for browsers without svh */
  min-height: max(640px, min(100svh, 940px));
  display: flex; align-items: center;
  background:
    radial-gradient(1200px 700px at 72% 45%, rgba(38,110,184,.20), transparent 60%),
    var(--night);
  color: var(--white);
  cursor: crosshair;
  -webkit-tap-highlight-color: transparent;
}
.hero::before { /* dotted field, fades toward the edges */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(169,182,204,.16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(900px 600px at 68% 50%, #000 20%, transparent 75%);
          mask-image: radial-gradient(900px 600px at 68% 50%, #000 20%, transparent 75%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.hero-inner {
  position: relative; z-index: 1; width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 120px var(--gutter) 96px;
  pointer-events: none;
}
.hero-inner a { pointer-events: auto; }

.hero-title {
  margin: 0; max-width: 10.5ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 6.4vw, 92px); line-height: .96; letter-spacing: -0.042em;
  text-wrap: balance;
}
.hero-lede {
  margin: 28px 0 36px; max-width: 30ch;
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted-dark);
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* Load-in */
.hero-inner > * { animation: rise .9s var(--ease-out) both; }
.hero-inner > :nth-child(2) { animation-delay: .08s; }
.hero-inner > :nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Statement ---------- */
.statement {
  background: var(--paper);
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(40px, 6vw, 72px);
}
.statement-text {
  max-width: 24ch; margin: 0 auto 0 max(0px, calc((100% - var(--max)) / 2));
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -0.035em;
  color: var(--ink);
}
.statement-text span { white-space: nowrap; background-repeat: no-repeat; background-size: 0% .14em; background-position: 0 92%; transition: background-size 1s var(--ease-out); }
.statement-text.is-in span { background-size: 100% .14em; }
.statement-text.is-in .hl-apex { transition-delay: .25s; }
.statement-text.is-in .hl-tail { transition-delay: .5s; }
.hl-wing { background-image: linear-gradient(90deg, var(--sky), var(--sky)); }
.hl-apex { background-image: linear-gradient(90deg, var(--sky), var(--deep)); }
.hl-tail { background-image: linear-gradient(90deg, var(--yellow), var(--orange)); }

/* ---------- Approach ---------- */
.approach {
  background: var(--paper);
  padding: clamp(24px, 4vw, 56px) var(--gutter) clamp(88px, 12vw, 160px);
}
.stages { max-width: var(--max); margin-left: auto; margin-right: auto; }
.stages {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.stage {
  background: var(--white); border-radius: var(--radius);
  padding: 28px 28px 32px;
  border: 1px solid transparent;
  transition: border-color .3s, transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.stage:hover { border-color: var(--line); transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(0,31,67,.35); }
.stage-mark { width: 104px; height: 104px; margin-bottom: 28px; overflow: visible; }
.stage-mark .ghost { stroke: #E2E8F1; }
.stage-mark .ghost-node { fill: #E2E8F1; stroke: none; }
.stage-num { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.stage-text { margin: 0; color: var(--muted); font-size: 16px; }

/* stage mark animations, triggered by .is-in */
.stage .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage.is-in .draw { animation: draw 1s var(--ease-out) .35s forwards; }
.stage.is-in .draw-late { animation-delay: .55s; }
.stage .pop { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.stage.is-in .pop { animation: pop .6s var(--ease-out) 1.05s forwards; }
.stage.is-in .pop-late { animation-delay: 1.25s; }
.stage .pulse { stroke: var(--sky); stroke-width: 2; fill: none; transform-box: fill-box; transform-origin: center; opacity: 0; }
.stage.is-in .pulse { animation: pulse 2.4s ease-out .4s infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 60% { transform: scale(1.18); } to { transform: scale(1); } }
@keyframes pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.stages .stage:nth-child(2) { transition-delay: .08s; }
.stages .stage:nth-child(3) { transition-delay: .16s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stage .draw { stroke-dashoffset: 0; animation: none !important; }
  .stage .pop { transform: none; animation: none !important; }
  .stage .pulse { display: none; }
  .statement-text span { background-size: 100% .14em; transition: none; }
}

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--white);
  padding: clamp(96px, 14vw, 180px) var(--gutter);
}
.cta-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cta-inner { max-width: var(--max); margin: 0 auto; }
.cta-title {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 7vw, 104px); line-height: .98; letter-spacing: -0.045em;
}
.cta-lede { margin: 22px 0 40px; max-width: 34ch; color: var(--muted-dark); font-size: clamp(18px, 1.6vw, 21px); }
.cta-mail {
  display: inline-flex; align-items: baseline; gap: .3em; flex-wrap: wrap;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 4.2vw, 56px); letter-spacing: -0.03em; line-height: 1.15;
  text-decoration: none; color: var(--white);
  background: linear-gradient(90deg, var(--sky), var(--mid) 45%, var(--yellow) 75%, var(--orange)) no-repeat 0 100% / 0% 3px;
  padding-bottom: 6px; transition: background-size .6s var(--ease-out);
  overflow-wrap: anywhere;
}
.cta-mail:hover, .cta-mail:focus-visible { background-size: 100% 3px; }
.cta-arrow { font-size: .7em; color: var(--orange); transition: transform .35s var(--ease-out); }
.cta-mail:hover .cta-arrow { transform: translate(4px, -4px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px;
  padding: 28px max(var(--gutter), calc((100% - var(--max)) / 2));
}
.footer-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--muted); }
.footer-meta a { text-decoration: none; color: var(--ink); font-weight: 500; }
.footer-meta a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .hero { align-items: flex-end; min-height: max(640px, 100vh); min-height: max(640px, 100svh); }
  .hero-inner { padding-top: 0; padding-bottom: max(48px, env(safe-area-inset-bottom)); }
  .hero-title { max-width: 11ch; font-size: clamp(36px, 11.4vw, 64px); }
  .cta { padding-top: 168px; }
  .stages { grid-template-columns: 1fr; gap: 14px; }
  .stage { padding: 24px 22px 26px; }
  .stage-mark { width: 84px; height: 84px; margin-bottom: 20px; }
  .stage:hover { transform: none; box-shadow: none; }
}
@media (max-width: 520px) {
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .hero-lede { margin: 20px 0 28px; }
  .hero-actions { gap: 4px; }
  .hero-actions .btn { width: 100%; }
  .cta-mail { font-size: clamp(24px, 7.4vw, 30px); }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
