/* ==========================================================
   Brayan Soto — Game Designer portfolio
   Clean dark theme · electric blue accent (per-project accents) · Oswald + Inter
   ========================================================== */

:root {
  --bg: #0e1014;
  --bg-raised: #14171d;
  --bg-card: #171a21;
  --line: #262b35;
  --text: #e8eaf0;
  --text-dim: #9aa1b0;
  --accent: #4c8dff;
  --accent-rgb: 76, 141, 255;
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --radius: 10px;
  --max: 1180px;
  --header-h: 68px;
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.pt-0 { padding-top: 0; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3.5rem; }
.text-center { text-align: center; }
.accent-text { color: var(--accent); }

/* ---------- Film grain ---------- */
.film-grain::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-2%, 6%); }
  80% { transform: translate(5%, -2%); }
  100% { transform: translate(0, 0); }
}

/* Body-level letterbox divs are kept for markup compatibility;
   the letterbox effect lives on the hero instead. */
.letterbox { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(14, 16, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.logo:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  position: relative;
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); text-decoration: none; }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.hamburger .bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.hamburger[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.35); }
.btn-secondary { background: transparent; color: var(--text); }
.btn-secondary:hover { background: var(--accent-soft); }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
/* Letterbox bars */
.letterboxed::before,
.letterboxed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: #000;
  z-index: 2;
  animation: letterbox-in 1.4s var(--ease) both;
}
.letterboxed::before { top: 0; transform-origin: top; }
.letterboxed::after { bottom: 0; transform-origin: bottom; }
@keyframes letterbox-in {
  from { transform: scaleY(2.2); }
  to { transform: scaleY(1); }
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;            /* 16:9 */
  min-height: 100%;
  min-width: 177.78vh;        /* 16:9 */
  transform: translate(-50%, -50%);
  border: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 16, 20, 0.94) 0%, rgba(14, 16, 20, 0.7) 45%, rgba(14, 16, 20, 0.3) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-content {
  position: relative;
  z-index: 3;
  padding-top: 9vh;
  padding-bottom: 9vh;
}
.eyebrow,
.director-slate {
  display: inline-block;
  font-family: var(--font-head);
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  padding: 4px 12px;
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(3rem, 10vw, 7.5rem);
  margin: 0;
  line-height: 0.95;
}
.hero-subtitle {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.15em;
  margin: 0.3em 0 0.8em;
}
.hero-pitch {
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* ---------- Section titles ---------- */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2.2rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 60%;
  height: 3px;
  margin-top: 10px;
  background: var(--accent);
}
.text-center .section-title::after { margin-left: auto; margin-right: auto; }

/* ---------- Project cards ---------- */
.projects-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.project-card:hover {
  text-decoration: none;
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
/* Accent bar that sweeps across on hover */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.project-card:hover::before { transform: scaleX(1); }

.card-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1d1d1d;
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s;
  filter: saturate(0.85);
}
.project-card:hover .card-image-wrapper img { transform: scale(1.06); filter: saturate(1.1); }

.card-content { padding: 22px 24px 26px; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.card-meta .studio { color: var(--accent); }
.project-card h3 { font-size: 1.6rem; margin-bottom: 0.25em; }
.large-card h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.role { color: var(--text-dim); margin: 0; }
.card-excerpt { margin: 12px 0 0; font-size: 0.95rem; color: var(--text-dim); }

/* ---------- Teaser ---------- */
.teaser-section { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.teaser-text { max-width: 40rem; margin: 0 auto 2rem; color: var(--text-dim); font-size: 1.1rem; }

/* ---------- Inner page header ---------- */
.page-header { padding-bottom: 40px; }
.page-title { font-size: clamp(2.4rem, 7vw, 4.5rem); margin-bottom: 0.3em; }

/* ---------- Project detail ---------- */
.project-hero { padding-top: 40px; padding-bottom: 40px; }
.video-responsive {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.video-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.project-header { margin-bottom: 3rem; }
.quick-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.fact-item {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.fact-item strong { color: var(--accent); font-weight: 600; }

.content-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
.role-block ul { margin: 0; padding-left: 1.2rem; }
.role-block li { margin-bottom: 0.6em; color: var(--text); }
.role-block li::marker { color: var(--accent); }
.role-block h3 { color: var(--accent); }
.role-block p { color: var(--text-dim); }

.reflection-section {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.reflection-section p { font-size: 1.1rem; margin: 0; }

/* ---------- Gallery ---------- */
.image-gallery { display: grid; gap: 32px 20px; grid-template-columns: 1fr; }
.gallery-item { margin: 0; min-width: 0; }
.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.gallery-item img:hover { transform: scale(1.02); border-color: var(--accent); }
.gallery-item figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--text-dim); }

/* Shown in place of an image file that hasn't been added yet */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: repeating-linear-gradient(-45deg, #151820 0 12px, #1a1e26 12px 24px);
  border: 1px dashed #343a46;
  border-radius: var(--radius);
}
.card-image-wrapper .img-placeholder { border-radius: 0; border: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 88vh; border-radius: var(--radius); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
.about-bio p { font-size: 1.1rem; color: var(--text-dim); }
.tag-list { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  font-size: 0.9rem;
}
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 26px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline .when { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.timeline h3 { margin: 4px 0; font-size: 1.15rem; }
.timeline p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; gap: 20px; grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.contact-card {
  display: block;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.contact-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); }
.contact-card .label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); font-size: 0.85rem; }
.contact-card .value { display: block; margin-top: 6px; font-size: 1.15rem; word-break: break-word; }

/* ---------- 404 ---------- */
.not-found { min-height: 70vh; display: flex; align-items: center; }
.not-found .big { font-size: clamp(5rem, 22vw, 12rem); color: var(--accent); line-height: 1; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--text-dim); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Per-project accents ---------- */
.theme-reel,  .card-reel   { --accent: #e5a910; --accent-rgb: 229, 169, 16; }
.theme-jugger, .card-jugger { --accent: #5fd8bf; --accent-rgb: 95, 216, 191; }
.theme-time,  .card-time   { --accent: #1fb8d6; --accent-rgb: 31, 184, 214; }
.theme-reel, .card-reel, .theme-jugger, .card-jugger, .theme-time, .card-time { --accent-soft: rgba(var(--accent-rgb), 0.12); }
.eyebrow { border-radius: 999px; }

/* Reel Run only: film touches */
.theme-reel .video-responsive::before,
.theme-reel .video-responsive::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6%;
  background: #000;
  z-index: 2;
  pointer-events: none;
}
.theme-reel .video-responsive::before { top: 0; }
.theme-reel .video-responsive::after { bottom: 0; }
.theme-reel .reflection-section {
  border-left: 0;
  border-top: 10px solid transparent;
  border-image: repeating-linear-gradient(90deg, #111 0 14px, var(--accent) 14px 28px) 10 0 0 0;
}

/* ---------- Page entrance & scroll reveal ---------- */
.page-transition { animation: page-in 0.6s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 767px) {
  .hamburger { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(14, 16, 20, 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .main-nav.open { transform: translateY(0); visibility: visible; }
  .nav-links { flex-direction: column; gap: 0; padding: 12px 20px 20px; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1.1rem; }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--accent); }
  .section-padding { padding: 56px 0; }
  .hero-overlay { background: linear-gradient(0deg, rgba(14,16,20,0.95) 10%, rgba(14,16,20,0.6) 100%); }
  .btn { padding: 12px 24px; }
}

/* ---------- Tablet & up ---------- */
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid .large-card { grid-column: 1 / -1; flex-direction: row; }
  .large-card .card-image-wrapper { flex: 1.6; aspect-ratio: auto; min-height: 340px; }
  .large-card .card-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 36px; }
  .standard-grid .project-card { flex-direction: column; }
  .image-gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .standard-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: 1fr 1.3fr; }
  .image-gallery { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1.1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   Process page components (Reel Run)
   ========================================================== */
.section-intro { max-width: 46rem; color: var(--text-dim); font-size: 1.08rem; margin: -0.6rem 0 2.4rem; }
#process, #train, #romance, #documentation, #cut-content, #gallery { scroll-margin-top: calc(var(--header-h) + 16px); }

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 3.5rem;
}
.jump-nav a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.jump-nav a:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }

/* Numbered walkthrough */
.process-steps { display: grid; gap: 56px; counter-reset: step; }
.process-step {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  padding-left: 22px;
  border-left: 2px solid var(--line);
  position: relative;
}
.process-step::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.step-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 0.3rem;
}
.step-text h3 { font-size: 1.5rem; margin-bottom: 0.2em; }
.step-date { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.9rem; }
.step-text p:last-child { color: var(--text-dim); margin: 0; }
.step-media { display: grid; gap: 14px; grid-template-columns: 1fr; align-content: start; }

/* A single stage image/video with caption */
.stage { margin: 0; min-width: 0; position: relative; }
.stage img,
.stage video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}
.stage video { background: #000; }
.stage img.zoomable { cursor: zoom-in; transition: border-color 0.25s, transform 0.25s var(--ease); }
.stage img.zoomable:hover { border-color: var(--accent); transform: translateY(-2px); }
.stage figcaption { margin-top: 8px; font-size: 0.88rem; color: var(--text-dim); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.stage-label {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.credit {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  white-space: nowrap;
}
.credit.mine { color: #111; background: var(--accent); border-color: var(--accent); }

/* Horizontal pipeline strip */
.pipeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  margin-bottom: 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.pipeline .stage { scroll-snap-align: start; }
.pipeline .stage:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -15px;
  top: calc(1.4rem + (100% - 3.6rem) / 2);
  color: var(--accent);
  font-size: 1rem;
  z-index: 1;
}
.pipeline-title { font-size: 1.35rem; margin: 0 0 0.3rem; }
.pipeline-note { color: var(--text-dim); max-width: 46rem; margin-bottom: 1.2rem; }

/* Documentation cards */
.doc-title { font-size: 1.3rem; margin: 2.2rem 0 1rem; }
.doc-title:first-of-type { margin-top: 0; }
.doc-note { color: var(--text-dim); margin: -0.4rem 0 1rem; }
.doc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.doc-card { margin: 0; min-width: 0; }
.doc-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.doc-card img:hover { border-color: var(--accent); transform: translateY(-2px); }
.doc-card figcaption { margin-top: 8px; font-size: 0.88rem; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-grid.specs { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.doc-card.paper img { aspect-ratio: auto; padding: 10px; }

.gallery-item figcaption { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }

@media (min-width: 1024px) {
  .process-step { grid-template-columns: 0.8fr 1.6fr; gap: 40px; padding-left: 32px; }
  .step-media.two { grid-template-columns: 1fr 1fr; }
  .pipeline { overflow-x: visible; grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
.eyebrow { display: table; margin-bottom: 0.9rem; }

/* GDD download card */
.gdd-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 2.6rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.gdd-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.gdd-thumbs { display: flex; gap: 12px; justify-content: center; }
.gdd-thumbs img { width: 46%; max-width: 220px; aspect-ratio: 8.5 / 11; object-fit: cover; object-position: top; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); background: #fff; }
.gdd-thumbs img:last-child { transform: rotate(3deg) translateY(6px); }
.gdd-info h3 { font-size: 1.8rem; margin-bottom: 0.4em; }
.gdd-info p { color: var(--text-dim); margin-bottom: 1.4rem; max-width: 36rem; }
@media (min-width: 768px) { .gdd-card { grid-template-columns: 0.9fr 1.1fr; padding: 32px 40px; } }

/* Final shots carousel */
.carousel-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
}
.carousel-track { display: flex; transition: transform 0.5s var(--ease); touch-action: pan-y; }
.carousel-slide { margin: 0; flex: 0 0 100%; position: relative; }
.carousel-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; cursor: zoom-in; }
.carousel-slide figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 24px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  color: var(--text);
  font-size: 1rem;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(14,16,20,0.7);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  padding-bottom: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); color: #111; }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }
.carousel-count {
  position: absolute; top: 14px; right: 14px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(14,16,20,0.7);
  font-size: 0.8rem; letter-spacing: 0.08em; color: var(--text);
}
.carousel-thumbs {
  display: flex; gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.carousel-thumb {
  flex: 0 0 120px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}
.carousel-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.carousel-thumb:hover { opacity: 0.85; }
.carousel-thumb.active { opacity: 1; border-color: var(--accent); }
@media (max-width: 767px) {
  .carousel-btn { width: 38px; height: 38px; font-size: 1.6rem; }
  .carousel-slide figcaption { position: static; background: var(--bg-raised); padding: 12px 14px; font-size: 0.9rem; }
  .carousel-thumb { flex-basis: 84px; }
}
@media (max-width: 767px) {
  .carousel-stage { background: var(--bg-raised); }
  .carousel-track { align-items: flex-start; }
  .carousel-btn { top: calc((100vw - 34px) * 9 / 32); }
}
