/* ════════════════════════════════════════════════════════════
   SANTIAGO VISUALS — PORTAFOLIO
   Sistema de diseño · brutalist-editorial · dark-warm
   ════════════════════════════════════════════════════════════ */

:root {
  --ink: #0b0b0b;
  --ink-2: #141414;
  --ink-3: #1d1d1d;
  --paper: #f4f1ea;
  --paper-2: #e8e2d4;
  --acid: #ff3b2e;
  --line: #1a1a1a;

  --fd: 'Space Grotesk', 'Inter', sans-serif;    /* display */
  --fb: 'Inter', system-ui, sans-serif;          /* body */
  --fm: 'JetBrains Mono', ui-monospace, monospace;

  --pad-x: clamp(20px, 4vw, 64px);
  --pad-y: clamp(64px, 10vw, 140px);
  --content-max: 1440px;

  --nav-h: 72px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--acid); color: var(--paper); }

/* Grain */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  background: rgba(11, 11, 11, 0.7);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-solid { background: rgba(11, 11, 11, 0.92); border-color: rgba(244, 241, 234, 0.12); }
.nav-brand {
  font-family: var(--fd);
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.nav-brand .nav-logo {
  height: clamp(22px, 2.4vw, 28px);
  width: auto;
  display: block;
}
.nav-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); }
.nav-links {
  display: none;
  gap: 28px;
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-links a { opacity: 0.75; transition: opacity 0.2s var(--ease); position: relative; }
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--acid);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--paper);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-cta:hover { background: var(--paper); color: var(--ink); }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--nav-h);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
}
.hero-video {
  position: absolute; inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--ink);
}
.hero-video video,
.hero-video img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,11,11,0.55) 0%, rgba(11,11,11,0.25) 30%, rgba(11,11,11,0.55) 70%, rgba(11,11,11,0.9) 100%),
    radial-gradient(ellipse 90% 80% at center, transparent 0%, rgba(11,11,11,0.5) 100%);
}
.hero-inner {
  width: 100%; max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(48px, 10vw, 120px);
  align-self: end;
  display: flex; flex-direction: column; gap: clamp(20px, 3vw, 36px);
}
.hero-kicker {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.7;
  display: flex; align-items: center; gap: 12px;
}
.hero-kicker::before {
  content: ''; display: inline-block;
  width: 32px; height: 1px;
  background: var(--acid);
}
.hero-title {
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(44px, 9vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.hero-title em {
  font-style: normal;
  color: var(--acid);
}
.hero-sub {
  font-family: var(--fm);
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  max-width: 540px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: clamp(8px, 2vw, 20px);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 22px;
  border: 1px solid var(--paper);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
  will-change: transform;
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.primary {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--paper);
}
.btn.primary:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.ghost { background: transparent; }

.hero-reel-btn {
  position: absolute;
  top: calc(var(--nav-h) + 16px);
  right: var(--pad-x);
  z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fm); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 10px 14px;
  background: rgba(11,11,11,0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(244,241,234,0.25);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hero-reel-btn:hover { background: var(--acid); border-color: var(--acid); }

.hero-scroll {
  display: none;
  position: absolute; bottom: 22px; right: var(--pad-x);
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.55;
  flex-direction: column; align-items: center; gap: 10px;
  animation: hero-scroll-pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
.hero-scroll::after {
  content: ''; width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--paper) 0%, transparent 100%);
}
@media (min-width: 820px) { .hero-scroll { display: flex; } }
@keyframes hero-scroll-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, 0); }
  50% { opacity: 0.8; transform: translate(-50%, 6px); }
}

/* ─── SECTION BASE ─── */
.sec {
  position: relative;
  padding: var(--pad-y) var(--pad-x);
  border-top: 1px solid rgba(244,241,234,0.08);
  width: 100%;
}
.sec-inner { max-width: var(--content-max); margin: 0 auto; }
.sec-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 14px 28px;
  margin-bottom: clamp(32px, 6vw, 80px);
}
.sec-num {
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--acid);
}
.sec-title {
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.sec-kicker {
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  width: 100%;
  margin-top: -6px;
}

/* ─── 02 · QUIÉN ─── */
.quien-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (min-width: 820px) {
  .quien-grid { grid-template-columns: minmax(300px, 1fr) 1.3fr; }
}
.quien-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(244,241,234,0.1);
}
.quien-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.03);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.quien-photo:hover img { filter: grayscale(0) contrast(1.05); transform: scale(1.03); }
.quien-body { display: flex; flex-direction: column; gap: 28px; }
.quien-intro {
  font-family: var(--fb);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
  max-width: 640px;
  opacity: 0.92;
}
.quien-intro strong { color: var(--acid); font-weight: 600; }
.quien-skills {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.quien-skills li {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid rgba(244,241,234,0.22);
}
.quien-body .btn { align-self: flex-start; }

/* ─── 03 · TRABAJO ─── */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  background: rgba(244,241,234,0.08);
  border: 1px solid rgba(244,241,234,0.08);
}
@media (min-width: 720px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
.work-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16 / 10;
  isolation: isolate;
}
.work-thumb {
  position: absolute; inset: 0;
  overflow: hidden;
}
.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
  filter: brightness(0.75) saturate(0.95);
}
.work-card:hover .work-thumb img { transform: scale(1.05); filter: brightness(0.95) saturate(1.05); }
.work-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,11,11,0) 40%, rgba(11,11,11,0.9) 100%);
  pointer-events: none;
}
.work-meta {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: clamp(20px, 3vw, 32px);
  display: flex; flex-direction: column; gap: 6px;
}
.work-year, .work-kind {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
}
.work-title {
  font-family: var(--fd);
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.work-card .arrow {
  position: absolute; top: clamp(18px, 2.6vw, 28px); right: clamp(18px, 2.6vw, 28px); z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(244,241,234,0.35);
  font-family: var(--fm);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.work-card:hover .arrow { background: var(--acid); border-color: var(--acid); transform: translate(2px, -2px); }
.work-card.is-soon { pointer-events: none; }
.work-card.is-soon .work-thumb {
  background: repeating-linear-gradient(45deg, var(--ink-2), var(--ink-2) 14px, var(--ink-3) 14px, var(--ink-3) 28px);
}
.work-card.is-soon .work-thumb img {
  opacity: 0.18;
  filter: grayscale(1) brightness(0.6);
}
.work-card.is-soon::before {
  content: 'Próximamente'; position: absolute; top: clamp(18px, 2.6vw, 28px); left: clamp(18px, 2.6vw, 28px); z-index: 2;
  font-family: var(--fm); font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  padding: 6px 10px; background: var(--acid); color: var(--paper);
}
.work-card.is-soon .arrow { display: none; }

/* ─── 04 · SERVICIOS ─── */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 820px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
.svc {
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px;
  border: 1px solid rgba(244,241,234,0.1);
  background: rgba(244,241,234,0.02);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.svc:hover { border-color: rgba(255,59,46,0.5); background: rgba(255,59,46,0.04); }
.svc-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
}
.svc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.svc:hover .svc-img img { transform: scale(1.04); }
.svc h3 {
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
}
.svc ul { display: flex; flex-direction: column; gap: 6px; }
.svc li {
  font-family: var(--fb);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.85;
  padding-left: 16px;
  position: relative;
}
.svc li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 8px; height: 1px; background: var(--acid);
}
.svc-ideal {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  padding-top: 12px;
  border-top: 1px solid rgba(244,241,234,0.08);
  margin-top: auto;
}

/* ─── 05 · MARCAS (marquee) ─── */
.brands {
  overflow: hidden;
  border-top: 1px solid rgba(244,241,234,0.08);
  border-bottom: 1px solid rgba(244,241,234,0.08);
  padding: 36px 0;
  margin: 0 calc(-1 * var(--pad-x));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}
.brands-track {
  display: flex;
  gap: clamp(48px, 5vw, 96px);
  align-items: center;
  width: max-content;
  animation: marquee-left 38s linear infinite;
}
.brands:hover .brands-track { animation-play-state: paused; }
.brand-item {
  flex: 0 0 auto;
  height: clamp(44px, 5vw, 64px);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.55;
  filter: grayscale(1) brightness(0) invert(0.85);
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}
.brand-item:hover { opacity: 1; filter: grayscale(0) brightness(1) invert(0); }
.brand-item img {
  height: 100%; width: auto; max-width: 180px;
  object-fit: contain;
}
@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; }
}

/* ─── ABOUT PAGE ─── */
.about-hero {
  position: relative;
  min-height: 86svh;
  padding: calc(var(--nav-h) + clamp(32px, 6vw, 80px)) var(--pad-x) clamp(48px, 8vw, 120px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.about-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 60% at 20% 100%, rgba(255,59,46,0.18) 0%, transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.about-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: clamp(28px, 5vw, 60px);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .about-hero-inner { grid-template-columns: minmax(280px, 420px) 1fr; align-items: end; }
}
.about-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-3);
  position: relative;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(244,241,234,0.12);
  pointer-events: none;
}
.about-id { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 22px); }
.about-kicker {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.6;
}
.about-name {
  font-family: var(--fd);
  font-size: clamp(44px, 8vw, 120px);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.about-name em { font-style: normal; color: var(--acid); }
.about-role {
  font-family: var(--fm);
  font-size: clamp(12px, 1.3vw, 15px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  max-width: 560px;
}

/* Bio — long-form narrative */
.bio {
  padding: var(--pad-y) var(--pad-x);
  border-top: 1px solid rgba(244,241,234,0.08);
}
.bio-inner {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
  font-family: var(--fb);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
}
.bio-inner p { opacity: 0.9; }
.bio-inner p::first-letter {
  font-family: var(--fd);
  font-size: 1.1em;
  font-weight: 600;
}
.bio-inner strong { color: var(--paper); font-weight: 600; }
.bio-inner em { color: var(--acid); font-style: normal; font-weight: 500; }

/* Stack — herramientas */
.stack { padding: var(--pad-y) var(--pad-x); border-top: 1px solid rgba(244,241,234,0.08); }
.stack-inner { max-width: var(--content-max); margin: 0 auto; }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  background: rgba(244,241,234,0.06);
  border: 1px solid rgba(244,241,234,0.06);
}
.stack-item {
  padding: clamp(22px, 2.4vw, 32px) clamp(18px, 2vw, 26px);
  background: var(--ink);
  display: flex; flex-direction: column; gap: 8px;
  transition: background 0.25s var(--ease);
}
.stack-item:hover { background: var(--ink-2); }
.stack-cat {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.5;
}
.stack-name {
  font-family: var(--fd);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Filosofía */
.philo { padding: var(--pad-y) var(--pad-x); border-top: 1px solid rgba(244,241,234,0.08); }
.philo-inner { max-width: var(--content-max); margin: 0 auto; }
.philo-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  background: rgba(244,241,234,0.06);
  border: 1px solid rgba(244,241,234,0.06);
  counter-reset: philo;
}
@media (min-width: 820px) { .philo-list { grid-template-columns: repeat(3, 1fr); } }
.philo-item {
  padding: clamp(32px, 4vw, 56px) clamp(22px, 3vw, 36px);
  background: var(--ink);
  display: flex; flex-direction: column; gap: 18px;
  counter-increment: philo;
  position: relative;
}
.philo-item::before {
  content: '0' counter(philo);
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--acid);
}
.philo-head {
  font-family: var(--fd);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.philo-body {
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.75;
}

/* ─── CONTACT / CLOSING ─── */
.contact {
  padding: var(--pad-y) var(--pad-x);
  border-top: 1px solid rgba(244,241,234,0.1);
  text-align: left;
}
.contact-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid; gap: clamp(32px, 5vw, 60px);
}
.contact-head {
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(36px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 1100px;
}
.contact-head em {
  font-style: normal;
  color: var(--acid);
}
.contact-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
}
.contact-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(244,241,234,0.1);
  font-family: var(--fm);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.contact-meta dt { opacity: 0.5; margin-bottom: 6px; }
.contact-meta dd a:hover { color: var(--acid); }

/* ─── FOOTER ─── */
.footer {
  padding: 32px var(--pad-x);
  border-top: 1px solid rgba(244,241,234,0.08);
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px;
}
.footer-brand {
  display: flex; align-items: center; gap: 14px;
  opacity: 0.75;
}
.footer-brand img {
  height: 22px;
  width: auto;
  display: block;
}
.footer > span:not(.footer-brand) { opacity: 0.55; }
.footer a:hover { color: var(--acid); opacity: 1; }

/* ─── CASE STUDY (work/<slug>/index.html) ─── */
.case-hero {
  position: relative;
  min-height: 88vh;
  padding: calc(var(--nav-h) + clamp(40px, 8vw, 100px)) var(--pad-x) clamp(48px, 8vw, 100px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.case-hero-media {
  position: absolute; inset: 0;
  z-index: -1;
}
.case-hero-media img,
.case-hero-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: saturate(0.85) brightness(0.4) contrast(0.95);
}
.case-hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,11,0.85) 0%, rgba(11,11,11,0.6) 40%, rgba(11,11,11,0.3) 100%),
    linear-gradient(180deg, rgba(11,11,11,0.45) 0%, rgba(11,11,11,0.35) 40%, rgba(11,11,11,0.95) 100%);
}
@media (max-width: 700px) {
  .case-hero-media::after {
    background:
      linear-gradient(180deg, rgba(11,11,11,0.7) 0%, rgba(11,11,11,0.55) 40%, rgba(11,11,11,0.95) 100%);
  }
}
.case-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(24px, 4vw, 48px);
}
.case-crumbs {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  display: flex; gap: 10px; align-items: center;
}
.case-crumbs a { opacity: 0.8; }
.case-crumbs a:hover { color: var(--acid); opacity: 1; }
.case-title {
  font-family: var(--fd);
  font-size: clamp(44px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}
.case-title em { font-style: normal; color: var(--acid); }
.case-tagline {
  max-width: 60ch;
  font-family: var(--fb);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
  color: rgba(244,241,234,0.78);
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(244,241,234,0.15);
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.case-meta dt { opacity: 0.5; margin-bottom: 6px; }
.case-meta dd { font-size: 13px; letter-spacing: 0.04em; text-transform: none; color: var(--paper); }

.case-body {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 10vw, 140px) var(--pad-x);
}
.case-body-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column;
  gap: clamp(56px, 7vw, 96px);
}
.case-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 900px) {
  .case-section { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
}
.case-section-label {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  padding-top: 6px;
}
.case-section-body {
  font-family: var(--fb);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: rgba(244,241,234,0.82);
  max-width: 70ch;
}
.case-section-body p + p { margin-top: 1em; }
.case-section-body strong { color: var(--paper); font-weight: 600; }
.case-section-body em { color: var(--acid); font-style: normal; }

.case-gallery {
  column-count: 1;
  column-gap: 16px;
}
@media (min-width: 640px) { .case-gallery { column-count: 2; column-gap: 20px; } }
@media (min-width: 1100px) { .case-gallery { column-count: 3; column-gap: 24px; } }
.case-gallery figure {
  break-inside: avoid;
  margin: 0 0 20px;
  overflow: hidden;
  background: var(--ink-2);
  border-radius: 2px;
}
.case-gallery img {
  width: 100%; height: auto;
  display: block;
  transition: transform 0.6s var(--ease);
}
.case-gallery figure:hover img { transform: scale(1.03); }

.case-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(244,241,234,0.08);
  border: 1px solid rgba(244,241,234,0.08);
  margin-top: 24px;
}
.case-stat {
  background: var(--ink);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.case-stat-num {
  font-family: var(--fd);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: var(--acid);
  letter-spacing: -0.02em;
}
.case-stat-label {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}

.case-next {
  background: var(--ink-2);
  padding: clamp(56px, 8vw, 100px) var(--pad-x);
  border-top: 1px solid rgba(244,241,234,0.08);
  border-bottom: 1px solid rgba(244,241,234,0.08);
}
.case-next-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: clamp(16px, 3vw, 32px);
}
.case-next-kicker {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}
.case-next-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid rgba(244,241,234,0.1);
  border-bottom: 1px solid rgba(244,241,234,0.1);
  transition: padding-left 0.3s var(--ease);
}
.case-next-link:hover { padding-left: 16px; }
.case-next-link:hover .case-next-title { color: var(--acid); }
.case-next-title {
  font-family: var(--fd);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  transition: color 0.3s var(--ease);
}
.case-next-arrow {
  font-family: var(--fd);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  color: var(--acid);
}

/* ─── REVEAL (scroll animations — progressive enhancement) ─── */
.r-mask { overflow: hidden; }
html.js .r-mask > * {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.9s var(--ease);
}
html.js .r-mask.is-in > * { transform: translateY(0); }

html.js .r-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .r-fade.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .r-mask > *, .r-fade { transform: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
