/* PENUELVISION build 20261103d */
/* ============================================================
   PENUELVISION STUDIOS — shared design system
   Warm beige-brown palette · Montserrat display · Inter body

   Browser support: Chrome, Firefox, Safari, Edge, Opera, Brave.
   Fallbacks are provided for backdrop-filter, aspect-ratio,
   :focus-visible, clamp() and gap in flex containers.
   ============================================================ */

/* ---------- SELF-HOSTED FONTS ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/montserrat-medium.woff2') format('woff2'),
       url('./fonts/montserrat-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/montserrat-semibold.woff2') format('woff2'),
       url('./fonts/montserrat-semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/montserrat-bold.woff2') format('woff2'),
       url('./fonts/montserrat-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-regular.woff2') format('woff2'),
       url('./fonts/inter-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- TOKENS ---------- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-elevated: #1a1a28;

  --accent-beige: #e3c9a8;
  --accent-sand: #c9a87c;
  --accent-brown: #a67c52;
  --accent-warm-deep: #8b6f47;
  /* Label colour on the warm gradient buttons. Darkened from #2a1f14
     so white-on-warm text clears 4.5:1 across every gradient stop,
     including the darkest #8b6f47 end. */
  --on-warm: #1a130c;

  --gradient-warm: linear-gradient(135deg, #e3c9a8 0%, #c9a87c 45%, #9c7f57 100%);
  --gradient-warm-anim: linear-gradient(100deg, #e3c9a8, #c9a87c, #a67c52, #9c7f57, #c9a87c, #e3c9a8);
  --gradient-warm-text: linear-gradient(120deg, #e3c9a8 0%, #c9a87c 50%, #a67c52 100%);

  --text-primary: #ffffff;
  --text-body: #e0e0e8;
  --text-muted: #9a9aad;
  --border: rgba(255, 255, 255, 0.08);
  --danger: #e07a5f;

  --font-display: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --header-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* stops iOS bumping font size in landscape */
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Keyboard focus that does not fire on mouse click.
   Browsers without :focus-visible keep a plain outline. */
:focus { outline: 2px solid var(--accent-sand); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent-sand); outline-offset: 3px; }

/* ---------- KEYFRAMES ---------- */
@keyframes warmFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HEADER
   Desktop: [logo] [Start a Project] [nav]
   Mobile:  [logo] [hamburger]  +  always-visible scrollable nav
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 5vw;
  background: rgba(10, 10, 15, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

/* Browsers without backdrop-filter get a solid bar instead of
   unreadable text over the hero. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(10, 10, 15, 0.96); }
}

.site-header.is-scrolled {
  background: rgba(10, 10, 15, 0.96);
  border-bottom-color: var(--border);
  padding: 11px 5vw;
}

.header-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2.4px;
  color: var(--text-primary);
  white-space: nowrap;
  flex: 0 0 auto;
}

.header-cta { flex: 0 0 auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 0 0 auto;
}

.header-nav a {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.3px;
  color: var(--text-body);
  transition: color 0.22s ease;
  white-space: nowrap;
  padding: 4px 0;
}

.header-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--gradient-warm);
  transition: width 0.3s ease;
}

.header-nav a:hover { color: var(--accent-beige); }
.header-nav a:hover::after { width: 100%; }

.header-nav a.is-active { color: var(--accent-beige); }
.header-nav a.is-active::after { width: 100%; }

.nav-toggle { display: none; }

/* Direct "Photos" link — mobile only, replaces the dropdown there */
.nav-mobile-only { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  position: relative;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  line-height: 1.2;
  border-radius: 7px;
  padding: 14px 30px;
  color: var(--on-warm);
  background-color: var(--accent-brown);
  background-image: var(--gradient-warm-anim);
  background-size: 300% 300%;
  background-position: 0% 50%;
  box-shadow: 0 4px 18px rgba(166, 124, 82, 0.25);
  transition: box-shadow 0.35s ease, transform 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  text-align: center;
}

.btn:hover {
  animation: warmFlow 4s ease infinite;
  box-shadow: 0 10px 34px rgba(201, 168, 124, 0.45);
  transform: translateY(-2px);
  color: var(--on-warm);
}

.btn:active { transform: translateY(0); }

.btn-sm { padding: 10px 20px; font-size: 0.76rem; }
.btn-lg { padding: 16px 36px; font-size: 0.98rem; }

.btn-outline {
  background: transparent;
  background-image: none;
  border: 1.5px solid rgba(227, 201, 168, 0.4);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-outline:hover {
  animation: none;
  background: rgba(227, 201, 168, 0.09);
  border-color: var(--accent-beige);
  box-shadow: 0 8px 26px rgba(201, 168, 124, 0.2);
  color: var(--text-primary);
}

/* ============================================================
   PAGE SHELL
   ============================================================ */
.page-main { padding-top: var(--header-h); }

/* The header is fixed, so an anchor would tuck the section's top edge
   underneath it and hide the first lines of every target. */
section[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.section {
  padding: 96px 5vw;
  max-width: 1440px;
  margin: 0 auto;
}

.section-tight { padding: 64px 5vw; }

.section-dark {
  background: var(--bg-secondary);
  max-width: none;
}

.section-dark > .section-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 52px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-sand);
  margin-bottom: 14px;
}

.gradient-warm {
  background: var(--gradient-warm-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-sand);          /* fallback when clip is unsupported */
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 20px;
}

.prose { max-width: 860px; margin: 0 auto; }

/* The first heading of a prose block needs no top margin — the section
   padding above it already provides the breathing room. Without this
   the two collapsed into one oversized gap. */
.prose > :first-child { margin-top: 0; }

/* About: the intro and "What We Create" belong to one flow, so they sit
   closer together than the default section rhythm. */
.about-intro { padding-bottom: 32px; }
.about-body { padding-top: 36px; }


/* About portrait. The photograph is a tall 3:5 crop, so at full column
   width it drove the row to ~830 px and left a large gap under the
   shorter text column. Capping the height keeps the image generous
   without stretching the section. */
.about-portrait {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.about-portrait img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 10px;
}

/* Stacked on phones: no need to cap the height there, the column is
   already narrow and the cap would crop the portrait awkwardly. */
@media (max-width: 860px) {
  .about-portrait img { max-height: none; }
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 44px 0 14px;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 30px 0 10px;
}
.prose p { margin-bottom: 16px; color: var(--text-muted); line-height: 1.8; }
.prose ul { margin: 0 0 20px 0; padding-left: 22px; }
.prose li { margin-bottom: 10px; color: var(--text-muted); line-height: 1.75; }
.prose strong { color: var(--text-body); font-weight: 600; }
.prose a { color: var(--accent-sand); text-decoration: underline; }

/* A .btn inside .prose must keep its own colours. ".prose a" is more
   specific (0,1,1) than ".btn" (0,1,0), so the label was being tinted
   sand-on-sand and vanished into the button. */
.prose a.btn {
  color: var(--on-warm);
  text-decoration: none;
}

.prose a.btn-outline { color: var(--text-primary); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 5vw 80px;
}

.hero-bg { position: absolute; inset: 0; z-index: 1; }

.hero-bg video,
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;

  /* The scrim keeps its gradient shape but is applied at 37 % strength,
     so the footage is clearly visible while the headline stays readable.
     The bottom stop stays denser to ground the section edge. */
  opacity: 0.37;

  background:
    radial-gradient(ellipse at center, rgba(10, 10, 15, 0.45), rgba(10, 10, 15, 0.94)),
    linear-gradient(180deg, rgba(22, 15, 8, 0.4) 0%, rgba(10,10,15,0) 40%, rgba(10, 10, 15, 0.92) 100%);
}

.hero-inner { position: relative; z-index: 3; max-width: 1020px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 22px;
}

/* Role line: the one sentence that says what this person does. It sits
   between the headline and the longer description. */
.hero-role {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--accent-sand);
  margin: 18px 0 0;
}

.hero-role .role-sep {
  color: var(--muted);
  font-weight: 400;
  margin: 0 4px;
}

.hero-sub {
  font-size: clamp(0.98rem, 1.7vw, 1.2rem);
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 38px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   GRIDS
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Last row with a single item centres instead of hugging the left edge */
.grid-3 > :last-child:nth-child(3n + 1) {
  grid-column: 2 / 3;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* About: text column slightly wider than the portrait. Declared as a
   class rather than an inline style so the mobile media query can stack
   the columns — an inline style would outrank it. Must sit after
   .grid-2: equal specificity, so source order decides. */
.about-grid { grid-template-columns: 1fr 1.15fr; }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 124, 0.4);
  box-shadow: 0 18px 44px rgba(139, 111, 71, 0.18);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon { font-size: 1.8rem; display: block; margin-bottom: 14px; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.service-tagline {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--accent-sand);
  padding-bottom: 11px;
  margin-bottom: 13px;
  border-bottom: 1px solid rgba(201, 168, 124, 0.2);
}

.service-card p { font-size: 0.93rem; color: var(--text-muted); }

.service-list { list-style: none; margin-top: 12px; }

.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.91rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-sand);
}

/* ============================================================
   SHOWREEL
   ============================================================ */
.showreel-wrap { max-width: 1080px; margin: 0 auto; }

.showreel-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  aspect-ratio: 16 / 9;
}

/* Safari <15 has no aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .showreel-frame { height: 0; padding-bottom: 56.25%; }
  .showreel-frame img,
  .showreel-frame .showreel-play,
  .showreel-frame .showreel-label {
    position: absolute;
  }
  .showreel-frame img { top: 0; left: 0; width: 100%; height: 100%; }
}

.showreel-frame img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.showreel-frame:hover img { transform: scale(1.03); opacity: 0.85; }

.showreel-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--gradient-warm);
  color: var(--on-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  padding-left: 6px;
  box-shadow: 0 12px 40px rgba(201, 168, 124, 0.45);
  transition: transform 0.3s ease;
}

.showreel-frame:hover .showreel-play { transform: translate(-50%, -50%) scale(1.08); }

.showreel-label {
  position: absolute;
  left: 20px; bottom: 18px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* Inline player replaces the poster once started */
.showreel-player {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
  .showreel-player { height: 0; padding-bottom: 56.25%; }
}

.showreel-player iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Description box under the reel */
.video-caption {
  margin-top: 18px;
  padding: 22px 26px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-left: 3px solid var(--accent-sand);
}

.video-caption h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.video-caption p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin: 0;
}

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: rgba(5, 5, 10, 0.95);
}

.video-modal.is-open { display: flex; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .video-modal {
    background: rgba(5, 5, 10, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.video-modal-inner { width: 100%; max-width: 1180px; position: relative; }

.video-modal-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
  .video-modal-frame { height: 0; padding-bottom: 56.25%; }
}

.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video-modal-close {
  position: absolute;
  top: -44px; right: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.video-modal-close:hover {
  background: var(--accent-sand);
  color: var(--on-warm);
  transform: rotate(90deg);
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.filters {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  background-color: var(--bg-elevated);
  background-image: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background-size: 300% 300%;
  background-position: 0% 50%;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.filter-btn:hover {
  color: var(--accent-beige);
  border-color: var(--accent-sand);
  transform: translateY(-1px);
}

.filter-btn.is-active {
  background-image: var(--gradient-warm-anim);
  color: var(--on-warm);
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(166, 124, 82, 0.28);
}

.filter-btn.is-active:hover {
  animation: warmFlow 4s ease infinite;
  box-shadow: 0 8px 28px rgba(201, 168, 124, 0.45);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
}

.work-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 124, 0.35);
  box-shadow: 0 20px 50px rgba(139, 111, 71, 0.22);
}

.work-card.is-hidden { display: none; }

.work-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: var(--bg-secondary);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
  .work-thumb { height: 0; padding-bottom: 56.25%; }
  .work-thumb img,
  .work-thumb .work-play,
  .work-thumb img { top: 0; left: 0; width: 100%; height: 100%; }
}

.work-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work-card:hover .work-thumb img { transform: scale(1.06); }

.work-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card:hover .work-thumb::after { opacity: 1; }

.work-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(201, 168, 124, 0.94);
  color: var(--on-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding-left: 3px;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.work-card:hover .work-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.work-body { padding: 18px 20px 20px; }

.work-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.work-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.work-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag.is-warm {
  color: var(--accent-sand);
  background: rgba(201, 168, 124, 0.08);
  border-color: rgba(201, 168, 124, 0.3);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 44px;
  align-items: start;
}

.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 38px;
}

.field { margin-bottom: 20px; }

.field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.field-label .req { color: var(--accent-sand); }

.input,
.select,
.textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder,
.textarea::placeholder { color: #63637a; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent-sand);
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.13);
}

.input.has-error,
.select.has-error,
.textarea.has-error { border-color: var(--danger); }

.textarea { resize: vertical; min-height: 145px; }

.select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9a87c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.select option { background: #14141f; color: var(--text-primary); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.check-row { display: flex; align-items: flex-start; }

.check-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin: 3px 10px 0 0;
  accent-color: var(--accent-sand);
  cursor: pointer;
  flex-shrink: 0;
}

.check-label {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  cursor: pointer;
}

.check-label a { color: var(--accent-sand); text-decoration: underline; }

.form-error {
  display: none;
  font-size: 0.79rem;
  color: var(--danger);
  margin-top: 6px;
}

.form-error.is-visible { display: block; }

.form-submit {
  width: 100%;
  margin-top: 6px;
  padding: 16px 30px;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--on-warm);
  background-color: var(--accent-brown);
  background-image: var(--gradient-warm-anim);
  background-size: 300% 300%;
  background-position: 0% 50%;
  box-shadow: 0 4px 18px rgba(166, 124, 82, 0.25);
  transition: box-shadow 0.35s ease, transform 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-submit:hover:not(:disabled) {
  animation: warmFlow 4s ease infinite;
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(201, 168, 124, 0.45);
}

.form-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.form-success {
  display: none;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  color: var(--accent-beige);
  background: rgba(201, 168, 124, 0.1);
  border: 1px solid rgba(201, 168, 124, 0.35);
}

.form-success.is-visible { display: block; }

.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 38px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 22px;
}

.info-item { margin-bottom: 22px; }

.info-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-sand);
  margin-bottom: 5px;
}

.info-value { font-size: 0.98rem; color: var(--text-primary); line-height: 1.6; }
.info-value a { transition: color 0.2s ease; word-break: break-word; }
.info-value a:hover { color: var(--accent-beige); }

.info-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }

.social-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.social-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.social-btn:hover {
  background-image: var(--gradient-warm);
  color: var(--on-warm);
  border-color: transparent;
  transform: translateY(-3px);
}

.response-note {
  margin-top: 22px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  background: rgba(201, 168, 124, 0.08);
  border: 1px solid rgba(201, 168, 124, 0.28);
}

.response-note .label {
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.response-note .value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-beige);
}

/* ============================================================
   CLIENT PORTAL — discreet corner link
   ============================================================ */
.portal-peek {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 800;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  background: #0a0a0f;
  font-size: 0;
  opacity: 0.02;
  transition: opacity 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

.portal-peek:hover,
.portal-peek:focus-visible {
  opacity: 0.6;
  color: var(--accent-sand);
  font-size: 1.05rem;
  outline: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 5vw 30px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 44px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--text-primary);
  margin-bottom: 13px;
}

.footer-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; }

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-sand);
  margin-bottom: 15px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  word-break: break-word;
}

.footer-links a:hover { color: var(--accent-beige); }

.footer-bottom {
  max-width: 1440px;
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* If the script never runs, nothing may stay hidden. */
.no-js .reveal { opacity: 1; transform: none; }

/* Readers who ask for less motion get the content without the movement. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet landscape */
@media (max-width: 1080px) {
  .header-nav { gap: 16px; }
  .header-nav a { font-size: 0.78rem; }
  .header-logo { font-size: 1rem; letter-spacing: 2px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 > :last-child:nth-child(3n + 1) { grid-column: auto; }
  .grid-3 > :last-child:nth-child(2n + 1) { grid-column: 1 / -1; max-width: 520px; width: 100%; margin: 0 auto; }
}

/* Tablet portrait / small laptop */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .info-card { position: static; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- MOBILE ----------
   The nav must never disappear. On small screens the header becomes
   two rows: brand + CTA on the first, a horizontally scrollable menu
   on the second. Nothing is hidden behind a hamburger.
----------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --header-h: 108px; }

  .site-header {
    padding: 12px 16px 0;
    gap: 10px;
    flex-wrap: wrap;
  }

  .site-header.is-scrolled { padding: 10px 16px 0; }

  .header-logo {
    font-size: 0.82rem;
    letter-spacing: 1.4px;
    order: 1;
    flex: 1 1 auto;
  }

  .header-cta {
    order: 2;
    flex: 0 0 auto;
  }

  .header-cta .btn-sm { padding: 8px 14px; font-size: 0.68rem; }

  .nav-toggle { display: none !important; }

  /* The dropdown is unusable inside a horizontally scrolling strip: as an
     overlay it covers the neighbouring links, in flow it pushes the row
     down. On phones it is replaced by a plain "Photos" link. */
  .nav-item { position: static; }
  .nav-item .nav-caret { display: none; }
  .nav-sub { display: none !important; }
  .nav-mobile-only { display: block; }

  /* Always-visible, swipeable menu */
  .header-nav {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    gap: 18px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 11px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .header-nav::-webkit-scrollbar { display: none; }

  .header-nav a {
    font-size: 0.76rem;
    padding: 3px 0;
    flex: 0 0 auto;
  }

  .header-nav a::after { bottom: 0; }

  .section { padding: 60px 5vw; }
  .section-tight { padding: 44px 5vw; }
  .hero { min-height: 84vh; padding: 60px 5vw 60px; }
  .work-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-3 > :last-child:nth-child(n) { grid-column: auto; max-width: none; }
}

/* Phones */
@media (max-width: 640px) {
  :root { --header-h: 102px; }

  /* iOS Safari zooms in when a focused field renders below 16px and does
     not zoom back out, leaving the visitor on a magnified page. The
     viewport has no maximum-scale on purpose, so the font is the lever. */
  .input,
  .select,
  .textarea { font-size: 16px; }

  .hero-title { font-size: 1.65rem; letter-spacing: 0; }
  .hero-sub { font-size: 0.94rem; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .field-row { grid-template-columns: 1fr; }
  .form-card, .info-card { padding: 24px 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .showreel-play { width: 62px; height: 62px; font-size: 1.3rem; }
  .showreel-label { font-size: 0.8rem; letter-spacing: 1.4px; left: 14px; bottom: 12px; }

  .filter-btn { font-size: 0.8rem; padding: 12px 16px; }

  .video-modal { padding: 12px; }
  .video-modal-close { top: -38px; width: 34px; height: 34px; }

  .video-caption { padding: 16px 18px; }
  .video-caption h3 { font-size: 0.92rem; }
  .video-caption p { font-size: 0.86rem; }
}

/* Very narrow phones (iPhone SE, older Android) */
@media (max-width: 380px) {
  .header-logo { font-size: 0.74rem; letter-spacing: 1px; }
  .header-nav { gap: 13px; }
  .header-nav a { font-size: 0.71rem; }
  .header-cta .btn-sm { padding: 7px 11px; font-size: 0.62rem; }
}

/* Landscape phones — reclaim vertical space */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 40px 5vw; }
  .hero-title { font-size: 1.5rem; }
  .hero-sub { display: none; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media (max-width: 640px) {
  .hero-role { font-size: 0.84rem; letter-spacing: 0.3px; margin-top: 14px; }
  .hero-role .role-sep { margin: 0 2px; }
}

@media print {
  .site-header, .site-footer, .portal-peek, .video-modal, .filters { display: none !important; }
  body { background: #fff; color: #000; }
  .page-main { padding-top: 0; }
}

/* Users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   HERO VIDEO BACKGROUND
   ============================================================ */

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  pointer-events: none;
}

/* Fallback poster stays visible until the video can play, and
   permanently on browsers that refuse autoplay. */
.hero-bg video {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-bg video.is-ready { opacity: 0.42; }

/* ============================================================
   NAV DROPDOWN — Portfolio
   Hover on desktop, tap-through on touch devices.
   The parent link still navigates to the video portfolio.
   ============================================================ */

.nav-item { position: relative; display: flex; align-items: center; }

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  opacity: 0.65;
  transition: transform 0.25s ease;
  margin-top: 1px;
}

.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: rotate(180deg); }

.nav-sub {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 196px;
  padding: 8px;
  background: #15151f;
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 950;
}

/* Invisible bridge so the pointer can travel from the link to the
   menu without the menu closing in the gap. */
.nav-sub::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-item:hover > .nav-sub,
.nav-item:focus-within > .nav-sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-sub a {
  display: block;
  padding: 10px 14px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-sub a::after { display: none; }

.nav-sub a:hover,
.nav-sub a:focus-visible {
  background: rgba(201, 168, 124, 0.14);
  color: var(--accent-beige);
}

.nav-sub a.is-active { color: var(--accent-sand); }

/* Arrow pointing up at the parent */
.nav-sub::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: #15151f;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* ============================================================
   TOUCH TARGETS
   Apple asks for 44pt, Material for 48dp. Text-sized links fall well
   short: a menu item is about 25px tall, a footer link 17px. These
   rules apply only where the pointer is a finger, so the desktop
   rhythm is untouched. Padding grows the hit box, not just height.
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .header-nav a,
  .nav-sub a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* The underline belongs to the word, not to the padded box. */
  .header-nav a::after { bottom: 12px; }

  .filter-btn {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .footer-links a,
  .footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .lightbox-close {
    width: 44px;
    height: 44px;
    top: -52px;
  }

  /* The box stays visually small so the form does not grow, but the
     label beside it is part of the target and the input gets an
     invisible 44px hit region of its own. */
  .check-row { position: relative; }

  .check-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }

  .check-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    left: -12px;
    top: -12px;
    width: 44px;
    height: 44px;
  }

  .check-label { padding-top: 1px; }

  .header-logo { padding: 11px 0; }
}

/* Touch: no hover, so open on focus and let taps pass through */
/* Touch screens have no hover, so the dropdown is opened by tapping the
   caret instead. It has to stay an overlay.

   The previous version put it back into the normal flow here
   (position: static). That only makes sense inside a stacked drawer.
   This navigation is a single row, so in the flow the list pushed the
   row apart and the two entries landed on top of "Portfolio" — most
   visible with an Android phone on its side, where the viewport is
   wider than the 860px breakpoint and the one-row layout is in use.
   Below 860px the list is hidden outright and replaced by the "Photos"
   link, so only wide touch screens are affected at all. */
@media (hover: none) {
  .nav-item.is-open > .nav-sub {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  /* A finger needs the rows to be tall enough to hit. */
  .nav-sub a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 860px) {
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-sub { position: static; transform: none; }
}

/* ============================================================
   PHOTO PORTFOLIO
   ============================================================ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.photo-cell {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  -webkit-appearance: none;
  appearance: none;
}

@supports not (aspect-ratio: 4 / 3) {
  .photo-cell { height: 0; padding-bottom: 75%; }
}

.photo-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.photo-cell:hover img { transform: scale(1.05); }

.photo-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  pointer-events: none;
  transition: border-color 0.25s ease;
}

.photo-cell:hover::after { border-color: rgba(201, 168, 124, 0.5); }

/* Empty slot — clearly a placeholder, not a broken image */
.photo-slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.012) 0 12px,
      rgba(255, 255, 255, 0.028) 12px 24px
    );
  color: #55556a;
}

.photo-slot svg {
  width: 26px;
  height: 26px;
  opacity: 0.5;
}

.photo-slot span {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.6px;
  word-break: break-all;
  line-height: 1.4;
}

.photo-cell.is-hidden { display: none; }

/* A slot whose thumbnail does not exist is removed from the grid.
   Without this, a category with 3 photos would show 3 images followed
   by 37 empty frames labelled events-04, events-05 and so on. */
.photo-cell[data-missing="1"] { display: none; }

/* ============================================================
   LIGHTBOX — thin animated gradient frame
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vw;
  background: rgba(5, 5, 10, 0.95);
}

.lightbox.is-open { display: flex; }

.lightbox-inner {
  position: relative;
  display: inline-block;

  /* Ceiling raised so a 2400 px original is actually visible on large
     screens. At 1200 px the extra detail was discarded before reaching
     the display. The height clamp still keeps tall photos inside the
     viewport. */
  max-width: min(1600px, 94vw);
}

.lightbox-frame {
  position: relative;
  padding: 2px;
  border-radius: 12px;
  overflow: hidden;

  /* The gradient sits on the container; the image covers all but
     a 2px rim, which reads as a thin animated border. */
  background-image: linear-gradient(
    100deg,
    #e3c9a8, #c9a87c, #a67c52, #8b6f47, #c9a87c, #e3c9a8
  );
  background-size: 300% 300%;
  animation: warmFlow 6s ease infinite;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 4px);
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

/* Loading state: the frame keeps a readable size while the next original
   downloads, the old picture dims, and a ring shows that work is in
   progress. The ring only spins when motion is allowed. */
.lightbox-frame.is-loading {
  min-width: min(440px, 80vw);
  min-height: min(300px, 50vh);
}

.lightbox-frame.is-loading img {
  opacity: 0.25;
  transition: opacity 0.2s ease;
}

.lightbox-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 3px solid rgba(227, 201, 168, 0.25);
  border-top-color: var(--accent-sand);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox-frame.is-loading::after {
  opacity: 1;
  animation: lightboxSpin 0.9s linear infinite;
}

@keyframes lightboxSpin {
  to { transform: rotate(360deg); }
}

.lightbox-caption {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  padding: 26px 16px 10px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  border-radius: 0 0 10px 10px;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-close:hover {
  background: var(--accent-sand);
  color: var(--on-warm);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease;
}

.lightbox-nav:hover { background: var(--accent-sand); color: var(--on-warm); }
.lightbox-prev { left: -58px; }
.lightbox-next { right: -58px; }

@media (max-width: 900px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox { padding: 8vw 3vw; }
}

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
  .photo-slot span { font-size: 0.52rem; }
  .photo-slot svg { width: 20px; height: 20px; }
  .lightbox-close { top: -40px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-frame { animation: none; background-position: 0% 50%; }
  .lightbox-frame.is-loading::after { animation: none; border-top-color: transparent; }
}
