/* ============================================================
   Vertical Studio — v3 · Stripe Press aesthetic
   Paper, serif, generous whitespace, single deep-blue accent
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Paper palette */
  --paper:        #F4EFE5;
  --paper-deep:   #ECE5D6;
  --paper-edge:   #E3DBC9;
  --ink:          #1A1410;
  --ink-soft:     #2A211B;
  --ink-mute:     #6B5D52;
  --ink-faint:    #9C8E80;
  --rule:         #D9CFBC;
  --rule-soft:    #E5DDCB;

  /* Accent — deep marine blue (used sparingly) */
  --accent:       #1A3A8F;
  --accent-deep:  #142E72;
  --accent-tint:  rgba(26, 58, 143, 0.08);

  /* Typography */
  --serif:        "Fraunces", "Spectral", "Source Serif Pro", Georgia, serif;
  --sans:         "Inter", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:         "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Rhythm */
  --measure:      720px;
  --wide:         1080px;
  --gutter:       clamp(20px, 4vw, 48px);

  /* Easing */
  --ease:         cubic-bezier(.2, .6, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "kern", "liga";

  /* Subtle paper grain (CSS-only) */
  background-image:
    radial-gradient(rgba(43, 30, 20, 0.025) 1px, transparent 1px),
    radial-gradient(rgba(43, 30, 20, 0.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Containers ---------- */
.container {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-style: normal;
  margin: 0;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}

h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }

p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--ink); }

a { color: var(--ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

.mono, .num, .ix { font-family: var(--mono); font-feature-settings: "tnum", "ss01"; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 239, 229, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 0 rgba(43, 30, 20, 0.02), 0 8px 24px -16px rgba(43, 30, 20, 0.18);
  background: rgba(244, 239, 229, 0.96);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--serif); font-weight: 500; font-size: 19px;
  letter-spacing: -0.01em; color: var(--ink);
}
.logo em { font-style: italic; font-weight: 500; color: var(--ink-mute); font-variation-settings: "opsz" 14, "SOFT" 100, "WONK" 1; }
.logo-mark {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  cursor: pointer;
  line-height: 1;
}
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 10vw, 120px) 0 clamp(60px, 8vw, 100px);
  border-bottom: 1px solid var(--rule);
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 clamp(28px, 5vw, 56px);
  text-align: center;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.4fr 1fr; max-width: var(--wide); }
}
.hero h1 {
  font-size: clamp(46px, 8vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .accent { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 560px;
  margin: 0 0 clamp(30px, 4vw, 44px);
}
.hero-sub strong { font-weight: 500; color: var(--ink); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero "showreel" — paper card, no neon */
.showreel {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.showreel::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
}
.showreel-label, .showreel-tc {
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.showreel-label { top: 24px; left: 24px; display: inline-flex; align-items: center; gap: 8px; }
.showreel-label .rec { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.showreel-tc { bottom: 24px; left: 24px; }
.showreel-tc.right { left: auto; right: 24px; }
.showreel-center { text-align: center; }
.showreel-center .num {
  font-family: var(--serif);
  font-size: clamp(64px, 10vw, 104px);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.showreel-center .num em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.showreel-center .label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Hero stats */
.hero-stats {
  margin-top: clamp(60px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat {
  background: var(--paper);
  padding: 28px 24px;
  text-align: center;
}
.hero-stat .v {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-stat .v em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.hero-stat .k {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Section atoms ---------- */
/* ===== Steps list (How it works) ===== */
.steps-list {
  list-style: none;
  padding: 0;
  margin: clamp(32px, 4vw, 56px) 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .steps-list { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (min-width: 1100px) {
  .steps-list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.step-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.step-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.step-text {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-mute);
}

/* Section wrapper — transparent, only spacing */
.block {
  padding: clamp(48px, 7vw, 88px) 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Card-like inner panel — the actual "подложка" */
.block > .container {
  background: var(--paper-edge);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 56px);
  box-shadow: 0 14px 36px -22px rgba(26, 20, 16, 0.25);
}
.section-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 auto clamp(20px, 3vw, 32px);
  max-width: var(--wide);
}
.section-meta .num { color: var(--ink); font-weight: 500; }
.section-meta .dot { width: 4px; height: 4px; background: var(--ink-faint); border-radius: 50%; }
.section-meta .right { margin-left: auto; color: var(--ink-faint); }

.section-title {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 500;
  margin: 0 0 clamp(40px, 6vw, 72px);
  max-width: 760px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.section-title em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Cases ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 760px) { .cases-grid { grid-template-columns: 1fr 1fr; } } @media (min-width: 1100px) { .cases-grid { grid-template-columns: repeat(4, 1fr); } }

.case-card {
  background: var(--paper);
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  /* Anchor reset (used when .case-card is on an <a>) */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease), border-color .2s var(--ease);
  border: 1px solid transparent;
}
.case-card:hover {
  background: var(--paper-deep);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(26, 20, 16, 0.25),
              0 4px 10px -6px rgba(26, 20, 16, 0.12);
  border-color: var(--rule);
}
/* Visual CTA inside the link (used to be <a>, now a <span> — no nested anchors) */
.case-card-cta {
  align-self: flex-start;
  pointer-events: none; /* whole card handles click */
}
.case-card:hover .case-card-cta {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.case-cover {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
}
.case-card:hover .case-cover { border-color: var(--rule); }
.ph-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.7;
}
.case-cover::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 28px; height: 28px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--ink-faint);
}
.case-index, .ph-label {
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.case-index { top: 14px; left: 14px; }
.ph-label   { bottom: 14px; right: 14px; }

.case-body { display: flex; flex-direction: column; gap: 10px; flex: 1; } .case-body .btn { margin-top: auto; }

.case-industry {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.case-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 4px 0 6px;
  min-height: calc(2 * 1.15em);
  display: flex;
  align-items: flex-start;
}
.case-stats {
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-stat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
}
.case-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.case-stat-value {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.3;
}
.case-stat-row-out {
  background: rgba(26, 58, 143, 0.04);
  border-color: rgba(26, 58, 143, 0.25);
}
.case-stat-row-out .case-stat-value {
  font-size: 19px;
  font-weight: 500;
  color: var(--accent);
}

.cases-formula-note {
  margin: 18px auto 0;
  max-width: 720px;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- IO Table ---------- */
.io-table-wrapper {
  max-width: 920px;
  margin: 0 auto;
  overflow-x: auto;
}
.io-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-soft);
}
.io-table thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  text-align: left;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
}
.io-table thead th:last-child { padding-right: 0; }
.io-table thead th .ix {
  display: inline-block; width: 16px; color: var(--ink-faint); margin-right: 4px;
}
.io-table tbody td {
  padding: 22px 18px 22px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.55;
}
.io-table tbody td:first-child {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  width: 22%;
  white-space: nowrap;
}
.io-table tbody td.dash { color: var(--ink-faint); font-family: var(--mono); font-size: 14px; }
.io-table tbody tr:last-child td { border-bottom: 0; }

.io-cta-row {
  display: flex; justify-content: center;
  margin-top: clamp(40px, 5vw, 60px);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 64px);
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.contact-form { display: flex; flex-direction: column; gap: 22px; }
.contact-field { display: flex; flex-direction: column; gap: 8px; }
.contact-field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex; align-items: center; gap: 10px;
}
.contact-field label .ix { color: var(--ink-faint); }
.contact-field input,
.contact-field textarea {
  font: inherit;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0 10px;
  outline: none;
  transition: border-color .2s var(--ease);
  resize: vertical;
}
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--ink-faint); font-style: italic; }
.contact-field input:focus,
.contact-field textarea:focus { border-bottom-color: var(--accent); }

.contact-form .btn { align-self: flex-start; margin-top: 8px; }

.contact-links {
  display: flex; flex-direction: column; gap: 28px;
  padding-top: 12px;
}
.contact-link { display: flex; flex-direction: column; gap: 6px; }
.contact-link .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact-link a {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 26px);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  align-self: flex-start;
}
.contact-link a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 56px;
  background: var(--paper);
}
.site-footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.site-footer em { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: -0.01em; color: var(--ink); font-size: 14px; }

/* ============================================================
   case.html — Case detail page
   ============================================================ */

.case-hero {
  padding: clamp(60px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.back-link {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-block;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.back-link:hover { color: var(--accent); }
.case-hero .subhead {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
}
.case-hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 24px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.case-hero h1 em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.case-hero-sub {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}
.case-hero-sub strong { color: var(--ink); font-weight: 500; }
.arr {
  display: inline-block; margin: 0 10px;
  color: var(--accent);
  font-family: var(--mono);
}

.case-section {
  padding: clamp(72px, 10vw, 120px) 0;
  border-bottom: 1px solid var(--rule);
}
.case-section h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 clamp(40px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.case-section h2 .ix {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.case-section h2 em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* Media grid */
.media-grid {
  display: grid;
  gap: 12px;
}
.media-grid.horizontal { grid-template-columns: repeat(2, 1fr); }
.media-grid.vertical { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) {
  .media-grid.horizontal { grid-template-columns: repeat(3, 1fr); }
  .media-grid.vertical { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .media-grid.horizontal { grid-template-columns: repeat(5, 1fr); }
  .media-grid.vertical { grid-template-columns: repeat(5, 1fr); }
}

.media-tile {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.media-tile:hover { background: var(--paper); border-color: var(--ink-faint); }
.media-tile.horizontal { aspect-ratio: 16 / 9; }
.media-tile.vertical   { aspect-ratio: 9 / 16; }
.media-tile .ix { color: var(--ink); font-weight: 500; }
.media-tile.more {
  background: transparent;
  border-style: dashed;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
}
.media-tile.more span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; }

/* Real media — image fills slot, label overlays bottom-left */
.case-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.case-cover .case-index,
.case-cover .ph-label { z-index: 2; }

.media-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
a.media-tile { text-decoration: none; color: inherit; padding: 0; overflow: hidden; }
a.media-tile:hover img { opacity: 0.92; }
.media-tile__label {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(20,20,20,0.72);
  padding: 4px 8px;
  border-radius: 2px;
}

/* ===== Contact form success message ===== */
.contact-success {
  background: var(--paper-deep);
  border-left: 3px solid var(--accent);
  padding: 28px 32px;
  margin-top: 4px;
  animation: fade-in .4s ease-out;
}
.contact-success__title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink);
}
.contact-success__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mute);
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Social links — clickable words ===== */
.social-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}
.social-list li {
  display: inline-flex;
  align-items: baseline;
}
.social-list li:not(:last-child)::after {
  content: '·';
  margin: 0 18px;
  color: var(--ink-mute);
  font-family: var(--mono);
}
.social-list a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 3px;
  transition: color .15s, border-color .15s;
}
.social-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== Sources carousel ===== */
.sources-carousel {
  position: relative;
  margin-top: clamp(20px, 2.5vw, 32px);
}
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.carousel-page {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) {
  .carousel-page { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .carousel-page { grid-template-columns: repeat(5, 1fr); }
}
/* When inside a carousel-page the tile keeps its existing horizontal aspect */
.carousel-page .media-tile.horizontal { aspect-ratio: 16 / 9; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: clamp(20px, 2.5vw, 32px);
}
.carousel-nav {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, opacity .15s;
  font-family: var(--mono);
}
.carousel-nav:hover { background: var(--ink); color: var(--paper); }
.carousel-nav[disabled] { opacity: 0.25; cursor: not-allowed; }
.carousel-nav[disabled]:hover { background: transparent; color: var(--ink); }
.carousel-counter {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  min-width: 80px;
  text-align: center;
}
.carousel-counter strong { color: var(--ink); font-weight: 500; }

.subsection-label {
  margin: clamp(40px, 5vw, 60px) 0 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center;
  display: flex; align-items: center; gap: 16px;
}
.subsection-label::before,
.subsection-label::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.social-links {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
}
.social-pill {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.social-pill:hover { background: var(--ink); color: var(--paper); }

.case-cta-bottom {
  text-align: center;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule);
}
.case-cta-bottom .lead {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0 0 28px;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.case-cta-bottom .lead em {
  font-style: italic; color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* ---------- Small ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- Video modal ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 16, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  backdrop-filter: blur(8px);
}
.video-modal[aria-hidden="false"] { display: flex; }
.video-modal__inner {
  width: 100%;
  max-width: min(420px, 90vw);
  max-height: 90vh;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.video-modal--horizontal .video-modal__inner {
  aspect-ratio: 16 / 9;
  max-width: min(960px, 92vw);
}
.video-modal__inner video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.video-modal__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  font-family: var(--sans, sans-serif);
  transition: background 0.15s, border-color 0.15s;
}
.video-modal__close:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.7);
}
body.modal-open { overflow: hidden; }
