/* ==========================================================================
   Nomar Photography & Video — UI v3 ("dark editorial")
   No framework. Tokens first, then layout primitives, then sections.
   ========================================================================== */

:root {
  /* Palette */
  --bg: #0d0c0b;
  --bg-raised: #151412;
  --bg-sunken: #090807;
  --ink: #efe9df;
  --ink-soft: #c9c1b4;
  --ink-muted: #8f877b;
  --line: rgba(239, 233, 223, 0.12);
  --line-strong: rgba(239, 233, 223, 0.24);
  --accent: #c9a56b;
  --accent-ink: #14110c;
  --danger: #e38b7a;
  --success: #9fc79a;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-eyebrow: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --fs-h2: clamp(2.25rem, 1.6rem + 2.6vw, 4rem);
  --fs-h1: clamp(2.9rem, 1.8rem + 4.6vw, 6.25rem);

  /* Space & shape */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section-y: clamp(5rem, 3.5rem + 6vw, 9.5rem);
  --maxw: 1320px;
  --radius: 2px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Self-hosted fonts (SIL OFL — see ../fonts) */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-400-normal.87d22046a89f.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-500-normal.efeea72c7a42.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-400-italic.aa6bdaf51a40.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-500-italic.9b8a16c9964e.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.1589a53d0b0e.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.f95b8f975304.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.58d382c3e448.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

em, .serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 400; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  padding: .75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
}
.skip-link:focus { top: 1rem; color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--raised { background: var(--bg-raised); }
.section--sunken { background: var(--bg-sunken); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 2.5rem; height: 1px;
  background: currentColor;
}
.eyebrow--plain::before { display: none; }

.section-head {
  display: grid;
  gap: 1.5rem 4rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4.5rem);
}
@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: end;
  }
}
.section-head h2 { font-size: var(--fs-h2); }
.section-head h2 em { color: var(--accent); }
.section-head p { max-width: 38rem; font-size: var(--fs-lead); color: var(--ink-muted); }

.btn {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 52px;
  padding: .9rem 1.75rem;
  border: 1px solid var(--btn-line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: 600 .8125rem/1 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { --btn-line: var(--ink); color: var(--btn-ink); transform: translateY(-1px); }
.btn svg { width: 1em; height: 1em; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--accent { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: var(--accent); }
.btn--accent:hover { --btn-bg: var(--ink); --btn-line: var(--ink); --btn-ink: var(--accent-ink); }

.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: .35rem;
}
.link-arrow:hover { border-color: var(--accent); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* Reveal on scroll (only when JS is running) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), height .4s var(--ease), transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav-open .site-header { transform: none; }

/* Reading progress along the bottom edge of the header (no JS) */
@supports (animation-timeline: scroll()) {
  .site-header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    transition: opacity .4s var(--ease);
    animation: read-progress linear both;
    animation-timeline: scroll(root);
  }
  .site-header.is-solid::after,
  .page-inner .site-header::after { opacity: .9; }
  @keyframes read-progress { to { transform: scaleX(1); } }
}
.site-header.is-solid,
.page-inner .site-header {
  background: rgba(13, 12, 11, .82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .85rem; color: var(--ink); }
.brand img { width: 44px; height: auto; }
.brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: .01em;
}
.brand-name small {
  margin-top: .3rem;
  font-family: var(--font-body);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav { display: flex; align-items: center; gap: 2.25rem; }
.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-list a {
  position: relative;
  display: inline-block;
  padding: .5rem 0;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav-list a:hover,
.nav-list a.is-active { color: var(--ink); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }

.nav-cta { min-height: 44px; padding: .7rem 1.35rem; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease), opacity .3s;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; z-index: 2; }
  .nav-cta { display: none; }
  .nav-list {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
    padding: calc(var(--header-h) + 1rem) var(--gutter) 3rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s;
  }
  .nav-list a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
  }
  .nav-list a::after { display: none; }
  .nav-list a.is-active { color: var(--accent); }
  .nav-open .nav-list { opacity: 1; visibility: visible; }
  .nav-open .site-header { background: var(--bg); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-sunken);
  isolation: isolate;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 9s linear;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide.is-active img { transform: scale(1); }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(9, 8, 7, .55) 0%, rgba(9, 8, 7, 0) 28%),
    linear-gradient(0deg, rgba(9, 8, 7, .92) 0%, rgba(9, 8, 7, .35) 45%, rgba(9, 8, 7, .1) 100%),
    linear-gradient(90deg, rgba(9, 8, 7, .55) 0%, rgba(9, 8, 7, 0) 60%);
}

.hero-content {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: clamp(6rem, 4rem + 6vw, 8.5rem);
}
.hero h1 {
  max-width: 13ch;
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: .98;
}
.hero h1 em { color: var(--accent); }
.hero-lead {
  max-width: 36rem;
  margin-top: 1.75rem;
  color: var(--ink-soft);
  font-size: var(--fs-lead);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

.hero-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line);
}
.hero-meta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}
.hero-caption {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.hero-caption b { color: var(--ink); font-weight: 600; }

.hero-dots { display: flex; gap: .5rem; }
.hero-dot {
  position: relative;
  width: 44px; height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hero-dot::before,
.hero-dot::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--line-strong);
}
.hero-dot::after {
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-dot.is-active::after { animation: hero-progress var(--hero-interval, 6s) linear forwards; }
.hero.is-paused .hero-dot.is-active::after { animation-play-state: paused; }
@keyframes hero-progress { to { transform: scaleX(1); } }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 28px;
  background: linear-gradient(var(--ink), transparent);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 640px) {
  .hero::after {
    background:
      linear-gradient(180deg, rgba(9, 8, 7, .6) 0%, rgba(9, 8, 7, 0) 22%),
      linear-gradient(0deg, rgba(9, 8, 7, .95) 0%, rgba(9, 8, 7, .55) 55%, rgba(9, 8, 7, .2) 100%);
  }
  .hero-caption, .scroll-cue { display: none; }
  .hero-meta .container { justify-content: flex-start; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg);
  padding-block: 1.6rem;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
  margin: 0;
  list-style: none;
}
.marquee-group li {
  display: flex;
  align-items: center;
  gap: 3rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  font-style: italic;
  color: var(--ink);
  white-space: nowrap;
}
.marquee-group li::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 6rem);
  align-items: center;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}
.about-statement {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 2rem;
}
.about-statement em { color: var(--accent); }
.about-copy { color: var(--ink-muted); max-width: 36rem; }

.pillars {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.pillar h3 {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .75rem;
  font-size: var(--fs-h3);
}
.pillar h3 span {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--accent);
}
.pillar p { font-size: .95rem; color: var(--ink-muted); }

.about-media {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
}
.about-media figure { margin: 0; overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-media .m1 { grid-column: 1 / 10; grid-row: 1; aspect-ratio: 4 / 3; }
.about-media .m2 {
  grid-column: 6 / 13;
  grid-row: 1;
  align-self: end;
  aspect-ratio: 4 / 3;
  transform: translateY(42%);
  border: 10px solid var(--bg);
}
.about-media::before {
  content: "";
  position: absolute;
  top: -1.5rem; left: -1.5rem;
  width: 40%; height: 45%;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.about-badge {
  position: absolute;
  left: 0; bottom: -28%;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  max-width: 13rem;
}
.about-badge strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.about-badge span { font-size: var(--fs-small); color: var(--ink-muted); }
@media (max-width: 959px) {
  .about-media { margin-bottom: 0; row-gap: 0; }
  .about-media .m2 { transform: translateY(30%); }
  .about-media::before { display: none; }
  .about-badge { position: static; grid-column: 1 / -1; max-width: none; margin-top: 22%; }
}

/* --------------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.filter-btn {
  min-height: 40px;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: 600 .75rem/1 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.filter-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--accent-ink); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.5rem, .3rem + .8vw, 1.25rem);
}
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gallery-loader { grid-column: 1 / -1; height: 1px; }

.tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-raised);
  animation: tile-in .9s var(--ease) both;
}
.tile[hidden] { display: none; }
@keyframes tile-in { from { opacity: 0; transform: translateY(16px); } }

.tile > a,
.tile > div { display: block; height: 100%; color: var(--ink); }
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
}
.tile-caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.9rem, .6rem + 1vw, 1.5rem);
  background: linear-gradient(0deg, rgba(9, 8, 7, .85), rgba(9, 8, 7, 0));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.tile-caption small {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.tile-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.15;
}
.tile-caption .icon { width: 1.4rem; height: 1.4rem; }
.tile:hover img,
.tile:focus-within img { transform: scale(1.045); }
.tile:hover .tile-caption,
.tile:focus-within .tile-caption { opacity: 1; transform: none; }
@media (hover: none) {
  .tile-caption { opacity: 1; transform: none; }
  .tile-caption .icon { display: none; }
}

.gallery-more { display: flex; justify-content: center; margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.gallery-more[hidden] { display: none; }

.gallery-status {
  margin-top: 2rem;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

/* Skeleton shown while htmx loads */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.5rem, .3rem + .8vw, 1.25rem);
}
@media (min-width: 900px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .skeleton-grid { grid-template-columns: repeat(4, 1fr); } }
.skeleton-grid > span {
  aspect-ratio: 4 / 5;
  background: linear-gradient(100deg, var(--bg-raised) 40%, #1d1b18 50%, var(--bg-raised) 60%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.service {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: .5rem 1.5rem;
  padding: clamp(1.75rem, 1.4rem + 1vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  transition: padding .5s var(--ease);
}
.service::before {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}
.service:hover::before { transform: scaleX(1); }
.service-num {
  padding-top: .55rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--accent);
}
.service h3 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem); transition: color .4s var(--ease); }
.service:hover h3 { color: var(--accent); }
.service p { grid-column: 2; color: var(--ink-muted); max-width: 40rem; }
.service-tags {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}
.service-tags li {
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
}
@media (min-width: 900px) {
  .service {
    grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .service p { grid-column: 3; grid-row: 1; padding-top: .4rem; }
  .service-tags { grid-column: 3; }
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(6rem, 4rem + 8vw, 11rem);
  text-align: center;
}
.cta-bg { position: absolute; inset: 0; z-index: -2; }
.cta-bg img { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(9, 8, 7, .55) 0%, rgba(9, 8, 7, .88) 75%);
}
.cta h2 { font-size: var(--fs-h2); max-width: 16ch; margin: 0 auto; }
.cta h2 em { color: var(--accent); }
.cta p { max-width: 34rem; margin: 1.5rem auto 2.5rem; font-size: var(--fs-lead); }
.cta .eyebrow { justify-content: center; }
.cta .eyebrow::before,
.cta .eyebrow::after { content: ""; display: block; width: 2.5rem; height: 1px; background: currentColor; }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.quotes { position: relative; }
.quotes-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.quotes-track::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .quotes-track { grid-auto-columns: calc((100% - var(--gutter)) / 2); } }

.quote {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: clamp(2rem, 1.5rem + 2vw, 3rem);
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: .6;
  height: 2.2rem;
  color: var(--accent);
}
.quote blockquote {
  flex: 1;
  margin: 1.25rem 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + .7vw, 1.65rem);
  line-height: 1.4;
  color: var(--ink);
}
.quote figcaption { display: flex; align-items: center; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.quote figcaption strong { display: block; color: var(--ink); font-weight: 600; }
.quote figcaption span { font-size: var(--fs-small); color: var(--ink-muted); }
.stars { display: flex; gap: 2px; margin-left: auto; color: var(--accent); }
.stars svg { width: 14px; height: 14px; }

.quotes-nav { display: flex; align-items: center; gap: .75rem; }
.round-btn {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.round-btn:hover:not([disabled]) { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.round-btn[disabled] { opacity: .3; cursor: default; }
.round-btn svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  gap: clamp(1rem, .5rem + 1.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.member { margin: 0; }
.member-photo { overflow: hidden; aspect-ratio: 3 / 4; background: var(--bg-raised); }
.member-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .8s var(--ease), transform 1.2s var(--ease);
}
.member:hover .member-photo img { filter: none; transform: scale(1.03); }
.member figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.1rem; }
.member h3 { font-size: 1.6rem; }
.member span {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(3rem, 2rem + 4vw, 6rem); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }

.contact-intro h2 { font-size: var(--fs-h2); margin-bottom: 1.5rem; }
.contact-intro h2 em { color: var(--accent); }
.contact-intro > p { color: var(--ink-muted); font-size: var(--fs-lead); max-width: 30rem; }

.contact-list { margin: 2.5rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list .icon { color: var(--accent); margin-top: .2rem; }
.contact-list small {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.contact-list a, .contact-list address { color: var(--ink); font-style: normal; font-size: 1.05rem; }
.contact-list a:hover { color: var(--accent); }

.socials { display: flex; gap: .6rem; margin-top: 2rem; }
.socials a {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
}
.socials a:hover { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.socials svg { width: 18px; height: 18px; }

.form-card {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}
.form-card h3 { font-size: var(--fs-h3); margin-bottom: .5rem; }
.form-card > p { color: var(--ink-muted); margin-bottom: 2rem; }

.form-grid { display: grid; gap: 1.75rem 1.5rem; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

.field { position: relative; display: flex; flex-direction: column; gap: .5rem; }
.field label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .7rem 0 .8rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.05rem/1.5 var(--font-body);
  transition: border-color .3s var(--ease);
  color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.75rem;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a56b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .1rem center / 1.1rem;
}
.field select:invalid { color: rgba(239, 233, 223, .3); }
.field select option { background: var(--bg-raised); color: var(--ink); }
.field-optional {
  margin-left: .4rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: lowercase;
  color: rgba(239, 233, 223, .35);
}
/* Hide number spinners; the field is a quick estimate, not a stepper */
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(239, 233, 223, .3); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input:disabled,
.field textarea:disabled { opacity: .5; }
.field-hint { font-size: .8rem; color: var(--ink-muted); }

/* Honeypots: off-screen, not display:none (bots skip those) */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}
.form-note { font-size: .8rem; color: var(--ink-muted); max-width: 22rem; }

.form-alert {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid;
  font-size: .95rem;
}
.form-alert--error { border-color: rgba(227, 139, 122, .45); color: var(--danger); background: rgba(227, 139, 122, .06); }
.form-alert--success { border-color: rgba(159, 199, 154, .45); color: var(--success); background: rgba(159, 199, 154, .06); }

.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.htmx-request .spinner { display: inline-block; }
.htmx-request .btn-label-idle { display: none; }
.btn-label-busy { display: none; }
.htmx-request .btn-label-busy { display: inline; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--line);
  padding-top: clamp(4rem, 3rem + 4vw, 7rem);
}
.footer-top {
  display: grid;
  gap: 3rem;
  padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
}
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-claim {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  line-height: 1.1;
  color: var(--ink);
  max-width: 14ch;
  margin-bottom: 2rem;
}
.footer-claim em { color: var(--accent); }
.site-footer h4 {
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.footer-links a, .site-footer address { color: var(--ink-soft); font-style: normal; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--ink-muted);
}
.footer-wordmark {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 1rem + 11.5vw, 12.5rem);
  line-height: .9;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  text-align: center;
  padding-top: 1rem;
  user-select: none;
}

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 90;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(13, 12, 11, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .4s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: var(--accent-ink); }
.to-top svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Inner pages (album, legal)
   -------------------------------------------------------------------------- */
.page-head {
  position: relative;
  padding: calc(var(--header-h) + clamp(3.5rem, 2.5rem + 4vw, 6.5rem)) 0 clamp(2.5rem, 2rem + 2vw, 4rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.page-head-bg { position: absolute; inset: 0; z-index: -2; }
.page-head-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.1); transform: scale(1.2); opacity: .45; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 0%, rgba(13, 12, 11, .5) 100%); }
.page-head h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 5.5rem); font-weight: 400; max-width: 18ch; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--line-strong); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--accent); }

.album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin: 2.5rem 0 0;
  padding: 0;
}
.album-meta div { display: flex; flex-direction: column; gap: .25rem; }
.album-meta dt {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.album-meta dd { margin: 0; color: var(--ink); font-size: 1.05rem; }
.album-meta a { display: inline-flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--line-strong); }

.album-grid {
  columns: 1;
  column-gap: clamp(.5rem, .3rem + .8vw, 1.25rem);
}
@media (min-width: 600px) { .album-grid { columns: 2; } }
@media (min-width: 1000px) { .album-grid { columns: 3; } }
.album-grid a {
  display: block;
  margin-bottom: clamp(.5rem, .3rem + .8vw, 1.25rem);
  break-inside: avoid;
  overflow: hidden;
  background: var(--bg-raised);
  cursor: zoom-in;
}
.album-grid img { width: 100%; height: auto; }
.album-grid a:hover img { transform: scale(1.03); }

.album-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.empty-state { padding: 4rem 0; text-align: center; color: var(--ink-muted); }

/* Legal prose — DB content ships Bootstrap utility classes; map the ones used. */
.prose { max-width: 52rem; margin-inline: auto; color: var(--ink-soft); }
.prose-date {
  display: inline-flex;
  gap: .75rem;
  margin-bottom: 3rem;
  padding: .6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--ink-muted);
}
.prose-date b { color: var(--accent); font-weight: 600; }
.prose h1 { display: none; } /* page head already shows the title */
.prose h2, .prose h3, .prose h4 { margin: 2.5rem 0 1rem; font-size: var(--fs-h3); }
.prose .d-flex { display: flex; gap: 1.25rem; }
.prose .d-flex > div:first-child h3 { color: var(--accent); }
.prose .ms-3 { flex: 1; }
.prose .fs-4 { font-size: 1.05rem; }
.prose .mt-5 { margin-top: 3rem; }
.prose .mb-3, .prose .mb-4 { margin-bottom: 1.25rem; }
.prose .fw-bold { font-weight: 500; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .5rem; }
.prose strong, .prose b { color: var(--ink); }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #070605;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--ink-muted);
}
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(.5rem, 5vw, 6rem); }
.lightbox-stage img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100svh - 160px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transition: opacity .3s var(--ease);
}
.lightbox-stage img.is-loading { opacity: 0; }
.lightbox-prev,
.lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(13, 12, 11, .6); }
.lightbox-prev { left: var(--gutter); }
.lightbox-next { right: var(--gutter); }
.lightbox-foot { padding: 1rem var(--gutter) 1.5rem; text-align: center; font-size: .8rem; color: var(--ink-muted); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: -64px; transform: none; }
  .lightbox-stage { padding: 0; }
}

/* --------------------------------------------------------------------------
   Image fade-in (JS adds .is-loaded; images already cached get it at once)
   -------------------------------------------------------------------------- */
.js :is(.tile, .album-grid a, .member-photo, .related-media) img {
  opacity: 0;
  transition: opacity .8s var(--ease), transform 1.2s var(--ease), filter .8s var(--ease);
}
.js :is(.tile, .album-grid a, .member-photo, .related-media) img.is-loaded { opacity: 1; }

/* Quiet placeholder sheen while a tile's photo is still downloading */
.js :is(.tile, .album-grid a, .related-media):has(img:not(.is-loaded)) {
  background: linear-gradient(100deg, var(--bg-raised) 40%, #1d1b18 50%, var(--bg-raised) 60%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
.js .tile:has(img:not(.is-loaded)) { animation: tile-in .9s var(--ease) both, shimmer 1.6s linear infinite; }

/* Gallery hover focus: dim the rest so the hovered photo leads */
@media (hover: hover) {
  .gallery:has(.tile:hover) .tile:not(:hover) img,
  .album-grid:has(a:hover) a:not(:hover) img { filter: brightness(.55) saturate(.8); }
}

/* --------------------------------------------------------------------------
   Hero controls
   -------------------------------------------------------------------------- */
.hero-controls { display: flex; align-items: center; gap: .75rem; }
.hero-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.hero-toggle:hover { background: var(--ink); color: var(--accent-ink); }
.hero-toggle svg { width: 12px; height: 12px; }
.hero-toggle-play { display: none; }
.hero-toggle[aria-pressed="true"] .hero-toggle-pause { display: none; }
.hero-toggle[aria-pressed="true"] .hero-toggle-play { display: contents; }
.hero-toggle-pause { display: contents; }

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

/* --------------------------------------------------------------------------
   Services: inline enquiry link
   -------------------------------------------------------------------------- */
.service-link {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: .3rem;
}
.service-link svg { width: 1em; height: 1em; transition: transform .35s var(--ease); }
.service-link:hover { border-color: var(--accent); }
.service-link:hover svg { transform: translateX(3px); }
@media (min-width: 900px) { .service-link { grid-column: 3; } }

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 2.5rem var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.step::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 3rem; height: 1px;
  background: var(--accent);
  transition: width .9s var(--ease);
}
.step:hover::before { width: 100%; }
.step-num {
  display: block;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.75rem);
  font-style: italic;
  line-height: 1;
  color: var(--accent);
}
.step h3 { font-size: var(--fs-h3); margin-bottom: .75rem; }
.step p { font-size: .95rem; color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   Form validation
   -------------------------------------------------------------------------- */
.field-error { font-size: .8rem; color: var(--danger); }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: var(--danger); }
.field input:user-invalid,
.field textarea:user-invalid { border-bottom-color: var(--danger); }
.form-card.is-highlighted { animation: card-glow 1.6s var(--ease); }
@keyframes card-glow {
  0% { box-shadow: 0 0 0 0 rgba(201, 165, 107, 0); }
  30% { box-shadow: 0 0 0 1px var(--accent), 0 0 60px rgba(201, 165, 107, .18); }
  100% { box-shadow: 0 0 0 0 rgba(201, 165, 107, 0); }
}

/* --------------------------------------------------------------------------
   Album extras
   -------------------------------------------------------------------------- */
.album-actions { margin-top: 2rem; }
.album-actions .link-arrow { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: var(--font-body); }
.album-actions .link-arrow[hidden] { display: none; }

.related-grid {
  display: grid;
  gap: clamp(1rem, .5rem + 1.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.related-card { display: block; color: var(--ink); }
.related-media { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg); }
.related-media img { width: 100%; height: 100%; object-fit: cover; }
.related-card:hover .related-media img { transform: scale(1.04); }
.related-body { display: block; padding-top: 1.1rem; }
.related-body small {
  display: block;
  margin-bottom: .35rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.related-body strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1.15; }
.related-card:hover strong { color: var(--accent); transition: color .3s var(--ease); }

.lightbox-spinner {
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s var(--ease);
  animation: spin .8s linear infinite;
}
.lightbox-stage:has(img.is-loading) .lightbox-spinner { opacity: 1; transition-delay: .25s; }

/* --------------------------------------------------------------------------
   Mobile quick-action bar
   -------------------------------------------------------------------------- */
.mobile-bar { display: none; }
@media (max-width: 640px) {
  .mobile-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 95;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .75rem;
    padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(13, 12, 11, .9);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform .5s var(--ease);
  }
  .mobile-bar.is-visible { transform: none; }
  .mobile-bar .btn { min-height: 46px; }
  .mobile-bar-call {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 46px;
    padding: 0 1.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .mobile-bar-call .icon { width: 1rem; height: 1rem; }
  .to-top { display: none; }
  .site-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   Error pages
   -------------------------------------------------------------------------- */
.error-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding-block: calc(var(--header-h) + 3rem) 4rem;
}
.error-bg { position: absolute; inset: 0; z-index: -2; }
.error-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: grayscale(.4); }
.error-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--bg) 10%, rgba(13, 12, 11, .55) 100%);
}
.error-code {
  margin-bottom: .5rem;
  font-family: var(--font-display);
  font-size: clamp(6rem, 3rem + 14vw, 15rem);
  font-style: italic;
  line-height: .85;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.error-page h1 { font-size: var(--fs-h1); font-weight: 400; max-width: 14ch; }
.error-page h1 em { color: var(--accent); }
.error-lead { max-width: 34rem; margin-top: 1.5rem; font-size: var(--fs-lead); }
.error-lead a { color: var(--accent); }

/* ==========================================================================
   Round 2 — cinematic layer
   ========================================================================== */

/* Cross-document page transitions (Chromium/Safari; others just navigate) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.mobile-bar { view-transition-name: mobile-bar; }
::view-transition-old(root) { animation: vt-out .35s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .6s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* Film grain: one static SVG noise tile, nudged in steps on hover devices */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 400;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (hover: hover) and (pointer: fine) {
  body::after { animation: grain 1.2s steps(6) infinite; }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* Word-by-word headline reveal (JS wraps words in .w > span) */
.js .split.reveal { opacity: 1; transform: none; }
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 .06em .14em 0;
  margin: 0 -.06em -.14em 0;
}
.split .w > span {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  transform-origin: left bottom;
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--delay, 0s) + var(--i, 0) * 55ms);
}
.split.is-visible .w > span { transform: none; }

/* Follow cursor over photos (JS positions .cursor; the dot scales in) */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 450;
  width: 0; height: 0;
  pointer-events: none;
  will-change: transform;
}
.cursor-dot {
  position: absolute;
  left: -44px; top: -44px;
  display: grid;
  place-items: center;
  width: 88px; height: 88px;
  padding: .5rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent-ink);
  font: 600 .62rem/1.25 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  transform: scale(0);
  transition: transform .45s var(--ease);
}
.cursor.is-active .cursor-dot { transform: scale(1); }
.cursor.is-active.is-pressed .cursor-dot { transform: scale(.85); }
.has-cursor [data-cursor] { cursor: none; }
.lightbox.is-open ~ .cursor { display: none; }

/* Tile caption: let the count read as secondary */
.tile-caption small { white-space: nowrap; }

/* Portfolio filter transition (View Transitions API, same-document) */
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }
.vt-filter::view-transition-old(root),
.vt-filter::view-transition-new(root) { animation: none; }

/* About photos drift with scroll */
@supports (animation-timeline: view()) {
  .about-media img {
    scale: 1.14;
    animation: drift linear both;
    animation-timeline: view();
  }
  @keyframes drift {
    from { translate: 0 -6%; }
    to { translate: 0 6%; }
  }

  /* Footer wordmark fills with gold as it scrolls in */
  .footer-wordmark {
    background: linear-gradient(90deg, rgba(201, 165, 107, .9) 0 50%, transparent 50% 100%) 100% 0 / 200% 100% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    animation: word-fill linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 60%;
  }
  @keyframes word-fill { to { background-position: 0 0; } }
}

/* Mobile menu: staggered entrance + contact footer */
.nav-extra { display: none; }
@media (max-width: 1080px) {
  .nav-list li {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .5s var(--ease), transform .7s var(--ease);
  }
  .nav-open .nav-list li { opacity: 1; transform: none; }
  .nav-open .nav-list li:nth-child(1) { transition-delay: .08s; }
  .nav-open .nav-list li:nth-child(2) { transition-delay: .13s; }
  .nav-open .nav-list li:nth-child(3) { transition-delay: .18s; }
  .nav-open .nav-list li:nth-child(4) { transition-delay: .23s; }
  .nav-open .nav-list li:nth-child(5) { transition-delay: .28s; }
  .nav-open .nav-list li:nth-child(6) { transition-delay: .33s; }
  .nav-open .nav-list li:nth-child(7) { transition-delay: .38s; }
  .nav-open .nav-list li:nth-child(8) { transition-delay: .43s; }
  .nav-extra {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: var(--fs-small);
    color: var(--ink-muted);
  }
  .nav-list .nav-extra a {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--accent);
  }
}

/* Testimonials: drag + progress */
.quotes-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
@media (hover: hover) and (pointer: fine) { .quotes-track { cursor: grab; } }
.quotes-progress {
  position: relative;
  height: 1px;
  margin-top: 2.5rem;
  background: var(--line);
  overflow: hidden;
}
.quotes-progress span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, .2));
  transition: transform .4s var(--ease);
}

/* Contact success */
.form-alert--success { align-items: center; }
.success-check { flex: none; display: inline-grid; }
.success-check svg { width: 28px; height: 28px; }
.success-check circle { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .8s var(--ease) forwards; }
.success-check path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: draw .5s var(--ease) .55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Lightbox: tools, slideshow progress, filmstrip, zoom */
.lightbox { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.lightbox-tools { display: flex; gap: .5rem; }
.lightbox-tools .round-btn { width: 44px; height: 44px; }
.lightbox-tools [hidden] { display: none; }
.lightbox .when-on { display: none; }
.lightbox.is-playing .when-on { display: contents; }
.lightbox.is-playing .when-off { display: none; }
.when-off { display: contents; }

.lightbox-progress { height: 1px; margin-inline: var(--gutter); background: var(--line); opacity: 0; transition: opacity .3s var(--ease); }
.lightbox-progress::after { content: ""; display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.lightbox.is-playing .lightbox-progress { opacity: 1; }
.lightbox.is-playing .lightbox-progress.is-running::after { animation: lb-progress var(--lb-interval, 4s) linear forwards; }
@keyframes lb-progress { to { transform: scaleX(1); } }

.lightbox-stage { overflow: hidden; }
.lightbox-stage img {
  max-height: calc(100vh - 230px);
  max-height: calc(100svh - 230px);
  cursor: zoom-in;
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.lightbox-stage img.is-zoomed { transform: scale(2.2); cursor: zoom-out; transition: opacity .3s var(--ease); }
.lightbox-stage img.is-entering { animation: lb-in .5s var(--ease); }
@keyframes lb-in { from { opacity: .3; transform: scale(.985); } }

.lightbox-foot { padding: .75rem var(--gutter) 1rem; text-align: center; }
.lightbox-caption { margin: 0 0 .75rem; font-size: .8rem; color: var(--ink-muted); }
.lightbox-strip {
  display: flex;
  gap: 6px;
  justify-content: safe center;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip button {
  flex: none;
  width: 56px; height: 56px;
  padding: 0;
  border: 1px solid transparent;
  background: var(--bg-raised);
  opacity: .45;
  cursor: pointer;
  transition: opacity .3s var(--ease), border-color .3s var(--ease);
}
.lightbox-strip button:hover { opacity: .8; }
.lightbox-strip button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.lightbox-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .lightbox-strip { display: none; }
  .lightbox-stage img { max-height: calc(100svh - 200px); }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .site-header.is-hidden { transform: none; }
  body::after { animation: none; }
  .about-media img, .footer-wordmark { animation: none; }
  .footer-wordmark { background: none; }
  .split .w > span { transform: none; }
  @view-transition { navigation: none; }
}
