/* ==========================================================================
   Peak Digital — five-colour system
   Night #0D1233 (ground)   Dusk #3B2A7A (surfaces)   Snow #F4F2FF (text)
   Ember #FF7A3D (primary accent)   Gold #FFC56B (secondary accent)
   The rose alpenglow lives only in the 3D sky, never in the interface.
   ========================================================================== */

:root {
  --night: #0D1233;
  --dusk: #3B2A7A;
  --ember: #FF7A3D;
  --gold: #FFC56B;
  --snow: #F4F2FF;
  --mist: #BCB8DC; /* snow at reduced strength, for secondary text */
  --line: rgba(244, 242, 255, .14);

  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-text: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .18, 1);

  --gutter: clamp(16px, 4.2vw, 64px);

  /* Type scale — perfect fourth (1.333) from an 18px body */
  --fs-sm: .875rem;
  --fs-body: 1.125rem;
  --fs-lead: clamp(1.05rem, 1.35vw, 1.3rem);
  --fs-h3: clamp(1.45rem, 2vw, 2rem);
  --fs-h2: clamp(2.3rem, 5.6vw, 5.4rem);
  --fs-hero: clamp(2.5rem, 7.3vw, 8.6rem);
}

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

html {
  background: var(--night);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
html.is-loading { overflow: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% 0%, #2A1E5C 0%, transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #1A1446 100%);
  color: var(--snow);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Lines revealed through a mask (SplitText) */
.ln-mask { padding-bottom: .12em; margin-bottom: -.12em; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--gold); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 8px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 400;
  padding: 12px 18px; border-radius: 999px;
  background: var(--snow); color: var(--night);
  font-weight: 600; text-decoration: none;
  transition: top .3s var(--ease-out);
}
.skip:focus { top: 16px; }

/* ---------- Scene layers ---------- */

#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; display: block;
  opacity: 0; transition: opacity 1s var(--ease-out);
}
#scene.is-ready { opacity: 1; }

.veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13, 18, 51, .55) 0%, rgba(13, 18, 51, 0) 16%, rgba(13, 18, 51, 0) 52%, rgba(13, 18, 51, .72) 100%),
    radial-gradient(130% 90% at 50% 45%, transparent 55%, rgba(8, 10, 34, .6) 100%);
}

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

main, .foot { position: relative; z-index: 2; }

/* ---------- Loader ---------- */

.loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: radial-gradient(90% 70% at 50% 62%, #2E2068 0%, var(--night) 70%);
  clip-path: inset(0 0 0 0);
}
.is-return .loader-inner { display: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loader-mark { width: clamp(84px, 9vw, 112px); height: auto; overflow: visible; margin-bottom: 10px; }
.loader-p {
  fill: rgba(244, 242, 255, 0);
  stroke: var(--snow); stroke-width: 5; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.loader-sun { fill: url(#g-sun); }
.loader-meta {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.loader-unit { font-size: .38em; margin-left: .35em; color: var(--mist); letter-spacing: 0; }
.loader-text { color: var(--mist); font-size: var(--fs-sm); }

/* ---------- Cursor ----------
   Native OS cursors with a custom image: drawn by the system, so they never lag.
   Snow arrow by default; gold-to-ember arrow over anything clickable. */

:root {
  --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3.5v20.2l5.3-4.9 3.6 8.3 3.9-1.7-3.6-8.1h7.3z' fill='%230D1233' fill-opacity='.35' transform='translate(1.2 1.6)'/%3E%3Cpath d='M5 3.5v20.2l5.3-4.9 3.6 8.3 3.9-1.7-3.6-8.1h7.3z' fill='%23F4F2FF' stroke='%230D1233' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, auto;
  --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23FFC56B'/%3E%3Cstop offset='1' stop-color='%23FF7A3D'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 3.5v20.2l5.3-4.9 3.6 8.3 3.9-1.7-3.6-8.1h7.3z' fill='%230D1233' fill-opacity='.35' transform='translate(1.2 1.6)'/%3E%3Cpath d='M5 3.5v20.2l5.3-4.9 3.6 8.3 3.9-1.7-3.6-8.1h7.3z' fill='url(%23g)' stroke='%230D1233' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, pointer;
}
html { cursor: var(--cur); }
a, button, label, summary, [role="button"] { cursor: var(--cur-link); }

.shock {
  position: fixed; left: 0; top: 0; z-index: 240; pointer-events: none;
  width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 40px rgba(255, 197, 107, .35), inset 0 0 40px rgba(255, 122, 61, .3);
}

/* ---------- Buttons & links ---------- */

.btn {
  --mx: 50%; --my: 50%;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
  font: 600 1rem/1 var(--f-text); letter-spacing: .005em;
  text-decoration: none; cursor: var(--cur-link); background: none;
  transition: color .45s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--mx); top: var(--my);
  width: 260%; aspect-ratio: 1; border-radius: 50%;
  background: var(--snow);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .75s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translate(-50%, -50%) scale(1); }
.btn > span, .btn > svg { position: relative; display: inline-block; }

.btn-solid {
  color: var(--night);
  background: linear-gradient(100deg, var(--gold) 0%, var(--ember) 100%);
  box-shadow: 0 18px 50px -18px rgba(255, 122, 61, .7);
}
.btn-line { color: var(--snow); box-shadow: inset 0 0 0 1.5px rgba(244, 242, 255, .38); }
.btn-line:hover, .btn-line:focus-visible { color: var(--night); }
.btn-sm { min-height: 46px; padding: 0 22px; font-size: .95rem; }

.roll {
  position: relative; display: inline-flex; align-items: center;
  min-height: 44px;
  text-decoration: none; font-weight: 500; line-height: 1.35;
}
.roll-clip { display: inline-block; overflow: hidden; height: 1.35em; }
.roll-clip > span { position: relative; display: inline-block; transition: transform .6s var(--ease-out); }
.roll-clip > span::after {
  content: attr(data-text); position: absolute; left: 0; top: 100%;
  color: var(--gold);
}
.roll:hover .roll-clip > span, .roll:focus-visible .roll-clip > span { transform: translateY(-100%); }

/* ---------- Nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  transition: transform .7s var(--ease-out), background-color .4s, box-shadow .4s;
}
.nav.is-solid {
  /* Solid tint instead of backdrop-filter: a blur over the live 3D canvas is re-computed every frame */
  background: rgba(13, 18, 51, .9);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-mark { width: 38px; height: 38px; transition: transform .9s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.brand-word { font-family: var(--f-display); font-weight: 400; font-size: .95rem; letter-spacing: .01em; }
.brand-word b { font-weight: 800; }

.nav-links { display: flex; gap: clamp(20px, 3vw, 44px); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---------- Altimeter ---------- */

.altimeter {
  position: fixed; right: clamp(14px, 1.8vw, 30px); top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
  font-variant-numeric: tabular-nums;
}
.alt-read { font-family: var(--f-display); font-weight: 500; font-size: .9rem; white-space: nowrap; }
.alt-label { font-size: .85rem; color: var(--mist); white-space: nowrap; }
.alt-track {
  position: relative; width: 2px; height: min(40vh, 320px); margin-right: 8px;
  background: rgba(244, 242, 255, .16); border-radius: 2px;
}
.alt-fill {
  position: absolute; inset: 0; border-radius: 2px;
  background: linear-gradient(to top, var(--ember), var(--gold));
  transform-origin: 50% 100%; transform: scaleY(0);
}
.alt-stop {
  position: absolute; left: 50%; bottom: calc(var(--at, 0) * 100%);
  width: 13px; height: 13px; border-radius: 50%;
  transform: translate(-50%, 50%);
  background: var(--night); border: 2px solid rgba(244, 242, 255, .45);
  transition: background-color .4s, border-color .4s, transform .5s var(--ease-out);
}
.alt-stop::before { content: ""; position: absolute; inset: -16px; }
.alt-stop:hover { transform: translate(-50%, 50%) scale(1.4); }
.alt-stop.is-past { background: var(--gold); border-color: var(--gold); }

@media (max-width: 899px) { .altimeter { display: none; } }

/* ---------- Summit bar + camp menu (phone) ---------- */

.summit-bar, .camp-menu { display: none; }

@media (max-width: 899px) {
  .nav { padding-block: 12px; }
  .summit-bar {
    position: fixed; z-index: 70;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 6px 6px 6px 18px; border-radius: 999px;
    background: rgba(13, 18, 51, .94);
    box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(0, 0, 0, .7);
    font-variant-numeric: tabular-nums;
  }
  .sb-read { font-family: var(--f-display); font-weight: 500; font-size: .85rem; white-space: nowrap; }
  .sb-label { display: inline-block; margin-left: 8px; font-family: var(--f-text); font-weight: 500; color: var(--gold); }
  .sb-menu {
    display: inline-flex; align-items: center; gap: 12px;
    min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px;
    background: var(--snow); color: var(--night); font-weight: 600; cursor: var(--cur-link);
  }
  .sb-burger { display: grid; gap: 5px; width: 18px; }
  .sb-burger i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease-out); }
  .sb-menu[aria-expanded="true"] .sb-burger i:first-child { transform: translateY(3.5px) rotate(45deg); }
  .sb-menu[aria-expanded="true"] .sb-burger i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .camp-menu {
    position: fixed; inset: 0; z-index: 65;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 90px var(--gutter) calc(100px + env(safe-area-inset-bottom));
    background: radial-gradient(120% 70% at 50% 100%, #2E2068 0%, var(--night) 70%);
    clip-path: circle(0% at calc(100% - 60px) calc(100% - 40px));
  }
  .camp-menu[hidden] { display: none; }
  .cm-list { display: grid; }
  .cm-link {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
    text-decoration: none;
  }
  .cm-name { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 9vw, 2.6rem); letter-spacing: -.04em; line-height: 1.1; }
  .cm-alt { order: 2; font-size: .85rem; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .cm-link.is-here .cm-name { color: var(--gold); }
  .cm-foot { display: grid; gap: 10px; margin-top: 28px; color: var(--mist); }
  .cm-foot a { text-decoration: none; min-height: 44px; display: flex; align-items: center; }

  /* Clear the summit bar (selectors carry extra weight: these blocks are defined further down) */
  body .foot { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  main .hero { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 130px var(--gutter) 36px;
  outline: none;
}
.hero-title {
  font-family: var(--f-display); font-weight: 300;
  font-size: var(--fs-hero); line-height: .98; letter-spacing: -.045em;
  perspective: 1100px;
}
.ht-line { display: block; perspective: 900px; transform-style: preserve-3d; }
.ht-line:nth-child(2) { padding-left: min(8vw, 140px); }
/* --hv (0..1) is set per letter by the cursor-proximity effect; it only touches
   compositor-friendly properties plus colour, never layout */
.hero-title .ch {
  translate: 0 calc(var(--hv, 0) * -12%);
  scale: calc(1 + var(--hv, 0) * .07);
  color: color-mix(in srgb, var(--gold) calc(var(--hv, 0) * 100%), var(--snow));
}

.hero-meta { margin-top: clamp(22px, 3.4vh, 36px); padding-left: min(8vw, 140px); }
.hero-sub {
  max-width: 40ch; font-size: var(--fs-lead); color: rgba(244, 242, 255, .84); text-wrap: pretty;
  text-shadow: 0 2px 22px rgba(13, 18, 51, .9), 0 0 2px rgba(13, 18, 51, .6);
}
.hero-title { text-shadow: 0 8px 60px rgba(13, 18, 51, .5); }
/* ---------- Ascent trail (hero) ----------
   Three reached summits (projects) and the next one (the visitor's business),
   stepping upward left to right; the line is drawn through the dot centres by main.js */
.trail { position: relative; margin-top: clamp(28px, 4.5vh, 44px); }
.trail-line {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none; z-index: 0;
}
.trail-line path {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; opacity: .7;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.trail-list {
  position: relative; z-index: 1;
  list-style: none; display: flex; align-items: flex-start;
  gap: clamp(22px, 3.4vw, 54px);
}
.trail-node:nth-child(1) { margin-top: 30px; }
.trail-node:nth-child(2) { margin-top: 20px; }
.trail-node:nth-child(3) { margin-top: 10px; }

.trail-link {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  max-width: 150px; text-decoration: none; color: inherit; border-radius: 12px;
}
.trail-dot {
  position: relative; display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%; overflow: hidden;
  background: var(--night);
  border: 1.5px solid rgba(244, 242, 255, .38);
  box-shadow: 0 0 0 6px rgba(13, 18, 51, .62), 0 14px 30px -10px rgba(0, 0, 0, .7);
  transition: transform .6s var(--ease-out), border-color .4s;
}
.trail-dot img { width: 100%; height: 100%; object-fit: cover; object-position: 28% 35%; transform: scale(1.6); }
.trail-name {
  margin-top: 12px;
  font-family: var(--f-display); font-weight: 500; font-size: .92rem; line-height: 1.2; letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(13, 18, 51, .9);
}
.trail-place { margin-top: 3px; font-size: .8rem; color: var(--mist); text-shadow: 0 2px 14px rgba(13, 18, 51, .9); }

.trail-link:hover .trail-dot, .trail-link:focus-visible .trail-dot { transform: translateY(-5px) scale(1.08); border-color: var(--gold); }

/* Hover / focus: a larger look at that project rises above the node */
.trail-preview {
  position: absolute; left: -12px; bottom: calc(100% + 14px); z-index: 5;
  width: 250px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px;
  border: 1px solid rgba(244, 242, 255, .2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
  opacity: 0; transform: translateY(12px) scale(.92); transform-origin: 20% 100%;
  transition: opacity .3s, transform .6s var(--ease-out);
  pointer-events: none;
}
.trail-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.trail-link:hover .trail-preview, .trail-link:focus-visible .trail-preview { opacity: 1; transform: none; }

/* The next summit: the visitor's own business */
.trail-node--you .trail-dot {
  overflow: visible; color: var(--night); border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  box-shadow: 0 0 0 6px rgba(13, 18, 51, .62), 0 14px 34px -8px rgba(255, 122, 61, .65);
}
.trail-node--you .trail-dot::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  animation: ping 2.2s var(--ease-out) infinite;
}
.trail-node--you .trail-dot svg { width: 26px; height: 26px; fill: currentColor; }
.trail-node--you .trail-name { color: var(--gold); }

.hero-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  margin-top: clamp(40px, 7vh, 72px);
  font-size: var(--fs-sm); color: var(--mist);
}
.hero-hint { display: flex; align-items: center; gap: 10px; }
.hint-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 0 0 rgba(255, 122, 61, .6);
  animation: ping 2.2s var(--ease-out) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 61, .65); }
  100% { box-shadow: 0 0 0 14px rgba(255, 122, 61, 0); }
}
.scroll-cue { display: flex; align-items: center; gap: 14px; padding-right: clamp(0px, 5vw, 70px); }
.cue-line { position: relative; width: 64px; height: 1.5px; background: rgba(244, 242, 255, .2); overflow: hidden; }
.cue-line::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  transform: translateX(-100%); animation: cue 2.4s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { transform: translateX(-100%); } 55% { transform: translateX(0); } 100% { transform: translateX(100%); } }

@media (max-width: 640px) {
  .ht-line:nth-child(2), .hero-meta { padding-left: 0; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .trail-list { gap: 10px; justify-content: space-between; }
  .trail-link { max-width: 78px; }
  .trail-dot { width: 46px; height: 46px; box-shadow: 0 0 0 4px rgba(13, 18, 51, .62), 0 10px 24px -8px rgba(0, 0, 0, .7); }
  .trail-node--you .trail-dot svg { width: 20px; height: 20px; }
  .trail-name { margin-top: 9px; font-size: .78rem; }
  .trail-place { font-size: .72rem; }
  .trail-node:nth-child(1) { margin-top: 18px; }
  .trail-node:nth-child(2) { margin-top: 12px; }
  .trail-node:nth-child(3) { margin-top: 6px; }
}

/* ---------- Shared section type ---------- */

section { outline: none; }

.sec-title {
  font-family: var(--f-display); font-weight: 400;
  font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.04em;
  text-wrap: balance;
}
.sec-lead {
  margin-top: 22px; max-width: 42ch; color: var(--mist); font-size: var(--fs-lead); text-wrap: pretty;
  text-shadow: 0 2px 24px rgba(13, 18, 51, .75);
}
.sec-title, .contact-title, .email { text-shadow: 0 6px 50px rgba(13, 18, 51, .45); }
.split-up .sw { padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- Work (portfolio) ---------- */

.work { position: relative; padding: 16vh calc(var(--gutter) + 70px) 14vh var(--gutter); }
.work-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 18px 60px; margin-bottom: clamp(36px, 6vh, 72px);
}
.work-head .sec-lead { margin-top: 0; max-width: 32ch; }

.work-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 36px); align-items: start;
  perspective: 1800px;
}
/* The three projects step upward, left to right: an ascent */
.work-item:nth-child(1) { margin-top: 120px; }
.work-item:nth-child(2) { margin-top: 60px; }
.work-item { transform-style: preserve-3d; transition: opacity .5s var(--ease-out), filter .5s var(--ease-out); }
.work-list:hover .work-item:not(:hover) { opacity: .5; filter: saturate(.55); }

.work-card { display: block; text-decoration: none; color: inherit; border-radius: 24px; }
.work-tilt { transform-style: preserve-3d; }

.work-frame {
  position: relative; padding: 9px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(59, 42, 122, .72), rgba(13, 18, 51, .9));
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -45px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.work-frame::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: radial-gradient(60% 50% at 50% 100%, rgba(255, 122, 61, .55), transparent 70%);
  filter: blur(26px); opacity: 0; transition: opacity .6s var(--ease-out);
}
.work-card:hover .work-frame::before, .work-card:focus-visible .work-frame::before { opacity: 1; }

.work-url {
  position: absolute; bottom: 19px; left: 19px; z-index: 2;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(13, 18, 51, .86);
  font-size: .78rem; font-weight: 500; letter-spacing: .01em;
  box-shadow: 0 0 0 1px var(--line);
}
.work-shot { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 10; background: var(--night); }
.work-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 18, 51, .7));
}
.work-zoom { position: absolute; inset: 0; transition: transform 1.1s var(--ease-out); }
.work-card:hover .work-zoom, .work-card:focus-visible .work-zoom { transform: scale(1.06); }
.work-zoom img { width: 100%; height: 118%; object-fit: cover; object-position: top center; will-change: transform; }

.work-meta {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px;
  padding: 18px 8px 0;
}
.work-name {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.2rem, 1.7vw, 1.65rem); line-height: 1.15; letter-spacing: -.035em;
}
.work-kind { grid-column: 1; margin-top: 4px; color: var(--mist); font-size: .95rem; }
.work-go {
  grid-column: 2; grid-row: 1 / span 2;
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1.5px solid rgba(244, 242, 255, .3);
  transition: background-color .45s var(--ease-out), border-color .45s, color .45s;
}
.work-arrows { position: relative; width: 20px; height: 20px; }
.work-arrows svg {
  position: absolute; inset: 0; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .6s var(--ease-out);
}
.work-arrows svg:last-child { transform: translate(-150%, 150%); }
.work-card:hover .work-go, .work-card:focus-visible .work-go { background: var(--ember); border-color: var(--ember); color: var(--night); }
.work-card:hover .work-arrows svg:first-child, .work-card:focus-visible .work-arrows svg:first-child { transform: translate(150%, -150%); }
.work-card:hover .work-arrows svg:last-child, .work-card:focus-visible .work-arrows svg:last-child { transform: none; }

@media (max-width: 899px) {
  .work { padding: 14vh var(--gutter) 10vh; }
  .work-list { grid-template-columns: 1fr; gap: 44px; perspective: none; }
  .work-item:nth-child(n) { margin-top: 0; }
  .work-list:hover .work-item:not(:hover) { opacity: 1; filter: none; }
}

/* ---------- Manifest ---------- */

.manifest {
  min-height: 115vh; display: grid; align-items: center;
  padding: 22vh var(--gutter);
}
.manifest-text {
  max-width: 28ch;
  font-family: var(--f-text); font-weight: 500;
  font-size: clamp(1.75rem, 3.7vw, 3.6rem); line-height: 1.16; letter-spacing: -.02em;
  font-variation-settings: "opsz" 96;
  text-shadow: 0 4px 40px rgba(13, 18, 51, .6);
}

/* ---------- Services ---------- */

.services { position: relative; }
.svc-track {
  display: flex; align-items: center; gap: clamp(22px, 2.4vw, 40px);
  width: max-content; height: 100vh;
  padding: 0 calc(var(--gutter) + 70px) 0 var(--gutter);
  perspective: 1600px;
}
.svc-intro { flex: none; width: min(36vw, 540px); padding-right: 2vw; }

.svc {
  flex: none;
  width: clamp(300px, 28vw, 420px);
  height: clamp(460px, 70vh, 620px);
  perspective: 1300px;
  transform-style: preserve-3d;
}
.svc-tilt { width: 100%; height: 100%; transform-style: preserve-3d; }

/* Near-transparent glass pane. No backdrop-filter (too costly over the live 3D canvas):
   the glass is a faint tint, a bright rim and a sheen that follows the cursor.
   The upper half stays clear so the mountain shows through; the lower half deepens for legible text. */
.svc-glass {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 30px;
  background: linear-gradient(180deg,
    rgba(244, 242, 255, .07) 0%, rgba(244, 242, 255, .02) 36%,
    rgba(13, 18, 51, .6) 60%, rgba(13, 18, 51, .84) 100%);
  border: 1px solid rgba(244, 242, 255, .17);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .03),
    0 40px 90px -45px rgba(0, 0, 0, .75);
}
.svc-glass::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 42% at 50% 30%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%);
}
.svc-glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .11) 46%, transparent 60%);
  background-size: 260% 100%;
  background-position: var(--gx, 30%) 0;
  opacity: .55; transition: opacity .5s var(--ease-out);
}
.svc:hover .svc-glass::after { opacity: 1; }

/* Topographic map of a summit: contour rings generated per card (main.js), icon on the peak */
.svc-topo { position: relative; flex: 1 1 auto; min-height: 130px; }
.topo-map {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(75% 85% at 50% 48%, #000 40%, transparent 88%);
  mask-image: radial-gradient(75% 85% at 50% 48%, #000 40%, transparent 88%);
  transition: transform 1.6s var(--ease-out);
}
.svc:hover .topo-map { transform: scale(1.08) rotate(-4deg); }
.topo-ring {
  fill: none; stroke: color-mix(in srgb, var(--accent) 36%, transparent); stroke-width: 1;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.topo-ring.is-index { stroke: color-mix(in srgb, var(--accent) 72%, transparent); stroke-width: 1.5; }

.svc-peak {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  display: grid; place-items: center;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(244, 242, 255, .16), rgba(13, 18, 51, .6) 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow:
    0 0 0 9px color-mix(in srgb, var(--accent) 8%, transparent),
    0 0 46px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: scale .8s var(--ease-out);
}
.svc:hover .svc-peak { scale: 1.08; }
.svc-icon {
  width: 40px; height: 40px;
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.svc-icon > * { stroke-dasharray: 1; stroke-dashoffset: 0; }

.svc-body { position: relative; padding: 0 clamp(24px, 2.2vw, 34px) clamp(20px, 2vw, 28px); }
.svc h3 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.3rem, 1.75vw, 1.75rem); line-height: 1.1; letter-spacing: -.03em;
  text-wrap: balance;
}
.svc-body > p { margin-top: 10px; color: var(--mist); font-size: .98rem; line-height: 1.5; }
.svc-list {
  list-style: none; display: grid; gap: 7px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--snow);
}
.svc-list li { display: flex; gap: 10px; align-items: baseline; }
.svc-list li::before {
  content: ""; flex: none; width: 10px; height: 8px;
  background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.svc-cta {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; margin-top: 10px;
  color: var(--accent); font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 9px) / 0 1.5px no-repeat;
  transition: background-size .5s var(--ease-out);
}
.svc-cta:hover, .svc-cta:focus-visible { background-size: calc(100% - 26px) 1.5px; }
.svc-cta svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .5s var(--ease-out);
}
.svc-cta:hover svg, .svc-cta:focus-visible svg { transform: translate(3px, -3px); }

.svc-progress { display: none; }

/* Phone: a native swipe rail with snap points, not a stacked desktop layout */
@media (max-width: 899px) {
  .services { padding: 16vh 0 10vh; }
  .svc-track {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    grid-auto-columns: min(80vw, 340px);
    column-gap: 14px; row-gap: 36px;
    width: auto; height: auto;
    padding: 0 var(--gutter) 6px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    scrollbar-width: none; perspective: none;
  }
  .svc-track::-webkit-scrollbar { display: none; }
  .svc-intro {
    grid-row: 1; grid-column: 1 / span 4;
    position: sticky; left: 0;
    width: calc(100vw - 2 * var(--gutter)); padding: 0;
  }
  .svc { grid-row: 2; width: auto; height: 540px; scroll-snap-align: start; }
  .svc-progress {
    display: block; position: relative;
    height: 2px; margin: 26px var(--gutter) 0;
    background: rgba(244, 242, 255, .16); border-radius: 2px; overflow: hidden;
  }
  .svc-progress span {
    position: absolute; inset: 0; border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--ember));
    transform-origin: 0 50%; transform: scaleX(.25);
  }
}

/* ---------- Process ---------- */

.process-inner {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px calc(var(--gutter) + 70px) 70px var(--gutter);
}
.process-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 90px); align-items: center;
  margin-top: clamp(30px, 6vh, 64px);
}
.steps { position: relative; min-height: 360px; }
.step { position: absolute; inset: 0; }
.step:not(:first-child) { opacity: 0; visibility: hidden; }
.step-num {
  font-family: var(--f-display); font-weight: 200;
  font-size: clamp(4.2rem, 9vw, 8.6rem); line-height: .9; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1.3px rgba(244, 242, 255, .8);
}
.step-meta { margin-top: 18px; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.step-title {
  margin-top: 8px; perspective: 700px;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.035em;
}
.step-text {
  margin-top: 14px; max-width: 36ch; color: rgba(244, 242, 255, .84);
  text-shadow: 0 2px 22px rgba(13, 18, 51, .9), 0 0 2px rgba(13, 18, 51, .6);
}
.step-title, .step-meta { text-shadow: 0 4px 30px rgba(13, 18, 51, .7); }

.ridge { width: 100%; height: auto; overflow: visible; }
.ridge-area { fill: url(#g-ridge-fill); opacity: 0; }
.ridge-base { fill: none; stroke: rgba(244, 242, 255, .14); stroke-width: 2; stroke-linejoin: round; }
.ridge-line { fill: none; stroke: url(#g-ridge); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.camp circle { fill: var(--night); stroke: rgba(244, 242, 255, .4); stroke-width: 2; transition: fill .4s, stroke .4s; }
.camp text { fill: var(--mist); font: 500 15px var(--f-text); text-anchor: middle; transition: fill .4s; }
.camp.is-on circle { fill: var(--gold); stroke: var(--gold); }
.camp.is-on text { fill: var(--snow); }
.climber { fill: var(--snow); filter: drop-shadow(0 0 8px rgba(255, 197, 107, .9)); }

/* Phone: the ridge stays pinned at the top while the four steps pass beneath it */
@media (max-width: 899px) {
  .process-inner { padding: 14vh var(--gutter) 10vh; }
  .process-body { grid-template-columns: 1fr; align-items: start; gap: 0; }
  .ridge {
    order: -1; position: sticky; top: 0; z-index: 1; align-self: start;
    width: calc(100% + 2 * var(--gutter)); max-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding: 70px var(--gutter) 40px;
    background: linear-gradient(180deg, var(--night) 0%, rgba(13, 18, 51, .9) 72%, rgba(13, 18, 51, 0) 100%);
  }
  .camp text { display: none; }
  .steps { min-height: 0; display: grid; gap: 22vh; padding: 8vh 0 18vh; }
  .step { position: relative; inset: auto; opacity: .28; transition: opacity .6s var(--ease-out); }
  .step:not(:first-child) { opacity: .28; visibility: visible; }
  .step.is-current { opacity: 1; }
}

/* ---------- Clients ---------- */

.clients { padding: 24vh 0 20vh; overflow: hidden; }
.clients-head { padding: 0 var(--gutter); margin-bottom: 10vh; max-width: 1100px; }

.marquee { position: relative; padding: .6vh 0; }
.marquee-row { display: flex; width: max-content; will-change: transform; }
.mq-item {
  display: inline-flex; align-items: center;
  gap: clamp(20px, 2.6vw, 44px); padding-right: clamp(20px, 2.6vw, 44px);
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2.3rem, 6.6vw, 6.4rem); line-height: 1.18; letter-spacing: -.04em;
  white-space: nowrap;
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.mq-item svg { width: .4em; height: .4em; fill: currentColor; flex: none; }

.marquee--band {
  color: var(--night);
  background: linear-gradient(90deg, var(--gold), var(--ember));
  transform: rotate(-2.4deg) scale(1.04);
  box-shadow: 0 30px 80px -30px rgba(255, 122, 61, .6);
}
.marquee--band .mq-item svg { fill: var(--night); opacity: .55; }
.marquee--band .mq-item:hover { color: var(--snow); }

.marquee--outline { transform: rotate(1.6deg); margin-top: 3vh; }
.marquee--outline .mq-item {
  font-weight: 300; color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 242, 255, .6);
}
.marquee--outline .mq-item svg { fill: var(--gold); }
.marquee--outline .mq-item:hover { color: var(--gold); -webkit-text-stroke-color: var(--gold); }

/* ---------- Contact ---------- */

.contact {
  position: relative; isolation: isolate;
  min-height: 100vh; display: flex; align-items: center;
  padding: 150px calc(var(--gutter) + 70px) 90px var(--gutter);
}
.contact::before, .clients::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(75% 65% at 22% 50%, rgba(13, 18, 51, .62) 0%, rgba(13, 18, 51, .25) 55%, transparent 80%);
}
.clients { position: relative; isolation: isolate; }
.contact-inner { width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.logo-wrap { margin-bottom: 44px; transform-style: preserve-3d; }
.contact-logo {
  width: clamp(110px, 12vw, 168px); height: auto; border-radius: 26px;
  box-shadow: 0 30px 80px -24px rgba(255, 122, 61, .55), 0 0 0 1px rgba(244, 242, 255, .12);
  will-change: transform;
}
.contact-title { font-weight: 300; font-size: var(--fs-hero); line-height: .98; letter-spacing: -.045em; }
.contact-lead {
  margin-top: 26px; max-width: 40ch; color: rgba(244, 242, 255, .86); font-size: var(--fs-lead);
  text-shadow: 0 2px 24px rgba(13, 18, 51, .8);
}

.email {
  position: relative; display: inline-block;
  margin-top: clamp(30px, 5vh, 54px);
  font-family: var(--f-display); font-weight: 400;
  font-size: min(5.1vw, 5.4rem); line-height: 1.15; letter-spacing: -.045em;
  text-decoration: none; color: var(--snow);
  perspective: 800px;
  overflow-wrap: anywhere;
}
.email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  transform: scaleX(.18); transform-origin: 0 50%;
  transition: transform .9s var(--ease-out);
}
.email:hover::after, .email:focus-visible::after { transform: scaleX(1); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(30px, 5vh, 50px); }
.copy-label { display: inline-block; }
.ig { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ig .ig-dot { fill: currentColor; stroke: none; }

@media (max-width: 640px) {
  .contact { padding: 120px var(--gutter) 70px; }
  .email { font-size: 5.6vw; white-space: nowrap; letter-spacing: -.05em; }
}

/* ---------- Footer ---------- */

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  padding: 18px var(--gutter);
  border-top: 1px solid var(--line);
  background: rgba(13, 18, 51, .92);
  color: var(--mist); font-size: var(--fs-sm);
}
.foot .roll { color: var(--snow); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hint-dot, .cue-line::after { animation: none; }
  .topo-map, .svc-peak { transition: none; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}

html.no-webgl #scene { display: none; }
