/* ============================================
   Boreal Art Studio — stylesheet
   ============================================ */

@font-face {
  font-family: 'Archivo Black';
  src: url('assets/fonts/archivo-black.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('assets/fonts/work-sans-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Orbitron';
  src: url('assets/fonts/orbitron-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #06060e;
  --bg-alt: #090914;
  --surface: #11111e;
  --surface-2: #171626;
  --line: rgba(243,241,236,0.12);
  --line-strong: rgba(243,241,236,0.22);
  --text: #f4f2ec;
  --text-dim: #a7a4b1;
  --text-faint: #6f6c7a;
  --text-body: #e5e3ec;

  --accent-1: #b7d3ff;
  --accent-2: #6a7dff;
  --accent-3: #b183ff;
  --accent-gradient: linear-gradient(100deg, var(--accent-1) 0%, var(--accent-2) 55%, var(--accent-3) 100%);

  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Archivo Black', -apple-system, sans-serif;
  --font-mono: 'Orbitron', 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --wrap: 1240px;
  --pad: clamp(24px, 5vw, 64px);
  --section-pad: clamp(80px, 12vh, 160px);

  --ease: cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  background: var(--bg);
}
body{
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p{ margin: 0; }
button{ font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea{ font: inherit; color: inherit; }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section{
  position: relative;
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* ---------- Skip link ---------- */
.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus{ left: var(--pad); }

/* ---------- Cosmic background ---------- */
.cosmic-bg{
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #0c0d1c 0%, #07070f 55%, #030305 100%);
  will-change: transform;
}
#starCanvas{
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.nebula-canvas{
  position: absolute;
  top: -18%; left: -18%;
  width: 136%; height: 136%;
  filter: blur(2px) saturate(1.55) contrast(1.08);
  animation: nebulaDrift 50s ease-in-out infinite;
  will-change: transform;
}
@keyframes nebulaDrift{
  0%{   transform: translate(0, 0) scale(1); }
  25%{  transform: translate(-2.5%, 2%) scale(1.05); }
  50%{  transform: translate(2%, -2.5%) scale(1.1); }
  75%{  transform: translate(2.5%, 2.5%) scale(1.04); }
  100%{ transform: translate(0, 0) scale(1); }
}
/* A second, coarser cloud layer sitting further "back": bigger, blurrier,
   drifting slower than the foreground layer. That speed/softness mismatch
   is what reads as parallax depth instead of one flat painted plane. */
.nebula-canvas-back{
  filter: blur(22px) saturate(1.3) contrast(1);
  opacity: .8;
  animation: nebulaDriftBack 85s ease-in-out infinite;
}
@keyframes nebulaDriftBack{
  0%{   transform: translate(0, 0) scale(1.14); }
  50%{  transform: translate(-3.5%, 3%) scale(1.22); }
  100%{ transform: translate(0, 0) scale(1.14); }
}
@media (prefers-reduced-motion: reduce){
  .nebula-canvas, .nebula-canvas-back{ animation: none; }
}

/* ---------- Black hole gravitational pull ----------
   Sits directly beneath the ambient logo, sharing its exact coordinate
   box so the swirl centers precisely on the ring. Above the nebula but
   below the starfield (z:-2, between nebula's -3 and stars' -1) — only the
   gas swirls, the stars stay pinned and crisp passing over it. */
.black-hole-pull{
  position: fixed;
  top: -8%;
  right: -8%;
  width: clamp(360px, 38vw, 600px);
  aspect-ratio: 1417 / 1890;
  z-index: -2;
  pointer-events: none;
}
.black-hole-swirl{
  position: absolute;
  top: 49%;
  left: 49%;
  width: 46%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,.5) 72%, transparent 100%);
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,.5) 72%, transparent 100%);
  filter: blur(3px) saturate(1.3);
  transform: translate(-50%, -50%);
  transform-origin: center;
  animation: blackHoleSwirl 65s linear infinite;
}
@keyframes blackHoleSwirl{
  0%{   transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  25%{  transform: translate(-50%, -50%) rotate(90deg) scale(1.025); }
  50%{  transform: translate(-50%, -50%) rotate(180deg) scale(1.045); }
  75%{  transform: translate(-50%, -50%) rotate(270deg) scale(1.025); }
  100%{ transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}
.black-hole-glow{
  position: absolute;
  top: 49%;
  left: 49%;
  width: 62%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106,125,255,.22) 0%, rgba(138,24,255,.12) 45%, transparent 76%);
  filter: blur(10px);
  opacity: .65;
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: reduce){
  .black-hole-swirl{ animation: none; }
}
@media (max-width: 700px){
  /* Centered and frozen on mobile — the swirl reads as noise this small
     and this close to the logo; a still centerpiece is cleaner than a
     corner accent fighting for space with the hero copy. */
  .black-hole-pull{
    top: 22%; left: 50%; right: auto;
    transform: translate(-50%, -50%);
    width: 55vw;
  }
  .black-hole-swirl{ animation: none; }
}

/* ---------- Ambient logo (background "black hole") ----------
   The brand mark, blown up huge and tucked into the corner as part of the
   scenery rather than a UI element — sits between the nebula and the
   starfield so stars read as passing in front of it. A masked sheen layer
   reuses the same PNG as its alpha mask, so the traveling highlight is
   clipped to the exact metal shape instead of a rectangle. */
.ambient-logo{
  position: fixed;
  top: -8%;
  right: -8%;
  width: clamp(360px, 38vw, 600px);
  aspect-ratio: 1417 / 1890;
  /* Explicit (not negative): a positioned element with an explicit z-index
     is painted as a unit above plain in-flow content, but tree order still
     decides ties against other same-level positioned elements. Since this
     sits earlier in the DOM than the header/sections/hero text (all of
     which are `position: relative`, so they count too), they still paint
     over it — it only needs to clear the nebula/starfield, which sit at
     negative z-index. */
  z-index: 0;
  pointer-events: none;
  filter: blur(.5px);
  /* Isolates the base/sheen blending into their own group (same effect
     opacity used to give us as a side effect) without making the whole
     mark translucent — the disk cap painted on top needs to stay fully
     opaque so the void reads solid instead of letting the nebula tint
     through. */
  isolation: isolate;
}
.ambient-logo-disk{
  /* The chrome ring has a bright diagonal spike running straight across the
     black disk — a flat solid circle here (an earlier attempt) covered
     that line completely, which read as a black blob slapped over the
     logo. This instead repaints the exact same artwork as .ambient-logo-base
     (identical background-image/size/position, so it lines up pixel for
     pixel) at full opacity, then clips it down to just the disk with
     clip-path — so the disk area shows the real art (void + spike) at full
     strength instead of watered down, while the ring stays exactly as it
     was, untouched outside that clipped ellipse. Ellipse, not circle: the
     box is non-square (aspect-ratio 1417/1890), and ellipse()'s two radii
     resolve against width/height independently so the shape stays a true
     circle on screen. Radii/center measured directly from the PNG's opaque
     black pixels. */
  position: absolute;
  inset: 0;
  background-image: url('assets/img/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  clip-path: ellipse(18.9% 14.2% at 50.81% 50.05%);
}
.ambient-logo-base{
  position: absolute;
  inset: 0;
  background-image: url('assets/img/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .62;
}
.ambient-logo-sheen{
  position: absolute;
  inset: 0;
  -webkit-mask-image: url('assets/img/logo.png');
  mask-image: url('assets/img/logo.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  /* Luminance, not alpha: the logo's black disk is fully opaque, so an
     alpha mask would let the sheen wash over it too. Luminance keys off
     brightness instead, so only the bright chrome ring/spike catch the shine. */
  mask-mode: luminance;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.65) 47%, rgba(206,221,255,1) 50%, rgba(255,255,255,.65) 53%, transparent 68%);
  background-size: 300% 300%;
  background-position: 220% -10%;
  opacity: .62;
  mix-blend-mode: screen;
  /* Slowed way down on purpose: a glint that repeats every 6-7s starts to
     read like a notification blinking. Once every ~18s feels like the
     light is actually catching the metal now and then, not looping. */
  animation: ambientLogoSheen 18s cubic-bezier(.3,.7,.2,1) infinite;
}
@keyframes ambientLogoSheen{
  0%{     background-position: 220% -10%; }
  10%{    background-position: -90% 75%; }
  100%{   background-position: -90% 75%; }
}
@media (prefers-reduced-motion: reduce){
  .ambient-logo-sheen{ animation: none; background-position: 60% 30%; }
}
@media (max-width: 700px){
  .ambient-logo{
    top: 22%; left: 50%; right: auto;
    transform: translate(-50%, -50%);
    width: 55vw;
  }
  .ambient-logo-base,
  .ambient-logo-sheen{ opacity: .5; }
  .ambient-logo-sheen{ animation: none; }
}

/* ---------- Grain overlay ---------- */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cursor ---------- */
.cursor-dot{
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 1.4px solid var(--accent-1);
  pointer-events: none;
  z-index: 300;
  transform: translate(-999px,-999px);
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease), opacity .25s var(--ease);
  opacity: 0;
}
.cursor-dot.is-active{ opacity: 1; }
.cursor-dot.is-hover{
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  background: rgba(63,232,196,0.12);
}
@media (hover: none), (pointer: coarse){
  .cursor-dot{ display: none; }
}

/* ---------- Header ---------- */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  padding: 14px 0;
  transition: padding .4s var(--ease);
  background: rgba(6,6,14,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(183,211,255,.18);
  box-shadow: 0 1px 0 rgba(183,211,255,.18), 0 14px 34px -16px rgba(106,125,255,.4);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-mark{ color: var(--accent-1); flex-shrink: 0; filter: drop-shadow(0 0 7px rgba(183,211,255,.55)); }
.brand-word{ font-family: var(--font-mono); font-size: 14px; }

.main-nav{
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.main-nav a{ position: relative; padding: 4px 0; transition: color .25s, text-shadow .25s; }
.main-nav a:hover{ color: var(--text); text-shadow: 0 0 10px rgba(183,211,255,.6); }
.main-nav a::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent-gradient);
  transition: width .3s var(--ease);
}
.main-nav a:hover::after{ width: 100%; }

.header-actions{ display: flex; align-items: center; gap: 16px; }

.nav-toggle{
  display: none;
  width: 32px; height: 22px;
  position: relative;
}
.nav-toggle span{
  position: absolute;
  left: 0; right: 0;
  height: 1.4px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav-toggle span:nth-child(1){ top: 0; }
.nav-toggle span:nth-child(2){ top: 10px; }
.nav-toggle span:nth-child(3){ top: 20px; }
.nav-toggle:hover span, .nav-toggle.is-open span{
  background: var(--accent-1);
  box-shadow: 0 0 8px rgba(183,211,255,.75);
}
.nav-toggle.is-open span:nth-child(1){ transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-10px) rotate(-45deg); }

.mobile-nav{
  position: fixed;
  inset: 0;
  z-index: 140;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 0 var(--pad);
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-nav.is-open{ transform: translateY(0); }
.mobile-nav a{
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
}
.mobile-nav .btn{ align-self: flex-start; margin-top: 12px; }

/* ---------- Buttons ---------- */
/* Shared "energize" sweep: a diagonal light bar that crosses on hover,
   like a panel powering up. Parked off to the right at rest, swept
   across on hover, then reset instantly (0s) so it's ready to replay. */
.btn, .work-arrow, .lightbox-close{
  position: relative;
  overflow: hidden;
}
.btn::before, .work-arrow::before, .lightbox-close::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 48%, rgba(183,211,255,.95) 50%, rgba(255,255,255,.55) 52%, transparent 65%);
  background-size: 250% 100%;
  background-position: 160% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, background-position 0s;
}
.btn:hover::before, .work-arrow:hover::before, .lightbox-close:hover::before{
  opacity: .9;
  background-position: -60% 0;
  transition: opacity .1s ease, background-position .85s cubic-bezier(.16,.84,.44,1);
}
@media (prefers-reduced-motion: reduce){
  .btn::before, .work-arrow::before, .lightbox-close::before{ display: none; }
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  transition: transform .35s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .3s, filter .3s, text-shadow .3s;
}
.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(183,211,255,.9), 0 0 18px rgba(183,211,255,.55);
}

/* Unified premium look for both variants: dark glass panel + glowing
   outline + luminous text, like an illuminated badge. */
.btn-solid, .btn-line{
  background: rgba(8,10,20,.45);
  border: 1px solid rgba(183,211,255,.8);
  color: var(--accent-1);
  text-shadow: 0 0 12px rgba(183,211,255,.55);
  box-shadow:
    0 0 0 1px rgba(183,211,255,.12) inset,
    0 0 14px rgba(183,211,255,.3),
    0 0 32px rgba(106,125,255,.18);
}
.btn-solid:hover, .btn-line:hover{
  transform: translateY(-2px);
  background: rgba(183,211,255,.1);
  color: #f2f7ff;
  text-shadow: 0 0 16px rgba(183,211,255,.85);
  box-shadow:
    0 0 0 1px rgba(183,211,255,.3) inset,
    0 0 24px rgba(183,211,255,.6),
    0 0 50px rgba(106,125,255,.4);
}
.btn-small{ padding: 10px 20px; font-size: 12.5px; }

/* ---------- Eyebrow / section head ---------- */
.eyebrow{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 18px;
}
.eyebrow-line{ width: 28px; height: 1px; background: var(--accent-gradient); display: inline-block; box-shadow: 0 0 8px rgba(183,211,255,.55); }

/* Rotating hero eyebrow: swaps phrase on an interval like a HUD readout
   refreshing — a blur+glow flicker out, slight rise, flicker back in. */
.eyebrow-text{
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  text-shadow: 0 0 0 rgba(183,211,255,0);
  transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease), text-shadow .45s var(--ease);
}
.eyebrow-text.is-swapping{
  opacity: 0;
  transform: translateY(-5px);
  filter: blur(3px);
  text-shadow: 0 0 12px rgba(183,211,255,.8);
}
@media (prefers-reduced-motion: reduce){
  .eyebrow-text{ transition: opacity .3s linear; }
  .eyebrow-text.is-swapping{ transform: none; filter: none; }
}
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-title{
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.14;
  letter-spacing: -0.01em;
}
.gradient-text{
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Reveal defensive CSS ---------- */
.reveal{ opacity: 1; transform: none; }
.reveal[data-split]{ opacity: 1; transform: none; }
.js-ready .reveal{ opacity: 0; transform: translateY(28px); }
.js-ready .reveal.is-visible{ opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 140px;
  padding-bottom: 90px;
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(4,4,10,.5);
  pointer-events: none;
}
.hero-content{ position: relative; }
.hero-title{
  font-family: var(--font-heading);
  font-size: clamp(40px, 7.6vw, 96px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}
.hero-copy{
  max-width: 480px;
  margin-top: 28px;
  color: var(--accent-1);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(183,211,255,.55);
}
.hero-actions{
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.scroll-cue{
  position: absolute;
  bottom: 28px;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-cue i{
  width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--accent-1), transparent);
  display: block;
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue{
  0%{ transform: scaleY(0); transform-origin: top; }
  50%{ transform: scaleY(1); transform-origin: top; }
  50.1%{ transform-origin: bottom; }
  100%{ transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 700px){
  /* On small screens the rotating eyebrow line crowded the space above the
     headline, so it moves down to sit where the "Scroll" cue used to be —
     the cue itself (word + moving line) is dropped since the eyebrow now
     occupies that spot. `.hero-content` has to give up its own positioning
     context here so the eyebrow can anchor straight to `.hero` (matching
     where `.scroll-cue` was already anchored), instead of measuring itself
     against `.hero-content`'s own (shorter) box. */
  .scroll-cue{ display: none; }
  .hero-content{ position: static; }
  #heroEyebrow{
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    bottom: 28px;
    margin: 0;
  }
}

/* ---------- About ---------- */
.about{ background: var(--bg-alt); }
.about-grid{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.about-media{ position: relative; }
.about-media img{
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 4px;
}
.about-media-frame{
  position: absolute;
  top: 18px; left: 18px;
  width: 100%; height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  z-index: -1;
}
.about-copy p{ color: var(--text-body); margin-top: 18px; max-width: 52ch; font-size: 18px; }
.about-copy .section-title{ margin-bottom: 4px; }

.stat-row{
  position: relative;
  display: flex;
  gap: clamp(24px, 5vw, 56px);
  margin-top: 44px;
  padding-top: 32px;
}
.stat-row::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(183,211,255,.55), rgba(106,125,255,.2) 45%, transparent 85%);
  box-shadow: 0 0 10px rgba(183,211,255,.35);
}
.stat{ display: flex; flex-direction: column; gap: 6px; }
.stat-num-row{ display: flex; align-items: baseline; gap: 2px; }
.stat-num{
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(183,211,255,.3);
}
.stat-plus{
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.2vw, 26px);
  color: var(--accent-1);
  text-shadow: 0 0 20px rgba(183,211,255,.3);
}
.stat-label{ font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }

/* ---------- Services ---------- */
.services{ background: var(--bg); }
.service-list{ border-top: 1px solid var(--line); }
.service-row{
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 24px;
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .3s;
}
.service-row::before{
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px rgba(183,211,255,.65);
  opacity: 0;
  transform: scaleY(.4);
  transform-origin: center;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.service-row:hover{ background: rgba(255,255,255,0.02); }
.service-row:hover::before{ opacity: 1; transform: scaleY(1); }
.service-num{ font-family: var(--font-mono); font-size: 13px; color: var(--accent-1); font-variant-numeric: tabular-nums; transition: text-shadow .35s var(--ease); }
.service-row:hover .service-num{ text-shadow: 0 0 10px rgba(183,211,255,.7); }
.service-row h3{ font-family: var(--font-heading); font-size: clamp(19px, 2.2vw, 26px); font-weight: 400; text-transform: uppercase; }
.service-row p{ color: var(--text-body); max-width: 46ch; font-size: 17px; }

/* ---------- Work ---------- */
.work{ background: var(--bg-alt); overflow: hidden; }
.work-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.work-portfolio-link{ flex-shrink: 0; margin-bottom: 4px; }

.work-carousel{ position: relative; }
.work-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.work-grid.is-swapping{ opacity: 0; transform: translateY(10px); }

.work-card{
  position: relative;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
  margin: 0;
  cursor: pointer;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.work-card:hover{
  border-color: rgba(183,211,255,.55);
  box-shadow: 0 0 26px rgba(183,211,255,.22), 0 16px 34px -18px rgba(0,0,0,.7);
  transform: translateY(-3px);
}
.work-card img{
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.work-card:hover img{ transform: scale(1.05); }
.work-card figcaption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(0deg, rgba(0,0,0,.72), transparent 70%);
}
.work-card figcaption span:first-child{ font-weight: 600; font-size: 16px; }
.work-card figcaption span:last-child{ font-size: 12px; color: var(--text-dim); }

.work-zoom{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(6,6,14,.55);
  border: 1px solid rgba(244,242,236,.35);
  color: var(--text);
  font-size: 16px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px) scale(.9);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.work-card:hover .work-zoom{ opacity: 1; transform: none; }

.work-carousel-controls{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.work-arrow{
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(8,10,20,.4);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(183,211,255,.08);
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.work-arrow:hover{
  border-color: rgba(183,211,255,.85);
  color: var(--accent-1);
  box-shadow: 0 0 18px rgba(183,211,255,.4);
}
.work-arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(183,211,255,.9), 0 0 18px rgba(183,211,255,.55);
}
.work-dots{ display: flex; gap: 8px; }
.work-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.work-dot:hover{ background: rgba(183,211,255,.7); box-shadow: 0 0 10px rgba(183,211,255,.5); }
.work-dot.is-active{ background: var(--accent-1); transform: scale(1.3); box-shadow: 0 0 12px rgba(183,211,255,.6); }

@media (max-width: 900px){
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .work-grid{ grid-template-columns: 1fr; }
}

/* ---------- Work lightbox ---------- */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.lightbox.is-open{
  opacity: 1;
  visibility: visible;
  transition: opacity .35s var(--ease), visibility 0s linear 0s;
}
.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,.9);
  backdrop-filter: blur(10px);
}
.lightbox-close{
  position: absolute;
  z-index: 5;
  top: 18px;
  right: clamp(18px, 4vw, 40px);
  width: 44px;
  height: 44px;
  border-radius: 7px;
  border: 1px solid rgba(244,242,236,.3);
  background: rgba(6,6,14,.55);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(183,211,255,.1);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.lightbox-close:hover{
  transform: rotate(90deg);
  border-color: rgba(183,211,255,.85);
  box-shadow: 0 0 20px rgba(183,211,255,.45);
}
.lightbox-close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(183,211,255,.9), 0 0 18px rgba(183,211,255,.55);
}
.lightbox-body{
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  max-width: min(94vw, 1400px);
  max-height: 88vh;
}

/* Curatorial info card — title, context and facts for the project. It
   sits beside the photo column and never scrolls with it, so it can
   never end up on top of a photo no matter how many the project has. */
.lightbox-facts{
  order: 2;
  flex: 0 0 300px;
  max-width: 300px;
  align-self: flex-start;
  padding: 26px 24px;
  background: rgba(8,10,20,.6);
  border: 1px solid rgba(183,211,255,.22);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  margin: 0;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.lightbox-facts.is-visible{ opacity: 1; transform: translateX(0); }
.lightbox-facts-sub{
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-1);
}
.lightbox-facts-title{
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lightbox-facts-count{
  margin: -8px 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lightbox-facts-list{
  list-style: none;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.lightbox-facts-list li{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--text-dim);
}
.lightbox-facts-list li:first-child{ border-top: none; padding-top: 0; }
.lightbox-facts-list li::before{ content: "\2014"; color: var(--accent-1); flex-shrink: 0; }

/* Photo column — every photo of the project, stacked and scrollable, so
   visitors browse at their own pace instead of stepping through arrows. */
.lightbox-scroll{
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-right: 4px;
  transform: scale(.96);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .4s var(--ease);
}
.lightbox.is-open .lightbox-scroll{ transform: scale(1); opacity: 1; }
.lightbox-img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  flex-shrink: 0;
}
.lightbox-scroll-hint{
  position: sticky;
  bottom: 10px;
  margin: -6px 0 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(6,6,14,.7);
  border: 1px solid rgba(183,211,255,.3);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-1);
  pointer-events: none;
}

@media (max-width: 860px){
  .lightbox-body{ flex-direction: column; justify-content: flex-start; max-height: 92vh; overflow-y: auto; gap: 20px; }
  .lightbox-facts{ order: 0; flex: 0 0 auto; max-width: 100%; width: 100%; align-self: stretch; }
  .lightbox-scroll{ order: 1; max-width: 100%; max-height: none; overflow-y: visible; padding-right: 0; }
}

body.lightbox-open{ overflow: hidden; }

/* ---------- Process ---------- */
.process{ background: var(--bg); }
.process-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 6vw, 80px);
}
.process-list{ margin-top: 40px; }
.process-list li{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.process-list li:last-child{ border-bottom: 1px solid var(--line); }
.process-num{ font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.process-list h3{ font-family: var(--font-heading); font-size: 17px; font-weight: 400; text-transform: uppercase; margin-bottom: 6px; }
.process-list p{ color: var(--text-body); font-size: 16.5px; max-width: 44ch; }
.process-media{
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.process-media img, .process-media video{
  width: 100%;
  aspect-ratio: 5/4;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-alt);
}
.process-media img:nth-child(2){ margin-left: 14%; width: 86%; }

/* ---------- Contact ---------- */
.contact{ background: var(--bg-alt); }
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-copy p{ color: var(--text-body); margin-top: 18px; max-width: 48ch; font-size: 18px; }
.contact-email{
  display: inline-block;
  margin-top: 28px;
  font-size: 22px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color .3s, border-color .3s;
}
.contact-email:hover{ color: var(--accent-1); border-color: var(--accent-1); }
.contact-copy p.contact-scarcity{
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: .04em;
  color: var(--text-faint);
}

.contact-form{ display: flex; flex-direction: column; gap: 20px; }
.field{ display: flex; flex-direction: column; gap: 8px; }
.field label{ font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field textarea{
  background: rgba(22,25,40,.7);
  border: 1px solid rgba(183,211,255,.2);
  border-radius: 4px;
  padding: 13px 14px;
  resize: vertical;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field input:hover, .field textarea:hover{ background: rgba(26,29,46,.75); }
.field input:focus, .field textarea:focus{
  outline: none;
  border-color: rgba(183,211,255,.75);
  box-shadow: 0 0 0 1px rgba(183,211,255,.15) inset, 0 0 16px rgba(183,211,255,.25);
}
.contact-form .btn{ align-self: flex-start; margin-top: 6px; }
.form-note{
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-1);
  text-shadow: 0 0 14px rgba(183,211,255,.5);
  margin: 4px 0 0;
}
.form-status{
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--accent-1);
  text-shadow: 0 0 10px rgba(183,211,255,.4);
  margin: 0;
}
.form-status.is-error{ color: #ff9d9d; text-shadow: 0 0 10px rgba(255,120,120,.35); }

/* ---------- Footer ---------- */
.site-footer{ background: var(--bg); position: relative; }
.site-footer::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183,211,255,.55) 50%, transparent);
  box-shadow: 0 0 14px rgba(183,211,255,.35);
}
.footer-inner{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.footer-brand{ display: flex; align-items: center; gap: 8px; color: var(--accent-1); font-weight: 600; font-size: 14px; font-family: var(--font-mono); }
.footer-brand span{ color: var(--text); }
.footer-nav{ display: flex; gap: 22px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.footer-nav a:hover{ color: var(--text); }
.footer-credits{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
}
.footer-credits-label{ text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.footer-credits-name{ color: var(--text-dim); }
.footer-credits-role{ color: var(--text-faint); }
.footer-meta{ display: flex; align-items: center; gap: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .main-nav{ display: none; }
  .header-actions .btn-small{ display: none; }
  .nav-toggle{ display: block; }

  .about-grid, .process-grid, .contact-grid{ grid-template-columns: 1fr; }
  .about-media{ order: -1; }

  .service-row{ grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 560px){
  .stat-row{ flex-wrap: wrap; row-gap: 24px; }
  .hero{ padding-top: 120px; }
}

@media (prefers-contrast: more){
  :root{ --text-dim: #cfcdd6; --line: rgba(243,241,236,0.3); }
}

/* ---------- Full portfolio page ---------- */
.portfolio-hero{ position: relative; padding-top: clamp(140px, 18vh, 200px); padding-bottom: clamp(48px, 7vh, 80px); }
.portfolio-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(4,4,10,.5);
  pointer-events: none;
}
.portfolio-hero .wrap{ position: relative; }

/* The hero's dim stops at its own box, so the nebula behind the grid
   further down was left at full, undimmed brightness — a visible seam
   where the dark backdrop just cuts off. Same treatment, continued. */
.portfolio-work{ position: relative; }
.portfolio-work::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(4,4,10,.5);
  pointer-events: none;
}
.portfolio-back{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.portfolio-back:hover{ color: var(--accent-1); transform: translateX(-4px); }
.portfolio-title{ max-width: 900px; }
.portfolio-hero .hero-copy{ max-width: 620px; margin-top: 20px; }

.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.portfolio-grid .work-card img{ aspect-ratio: 4/5; }

.portfolio-cta{ background: var(--bg-alt); }
.portfolio-cta-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

@media (max-width: 900px){
  .portfolio-grid{ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 560px){
  .portfolio-grid{ grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
