/* Neil Emmett v2 — the scroll film */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/geist-normal-300-800.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-400.woff2") format("woff2");
}

:root {
  --ink: #050b09;
  --bone: #efe9dd;
  --bone-2: rgba(239, 233, 221, .68);
  --bone-3: rgba(239, 233, 221, .4);
  --line: rgba(239, 233, 221, .14);
  --amber: #f3a84c;
  --amber-hot: #ffd38f;
  --mint: #9fe8c6;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 60px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--amber-hot); letter-spacing: -.015em; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 6px; }
.loading body { overflow: hidden; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--bone); color: var(--ink); font-size: 14px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- loader ---------- */
.loader { display: none; }
.loading .loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--ink);
  animation: loader-failsafe .6s ease 9s forwards;
}
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader__line { width: min(600px, 84vw); height: auto; overflow: visible; }
.loader__base { fill: none; stroke: rgba(239, 233, 221, .12); stroke-width: 1.2; }
.loader__trace {
  fill: none; stroke: var(--amber-hot); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: .18 1; stroke-dashoffset: .18;
  filter: drop-shadow(0 0 6px rgba(243, 168, 76, .9));
  animation: trace 1.4s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes trace { to { stroke-dashoffset: -1; } }
.loader__count {
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em; color: var(--bone-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- film canvas ---------- */
#film { display: none; }
.film-ready #film {
  display: block;
  position: fixed; inset: 0; z-index: 0;
  width: 100vw; height: 100vh; height: 100lvh;
}
.vignette { display: none; }
.film-ready .vignette {
  display: block;
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 50%, rgba(5, 11, 9, 0) 55%, rgba(5, 11, 9, .55) 100%),
    linear-gradient(to top, rgba(5, 11, 9, .55) 0%, rgba(5, 11, 9, 0) 30%);
}

/* ---------- scenes (also the no-WebGL fallback) ---------- */
main { position: relative; z-index: 2; }
.scene {
  position: relative;
  height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden;
  isolation: isolate;
}
.scene__media { position: absolute; inset: 0; z-index: -1; }
.scene__media img { width: 100%; height: 100%; object-fit: cover; }
.scene__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 11, 9, .8), rgba(5, 11, 9, 0) 55%);
}
.scene--hero .scene__media img { object-position: 66% 50%; }

.beat {
  position: absolute; inset: 0;
  display: flex;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.beat--hero, .beat--low-left { align-items: flex-end; justify-content: flex-start; padding-bottom: clamp(110px, 17vh, 190px); }
.beat--high-right { align-items: flex-start; justify-content: flex-end; text-align: right; padding-top: clamp(120px, 20vh, 220px); }
.beat--center { align-items: center; justify-content: center; text-align: center; }
.beat__text {
  font-weight: 500;
  font-size: clamp(2.9rem, 8.6vw, 9.6rem);
  line-height: .92;
  letter-spacing: -.055em;
  max-width: 11ch;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(5, 11, 9, .55), 0 0 2px rgba(5, 11, 9, .25);
}
.beat--center .beat__text { max-width: 13ch; }
.beat--small .beat__text { font-size: clamp(2.4rem, 6.2vw, 6.8rem); }
.beat__text em { letter-spacing: -.02em; }
.hero-name {
  font-weight: 600;
  font-size: clamp(4.3rem, 15.4vw, 16.5rem);
  line-height: .82;
  letter-spacing: -.065em;
  max-width: none;
  margin-left: -.04em;
}
.hero-name .line { display: block; }
.hero-name .line + .line { padding-left: .6em; }
.beat__text .char, .contact__title .char { display: inline-block; will-change: transform, opacity, filter; }
.film-ready .beat__text { transform: skewY(calc(var(--lean, 0) * -5deg)) translateY(calc(var(--lean, 0) * -18px)); }
.beat__text em { text-shadow: 0 0 40px rgba(243, 168, 76, .45); }

/* film mode: canvas behind, scenes become the scroll runway, beats float above */
.film-ready .scene { height: 135vh; overflow: visible; isolation: auto; }
.film-ready .scene--hero { height: 115vh; }
.film-ready .scene__media { display: none; }
.film-ready .beat { position: fixed; z-index: 5; }
.film-ready .beat:not(.beat--hero) { visibility: hidden; }

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; z-index: 20; padding: 22px var(--gutter); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud--top { top: 0; }
.hud--bottom { bottom: 0; padding-bottom: 22px; align-items: flex-end; }
.hud__right { display: flex; align-items: center; gap: 10px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.mark__pulse {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 14px 2px rgba(243, 168, 76, .55);
}
.motion .mark__pulse { animation: beat 1.05s ease-in-out infinite; }
.mark__pulse::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(243, 168, 76, .5); opacity: 0;
}
.motion .mark__pulse::after { animation: ring 1.05s ease-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.45); } 20% { transform: scale(1); } 30% { transform: scale(1.2); } 42% { transform: scale(1); } }
@keyframes ring { 0% { transform: scale(.6); opacity: .8; } 70%, 100% { transform: scale(2.3); opacity: 0; } }

.pill, .sound {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 20, 17, .4);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 14px; font-weight: 450;
  transition: border-color .4s, background-color .4s;
}
.pill:hover, .sound:hover { border-color: rgba(243, 168, 76, .6); background: rgba(243, 168, 76, .12); }
.pill svg { width: 14px; height: 14px; transition: transform .5s var(--ease); }
.pill:hover svg { transform: translateX(3px); }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound__bars i { width: 2px; height: 3px; background: var(--bone-2); border-radius: 1px; transition: height .3s; }
.sound.is-on .sound__bars i { background: var(--amber-hot); animation: eq .9s ease-in-out infinite alternate; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound.is-on .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound.is-on .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }

.timecode {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; color: var(--bone-3);
  font-variant-numeric: tabular-nums;
}
.timecode__rec { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(243, 168, 76, .9); }
.motion .timecode__rec { animation: rec 1.4s steps(1) infinite; }
@keyframes rec { 50% { opacity: .25; } }
.timecode__scene { color: var(--bone-2); text-transform: uppercase; min-width: 11ch; }
.timecode__bar { position: relative; width: 120px; height: 1px; background: var(--line); }
.timecode__bar i { position: absolute; inset: 0; background: var(--amber); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 8px rgba(243, 168, 76, .8); }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-3); }
.scroll-cue i { position: relative; width: 1px; height: 28px; overflow: hidden; background: rgba(239, 233, 221, .14); }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--amber); }
.motion .scroll-cue i::after { animation: cue 2s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }
.hud--bottom { display: none; }
.film-ready .hud--bottom { display: flex; }

/* heartbeat progress on the right edge */
.ecg { display: none; }
@media (min-width: 900px) {
  .film-ready .ecg {
    display: block;
    position: fixed; right: 18px; top: 18vh; bottom: 18vh; width: 40px; z-index: 20;
    pointer-events: none;
  }
}
.ecg svg { width: 100%; height: 100%; overflow: visible; }
.ecg__base { fill: none; stroke: rgba(239, 233, 221, .14); stroke-width: 1; }
.ecg__live { fill: none; stroke: var(--amber-hot); stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(243, 168, 76, .9)); }
.ecg__dot {
  position: absolute; left: 20px; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--amber-hot); box-shadow: 0 0 12px 3px rgba(243, 168, 76, .8);
}

/* ---------- cursor: a drop of light that stretches as it moves ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.cursor__drop, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; }
.cursor__drop {
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: radial-gradient(circle at 35% 35%, #fff3d6, var(--amber-hot) 40%, var(--amber) 75%);
  box-shadow: 0 0 16px 4px rgba(243, 168, 76, .6);
}
.cursor__ring {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 1px solid rgba(239, 233, 221, .3);
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), border-color .4s, background-color .4s;
}
.cursor.is-hover .cursor__ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; border-color: rgba(243, 168, 76, .75); background: rgba(243, 168, 76, .08); }

/* ---------- contact ---------- */
.contact {
  --glint: 137 58 55 55 110 134 43 195 103 117 156 32 38 220 146 200;
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(120px, 20vh, 220px) var(--gutter) 28px;
  isolation: isolate;
}
.contact__media { z-index: -1; }
.film-ready .contact__media { display: none; }
.contact__inner { margin-top: auto; margin-bottom: auto; }
.contact__title {
  font-weight: 500;
  font-size: clamp(3.2rem, 10vw, 11rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.contact__title .line { display: block; }
.contact__title .line + .line { padding-left: .5em; }
.contact__title em { letter-spacing: -.025em; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; margin-top: clamp(40px, 7vh, 80px); padding-left: clamp(0px, 5vw, 90px); }
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 16px;
  padding: 24px 38px 24px 32px; border-radius: 999px;
  background: var(--bone); color: var(--ink);
  font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em;
}
.cta__fill {
  position: absolute; z-index: -1; left: var(--mx, 50%); top: var(--my, 50%);
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: radial-gradient(circle, var(--amber-hot), var(--amber));
  transform: scale(0); transition: transform .7s var(--ease);
}
.cta:hover .cta__fill { transform: scale(60); }
.cta__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(243, 168, 76, .22); transition: background-color .4s; }
.cta:hover .cta__dot { background: var(--ink); }
.email { display: flex; flex-direction: column; gap: 14px; }
.email[hidden] { display: none; }
.email__canvas { display: block; max-width: 100%; }
.email__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.email__btn {
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10, 20, 17, .45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 14px; font-weight: 450;
  transition: border-color .4s, background-color .4s;
}
.email__btn:hover { border-color: rgba(243, 168, 76, .6); background: rgba(243, 168, 76, .12); }
.copied { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 22px; margin-top: 60px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3);
}
.site-footer a:hover, .motion-toggle:hover { color: var(--bone); }
.motion-toggle { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--bone-3); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .hud { padding: 14px var(--gutter); }
  .hud--bottom { padding-bottom: 16px; }
  .pill, .sound { padding: 9px 14px; font-size: 13px; }
  .sound__label { display: none; }
  .mark span:last-child { display: none; }
  .timecode__bar { width: 64px; }
  .timecode__scene { display: none; }
  .hero-name { font-size: clamp(3.8rem, 20vw, 6.4rem); }
  .hero-name .line + .line { padding-left: 0; }
  .beat--hero, .beat--low-left { padding-bottom: 96px; }
  .beat--high-right { padding-top: 96px; }
  .contact__row { padding-left: 0; }
  .contact__title .line + .line { padding-left: 0; }
  .cta { padding: 20px 30px 20px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
.is-paused .mark__pulse, .is-paused .mark__pulse::after, .is-paused .timecode__rec, .is-paused .scroll-cue i::after { animation-play-state: paused; }
