/* ==========================================================================
   Metalligator Fabrications
   Design system: gunmetal neumorphism + liquid glass
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces — the neumorphic canvas. Everything extrudes from --surface. */
  --void: #101216;
  --surface-deep: #191c21;
  --surface: #1f232a;
  --surface-high: #262b33;

  /* Neumorphic light model: one light source, top-left. */
  --nm-dark: #101216;
  --nm-light: #2e343d;
  --nm-dark-soft: rgba(9, 10, 13, 0.62);
  --nm-light-soft: rgba(255, 255, 255, 0.045);

  /* Ember — molten steel. The only saturated colour in the system. */
  --ember: #ff6a1f;
  --ember-hot: #ffa23c;
  --ember-deep: #d8410a;
  --ember-glow: rgba(255, 106, 31, 0.35);
  --ember-ring: rgba(255, 106, 31, 0.55);

  /* Ink */
  --ink: #d5dae2;
  --ink-bright: #f2f5f9;
  --ink-dim: #8d95a2;
  --ink-faint: #626a76;

  /* Glass */
  --glass-tint: rgba(255, 255, 255, 0.055);
  --glass-tint-hi: rgba(255, 255, 255, 0.11);
  --glass-rim: rgba(255, 255, 255, 0.42);
  --glass-rim-low: rgba(255, 255, 255, 0.1);

  /* Elevation */
  --nm-raise: 10px 10px 22px var(--nm-dark), -10px -10px 22px var(--nm-light-soft);
  --nm-raise-sm: 5px 5px 12px var(--nm-dark), -5px -5px 12px var(--nm-light-soft);
  --nm-raise-lg: 20px 20px 48px var(--nm-dark), -16px -16px 40px var(--nm-light-soft);
  --nm-inset: inset 7px 7px 15px var(--nm-dark), inset -7px -7px 15px var(--nm-light-soft);
  --nm-inset-sm: inset 3px 3px 7px var(--nm-dark), inset -3px -3px 7px var(--nm-light-soft);

  /* Type */
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-liquid: cubic-bezier(0.34, 1.4, 0.5, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  /* Metrics */
  --shell: min(1240px, 92vw);
  --radius: 22px;
  --radius-lg: 32px;
  --nav-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A faint vignette keeps the neumorphic field from reading as flat grey. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120vw 90vh at 50% -10%, rgba(255, 106, 31, 0.06), transparent 60%),
    radial-gradient(90vw 70vh at 100% 100%, rgba(90, 130, 190, 0.05), transparent 65%);
}

/* figure/figcaption carry UA margins that would inset every gallery tile. */
figure, figcaption { margin: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection {
  background: var(--ember);
  color: #14161a;
}

/* Film grain — sells the "metal surface" texture at almost no cost. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  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='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-drift 8s steps(6) infinite;
}

@keyframes grain-drift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

/* Custom scrollbar, machined to match */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--surface-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--surface-high), var(--surface-deep));
  border-radius: 99px;
  border: 2px solid var(--surface-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--ember-deep); }

/* --------------------------------------------------------------------------
   3. Neomorphic typography
   Text is embossed out of the surface, not painted on it.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
}

/* Solid ink is the base and the gradient is an upgrade, never the other way
   round: `color: transparent` without a working background-clip:text leaves the
   headline completely invisible (UC Browser, older Android WebViews). Engines
   that don't know @supports skip the block and keep the readable colour, which
   is exactly the fallback we want. */
.nm-text {
  color: var(--ink-bright);
  filter:
    drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(-1px -1px 0 rgba(255, 255, 255, 0.055));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nm-text {
    color: transparent;
    background: linear-gradient(168deg, var(--ink-bright) 8%, var(--ink) 45%, #737c8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* Engraved — text pressed *into* the metal. */
.nm-engraved {
  color: #1a1d22;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.075),
    0 -1px 1px rgba(0, 0, 0, 0.6);
}

.ember-text {
  color: var(--ember);
  filter: drop-shadow(0 0 16px var(--ember-glow));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ember-text {
    color: transparent;
    background: linear-gradient(120deg, var(--ember-hot), var(--ember) 45%, var(--ember-deep));
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.4rem;
}

.eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), transparent);
  box-shadow: 0 0 12px var(--ember-glow);
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-dim);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   4. Liquid glass
   Layered optics: tint → backdrop refraction → rim light → specular follow.
   -------------------------------------------------------------------------- */

.lg {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
  border: none;
  border-radius: 999px;
  /* Opaque by default. The glass tint is only ~6% white, which reads fine over
     a live blur but disappears without one, so the transparent version is
     gated behind backdrop-filter support below. */
  background: linear-gradient(150deg, #343a43, #262b33 55%, #2e343d);
  box-shadow:
    inset 0 1.5px 0 var(--glass-rim),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.12),
    inset 1.5px 0 1px rgba(255, 255, 255, 0.09),
    inset -1.5px 0 1px rgba(255, 255, 255, 0.09),
    inset 0 0 24px rgba(255, 255, 255, 0.045),
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  /* --tx / --ty are driven by JS for the magnetic pull. */
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition:
    transform 0.5s var(--ease-liquid),
    box-shadow 0.45s var(--ease-out),
    background 0.45s var(--ease-out);
}

/* Sits here rather than at the end of the file so the ember/ghost variants
   below still win on background. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lg {
    background:
      linear-gradient(150deg, var(--glass-tint-hi), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(16px) saturate(190%) brightness(1.12);
    -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.12);
  }
}

/* Specular highlight that tracks the pointer — the "wet" look. */
.lg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    circle 130px at var(--mx) var(--my),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.06) 42%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

/* Caustic sweep — light bending through the lens edge on hover. */
.lg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 32%,
    rgba(255, 255, 255, 0.22) 47%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.22) 53%,
    transparent 68%
  );
  transform: translateX(-115%);
  transition: transform 0.85s var(--ease-out);
}

.lg:hover::before { opacity: 1; }
.lg:hover::after { transform: translateX(115%); }

.lg:hover {
  transform: translate3d(var(--tx, 0px), calc(var(--ty, 0px) - 3px), 0) scale(1.022);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.16),
    inset 0 0 30px rgba(255, 255, 255, 0.07),
    0 22px 46px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lg:active {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(0.975);
  transition-duration: 0.12s;
}

.lg:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}

/* --- Button shapes ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.05rem 2.1rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-bright);
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn svg { width: 17px; height: 17px; flex: none; }

.btn .btn-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.45s var(--ease-liquid);
}

.btn:hover .btn-label { transform: translateX(1px); }

/* Ember variant — molten glass */
.btn-ember {
  background:
    linear-gradient(150deg, rgba(255, 176, 92, 0.5), rgba(255, 106, 31, 0.32) 55%, rgba(216, 65, 10, 0.4));
  color: #fff;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 226, 195, 0.75),
    inset 0 -1.5px 1px rgba(255, 160, 90, 0.3),
    inset 0 0 26px rgba(255, 150, 70, 0.22),
    0 14px 36px rgba(198, 62, 8, 0.36),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

.btn-ember:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 236, 214, 0.9),
    inset 0 0 34px rgba(255, 160, 80, 0.3),
    0 22px 52px rgba(206, 66, 10, 0.5),
    0 0 30px var(--ember-glow);
}

/* Ghost variant — smallest possible glass */
.btn-ghost {
  padding: 0.85rem 1.6rem;
  font-size: 0.82rem;
  color: var(--ink);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   5. Neumorphic surfaces
   -------------------------------------------------------------------------- */

.nm-card {
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  border-radius: var(--radius-lg);
  box-shadow: var(--nm-raise);
  transition: box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.nm-well {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--nm-inset);
}

.nm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  box-shadow: var(--nm-raise-sm);
}

/* --------------------------------------------------------------------------
   6. Shell + section rhythm
   -------------------------------------------------------------------------- */

.shell {
  width: var(--shell);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  padding: clamp(6rem, 12vh, 9.5rem) 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.section-head h2 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin-bottom: 1.5rem;
}

/* Hairline divider that catches the light like a machined seam */
.seam {
  height: 2px;
  border: none;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--nm-dark) 20%, var(--nm-dark) 80%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* --------------------------------------------------------------------------
   7. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: all 0.6s var(--ease-out);
}

.nav-inner {
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem 0.55rem 0.55rem 1.4rem;
  border-radius: 999px;
  transition: all 0.6s var(--ease-out);
}

/* Once scrolled, the bar condenses into a floating glass pill. */
.nav.is-stuck { height: 68px; }

.nav.is-stuck .nav-inner {
  width: min(1140px, 94vw);
  /* Opaque fallback so the bar never sits unreadable over scrolling content
     on engines without backdrop-filter. */
  background: linear-gradient(150deg, #2b3039, #21252c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.5);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-stuck .nav-inner {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.022));
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--ink-bright);
}

/* The mark is brushed steel with its own highlights, so it sits straight on
   the dark surface — no chip behind it. The art carries its own margin inside
   a square canvas, so the box is oversized to bring the glyph up to the
   optical weight of the wordmark next to it. */
.brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  transition: transform 0.6s var(--ease-liquid);
}

.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Lifts the mark off a flat background the way the neumorphic cards do. */
  filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.55));
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-dim);
  transition: color 0.35s var(--ease-out);
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.45s var(--ease-liquid);
}

.nav-links a:hover { color: var(--ink-bright); }
.nav-links a:hover::before { opacity: 1; transform: scale(1); }

.nav-links a.is-active { color: var(--ink-bright); }
.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

/* Column flex + margin-top:auto on the stat strip keeps the headline optically
   centred while the stats stay pinned to the floor — no absolute overlap. */
.hero {
  /* The hero runs on a patina-green accent instead of the site-wide ember.
     Re-pointing the tokens here keeps every accent inside the section — badge
     dot, primary button, scroll cue — on the same colour. */
  --ember: #24c96f;
  --ember-hot: #6ef0a6;
  --ember-deep: #0d8d4c;
  --ember-glow: rgba(36, 201, 111, 0.35);
  --ember-ring: rgba(36, 201, 111, 0.55);

  position: relative;
  /* vh first: engines that don't know svh drop that line and keep this one,
     rather than losing min-height altogether and collapsing the hero. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 2.5rem) 0 2.4rem;
  overflow: hidden;
}

#vanta-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Tames Vanta so the type stays legible and the cells read as forged texture. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(70vw 80vh at 18% 45%, rgba(22, 25, 30, 0.94), rgba(22, 25, 30, 0.55) 42%, transparent 74%),
    linear-gradient(100deg, rgba(18, 20, 24, 0.55) 30%, rgba(18, 20, 24, 0.3) 60%, rgba(18, 20, 24, 0.5)),
    linear-gradient(to bottom, rgba(16, 18, 22, 0.75), rgba(16, 18, 22, 0.25) 30%, rgba(31, 35, 42, 0.6) 78%, var(--surface) 99%);
}

/* .btn-ember bakes its molten orange into literal rgba stops, so the hero's
   copy of it is restated in green rather than tinted. */
.hero .btn-ember {
  background:
    linear-gradient(150deg, rgba(140, 245, 190, 0.5), rgba(36, 201, 111, 0.32) 55%, rgba(13, 141, 76, 0.4));
  box-shadow:
    inset 0 1.5px 0 rgba(214, 255, 232, 0.75),
    inset 0 -1.5px 1px rgba(110, 240, 166, 0.3),
    inset 0 0 26px rgba(70, 220, 140, 0.22),
    0 14px 36px rgba(10, 122, 66, 0.36),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero .btn-ember:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(228, 255, 240, 0.9),
    inset 0 0 34px rgba(110, 240, 166, 0.3),
    0 22px 52px rgba(12, 134, 72, 0.5),
    0 0 30px var(--ember-glow);
}

.hero .shell { z-index: 2; }

.hero-copy { max-width: 830px; }

.hero h1 {
  font-size: clamp(3.1rem, 9.2vw, 7.4rem);
  line-height: 0.94;
  margin-bottom: 1.9rem;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
}

.hero h1 .line > span { display: block; }

/* Entrance states are gated on the .js flag that the inline script in <head>
   sets. Unconditionally, these words start pushed 105% down inside an
   overflow:hidden line box — so on any engine that strips or stalls CSS
   animations (UC Browser's data-saver, proxy browsers, script blockers) the
   headline never rises and reads as missing. Visible is the default; the
   animation is the enhancement. */
.js .hero h1 .line > span {
  transform: translateY(105%);
  animation: rise 1.15s var(--ease-out) forwards;
}

.js .hero h1 .line:nth-child(1) > span { animation-delay: 0.35s; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: 0.47s; }
.js .hero h1 .line:nth-child(3) > span { animation-delay: 0.59s; }

@keyframes rise {
  to { transform: translateY(0); }
}

.hero-sub {
  font-size: clamp(1.02rem, 1.9vw, 1.28rem);
  color: var(--ink-dim);
  max-width: 54ch;
  margin: 0 0 2.8rem;
}

.js .hero-sub {
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.85s forwards;
}

.hero-sub strong {
  color: var(--ink);
  font-weight: 500;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.js .hero-actions {
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1s forwards;
}

.hero-badge { margin-bottom: 2rem; }

.js .hero-badge {
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.2s forwards;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 var(--ember-glow);
  animation: pulse 2.4s infinite;
}

/* Ring colour comes from --ember-ring so the pulse follows whatever accent
   the surrounding section defines. */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--ember-ring); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Stat strip riding the floor of the hero */
.hero-stats {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: clamp(2.5rem, 7vh, 5rem);
}

.js .hero-stats {
  opacity: 0;
  animation: fade-up 1.1s var(--ease-out) 1.25s forwards;
}

.hero-stats .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-row {
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink-bright);
  line-height: 1;
}

.stat span {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--ink-faint), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ember);
  animation: cue 2.2s var(--ease-io) infinite;
}

@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* --------------------------------------------------------------------------
   9. Marquee
   -------------------------------------------------------------------------- */

.marquee {
  padding: 2.2rem 0;
  overflow: hidden;
  background: var(--surface-deep);
  box-shadow: inset 0 12px 24px -14px var(--nm-dark), inset 0 -12px 24px -14px var(--nm-dark);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3.5rem;
  animation: slide 42s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

.marquee-track span {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: #343a43;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.045);
}

.marquee-track span::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ember);
  transform: rotate(45deg);
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   10. Our Works
   -------------------------------------------------------------------------- */

.works-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

/* Tab rail: a neumorphic well with a liquid-glass thumb that slides. */
.tabs {
  position: relative;
  display: flex;
  gap: 0.3rem;
  padding: 0.42rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--nm-inset-sm);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-thumb {
  position: absolute;
  top: 0.42rem;
  left: 0;
  height: calc(100% - 0.84rem);
  border-radius: 999px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 6px 18px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.62s var(--ease-liquid),
    width 0.62s var(--ease-liquid);
  pointer-events: none;
}

.tab {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.4s var(--ease-out);
}

.tab:hover { color: var(--ink-dim); }
.tab.is-active { color: var(--ink-bright); }

.tab .count {
  font-size: 0.62rem;
  opacity: 0.6;
  margin-left: 0.45rem;
  vertical-align: super;
}

.works-blurb {
  min-height: 3.2rem;
  max-width: 62ch;
  margin: 0 0 2.4rem;
  color: var(--ink-dim);
  font-size: 1.02rem;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.works-blurb.is-swapping { opacity: 0; transform: translateY(10px); }

/* Gallery — a deliberate editorial rhythm rather than a uniform grid. */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.15rem;
}

.shot {
  position: relative;
  grid-column: span 2;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface-deep);
  box-shadow: var(--nm-raise-sm);
  opacity: 0;
  transform: translateY(26px) scale(0.97);
  animation: shot-in 0.75s var(--ease-out) forwards;
  transition: box-shadow 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

/* Every 5th and 6th tile go wide/tall — breaks the checkerboard. */
.shot:nth-child(7n + 1) { grid-column: span 3; aspect-ratio: 16 / 11; }
.shot:nth-child(7n + 2) { grid-column: span 3; aspect-ratio: 16 / 11; }

@keyframes shot-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 0.6s var(--ease-out);
  filter: saturate(0.82) contrast(1.05);
}

.shot:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.55), var(--nm-raise-sm);
}

.shot:hover img {
  transform: scale(1.07);
  filter: saturate(1.05) contrast(1.08);
}

.shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 14, 17, 0.75), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.shot:hover::after { opacity: 1; }

.shot .shot-meta {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s var(--ease-out);
}

.shot:hover .shot-meta { opacity: 1; transform: translateY(0); }

.shot .shot-meta p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-bright);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.shot .zoom {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.shot .zoom svg { width: 15px; height: 15px; color: #fff; }

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  padding: clamp(3rem, 8vw, 5rem) 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--nm-inset);
}

.gallery-empty svg {
  width: 46px;
  height: 46px;
  color: var(--ink-faint);
  margin: 0 auto 1.2rem;
  opacity: 0.6;
}

.gallery-empty h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.gallery-empty p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   11. About
   Portrait beside the founder's story. The photo is owner-uploaded and may be
   any shape, so the frame fixes the aspect ratio and crops to it.
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-portrait { position: sticky; top: calc(var(--nav-h) + 2rem); }

.about-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  box-shadow: var(--nm-raise);
  display: grid;
  place-items: center;
}

.about-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stands in until a photo is uploaded, so the column is never a blank hole. */
.about-monogram {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink-faint);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 -1px 1px rgba(0, 0, 0, 0.5);
}

.about-frame img:not([hidden]) + .about-monogram { display: none; }

.about-portrait figcaption {
  margin-top: 1.25rem;
  text-align: center;
}

.about-portrait strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-bright);
}

.about-portrait figcaption span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.about-body p {
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  color: var(--ink-dim);
  margin: 0 0 1.35rem;
}

.about-body p:first-child {
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  color: var(--ink);
}

.about-body p strong { color: var(--ink); font-weight: 500; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.about-tags li {
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: var(--surface-deep);
  box-shadow: var(--nm-inset-sm);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }

  /* Sticky is pointless once the columns stack, and it strands the photo. */
  .about-portrait {
    position: static;
    max-width: 320px;
    margin-inline: auto;
  }
}

/* --------------------------------------------------------------------------
   12. Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 11, 14, 0.82);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-stage {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 82vh;
  transform: scale(0.94);
  transition: transform 0.55s var(--ease-liquid);
}

.lightbox.is-open .lightbox-stage { transform: scale(1); }

.lightbox-stage img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
}

.lightbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lightbox-bar p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.lightbox-nav { display: flex; gap: 0.6rem; }

.lightbox-close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   13. Vision
   -------------------------------------------------------------------------- */

.vision {
  background: var(--surface-deep);
  box-shadow: inset 0 24px 48px -30px var(--nm-dark), inset 0 -24px 48px -30px var(--nm-dark);
  overflow: hidden;
}

.vision::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 31, 0.09), transparent 62%);
  pointer-events: none;
}

.vision-statement {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.3vw, 3.15rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.035em;
  max-width: 19ch;
  margin: 0 0 3.4rem;
}

/* Word-by-word reveal, driven by scroll position.
   Words heat up rather than fade in — colour, not opacity, because opacity on
   a child would break the parent's background-clip:text gradient. */
.vision-statement .w {
  display: inline-block;
  color: #3d434c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.035);
  transform: translateY(5px);
  transition:
    color 0.55s var(--ease-out),
    text-shadow 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.vision-statement .w.lit {
  color: var(--ink-bright);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 -1px 0 rgba(255, 255, 255, 0.06),
    0 0 26px rgba(255, 106, 31, 0.13);
  transform: translateY(0);
}

.vision-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.vision-body p {
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  margin: 0 0 1.5rem;
}

.vision-body p strong {
  color: var(--ink-bright);
  font-weight: 600;
}

.vision-body p:first-of-type {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  color: var(--ink);
}

.pillars {
  display: grid;
  gap: 1rem;
}

.pillar {
  display: flex;
  gap: 1.25rem;
  padding: 1.6rem 1.7rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  box-shadow: var(--nm-raise-sm);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.pillar:hover {
  transform: translateX(6px);
  box-shadow: var(--nm-raise);
}

.pillar-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ember);
  padding-top: 0.28rem;
  flex: none;
}

.pillar h4 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
  color: var(--ink-bright);
  letter-spacing: -0.02em;
}

.pillar p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

.vision-signoff {
  margin-top: 3.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.vision-signoff p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.15rem;
}

/* Six cards divide cleanly into two rows of three — auto-fit would leave
   two orphans on the second row at desktop widths. */
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

.contact-card {
  position: relative;
  display: block;
  padding: 2rem 1.9rem 1.8rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  box-shadow: var(--nm-raise);
  overflow: hidden;
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.06), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--nm-raise-lg);
}

.contact-card:hover::before { opacity: 1; }

.contact-ico {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 1.4rem;
  background: var(--surface);
  box-shadow: var(--nm-inset-sm);
  color: var(--ink-dim);
  transition: color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.contact-ico svg { width: 21px; height: 21px; }

.contact-card:hover .contact-ico {
  color: var(--ember);
  box-shadow: var(--nm-inset-sm), 0 0 24px -6px var(--ember-glow);
}

.contact-card h4 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.55rem;
  font-family: var(--font-body);
}

.contact-card .value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-bright);
  word-break: break-word;
  margin-bottom: 0.85rem;
}

.contact-card .go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  transition: gap 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.contact-card:hover .go { gap: 0.8rem; color: var(--ember); }
.contact-card .go svg { width: 13px; height: 13px; }

/* Wide CTA panel */
.contact-cta {
  margin-top: 1.15rem;
  padding: clamp(2.4rem, 5vw, 3.6rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-high), var(--surface-deep));
  box-shadow: var(--nm-raise);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.contact-cta::after {
  content: '';
  position: absolute;
  right: -8%;
  top: -60%;
  width: 40%;
  height: 220%;
  background: radial-gradient(circle, var(--ember-glow), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

.contact-cta h3 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  margin-bottom: 0.7rem;
}

.contact-cta p {
  margin: 0;
  color: var(--ink-faint);
  max-width: 46ch;
  font-size: 0.95rem;
}

.contact-cta .cta-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--surface-deep);
  padding: 4rem 0 2.5rem;
  box-shadow: inset 0 24px 48px -34px var(--nm-dark);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
}

.footer-top p {
  max-width: 42ch;
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

.socials { display: flex; gap: 0.7rem; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--ink-faint);
}

.footer-bottom a:hover { color: var(--ember); }

/* --------------------------------------------------------------------------
   16. Watermark
   The mark, blown up and dropped almost all the way into the background, in
   the gutters the layout leaves empty. Decorative only: aria-hidden, pointer-
   transparent, and sat out on narrow screens where there is no spare room.
   -------------------------------------------------------------------------- */

.watermark {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  width: clamp(190px, 22vw, 340px);
}

/* Desaturated before it is faded: at this opacity the red eyes were the only
   thing that still carried, which read as a mistake rather than a watermark.
   Contrast is lifted a touch to hold the bevels together once the colour is
   gone, and the whole thing sits low enough to never compete with copy. */
.watermark img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.055;
  filter: grayscale(1) contrast(1.15);
}

/* Beside the works heading */
.watermark--works {
  top: clamp(4rem, 10vh, 7.5rem);
  right: -2.5rem;
}

/* Beside the contact heading. Smaller than the works one so the two do not
   read as the same stamp twice — the mark is symmetric, so flipping it would
   have changed nothing. */
.watermark--contact {
  top: clamp(5rem, 11vh, 8.5rem);
  right: -1.5rem;
  width: clamp(160px, 18vw, 270px);
}

/* Flows inline between the brand and the socials rather than floating. Top
   aligned with the rest of the row — centred, it hung well below the brand and
   the socials and read as misplaced rather than deliberate. */
.watermark--footer {
  position: static;
  align-self: flex-start;
  flex: none;
  width: clamp(110px, 12vw, 150px);
  margin-top: -0.4rem;
}

.watermark--footer img { opacity: 0.07; }

@media (max-width: 960px) {
  .watermark--works,
  .watermark--contact { display: none; }
}

@media (max-width: 620px) {
  .watermark--footer { display: none; }
}

/* --------------------------------------------------------------------------
   17. Reveal-on-scroll
   -------------------------------------------------------------------------- */

/* Gated on .js: this hides nearly every section on the page, so without a
   script to add .revealed it would leave the site all but empty. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.95s var(--ease-out),
    transform 0.95s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   18. Preloader
   -------------------------------------------------------------------------- */

/* Only ever shown when scripts are running, since only a script takes it back
   down. Ungated, a blocked or failed main.js leaves this opaque panel over the
   entire site permanently. */
.preloader { display: none; }

.js .preloader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.preloader.done { opacity: 0; visibility: hidden; }

.preloader-inner { text-align: center; }

.preloader svg {
  width: 62px;
  height: 62px;
  margin: 0 auto 1.5rem;
  color: var(--ember);
}

.preloader svg path,
.preloader svg polyline,
.preloader svg line {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 1.8s var(--ease-io) infinite;
}

@keyframes draw {
  0% { stroke-dashoffset: 120; }
  45%, 55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}

.preloader-bar {
  width: 150px;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-deep);
  box-shadow: var(--nm-inset-sm);
  overflow: hidden;
  margin: 0 auto;
}

.preloader-bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember-hot));
  animation: load 1.2s var(--ease-io) infinite;
}

@keyframes load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* --------------------------------------------------------------------------
   19. Toast
   -------------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-bright);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.5s var(--ease-liquid);
}

.toast.err { color: #ffc4ad; }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); flex: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */

/* Laptop screens are wide but short — scale the hero to the shorter axis. */
@media (max-height: 860px) and (min-width: 821px) {
  .hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); margin-bottom: 1.5rem; }
  .hero-sub { margin-bottom: 2.1rem; font-size: 1.05rem; }
  .hero-badge { margin-bottom: 1.5rem; }
}

@media (max-width: 1000px) {
  .vision-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .shot:nth-child(7n + 1),
  .shot:nth-child(7n + 2) { grid-column: span 4; }
}

@media (max-width: 820px) {
  :root { --nav-h: 66px; }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
  }

  .nav-toggle svg { width: 18px; height: 18px; }

  .nav-links {
    position: fixed;
    inset: 0 0 auto;
    top: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    height: 100vh;
    height: 100svh;
    padding: 2rem;
    background: rgba(20, 22, 26, 0.9);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    transform: translateY(-100%);
    transition: transform 0.65s var(--ease-out);
  }

  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { font-size: 1.5rem; padding: 0.8rem 1.6rem; font-family: var(--font-display); font-weight: 600; }
  .nav .btn { display: none; }

  .scroll-cue { display: none; }

  /* The hero collapses to a single column on phones, so the whole stack —
     headline, sub, buttons, stats — centres rather than staying left-anchored
     against an edge that is no longer there. */
  .hero-copy {
    margin-inline: auto;
    text-align: center;
  }

  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }

  .hero-stats .shell { justify-content: center; }
  .stat-row {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .shot,
  .shot:nth-child(7n + 1),
  .shot:nth-child(7n + 2) { grid-column: span 1; aspect-ratio: 3 / 4; }

  .lightbox-bar { position: static; margin-top: 1.2rem; flex-direction: column; }
  .footer-top { flex-direction: column; }

  /* These rows are space-between on desktop. Once they wrap, the button ends up
     alone on its own line and space-between parks it back at the left edge, so
     each action row centres instead. */
  .works-bar,
  .vision-signoff,
  .contact-cta,
  .cta-actions { justify-content: center; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .btn { padding: 0.95rem 1.6rem; width: 100%; }
  .hero-actions { width: 100%; }
  .stat-row { gap: 1.6rem; }
}

/* --------------------------------------------------------------------------
   21. Accessibility
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Carry the .js prefix here too — the gated entrance rules above are a class
     more specific than a bare selector, so without it these overrides lose the
     cascade and the content stays hidden. */
  [data-reveal],
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero h1 .line > span,
  .js .hero h1 .line > span { transform: none; }
  .hero-sub, .hero-actions, .hero-badge, .hero-stats,
  .js .hero-sub, .js .hero-actions, .js .hero-badge, .js .hero-stats { opacity: 1; }
  .vision-statement .w { transform: none; }
  .grain { display: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  background: var(--ember);
  color: #14161a;
  font-weight: 600;
  transition: top 0.3s var(--ease-out);
}

.skip-link:focus { top: 1rem; }
