/* ============================================================
   Navier — landing page
   Design tokens, then layout, then motion.
   Motion rules of thumb used throughout:
     · enter/exit  → ease-out   · on-screen movement → ease-in-out
     · UI feedback stays under 300ms; marketing reveals may run longer
   ============================================================ */

/* ── fonts ────────────────────────────────────────────────────
   Self-hosted: the same variable woff2 files Google Fonts serves,
   split on the same unicode ranges, so a subset loads only when a
   character in it is on the page. ↗ ∂ ∇ are in none of them and
   come from system fonts, as they did from Google. Licences
   (SIL OFL 1.1) sit beside the files in assets/fonts/. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ν and ρ in the equation */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  /* colour */
  --navy:      #0a1628;
  --deep:      #050b16;
  --ink:       #ffffff;
  --blue:      #7ba7c7;
  --blue-lift: #a8c9e0;
  --muted:     #9dabbc;
  --dim:       #7f8da0;
  --line:      rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
  --cream:     #f5f5f2;
  --cream-ink: #101b2b;

  /* type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* easing — the built-in curves are too weak for UI */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* layout */
  --gutter: 6.25%;
  --max: 1440px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  /* no grey flash on tap; every pressable has its own :active instead */
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, canvas { display: block; max-width: 100%; }

/* taps fire at once rather than waiting to rule out a double-tap zoom;
   pinch zoom is untouched */
a, button { touch-action: manipulation; }

/* control labels aren't content: a long press shouldn't select them. The
   contact address stays selectable so it can be copied. */
.nav > a, .btn, .btn-ghost, .motion-toggle {
  user-select: none;
  -webkit-user-select: none;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  /* viewport-fit=cover paints under the notch; keep content clear of it
     in landscape */
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px))
                  max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip {
  position: fixed;
  top: -80px; left: 20px; z-index: 100;
  background: var(--ink); color: var(--navy);
  padding: 12px 16px; font-size: 13px;
  transition: top 180ms var(--ease-out);
}
.skip:focus { top: 14px; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.display {
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

.accent { color: var(--blue); }
.muted  { color: var(--muted); }

.eyebrow {
  display: flex; align-items: center; gap: 13px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue);
}
.tick {
  display: block; height: 1px; width: 26px;
  background: currentColor;
  transform-origin: left center;
}

.fine { font-size: 12px; color: var(--dim); letter-spacing: 0; }

/* ── arrows nudge on hover; pointer devices only ─────────────── */
.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  a:hover > .arrow      { transform: translate(2px, -2px); }
  a:hover > .arrow-down { transform: translate(0, 3px); }
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  transition: background 260ms var(--ease-out),
              backdrop-filter 260ms var(--ease-out),
              border-color 260ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.header[data-stuck] {
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-soft);
}

.header-inner {
  height: 84px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.brand img { width: 188px; height: auto; object-fit: contain; }
.brand { display: inline-flex; transition: opacity 200ms var(--ease-out), transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .brand:hover { opacity: 0.7; }
}
.brand:active { transform: scale(0.97); }

.nav {
  display: flex; align-items: center; gap: 38px;
  font-size: 13.5px; color: var(--muted);
}
.nav > a { transition: color 200ms ease, transform 160ms var(--ease-out); }
.nav > a:not(.nav-cta) > span {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
/* underline grows from the left rather than fading in */
.nav > a:not(.nav-cta) > span::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--blue);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav > a:hover { color: var(--ink); }
  .nav > a:not(.nav-cta):hover > span::after { transform: scaleX(1); }
}
.nav > a:active { transform: scale(0.97); }
.nav-cta { color: var(--ink); }
.nav-cta .arrow { margin-left: 10px; }

/* ============================================================
   HERO — the content sits inside the medium.
   The simulation is the page; type floats on it, and a veil keeps
   the left column legible without hiding the flow.
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 132px;
  isolation: isolate;
}

.field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1200ms var(--ease-out);
}
.field[data-ready] { opacity: 1; }

/* keeps type legible over the simulation without hiding it */
.field-veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(85% 78% at 8% 48%, rgba(10, 22, 40, 0.96) 0%, rgba(10, 22, 40, 0.74) 40%, rgba(10, 22, 40, 0) 78%),
    linear-gradient(to bottom, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0) 24%),
    linear-gradient(to top, var(--navy) 2%, rgba(10, 22, 40, 0) 34%);
}

.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero h1 {
  font-size: clamp(48px, 7.4vw, 104px);
  margin-top: 30px;
}
.hero .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero .line > span { display: block; }

.hero-body { max-width: 560px; margin-top: 40px; }

.lede {
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.62;
  color: #ccd5e0;
  letter-spacing: -0.012em;
}

.hero-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px;
  margin-top: 34px;
}

/* ── primary button ──────────────────────────────────────────
   Fill sweeps in from the left with clip-path so the label never
   crossfades between two colours. */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 36px;
  padding: 16px 22px;
  background: var(--blue);
  color: var(--navy);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0;
  transition: transform 160ms var(--ease-out);
  will-change: transform;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 340ms var(--ease-out);
}
.btn > * { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { clip-path: inset(0 0 0 0); }
}
.btn:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: var(--muted);
  padding: 8px 2px;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { color: var(--ink); }
}
.btn-ghost:active { transform: scale(0.97); }

.hero-body .fine { margin-top: 18px; }

.hero-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px 32px;
  padding: 22px max(var(--gutter), env(safe-area-inset-right, 0px)) 22px max(var(--gutter), env(safe-area-inset-left, 0px));
  margin-top: 56px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--dim);
}
.hero-foot-right { display: flex; align-items: center; gap: 22px; }
.eq { color: var(--dim); white-space: nowrap; }

/* with no panel to host a pause control, motion gets a page-level one */
.motion-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  appearance: none; background: none; border: 0;
  border-left: 1px solid var(--line);
  padding: 6px 0 6px 18px;
  font: inherit; font-size: 12px; color: var(--dim);
  cursor: pointer;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
.motion-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue);
  transition: background 200ms ease, transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .motion-toggle:hover { color: var(--ink); }
}
.motion-toggle:active { transform: scale(0.97); }
.motion-toggle[aria-pressed='true'] .motion-dot {
  background: var(--dim);
  transform: scale(0.75);
}

/* ============================================================
   MARKETS
   ============================================================ */

.markets { background: var(--deep); border-block: 1px solid var(--line-soft); }
.markets .row {
  display: grid; grid-template-columns: 1.1fr repeat(4, 1fr);
  align-items: center; min-height: 118px; gap: 20px;
}
.markets .row > span { font-size: 18px; letter-spacing: -0.02em; }
.markets .row .label { font-size: 12px; color: var(--dim); line-height: 1.7; }

/* ============================================================
   SECTIONS
   ============================================================ */

.section { padding-block: clamp(72px, 9vw, 128px); }

.section-label {
  display: flex; justify-content: space-between; gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim);
}
.section-label span:first-child {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

/* ── approach ─────────────────────────────────────────────── */

.approach-intro {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 100px);
  margin-top: 60px;
}
.approach-intro h2 { font-size: clamp(34px, 4.1vw, 58px); }
.intro-copy { max-width: 470px; padding-top: 6px; }
.intro-copy p { font-size: 17.5px; line-height: 1.68; letter-spacing: -0.012em; }
.intro-copy p + p { margin-top: 22px; font-size: 16px; }

.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
  margin-top: clamp(56px, 7vw, 92px);
}
.principles article {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
/* the rule brightens across its width instead of blinking on */
.principles article::after {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 420ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .principles article:hover::after { transform: scaleX(1); }
}
.principles h3 {
  font-size: 25px; font-weight: 500; letter-spacing: -0.03em;
  margin: 26px 0 14px;
}
.principles p { color: var(--muted); font-size: 15px; line-height: 1.75; max-width: 330px; }
.number { color: var(--blue); }

/* ── process ──────────────────────────────────────────────── */

.process { background: var(--deep); border-block: 1px solid var(--line-soft); }
.process-title { font-size: clamp(32px, 3.8vw, 54px); margin-top: 52px; }

.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.6vw, 40px);
  margin-top: clamp(52px, 6vw, 80px);
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
/* a line that draws itself left→right as the row scrolls in */
.steps li::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, var(--blue), rgba(123, 167, 199, 0.15));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.steps li[data-shown]::before { transform: scaleX(1); }
.step-index { color: var(--blue); }
.steps h3 {
  font-size: 21px; font-weight: 500; letter-spacing: -0.028em;
  margin: 20px 0 12px;
}
.steps p { color: var(--muted); font-size: 14.5px; line-height: 1.72; }

/* ── origin (light break) ─────────────────────────────────── */

.origin {
  background: var(--cream);
  color: var(--cream-ink);
  padding-block: clamp(64px, 8vw, 104px);
}
.origin-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 7vw, 96px); align-items: center;
}
.origin-art {
  display: flex; flex-direction: column; align-items: center; gap: 26px;
}
.origin-art img {
  width: 62%; height: auto;
  filter: brightness(0) saturate(100%);
  opacity: 0.85;
}
.origin-eq { color: #5d6773; letter-spacing: 0.14em; }
.origin .eyebrow { color: #4d6a80; }
.origin h2 { font-size: clamp(30px, 3.4vw, 46px); margin-top: 24px; }
.origin-copy > p:last-child {
  color: #4b535e; line-height: 1.8; max-width: 520px; margin-top: 22px;
  font-size: 16.5px; letter-spacing: -0.008em;
}

/* ── contact ──────────────────────────────────────────────── */

.contact-grid {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(36px, 7vw, 96px);
  margin-top: 56px;
}
.contact h2 { font-size: clamp(30px, 3.5vw, 48px); }
.contact-copy p { max-width: 380px; }

/* the address fills with the accent colour via clip-path, so the
   two colours never crossfade against each other. Its scroll reveal
   sits on a wrapper: [data-reveal] owns transform and transition, and
   on the link itself it would swallow the press. */
.mail {
  position: relative;
  display: inline-flex; align-items: baseline; gap: clamp(28px, 5vw, 72px);
  margin-top: 26px; padding-bottom: 12px;
  border-bottom: 1px solid var(--blue);
  font-size: clamp(21px, 2.1vw, 26px);
  letter-spacing: -0.03em;
  transition: transform 160ms var(--ease-out);
}
.mail-text { position: relative; display: inline-block; }
.mail-text::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--blue);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 380ms var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .mail:hover .mail-text::after { clip-path: inset(0 0 0 0); }
}
.mail:active { transform: scale(0.985); }
.contact-copy .fine { margin-top: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--deep);
  border-top: 1px solid var(--line-soft);
  padding-block: 38px calc(30px + env(safe-area-inset-bottom, 0px));
}
.footer-top {
  display: flex; align-items: center; gap: 44px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}
.footer .brand img { width: 160px; }
.footer-line { font-size: 12px; color: var(--dim); }
.footer-social { font-size: 12px; margin-left: auto; color: var(--muted); transition: color 200ms ease, transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .footer-social:hover { color: var(--ink); }
}
.footer-social:active { transform: scale(0.97); }
.footer-bottom {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: clamp(24px, 5vw, 72px);
  margin-top: 24px;
  font-size: 11.5px; color: #77859a; line-height: 1.75;
}

/* ============================================================
   SCROLL REVEALS
   Marketing entrances, so they may run past the 300ms UI budget.
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal][data-shown] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

[data-reveal-line] {
  transform: translate3d(0, 105%, 0);
  transition: transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
[data-reveal-line][data-shown] { transform: translate3d(0, 0, 0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 1600px) {
  :root { --gutter: 92px; }
}

@media (max-width: 1024px) {
  .approach-intro { grid-template-columns: 1fr; gap: 34px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .contact-grid, .origin-grid { grid-template-columns: 1fr; }
  .origin-art { align-items: flex-start; }
  .origin-art img { width: 180px; }
}

@media (max-width: 820px) {
  .header-inner { height: 72px; }
  .brand img { width: 158px; }
  .nav { gap: 24px; font-size: 13px; }
  .nav > a:not(.nav-cta) { display: none; }
  .principles { grid-template-columns: 1fr; gap: 30px; }
  .principles p { max-width: none; }
  .hero-foot { margin-top: 36px; }
  .markets .row { grid-template-columns: repeat(2, 1fr); padding-block: 24px; }
  .markets .row .label { grid-column: 1 / -1; }
  .footer-top { flex-wrap: wrap; gap: 20px; }
  .footer-line { order: 3; width: 100%; }
  .footer-bottom { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 560px) {
  :root { --gutter: 22px; }
  html { scroll-padding-top: 80px; }

  /* no room for an off-to-the-side composition: scrim the whole field */
  .field-veil {
    background:
      linear-gradient(to bottom, rgba(10, 22, 40, 0.92) 0%, rgba(10, 22, 40, 0.6) 46%, rgba(10, 22, 40, 0.78) 82%, var(--navy) 100%);
  }

  /* comfortable touch targets */
  .btn-ghost { min-height: 44px; padding-inline: 0; }
  .motion-toggle { min-height: 44px; border-left: 0; padding-left: 0; }
  .nav-cta { padding-block: 12px; }

  /* the hero owns the whole first screen on phones too: svh is the height
     with the browser bars showing, so nothing below peeks in on load */
  .hero { padding-top: 104px; padding-bottom: 8px; }
  .hero h1 { font-size: clamp(40px, 12vw, 56px); margin-top: 24px; }
  .hero-body { margin-top: 30px; }
  .hero-actions { gap: 12px 20px; margin-top: 28px; }
  .btn { gap: 24px; width: 100%; justify-content: space-between; }
  .hero-foot { font-size: 11px; padding-block: 18px; }
  .eq { display: none; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; }
  .intro-copy p { font-size: 16.5px; }
  .mail { gap: 34px; }
}

/* ============================================================
   REDUCED MOTION
   Fewer and gentler, not zero: opacity stays, movement goes.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] { transform: none; transition: opacity 300ms ease; }
  [data-reveal-line] { transform: none; transition: none; }

  .arrow,
  .btn::before,
  .mail-text::after,
  .principles article::after,
  .steps li::before { transition: none; }

  .steps li::before,
  .principles article::after { transform: scaleX(1); }

  .btn:active,
  .btn-ghost:active,
  .mail:active,
  .nav > a:active,
  .motion-toggle:active,
  .brand:active,
  .footer-social:active { transform: none; }

  .field { transition: none; }
}
