/* ==========================================================================
   Mainline Photography — main stylesheet
   No build step. Progressive enhancement throughout:
   scroll-driven animations, @property, container queries, :has(),
   view transitions and popover all degrade to a static, readable page.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Registered custom properties (animatable) ---------- */
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@property --hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 38;
}
@property --gx {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
@property --gy {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
@property --wght {
  syntax: "<number>";
  inherits: true;
  initial-value: 380;
}
@property --soft {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --surface: #161618;
  --line: rgb(255 255 255 / 0.1);
  --text: #f2eee6;
  --muted: #a8a29a;           /* 7.6:1 on --bg */
  --gold: #e0c08a;            /* 11:1 on --bg */
  --gold-deep: #b48a4a;
  --cool: #9db8ff;
  --radius: 1.25rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 90rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.2vw, 2.3rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 4.2rem);
  --step-4: clamp(3rem, 1.6rem + 7vw, 8.5rem);

  color-scheme: dark;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
/* Fraunces ships with WONK=1 as default; keep the classic letterforms */
.brand__text, .marquee span, .step h3, .step__n, .card__num, .contact__email,
.site-footer__name, .credits__h2, .nf__title, .site-nav a { font-variation-settings: "WONK" 0; }
::selection { background: var(--gold); color: var(--bg); }

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

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

.skip {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  translate: 0 -200%;
  transition: translate 0.3s var(--ease-out);
}
.skip:focus-visible { translate: 0 0; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow .dot {
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgb(224 192 138 / 0.6);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 0.7em rgb(224 192 138 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(224 192 138 / 0); }
}

.section__title, .contact__title, .hero__title, .band__quote {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-variation-settings: "SOFT" var(--soft), "WONK" 0;
}
.section__title em, .contact__title em, .band__quote em {
  font-style: italic;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.85rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: var(--pad-y) 1.4rem;
  border-radius: 999px;
  font-weight: 560;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out), background-color 0.3s, color 0.3s;
}
.btn:active { transform: scale(0.97); }

/* Animated conic border via @property --angle */
.btn--glow {
  color: var(--bg);
  background:
    linear-gradient(var(--text), var(--text)) padding-box,
    conic-gradient(from var(--angle), var(--gold), var(--cool), #fff, var(--gold-deep), var(--gold)) border-box;
  border: 2px solid transparent;
  animation: spin 6s linear infinite;
}
.btn--glow::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--gold), var(--cool), transparent 60%, var(--gold));
  filter: blur(14px);
  opacity: 0.45;
  animation: spin 6s linear infinite;
  transition: opacity 0.4s;
}
.btn--glow:hover::after, .btn--glow:focus-visible::after { opacity: 0.85; }
@keyframes spin { to { --angle: 360deg; } }

.btn--ghost {
  border: 1px solid rgb(255 255 255 / 0.35);
  background: rgb(11 11 12 / 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgb(255 255 255 / 0.1); }

/* ---------- Scroll progress (scroll-driven) ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, var(--gold), var(--cool));
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: grow linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes grow { to { transform: scaleX(1); } }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  padding-top: max(0.9rem, env(safe-area-inset-top));
  transition: background-color 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.site-header.is-scrolled {
  background: rgb(11 11 12 / 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
/* Scroll-driven header background where supported (no JS needed) */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-solid linear both;
    animation-timeline: scroll(root);
    animation-range: 0 40vh;
  }
  @keyframes header-solid {
    from { background-color: rgb(11 11 12 / 0); box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0); }
    to   { background-color: rgb(11 11 12 / 0.72); box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.1); }
  }
  .site-header { backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-height: 44px;
}
.brand__mark {
  width: 2rem; height: 2rem;
  color: var(--gold);
  transition: rotate 1.2s var(--ease-out);
}
.brand:hover .brand__mark { rotate: 60deg; }
.brand__text {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 480;
  line-height: 1;
  display: flex;
  flex-direction: column;
}
.brand__sub {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}
.site-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 0;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.45rem;
  height: 1px;
  background: currentColor;
  scale: 0 1;
  transform-origin: right;
  transition: scale 0.5s var(--ease-out);
}
.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn):focus-visible::after { scale: 1 1; transform-origin: left; }

.nav-toggle, .nav-close { display: none; }

/* Desktop: popover nav rendered inline */
@media (min-width: 52rem) {
  .site-nav[popover] {
    display: flex;
    position: static;
    inset: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    overflow: visible;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
  }
}

/* Mobile: popover full-screen menu */
@media (max-width: 51.99rem) {
  .nav-toggle {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 48px; height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgb(11 11 12 / 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    position: relative;
    z-index: 70;
  }
  .nav-toggle span {
    display: block;
    width: 18px; height: 1.5px;
    background: var(--text);
    transition: transform 0.4s var(--ease-out);
  }
  body:has(.site-nav:popover-open) .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  body:has(.site-nav:popover-open) .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .site-nav[popover] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 6rem var(--gutter) 3rem;
    background: rgb(11 11 12 / 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out), display 0.4s allow-discrete, overlay 0.4s allow-discrete;
  }
  .site-nav[popover]:popover-open { display: flex; opacity: 1; }
  @starting-style { .site-nav[popover]:popover-open { opacity: 0; } }
  .site-nav ul { flex-direction: column; gap: 0.5rem; }
  .nav-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: max(0.9rem, env(safe-area-inset-top));
    right: var(--gutter);
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 0.04);
    cursor: pointer;
  }
  .nav-close svg { width: 22px; height: 22px; }
  .site-nav a:not(.btn) {
    font-family: "Fraunces", serif;
    font-size: var(--step-3);
    text-transform: none;
    letter-spacing: 0;
    padding: 0.2rem 0;
    display: inline-block;
  }
  .site-nav a:not(.btn)::after { bottom: 0.2rem; }
  .site-nav__cta { align-self: flex-start; }
}

/* Without popover support (very old browsers) keep the nav visible */
@supports not selector(:popover-open) {
  .nav-toggle { display: none !important; }
  .site-nav[popover] { display: block !important; position: static; opacity: 1; height: auto; padding: 0; background: none; }
  .site-nav ul { flex-direction: row !important; flex-wrap: wrap; }
  .site-nav a:not(.btn) { font-size: var(--step--1) !important; }
  .site-nav__cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 7rem var(--gutter) clamp(4.5rem, 9vh, 7rem);
  isolation: isolate;
  overflow: clip;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 70% 30%, #2a2420 0%, var(--bg) 70%);
}
.hero__poster, .hero__poster img, .hero__video, .hero__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__video { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero__video.is-playing { opacity: 1; }
.hero__gl { opacity: 0; transition: opacity 1.2s var(--ease-out); pointer-events: none; }
.hero__gl.is-live { opacity: 1; }
.hero__gl.is-grain { mix-blend-mode: overlay; image-rendering: pixelated; }
.hero__gl.is-grain.is-live { opacity: 0.55; }
/* When the WebGL canvas renders the video itself, hide the raw <video> */
.hero:has(.hero__gl.is-live.renders-video) .hero__video { visibility: hidden; }

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(11 11 12 / 0.55) 0%, rgb(11 11 12 / 0) 28%),
    linear-gradient(0deg, rgb(11 11 12 / 0.92) 0%, rgb(11 11 12 / 0.45) 38%, rgb(11 11 12 / 0) 65%),
    radial-gradient(80% 60% at 20% 80%, rgb(11 11 12 / 0.55), transparent 70%);
}

.hero__content {
  max-width: 62rem;
  display: grid;
  gap: clamp(1rem, 2.5vh, 1.75rem);
}
.hero__title {
  font-size: var(--step-4);
  font-weight: 320;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero__title .line { display: block; }
.hero__title .line--italic { font-style: italic; color: var(--gold); padding-left: 0.6em; }
.hero__eyebrow { color: #e9e3d9; text-shadow: 0 1px 12px rgb(0 0 0 / 0.6); }
.hero__lede {
  max-width: 36rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: #ddd7cd;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Kinetic letters (spans injected by JS) */
.kchar {
  display: inline-block;
  font-variation-settings: "wght" var(--wght), "SOFT" var(--soft), "opsz" 144, "WONK" 0;
  transition: --wght 0.6s var(--ease-out), --soft 0.6s var(--ease-out);
  will-change: transform;
}
.kinetic-ready .kchar {
  opacity: 0;
  transform: translateY(0.45em) rotate(6deg);
  filter: blur(8px);
  animation: kin-in 1.3s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 45ms + 150ms);
}
@keyframes kin-in {
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.kword { display: inline-block; white-space: nowrap; }

/* Hero content drifts away as you scroll (scroll-driven) */
@supports (animation-timeline: scroll()) {
  .hero__content, .hero__scroll {
    animation: hero-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 90vh;
  }
  .hero__media {
    animation: hero-media-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 100vh;
  }
}
@keyframes hero-out { to { opacity: 0; transform: translateY(-12vh); } }
@keyframes hero-media-out { to { transform: scale(1.08); filter: brightness(0.5); } }

.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.5rem, 5vh, 3rem);
  width: 44px; height: 70px;
  display: grid;
  place-items: center;
}
.hero__scroll span {
  width: 1px; height: 100%;
  background: linear-gradient(var(--text), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll span::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--gold);
  animation: drip 2.2s var(--ease-in-out) infinite;
}
@keyframes drip { to { top: 100%; } }

.hero__motion {
  position: absolute;
  left: var(--gutter);
  top: 6rem;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(11 11 12 / 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.3s;
}
.hero__motion:hover, .hero__motion:focus-visible { opacity: 1; }
.hero__motion[hidden] { display: none; }
@media (max-width: 51.99rem) { .hero__motion { top: auto; bottom: clamp(1.5rem, 5vh, 3rem); left: auto; right: calc(var(--gutter) + 3.25rem); } .hero { padding-bottom: 6rem; } }
@media (min-width: 52rem) { .hero__motion { top: auto; bottom: clamp(1.5rem, 5vh, 3rem); left: auto; right: calc(var(--gutter) + 4rem); } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.marquee span {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: var(--step-2);
  font-weight: 300;
  color: var(--muted);
  padding-inline: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 2.8rem;
}
.marquee span::after {
  content: "";
  width: 0.35em; height: 0.35em;
  border-radius: 50%;
  border: 1px solid var(--gold);
  translate: 1.4rem 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
}
.section__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
  max-width: 52rem;
}
.section__title {
  font-size: var(--step-3);
  font-weight: 340;
  letter-spacing: -0.015em;
}
.section__lede { color: var(--muted); max-width: 40rem; }

/* Scroll-driven reveal; static (fully visible) without support */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(2.5rem); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
/* IntersectionObserver fallback (class added by JS when timelines are unsupported) */
.io .reveal { opacity: 0; transform: translateY(2rem); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.io .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Filters (pure CSS via :has(), enhanced with View Transitions) ---------- */
.filters {
  border: 0;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filters input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.filters label {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.filters label:hover { border-color: rgb(255 255 255 / 0.35); }
.filters input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 3px; }
.filters input:checked + label {
  background:
    linear-gradient(var(--text), var(--text)) padding-box,
    conic-gradient(from var(--angle), var(--gold), var(--cool), var(--gold)) border-box;
  border-color: transparent;
  color: var(--bg);
  font-weight: 600;
  animation: spin 5s linear infinite;
}

.work:has(#f-portraits:checked)  .tile:not([data-cat="portraits"]),
.work:has(#f-weddings:checked)   .tile:not([data-cat="weddings"]),
.work:has(#f-families:checked)   .tile:not([data-cat="families"]),
.work:has(#f-events:checked)     .tile:not([data-cat="events"]),
.work:has(#f-headshots:checked)  .tile:not([data-cat="headshots"]),
.work:has(#f-landscapes:checked) .tile:not([data-cat="landscapes"]) { display: none; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none;
  columns: 3 18rem;
  column-gap: clamp(0.75rem, 1.6vw, 1.25rem);
}
.tile {
  break-inside: avoid;
  margin-bottom: clamp(0.75rem, 1.6vw, 1.25rem);
  container-type: inline-size;
}
.tile__link {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  isolation: isolate;
  transform: translateZ(0);
}
.tile__link img {
  width: 100%;
  transition: transform 1.2s var(--ease-out), filter 0.8s var(--ease-out);
}
.tile__link::before {
  /* spotlight that follows the pointer (registered --gx/--gy animate smoothly) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(40rem circle at var(--gx) var(--gy), rgb(255 240 215 / 0.18), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s, --gx 0.25s linear, --gy 0.25s linear;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.tile__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  background: linear-gradient(0deg, rgb(11 11 12 / 0.75), transparent 45%);
  opacity: 0.85;
  transition: opacity 0.5s;
  pointer-events: none;
}
@media (hover: hover) {
  .tile__link:hover img { transform: scale(1.045); filter: saturate(1.08) contrast(1.04); }
  .tile__link:hover::before { opacity: 1; }
}
.tile__link:focus-visible { outline-offset: 4px; }
.tile__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tile__cat { color: var(--text); }
.tile__view {
  display: inline-grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.4);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.tile__view svg { width: 0.9rem; height: 0.9rem; }
.tile__link:hover .tile__view, .tile__link:focus-visible .tile__view { opacity: 1; transform: none; }
/* Container query: narrow tiles get a compact caption */
@container (max-width: 16rem) {
  .tile__cap { padding: 0.7rem; font-size: 0.68rem; }
  .tile__view { display: none; }
}

@supports (animation-timeline: view()) {
  .tile {
    animation: tile-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}
@keyframes tile-in {
  from { opacity: 0; transform: translateY(3rem) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.gallery__note {
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.gallery__note a { color: var(--text); }
.gallery__empty {
  padding: 3rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ---------- Services (container queries) ---------- */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  container-type: inline-size;
  background: var(--bg);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(30rem circle at var(--gx) var(--gy), rgb(224 192 138 / 0.1), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s, --gx 0.2s linear, --gy 0.2s linear;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card__inner {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  height: 100%;
  align-content: start;
}
.card__num {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--gold);
  font-size: var(--step-1);
}
.card__title {
  font-family: "Fraunces", serif;
  font-size: var(--step-2);
  font-weight: 380;
  transition: font-variation-settings 0.6s var(--ease-out), letter-spacing 0.6s var(--ease-out);
  font-variation-settings: "wght" 380, "SOFT" 0, "WONK" 0;
}
.card:hover .card__title { font-variation-settings: "wght" 600, "SOFT" 100, "WONK" 0; letter-spacing: 0.01em; }
.card p { color: var(--muted); }
@container (min-width: 26rem) {
  .card__inner { grid-template-columns: 3.5rem 1fr; column-gap: 1.25rem; }
  .card__num { grid-row: span 2; padding-top: 0.35rem; }
}

/* ---------- Band (video interlude) ---------- */
.band {
  position: relative;
  min-height: 90svh;
  display: grid;
  place-items: center;
  padding: 4rem var(--gutter);
  overflow: clip;
  isolation: isolate;
  margin-block: clamp(2rem, 6vh, 4rem);
}
.band__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #15120f url("/media/band-poster.jpg") center / cover no-repeat;
}
.band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 50% 50%, rgb(11 11 12 / 0.35), rgb(11 11 12 / 0.85));
}
.band__video { width: 100%; height: 100%; object-fit: cover; }
@supports (animation-timeline: view()) {
  .band__media {
    animation: band-open linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }
  .band__quote {
    animation: band-quote linear both;
    animation-timeline: view();
    animation-range: cover 20% cover 55%;
  }
}
@keyframes band-open {
  from { clip-path: inset(12% 10% round 2rem); transform: scale(1.12); }
  to { clip-path: inset(0 0 round 0); transform: scale(1); }
}
@keyframes band-quote {
  from { opacity: 0; letter-spacing: 0.08em; --wght: 200; }
  to { opacity: 1; letter-spacing: -0.015em; --wght: 420; }
}
.band__quote {
  max-width: 54rem;
  text-align: center;
  font-size: var(--step-3);
  font-weight: 340;
  line-height: 1.1;
  font-variation-settings: "wght" var(--wght), "SOFT" 50, "WONK" 0;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.5);
}

/* ---------- Approach ---------- */
.approach {
  display: grid;
  gap: clamp(3rem, 6vw, 6rem);
}
@media (min-width: 60rem) {
  .approach { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .approach__intro { position: sticky; top: 7rem; }
}
.approach__intro { display: grid; gap: 1.25rem; }
.approach__text { font-size: var(--step-1); line-height: 1.55; color: var(--text); max-width: 38rem; }
/* word-by-word scrub (spans injected by JS) */
@supports (animation-timeline: view()) {
  .scrub .w {
    animation: word linear both;
    animation-timeline: view();
    animation-range: entry 70% cover 50%;
  }
}
@keyframes word { from { opacity: 0.18; } to { opacity: 1; } }

.steps { list-style: none; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.25rem 1rem;
  padding: 1.75rem 0;
  background: var(--bg);
}
.step__n { grid-row: span 2; font-family: "Fraunces", serif; font-style: italic; color: var(--gold); font-size: var(--step-1); }
.step h3 { font-family: "Fraunces", serif; font-size: var(--step-2); font-weight: 380; }
.step p { color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding-block: clamp(6rem, 16vh, 11rem);
  isolation: isolate;
}
.contact__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 26rem at var(--gx) var(--gy), hsl(var(--hue) 70% 60% / 0.22), transparent 70%),
    radial-gradient(30rem 20rem at 30% 70%, rgb(157 184 255 / 0.12), transparent 70%);
  animation: hue 14s ease-in-out infinite alternate;
  transition: --gx 1.2s var(--ease-out), --gy 1.2s var(--ease-out);
  filter: blur(10px);
}
@keyframes hue { from { --hue: 30; } to { --hue: 220; } }
.contact__title {
  font-size: var(--step-4);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.contact__lede { color: var(--muted); max-width: 34rem; font-size: var(--step-1); }
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1rem;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  border: 1px solid rgb(224 192 138 / 0.45);
  text-decoration: none;
  font-family: "Fraunces", serif;
  font-size: clamp(1.15rem, 0.7rem + 3.2vw, 3rem);
  font-weight: 400;
  color: var(--text);
  background: rgb(22 22 24 / 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.4s, background-color 0.4s, translate 0.5s var(--ease-out);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.contact__email:hover, .contact__email:focus-visible {
  border-color: var(--gold);
  background: rgb(224 192 138 / 0.1);
}
.contact__arrow { width: 0.8em; height: 0.8em; flex: none; color: var(--gold); transition: transform 0.5s var(--ease-out); }
.contact__email:hover .contact__arrow { transform: translate(0.15em, -0.15em); }
.contact__meta { color: var(--muted); font-size: var(--step--1); letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--gutter) max(2.5rem, env(safe-area-inset-bottom));
  display: grid;
  gap: 1.25rem;
  align-items: center;
  max-width: var(--max);
  margin-inline: auto;
}
@media (min-width: 52rem) { .site-footer { grid-template-columns: 1fr auto 1fr; } .site-footer__legal { text-align: right; } }
.site-footer__brand { display: grid; }
.site-footer__name { font-family: "Fraunces", serif; font-size: var(--step-1); }
.site-footer__place, .site-footer__legal { color: var(--muted); font-size: var(--step--1); }
.site-footer__email {
  font-size: var(--step-1);
  text-decoration-color: var(--gold);
  text-underline-offset: 0.3em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-footer__email:hover { color: var(--gold); }
.site-footer__legal a { color: var(--text); }

/* ---------- Lightbox (<dialog>) ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(8 8 9 / 0.96);
  color: var(--text);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), display 0.4s allow-discrete, overlay 0.4s allow-discrete;
}
.lightbox[open] { opacity: 1; display: grid; place-items: center; }
@starting-style { .lightbox[open] { opacity: 0; } }
.lightbox::backdrop { background: rgb(0 0 0 / 0.6); backdrop-filter: blur(6px); }
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 4.5rem 1rem 1.5rem;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__picture img {
  max-width: min(92vw, 1600px);
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.6rem;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__caption {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--step--1);
  color: var(--muted);
  text-align: center;
  max-width: 50rem;
}
.lightbox__cat { color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; }
.lightbox__count { font-variant-numeric: tabular-nums; }
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgb(22 22 24 / 0.7);
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}
.lightbox__btn:hover { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.3); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
.lightbox__prev, .lightbox__next { top: 50%; translate: 0 -50%; }
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }
@media (max-width: 40rem) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: max(1rem, env(safe-area-inset-bottom)); translate: none; }
  .lightbox__figure { padding-bottom: 5rem; }
}

/* ---------- View Transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: var(--ease-out); }
::view-transition-group(lb-img) { animation-duration: 0.6s; z-index: 100; }

/* ---------- Reduced motion: everything static, posters instead of video ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .hero__video, .hero__gl, .band__video { display: none; }
  .kinetic-ready .kchar { opacity: 1; transform: none; filter: none; }
  .marquee__track { transform: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__track span:nth-child(n + 13) { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Glyph stream cursor trail (js/glyph-stream.js) — decorative, never takes input */
.glyph-stream {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 90;
}
@media (prefers-reduced-motion: reduce), (hover: none), print { .glyph-stream { display: none; } }

/* Paused-by-user state mirrors reduced motion for decorative motion */
.motion-paused .marquee__track,
.motion-paused .btn--glow,
.motion-paused .btn--glow::after,
.motion-paused .contact__glow,
.motion-paused .hero__scroll span::after,
.motion-paused .eyebrow .dot { animation-play-state: paused; }

@media (forced-colors: active) {
  .btn--glow { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .filters input:checked + label { background: Highlight; color: HighlightText; }
}

@media print {
  .site-header, .hero__media, .marquee, .band, .lightbox, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Secondary pages (credits, 404) ---------- */
.page .page__header { position: sticky; animation: none; background: rgb(11 11 12 / 0.8); }
.credits { padding-top: clamp(3rem, 8vh, 5rem); display: grid; gap: 1.25rem; }
.credits__h2 { font-family: "Fraunces", serif; font-size: var(--step-2); margin-top: 2rem; }
.credits__wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.credits__table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 40rem; }
.credits__table th, .credits__table td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits__table th { color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; }
.credits__table tr:last-child td { border-bottom: 0; }
.credits__table a { color: var(--text); text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

.nf {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2rem var(--gutter);
  isolation: isolate;
  overflow: clip;
}
.nf__brand { position: absolute; top: max(1.25rem, env(safe-area-inset-top)); left: var(--gutter); }
.nf__glow {
  position: absolute; inset: -20%; z-index: -1;
  background: conic-gradient(from var(--angle) at 50% 55%, rgb(224 192 138 / 0.18), rgb(157 184 255 / 0.12), transparent 40%, rgb(224 192 138 / 0.18));
  filter: blur(60px);
  animation: spin 18s linear infinite;
}
.nf__title { font-family: "Fraunces", serif; font-weight: 200; font-size: clamp(7rem, 30vw, 20rem); line-height: 0.85; letter-spacing: -0.04em; }
.nf__digits { display: inline-flex; align-items: center; }
.nf__o {
  display: inline-block;
  width: 0.62em; height: 0.62em;
  margin-inline: 0.06em;
  border-radius: 50%;
  border: 0.035em solid var(--gold);
  background:
    repeating-conic-gradient(from var(--angle), rgb(224 192 138 / 0.5) 0 8deg, transparent 8deg 45deg);
  mask: radial-gradient(circle, transparent 28%, #000 29%);
  -webkit-mask: radial-gradient(circle, transparent 28%, #000 29%);
  animation: spin 10s linear infinite;
  filter: blur(0.6px);
}
.nf__text { color: var(--muted); max-width: 30rem; font-size: var(--step-1); }
.nf__actions { justify-content: center; }
