/* ==========================================================================
   GM MEDIA — site stylesheet
   Owner: Gianluigi Mango — see EDITING.md for how to change things.
   ========================================================================== */

/* ---------- Design tokens: change the accent colour here ---------- */
:root {
  --bg: #0B0B0D;
  --bg-soft: #121215;
  --bg-card: #16161A;
  --text: #F4F2EE;
  --text-dim: #A9A6A0;
  --accent: #FF6A00;
  --accent-strong: #FF8A33;
  --line: #2A2A2E;
  --radius: 4px;
  --maxw: 1180px;
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-strong); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.08;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.15rem; letter-spacing: 0.04em; }

p { color: var(--text-dim); }
strong { color: var(--text); }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.lede { font-size: 1.15rem; max-width: 46rem; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.btn--accent { background: var(--accent); color: #0B0B0D; }
.btn--accent:hover { background: var(--accent-strong); }
.btn--ghost { border-color: var(--text); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn--ghost-dark { border-color: #0B0B0D; color: #0B0B0D; }
.btn--ghost-dark:hover { border-color: var(--accent); color: #0B0B0D; }

/* ---------- Header / nav ---------- */
/* The frosted background lives on a ::before layer rather than on
   .site-header itself. backdrop-filter creates a containing block for
   fixed-position descendants, which was trapping the mobile menu inside
   the 64px header and cutting it off. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 11, 13, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}
.logo-img {
  height: 46px;
  width: auto;
  max-height: 46px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
/* If the stylesheet is ever missing/stale, the HTML width/height attributes
   above still keep the logo small instead of blowing out the header. */
.logo { max-height: 64px; }
.footer-grid .logo-img { height: 40px; }
@media (max-width: 640px) { .logo-img { height: 38px; } }

.main-nav { display: flex; align-items: center; gap: 1.1rem; }
.main-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.main-nav .btn { font-size: 0.8rem; padding: 0.6rem 1.1rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    max-height: none;
    background: rgba(11, 11, 13, 0.98);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1.5rem 1.5rem 3rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 60;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    font-size: 1.05rem;
    padding: 0.7rem 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .main-nav .btn { width: 100%; text-align: center; margin-top: 1rem; border-bottom: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  min-height: min(92dvh, 860px);
  display: flex;
  align-items: center;
  background: #060607;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
/* Hero video sits above the poster image; the image stays as the
   fallback for no-video situations (and is what shows before playback). */
.hero-video { z-index: 1; }
.hero-fallback { z-index: 0; }
/* The video already carries the darkened look via the overlay below, so
   give it the same 0.55 so both look identical mid-swap. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
/* If the browser can't play the video, hide it and let the image show. */
.hero-video.is-unplayable { display: none; }
.hero-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Vertical fade for the section, plus a left-hand scrim so the headline stays
     legible over brighter frames of the hero video. */
  background:
    linear-gradient(90deg, rgba(11,11,13,0.72) 0%, rgba(11,11,13,0.42) 42%, rgba(11,11,13,0.12) 70%, rgba(11,11,13,0) 100%),
    linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.35) 45%, rgba(11,11,13,0.95) 100%);
}
.hero-bg-wrap { position: absolute; inset: 0; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 5rem 1.25rem 4rem; }
.hero h1 { max-width: 15ch; margin-bottom: 1rem; }
.hero .lede { margin-bottom: 2rem; max-width: 40rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* Short viewports — placed AFTER the base rules so these actually win. */
@media (max-height: 800px) {
  .hero { min-height: auto; }
  .hero-inner { padding: 6.5rem 1.25rem 4rem; }
}
@media (max-height: 640px) {
  .hero-inner { padding: 6rem 1.25rem 3.5rem; }
  .hero h1 { max-width: 20ch; }
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.85rem 1.2rem;
}
.play-btn svg { width: 44px; height: 44px; }
.play-btn:hover svg circle { fill: var(--accent); }
.play-btn:hover svg path { fill: #0B0B0D; }

@keyframes heroDrift {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg { animation: heroDrift 18s ease-in-out infinite alternate; }
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  padding: 2rem 1rem;
  text-align: center;
}
.stat .stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  color: var(--accent);
  display: block;
}
.stat .stat-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.grid-4, .grid-3, .grid-2 {
  display: grid;
  gap: 1.4rem;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-img-wrap { aspect-ratio: 16 / 10; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.card-body p { font-size: 0.95rem; flex: 1; }
.card-link {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Why / features ---------- */
.feature { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: none; }
.feature h3 { color: var(--text); margin-bottom: 0.4rem; }
.feature p { max-width: 40rem; }

/* ---------- Video grid & lightbox ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 1000px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } }

.video-tile {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  width: 100%;
  color: var(--text);
  font: inherit;
}
.video-thumb { aspect-ratio: 16 / 9; background: #1c1c20 center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.video-tile .play-overlay { transition: transform 0.25s; }
.video-tile:hover .play-overlay { transform: scale(1.1); }
.video-tile figcaption, .video-tile .video-caption {
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 960px;
  width: min(94vw, 960px);
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
}
.lightbox-inner iframe,
.lightbox-inner video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; border-radius: var(--radius); }
.lightbox-inner video { object-fit: contain; cursor: default; }
/* Instagram reels are vertical — give them a portrait player. */
.lightbox-inner.is-vertical {
  aspect-ratio: 9 / 16;
  max-width: min(92vw, 460px);
  width: min(92vw, 460px);
  max-height: 86vh;
}
@media (max-width: 640px) {
  .lightbox-inner { aspect-ratio: 9 / 16; max-width: 420px; width: min(92vw, 420px); }
}
.lightbox-close {
  position: absolute;
  top: -52px;
  right: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Testimonials ---------- */
.replace-note { color: #7c7a74; font-size: 0.8rem; font-style: italic; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #131316 0%, #1d1108 100%);
  border-top: 2px solid var(--accent);
  padding: 3.5rem 0;
}
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { margin-bottom: 0; }
.cta-band .contact-lines { margin-top: 0.9rem; font-size: 0.95rem; }
.cta-band .contact-lines a { color: var(--text); text-decoration: none; font-weight: 600; }
.cta-band .contact-lines a:hover { color: var(--accent); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(160deg, #131316 0%, #0B0B0D 70%);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0;
}
.page-hero h1 { margin-bottom: 0.8rem; }

/* ---------- Service page bits ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin-top: 1rem; }
.checklist li {
  padding: 0.65rem 0 0.65rem 2.2rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
}
.figure-full { margin: 0; }
.figure-full img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details { display: grid; gap: 1.2rem; }
.contact-block h3 { margin-bottom: 0.3rem; }
.contact-block a { text-decoration: none; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.contact-block a:hover { color: var(--accent); }
.contact-block p { font-size: 0.95rem; }

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

.field label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  padding: 0.75rem 0.9rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Portfolio filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 2rem; }
.filter-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
}
.filter-btn:hover { color: var(--text); border-color: var(--text); }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #0B0B0D; }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }

.work-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-card); border: 1px solid var(--line); }
.work-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.work-tile:hover img { transform: scale(1.05); }
.work-tile.is-hidden { display: none; }
.work-tile .tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  font-size: 0.85rem;
  color: var(--text);
}
.work-tile .tile-label .cat { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; display: block; font-size: 0.75rem; }

.tile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(135deg, #17171b 0%, #23201a 55%, #2b1a0d 100%);
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}
.tile-placeholder .cat { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }

/* ---------- Facts / about ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }
.fact {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.fact .fact-k { color: var(--accent); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; display: block; margin-bottom: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #080809;
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-grid h3 { font-size: 0.85rem; color: var(--text); margin-bottom: 0.7rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.35rem; }
.footer-grid a { color: var(--text-dim); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  color: #7c7a74;
  font-size: 0.8rem;
}
.footer-bottom a { color: #7c7a74; }

/* ---------- Scroll reveal ----------
   IMPORTANT: nothing is ever hidden by default. The animation only plays
   once JS confirms the element is on screen, so if the script is slow,
   blocked, or the observer never fires, the content is simply already
   visible — it can never be left stranded at opacity 0. */
.reveal { opacity: 1; transform: none; }
html.js .reveal.is-visible { animation: revealIn 0.6s ease both; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .reveal.is-visible { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0B0B0D;
  padding: 0.6rem 1rem;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Privacy / prose ---------- */
.prose h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.prose p, .prose li { color: var(--text-dim); max-width: 46rem; }
.prose ul { margin: 0.8rem 0 0.8rem 1.2rem; }
.prose a { color: var(--accent-strong); }

/* ---------- 404 ---------- */
.error-hero { min-height: 70vh; display: flex; align-items: center; text-align: center; }


/* ---------- Instagram carousel ---------- */
.ig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ig-follow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
}
.ig-follow:hover { border-bottom-color: var(--accent); }

.ig-carousel {
  position: relative;
  cursor: grab;
}
.ig-carousel.is-dragging { cursor: grabbing; }
.ig-carousel.is-dragging .ig-card { pointer-events: none; }

.ig-track {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.9rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #1c1c20;
}
.ig-track::-webkit-scrollbar { height: 6px; }
.ig-track::-webkit-scrollbar-track { background: #1c1c20; border-radius: 999px; }
.ig-track::-webkit-scrollbar-thumb { background: #4a4a50; border-radius: 999px; }
.ig-track::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.ig-slide {
  flex: 0 0 auto;
  width: min(268px, 68vw);
  scroll-snap-align: start;
}
.ig-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  transition: border-color 0.25s;
}
.ig-card:hover { border-color: #45454c; }
.ig-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #1c1c20;
}
.ig-cap {
  padding: 0.7rem 0.9rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-dim);
}
.ig-hint {
  color: #7c7a74;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
@media (max-width: 640px) {
  .ig-slide { width: 76vw; }
  .ig-hint { display: none; }
}

/* ---------- Media pair (vertical video tiles) ---------- */
.media-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  max-width: 62rem;
}
@media (max-width: 560px) {
  .media-pair { grid-template-columns: 1fr; gap: 0.9rem; }
}
.video-tile {
  position: relative;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s;
}
.video-tile:hover { border-color: #45454c; }
.video-tile img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  background: #1c1c20;
}
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(11,11,13,0.55), rgba(11,11,13,0.05));
  border: 0;
  cursor: pointer;
  padding: 0;
}
.video-play svg {
  width: 64px;
  height: 64px;
  transition: transform 0.25s;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.5));
}
.video-play:hover svg,
.video-play:focus-visible svg { transform: scale(1.08); }
.video-tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.4rem 0.9rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #EDEBE6;
  background: linear-gradient(to top, rgba(11,11,13,0.92), transparent);
  pointer-events: none;
}

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.03); }
@media (max-width: 640px) {
  .media-pair { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .video-play svg { width: 48px; height: 48px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
}

/* ---------- Founder portrait ---------- */
.figure-portrait img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- Reel carousel (service pages) ---------- */
.reel-carousel {
  position: relative;
  cursor: grab;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}
.reel-carousel.is-dragging { cursor: grabbing; }
/* NOTE: do NOT set pointer-events:none on .video-tile here. It stops the
   pointerup landing on the <button>, so the browser fires `click` on the
   wrapping <figure> and the play handler never runs. Drag-vs-click is
   handled in JS with the rMoved flag instead. */
.reel-carousel.is-dragging .video-tile { cursor: grabbing; }
.reel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.9rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #1c1c20;
}
.reel-track::-webkit-scrollbar { height: 6px; }
.reel-track::-webkit-scrollbar-track { background: #1c1c20; border-radius: 999px; }
.reel-track::-webkit-scrollbar-thumb { background: #4a4a50; border-radius: 999px; }
.reel-track::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.reel-slide {
  flex: 0 0 auto;
  width: clamp(260px, 44vw, 440px);
  margin: 0;
  scroll-snap-align: start;
}
.reel-slide .video-tile { width: 100%; display: block; }
@media (max-width: 640px) {
  .reel-slide { width: 62vw; }
}

/* A carousel with a single reel shouldn't look like a broken two-up grid —
   centre it and cap its width so the empty space reads as deliberate. */
.reel-track:has(.reel-slide:only-child) {
  justify-content: center;
}
.reel-track:has(.reel-slide:only-child) .reel-slide {
  width: clamp(240px, 30vw, 340px);
}
@media (max-width: 640px) {
  .reel-track:has(.reel-slide:only-child) .reel-slide { width: 62vw; }
}

/* ---------- Contact form: inline validation & status ---------- */
#contact-form .field.has-error input,
#contact-form .field.has-error select,
#contact-form .field.has-error textarea {
  border-color: #ff6a00;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}
.form-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-note.is-success { color: #7fe3a4; border-color: rgba(127, 227, 164, 0.35); background: rgba(127, 227, 164, 0.07); }
.form-note.is-error { color: #ff9066; border-color: rgba(255, 106, 0, 0.4); background: rgba(255, 106, 0, 0.08); }
.field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #ff9066;
}
#contact-form button[type="submit"][disabled] { opacity: 0.65; cursor: progress; }
