/* ==========================================================================
   Orangefilms 2026 — Main Stylesheet
   Mobile-first. WCAG AA accessible. No external dependencies.
   ========================================================================== */

/* ── 1. Design Tokens ─────────────────────────────────────────────────────── */

:root {
  /* Colours */
  --color-orange:      #F36D2A;
  --color-orange-dark: #d95a1a;
  --color-cream:       #F1EDE4;
  --color-cream-dark:  #e8e2d6;
  --color-sage:        #717254;
  --color-sage-dark:   #5a5b41;
  --color-ink:         #1A1A1A;
  --color-ink-soft:    #2e2e2e;
  --color-white:       #FFFFFF;
  --color-mist:        #F8F7F5;
  --color-border:      #e0dbd2;
  --color-text:        #2c2c2c;
  --color-text-muted:  #6b6b6b;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale — fluid where appropriate */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  clamp(1.75rem, 3vw, 2.25rem);
  --text-4xl:  clamp(2rem, 4vw, 3rem);
  --text-5xl:  clamp(2.5rem, 5vw, 4rem);
  --text-hero: clamp(2.75rem, 7vw, 5.5rem);

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  9rem;

  /* Layout */
  --max-width:        1280px;
  --max-width-text:   720px;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);
  --header-height:    72px;

  /* Transitions */
  --transition-fast:  0.15s ease;
  --transition-base:  0.25s ease;
  --transition-slow:  0.4s ease;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
}


/* ── 2. Reset & Base ──────────────────────────────────────────────────────── */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Inline prose links — scoped to content areas only */
.page-content a,
.location-why a,
.about-bio-text a,
.about-philosophy a,
.service-detail a,
.faq-answer a,
.team-bio a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast);
}

.page-content a:hover,
.location-why a:hover,
.about-bio-text a:hover,
.about-philosophy a:hover,
.service-detail a:hover,
.faq-answer a:hover,
.team-bio a:hover {
  color: var(--color-text-muted);
}

/* Buttons inside content areas must not inherit the prose link colour */
.page-content .btn,
.location-why .btn,
.about-bio-text .btn,
.service-detail .btn,
.faq-answer .btn {
  color: var(--color-white);
  text-decoration: none;
}
.page-content .btn:hover,
.location-why .btn:hover,
.about-bio-text .btn:hover,
.service-detail .btn:hover,
.faq-answer .btn:hover {
  color: var(--color-white);
}
/* Exception: ghost-dark button on light bg needs ink text, not white */
.page-content .btn--ghost-dark,
.location-why .btn--ghost-dark,
.about-bio-text .btn--ghost-dark,
.service-detail .btn--ghost-dark,
.faq-answer .btn--ghost-dark {
  color: var(--color-ink);
}
.page-content .btn--ghost-dark:hover,
.location-why .btn--ghost-dark:hover,
.about-bio-text .btn--ghost-dark:hover,
.service-detail .btn--ghost-dark:hover,
.faq-answer .btn--ghost-dark:hover {
  color: var(--color-white);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font: inherit;
  background: none;
  border: none;
}

address {
  font-style: normal;
}

/* Accessibility: visible focus rings */
:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen reader only */
.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
  background: var(--color-orange);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  z-index: 9999;
}


/* ── 3. Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 { font-size: var(--text-5xl); font-weight: 400; }
h2 { font-size: var(--text-4xl); font-weight: 500; }
h3 { font-size: var(--text-3xl); font-weight: 500; }
h4 { font-size: var(--text-2xl); font-weight: 500; }
h5 { font-size: var(--text-xl);  font-weight: 600; font-family: var(--font-body); }
h6 { font-size: var(--text-lg);  font-weight: 600; font-family: var(--font-body); }

p {
  max-width: var(--max-width-text);
  line-height: 1.75;
}

p + p {
  margin-top: 1em;
}

strong { font-weight: 600; }
em     { font-style: italic; }

/* Display heading style (for hero, large statements) */
.text-display {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Eyebrow label above section headings */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

/* Utility text sizes */
.text-sm   { font-size: var(--text-sm); }
.text-muted { color: var(--color-text-muted); }


/* ── 4. Layout Utilities ──────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: 900px;
}

.container--text {
  max-width: var(--max-width-text);
}

/* Vertical section padding */
.section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section--sm {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section--lg {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

/* Background variants */
.bg-white  { background-color: var(--color-white); }
.bg-mist   { background-color: var(--color-mist); }
.bg-cream  { background-color: var(--color-cream); }
.bg-ink    { background-color: var(--color-ink); color: var(--color-white); }
.bg-sage   { background-color: var(--color-sage); color: var(--color-white); }


/* ── 5. Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

/* Primary: orange fill */
.btn--primary {
  background: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
  color: var(--color-white);
}

/* Ghost: outline, works on both dark and light */
.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* Ghost on light background */
.btn--ghost-dark {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.btn--ghost-dark:hover,
.btn--ghost-dark:focus-visible {
  background: var(--color-ink);
  color: var(--color-white);
}


/* ── 6. Site Header ───────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

/*
 * Background + backdrop-blur live on a ::before pseudo-element, NOT on .site-header itself.
 * Reason: backdrop-filter on the ancestor element creates a containing block for
 * position:fixed descendants (Safari / Chrome Mobile bug), causing .primary-nav to be
 * sized relative to the 72px header instead of the viewport.
 * A ::before pseudo-element is not an ancestor of .primary-nav, so it does not trigger
 * the bug while still providing the same visual blur effect.
 */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition-base);
  z-index: -1;
  pointer-events: none;
}

/* Solid when scrolled, or on all non-home pages */
.site-header.is-scrolled,
body:not(.is-home) .site-header {
  box-shadow: 0 1px 0 var(--color-border);
}

.site-header.is-scrolled::before,
body:not(.is-home) .site-header::before {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 36px;
  width: auto;
}

/* Inline SVG logo — colour controlled via CSS `color` → stroke:currentColor */
.site-logo svg {
  height: 36px;
  width: auto;
  display: block;
  color: var(--color-white);
  transition: color var(--transition-fast);
}

.site-header.is-scrolled .site-logo svg,
body:not(.is-home) .site-logo svg {
  color: var(--color-ink);
}

/* Text fallback (shown when SVG file not yet present) */
.site-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: -0.02em;
  transition: color var(--transition-fast);
}

.site-header.is-scrolled .site-logo-text,
body:not(.is-home) .site-logo-text {
  color: var(--color-ink);
}

/* Primary nav */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-menu > li {
  position: relative;
}

.primary-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.site-header.is-scrolled .primary-menu .nav-link,
body:not(.is-home) .primary-menu .nav-link {
  color: var(--color-ink);
}

.primary-menu .nav-link:hover,
.primary-menu .nav-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.primary-menu [aria-current="page"] > .nav-link,
.primary-menu .current-menu-item > .nav-link {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Dropdown chevron */
.dropdown-chevron {
  display: inline-block;
  width: 10px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='currentColor' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

/* Dropdown menu */
.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  padding: 0.5rem 0;
  z-index: 100;
}

.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu,
.primary-menu .menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu li {
  display: block;
}

.primary-menu .sub-menu .nav-link {
  color: var(--color-text) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 0;
  font-size: var(--text-sm);
  display: block;
}

.primary-menu .sub-menu .nav-link:hover {
  color: var(--color-ink) !important;
  background: var(--color-mist);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  flex-shrink: 0;
  overflow: visible; /* prevent browser clipping rotated bars */
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.site-header.is-scrolled .nav-toggle-bar,
body:not(.is-home) .nav-toggle-bar {
  background: var(--color-ink);
}

/* Mobile nav open state */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── 7. Homepage Hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--color-ink);
}

/* Vimeo background iframe */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 at viewport width */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 at viewport height */
  transform: translate(-50%, -50%);
  border: none;
}

/* Dark overlay for readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10,10,10,0.72) 0%,
    rgba(10,10,10,0.45) 60%,
    rgba(10,10,10,0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gutter);
  padding-top: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 1.25rem;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-white);
  max-width: 14ch;
  margin-bottom: 1.75rem;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 44ch;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

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

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
}

/* ── Hero sound toggle ─────────────────────────────────── */
.hero-sound-toggle {
  position: absolute;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-sound-toggle:hover,
.hero-sound-toggle:focus-visible {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Default: muted — show off icon + "Sound off" label */
.hero-snd-icon--on  { display: none; }
.hero-snd-icon--off { display: block; }
.hero-snd-label--on  { display: none; }
.hero-snd-label--off { display: inline; }

/* When toggled on — swap icons and label */
.hero-sound-toggle.is-sound-on .hero-snd-icon--on  { display: block; }
.hero-sound-toggle.is-sound-on .hero-snd-icon--off { display: none; }
.hero-sound-toggle.is-sound-on .hero-snd-label--on  { display: inline; }
.hero-sound-toggle.is-sound-on .hero-snd-label--off { display: none; }
.hero-sound-toggle.is-sound-on {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}


/* ── 8. Homepage Sections ─────────────────────────────────────────────────── */

/* Intro strip */
.home-intro {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-white);
}

.home-intro-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.home-intro-text h2 {
  font-size: var(--text-4xl);
  margin-bottom: 1.25rem;
}

.home-intro-text p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.home-about h2 {
  margin-bottom: 1.25rem;
}

.home-about p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.home-about p + p {
  margin-top: var(--space-md);
}

.home-intro-clients {
  padding-top: 0.5rem;
}

.clients-eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-sage);
  margin-bottom: 1.25rem;
}

.client-name-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.25rem;
}

.client-name-list li {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--color-ink);
  white-space: nowrap;
}

.client-name-list li:not(:last-child)::after {
  content: '\00B7';
  font-style: normal;
  color: var(--color-sage);
  margin: 0 0.5rem;
}

/* Section header (used across homepage sections) */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Featured Works grid */
.featured-works {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-mist);
}

.featured-works-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.featured-works-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--space-xl);
}

/* Capabilities strip */
.capabilities {
  padding: var(--space-xl) var(--gutter);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.capabilities-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.capabilities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  counter-reset: cap-counter;
}

.capabilities-list li {
  flex: 1;
  min-width: 200px;
  padding: var(--space-md) var(--space-lg) var(--space-md) 0;
  border-right: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-ink);
  counter-increment: cap-counter;
}

.capabilities-list li::before {
  content: counter(cap-counter, decimal-leading-zero) " ";
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.capabilities-list li:last-child {
  border-right: none;
}

/* Home CTA */
.home-cta {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-ink);
  text-align: center;
}

.home-cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.home-cta h2 {
  font-size: var(--text-4xl);
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.home-cta p {
  color: rgba(255,255,255,0.65);
  font-size: var(--text-lg);
  margin: 0 auto 2rem;
}


/* ── 9. Portfolio Grid ────────────────────────────────────────────────────── */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.portfolio-card {
  position: relative;
  background: var(--color-ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.portfolio-thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.portfolio-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-thumb-link img {
  transform: scale(1.04);
}

.portfolio-thumb-link img.img-error {
  opacity: 0;
}

/* Hidden extra gallery images (Fancybox siblings, not visible in grid).
   Use position:absolute + zero size rather than display:none so Fancybox
   can still query these elements via data-fancybox attribute selectors. */
.portfolio-gallery-extra {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Camera icon overlay for stills items */
.portfolio-gallery-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background var(--transition-base);
}

.portfolio-gallery-icon::after {
  content: '';
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.portfolio-card:hover .portfolio-gallery-icon::after,
.portfolio-thumb-link:focus-visible .portfolio-gallery-icon::after {
  opacity: 1;
  transform: scale(1);
}

.portfolio-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-ink-soft);
}

/* Play icon overlay */
.portfolio-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background var(--transition-base);
}

.portfolio-play-icon::after {
  content: '';
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 55% center;
  background-size: 22px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.portfolio-card:hover .portfolio-play-icon::after,
.portfolio-thumb-link:focus-visible .portfolio-play-icon::after {
  opacity: 1;
  transform: scale(1);
}

.portfolio-card-info {
  padding: 1rem;
}

.portfolio-card-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.portfolio-card-cat {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

/* Category filter bar */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn.is-active {
  background: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
}


/* ── 10. Inner Page Layout ─────────────────────────────────────────────────── */

.page-hero {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  background: var(--color-cream);
}

.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.page-hero .page-intro {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.75;
}

.page-hero--dark {
  background: var(--color-ink);
}

.page-hero--dark h1,
.page-hero--dark .page-intro {
  color: var(--color-white);
}

/* Portfolio page section wrapper */
.portfolio-section {
  padding: var(--space-2xl) var(--gutter);
}

.portfolio-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-empty {
  color: var(--color-text-muted);
  padding: var(--space-xl) 0;
}

/* Page content area */
.page-content {
  padding: var(--space-2xl) var(--gutter);
}

.page-content-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Long-form prose (Privacy Policy, Cookie Policy, generic pages) ───────── */
.entry-content {
  max-width: 72ch;
}

.entry-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-ink);
  margin-top: var(--space-xl);
  margin-bottom: 1rem;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.entry-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.entry-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-ink);
  margin-top: var(--space-lg);
  margin-bottom: 0.75rem;
}

.entry-content p {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
  color: var(--color-text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.entry-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.entry-content address {
  font-style: normal;
  color: var(--color-text-muted);
  line-height: 1.9;
}

/* Services list */
.services-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-xl);
}

.services-list li {
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}

/* Location card links (Where We Work section) */
.location-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.location-card-link {
  display: block;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-white);
  border-left: 3px solid var(--color-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 600;
  transition: background var(--transition-base), color var(--transition-base);
}

.location-card-link:hover,
.location-card-link:focus-visible {
  background: var(--color-orange);
  color: var(--color-white);
}

/* Service detail sections */
.service-detail {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.service-detail:first-of-type {
  border-top: none;
  padding-top: 0;
}

.service-detail h3 {
  margin-bottom: 1rem;
}

.service-detail p,
.service-detail ul {
  color: var(--color-text-muted);
}

.service-detail ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
}

.service-detail ul li {
  margin-bottom: 0.5rem;
}

/* Service detail grid: 2-col on larger screens */
.service-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

/* Tax incentive callout */
.tax-callout {
  background: var(--color-cream);
  border-left: 4px solid var(--color-orange);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: var(--space-lg);
}

.tax-callout strong {
  display: block;
  font-size: var(--text-lg);
  margin-bottom: 0.5rem;
  color: var(--color-ink);
}

/* CTA block used on inner pages */
.inline-cta {
  background: var(--color-cream);
  padding: var(--space-xl) var(--space-2xl);
  border-radius: var(--radius-lg);
  text-align: center;
}

.inline-cta h3 {
  margin-bottom: 0.75rem;
}

.inline-cta p {
  color: var(--color-text-muted);
  margin: 0 auto 1.5rem;
  max-width: 50ch;
}


/* Image placeholder — dev only, replaced by real <img> tags */
.page-img-placeholder {
  background: var(--color-mist);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
}

.page-img-placeholder--landscape { aspect-ratio: 16 / 9; width: 100%; max-height: 420px; }
.page-img-placeholder--portrait  { aspect-ratio: 4 / 5;  width: 100%; }
.page-img-placeholder--square    { aspect-ratio: 1 / 1;  width: 100%; }

/* Page hero with background image support */
.page-hero--image {
  background-color: var(--color-ink);
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-hero--image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.page-hero--image .page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero--image h1,
.page-hero--image .page-intro {
  color: var(--color-white);
}

/* Location page image strip */
.location-image-strip {
  padding: 0 var(--gutter) var(--space-xl);
}

.location-image-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-location-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Location "Why" section */
.location-why {
  padding: var(--space-xl) var(--gutter);
  background: var(--color-mist);
}

.location-why-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.location-why h2 {
  margin-bottom: 1.25rem;
}

.location-why p {
  color: var(--color-text-muted);
  max-width: 70ch;
  margin-bottom: 1rem;
}

/* About bio section */
.about-bio {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-cream);
}

.about-bio-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-bio-text h2 {
  margin-bottom: 1rem;
}

.about-bio-text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  max-width: 60ch;
}

/* About team grid (Janna, Maud, Charles) */
.about-team {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.about-team-card h3 {
  margin-top: var(--space-md);
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.team-bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
  line-height: 1.65;
  max-width: 38ch;
}

.about-team .page-img-placeholder--portrait {
  max-height: 300px;
}

.about-bio-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-team-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  max-height: 300px;
}

/* ── 11. About Page ───────────────────────────────────────────────────────── */

.about-philosophy {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-white);
}

.about-philosophy-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.philosophy-quote {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--color-ink);
  max-width: 30ch;
}

/* Clients section — editorial text columns */
.about-clients {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-ink);
  color: var(--color-white);
}

.about-clients-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-clients h2 {
  color: var(--color-white);
  margin-bottom: var(--space-xl);
}

.clients-grid {
  columns: 2;
  column-gap: var(--space-xl);
}

.clients-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 0.35rem 0;
  break-inside: avoid;
  transition: color var(--transition-fast);
  line-height: 1.3;
}

.clients-name:hover {
  color: var(--color-white);
}

/* Client names written as <p> tags (About page template) */
.about-clients .clients-grid p {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  padding: 0.35rem 0;
  margin: 0;
  break-inside: avoid;
  line-height: 1.3;
}

/* Directors / photographers written as <p> tags (light background context) */
.page-content .clients-grid p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  margin: 0;
  break-inside: avoid;
  line-height: 1.3;
}

/* Directors / photographers */
.about-collaborators {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-cream);
}

.about-collaborators-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.collaborator-group h3 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-cream-dark);
}

.collaborator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.collaborator-list span {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.collaborator-list span::after {
  content: ' ·';
  color: var(--color-border);
}

.collaborator-list span:last-child::after {
  content: '';
}


/* ── 12. Contact Page ─────────────────────────────────────────────────────── */

.contact-layout {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-white);
}

.contact-layout-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

/* CF7 form styling */
.wpcf7-form .form-field {
  margin-bottom: 1.25rem;
}

.wpcf7-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-ink);
  margin-bottom: 0.4rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-mist);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(243,109,42,0.12);
}

.wpcf7-form textarea {
  min-height: 140px;
  resize: vertical;
}

.wpcf7-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  background: var(--color-orange);
  color: var(--color-white);
  border: 2px solid var(--color-orange);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
}

/* WPForms submit button override */
.contact-form-col .wpforms-submit {
  font-family: var(--font-body) !important;
  font-size: var(--text-sm) !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 0.875rem 2rem !important;
  background: var(--color-orange) !important;
  color: var(--color-white) !important;
  border: 2px solid var(--color-orange) !important;
  border-radius: var(--radius-sm) !important;
  transition: background var(--transition-fast), border-color var(--transition-fast) !important;
  cursor: pointer !important;
}

.contact-form-col .wpforms-submit:hover,
.contact-form-col .wpforms-submit:focus {
  background: var(--color-orange-dark) !important;
  border-color: var(--color-orange-dark) !important;
}

/* Offices grid */
.offices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.office-card {
  padding: var(--space-md);
  background: var(--color-mist);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-orange);
}

.office-card h4 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-bottom: 0.75rem;
}

.office-card address {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
}

.office-card a {
  color: var(--color-ink);
  text-decoration: none;
}

.office-card a:hover {
  text-decoration: underline;
}


/* ── 13. FAQ Pages ────────────────────────────────────────────────────────── */

.faq-back {
  background: var(--color-mist);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}

.faq-back-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.faq-back a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: color var(--transition-fast);
}

.faq-back a:hover {
  color: var(--color-ink);
}

.faq-intro {
  max-width: 72ch;
  margin-bottom: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: 1.75;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.faq-item h2,
.faq-item h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-ink);
  margin-bottom: 1rem;
}

.faq-answer p,
.faq-item > p {
  color: var(--color-text-muted);
  max-width: 72ch;
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child,
.faq-item > p:last-child {
  margin-bottom: 0;
}

.faq-answer strong,
.faq-item > p strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ── 14. Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.75);
  padding-top: var(--space-2xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-logo img { height: 32px; width: auto; }

.footer-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-white);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: none;
}

.footer-partner-logo {
  display: inline-block;
  margin-top: 1.25rem;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.footer-partner-logo:hover {
  opacity: 0.85;
}

.footer-partner-logo img {
  display: block;
  width: 160px;
  height: auto;
}

.footer-nav-heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-nav-list li {
  margin-bottom: 0.5rem;
}

.footer-nav-list a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-nav-list a:hover {
  color: var(--color-white);
}

.footer-address {
  font-size: var(--text-sm);
  line-height: 1.9;
  color: rgba(255,255,255,0.55);
}

.footer-address a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-address a:hover { color: var(--color-white); }

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: 1.25rem;
}

.footer-social a {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-social a:hover { color: var(--color-white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copyright,
.footer-credit {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  max-width: none;
}

.footer-credit a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
}

.footer-credit a:hover { color: rgba(255,255,255,0.65); }


/* ── 15. Responsive ───────────────────────────────────────────────────────── */

/* Tablet: 640px+ */
@media (min-width: 640px) {
  .home-intro-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .contact-layout-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .offices-grid {
    grid-template-columns: 1fr 1fr;
  }

  .clients-grid {
    columns: 3;
  }

  .about-collaborators-inner {
    grid-template-columns: 1fr 1fr;
  }

  .about-philosophy-inner {
    grid-template-columns: 1fr 1fr;
  }

  .about-bio-inner {
    grid-template-columns: 1fr 280px;
  }

  .about-team {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  :root {
    --header-height: 80px;
  }

  .service-sections {
    grid-template-columns: 1fr 1fr;
  }

  /* Both items in the first row start flush — no top border or padding */
  .service-sections .service-detail:nth-child(2) {
    border-top: none;
    padding-top: 0;
  }

  .service-sections .service-detail:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  }

  .clients-grid {
    columns: 4;
  }
}

/* Mobile only: hide desktop nav, show toggle */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--color-white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    z-index: 400;
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  /* Hide scrollbar track — still scrollable if content ever overflows */
  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    width: 100%;
  }

  .primary-menu .nav-link {
    color: var(--color-ink);
    padding: 0.75rem 0.5rem;
    font-size: var(--text-base);
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .primary-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--color-mist);
    border-radius: var(--radius-sm);
    margin: 0.25rem 0 0.5rem;
    padding: 0.25rem 0;
    display: none;
  }

  .primary-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .primary-menu .sub-menu .nav-link {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    border-bottom: none;
    color: var(--color-text-muted) !important;
  }

  /* Mobile nav overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 399;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
  }

  .nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* Hero adjustments */
  .hero-title {
    max-width: 100%;
  }

  .capabilities-list li {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
  }

  /* CTA block: reduce horizontal padding so button fits and centres correctly */
  .inline-cta {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

/* Large screens */
@media (min-width: 1280px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid--featured {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Portfolio Single Item (Phase 2)
   ========================================================================== */

/* ── Hero ── */
.pi-hero {
  background: var(--color-ink);
  padding-top: var(--header-height); /* prevent fixed nav from obscuring top of video */
}

.pi-video-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}

.pi-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Self-hosted video — aspect-ratio replaces the padding-bottom hack */
.pi-video-wrap--html5 {
  padding-bottom: 0;
  height: auto;
}
.pi-video-wrap--html5 video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.pi-image-hero img,
.pi-stills-hero img.pi-stills-main {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

.pi-stills-hero {
  position: relative;
}

.pi-stills-extra {
  display: none;
}

.pi-stills-footer {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  gap: 0.5rem;
}

.pi-stills-count,
.pi-stills-play {
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.pi-stills-play {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* ── Intro ── */
.pi-intro {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--color-white);
}

.pi-intro-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.pi-breadcrumb {
  margin-bottom: var(--space-md);
}

.pi-breadcrumb a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-sage);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pi-breadcrumb a:hover {
  color: var(--color-ink);
}

.pi-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--color-ink);
  line-height: 1.1;
  margin: 0 0 var(--space-md);
}

.pi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.pi-meta-item {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pi-meta-type {
  color: var(--color-ink);
  font-weight: 600;
}

.pi-note {
  margin-top: var(--space-md);
}

.pi-note p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 300;
  color: var(--color-ink);
  line-height: 1.7;
  font-style: italic;
}

/* ── Related ── */
.pi-related {
  padding: var(--space-xl) 0;
  background: var(--color-mist);
}

.pi-related-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.pi-related-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  color: var(--color-ink);
  margin: 0 0 var(--space-lg);
}

.pi-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.pi-related-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-ink);
  color: var(--color-white);
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .pi-related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Portfolio item CTA ──────────────────────────────────── */
.cta-section {
  padding: var(--space-2xl) var(--gutter);
  background: var(--color-ink);
  text-align: center;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  font-style: italic;
  color: var(--color-white);
  margin-bottom: 2rem;
  line-height: 1.2;
}

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