/* Zenith Picture Company — base styles */

:root {
  /* --- direction-driven (overridden inline by app) --- */
  --bg: #000000;
  --bg-2: #0a0a0a;
  --surface: #0e0e0e;
  --surface-2: #141414;
  --fg: #f4f4f3;
  --fg-2: #b8b9bd;
  --fg-3: #6f7178;
  --rule: rgba(255,255,255,0.08);
  --rule-2: rgba(255,255,255,0.16);
  --accent: #6f8aa1;        /* slate blue-gray */
  --accent-soft: #5d7a8c;
  --accent-tint: rgba(111, 138, 161, 0.14);

  /* font stack — swapped by tweak */
  --font-display: 'Cinzel', 'Cormorant Garamond', 'Trajan Pro', serif;
  --font-body: 'DM Sans', 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* density-driven */
  --section-py: 160px;
  --gutter: 96px;
  --max-w: 1320px;
  --hero-h: 100svh;

  /* type scale */
  --t-display: clamp(48px, 7.2vw, 112px);
  --t-h1: clamp(36px, 4.8vw, 72px);
  --t-h2: clamp(24px, 2.4vw, 34px);
  --t-body: 16px;
  --t-small: 13px;
  --t-micro: 11px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

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

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
}

/* === typography utility === */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 400;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.serif-headline {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.mono { font-family: var(--font-mono); }

/* === layout === */

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

@media (max-width: 900px) {
  :root { --gutter: 28px; --section-py: 96px; }
}

section.zpc-section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* === nav === */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--rule);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 14px;
}
.nav-logo img {
  width: 38px;
  height: 28px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 400;
}
.nav-links a {
  color: var(--fg-2);
  position: relative;
  transition: color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  white-space: nowrap;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: letter-spacing 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              color 0.4s ease;
}
.nav-cta::after {
  content: '→';
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-cta:hover { letter-spacing: 0.24em; color: var(--fg); }
.nav-cta:hover::after { transform: translateX(6px); }

@media (max-width: 1024px) {
  .nav-links { gap: 22px; font-size: 11px; }
}
@media (max-width: 960px) {
  .nav { padding: 16px var(--gutter); }
  .nav-links { display: none; }
}

/* === hero === */

.hero {
  min-height: var(--hero-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px var(--gutter) 80px;
  text-align: center;
  overflow: hidden;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, var(--bg) 100%);
  pointer-events: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.hero-mark {
  width: 180px;
  height: 136px;
  object-fit: contain;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.hero-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 132px);
  letter-spacing: 0.22em;
  margin: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
  /* push the optical center by removing the trailing letter-space's right gap */
  padding-left: 0.22em;
}

.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 20px);
  letter-spacing: 0.32em;
  color: var(--fg-2);
  margin-top: 18px;
  text-transform: uppercase;
  font-weight: 400;
}

.hero-tagline {
  margin-top: 64px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  max-width: 520px;
}

.hero-meta {
  position: absolute;
  left: var(--gutter);
  bottom: 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  gap: 28px;
  z-index: 1;
}
.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 36px;
  background: var(--fg-3);
  animation: scrollHint 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

@media (max-width: 700px) {
  .hero-meta, .hero-scroll { display: none; }
}

/* dark logo invert */
.invert-for-dark { filter: invert(1) brightness(1.05); }

/* === about === */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 96px;
  align-items: start;
}
.about-side {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 14px;
}
.about-mark {
  width: 220px;
  height: 166px;
  object-fit: contain;
  align-self: flex-start;
  opacity: 0.92;
}
.about-body {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--fg);
}
.about-body em {
  font-style: italic;
  color: var(--accent);
}
.about-foot {
  margin-top: 56px;
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  color: var(--fg-2);
  font-size: 14px;
}
.about-foot div span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-side { flex-direction: row; align-items: center; gap: 32px; }
  .about-mark { width: 120px; height: 90px; }
}

/* === services === */

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 96px 0;
  border-bottom: 1px solid var(--rule);
}
.service:last-of-type { border-bottom: 0; }
.service.reverse .service-copy { order: 2; }
.service.reverse .service-visual { order: 1; }

.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 18px;
}
.service-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 28px 0;
  text-transform: uppercase;
}
.service-para {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-2);
  max-width: 46ch;
  margin: 0 0 32px 0;
}
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding-left: 24px;
  position: relative;
}
.service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service-visual {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  transition: border-color 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.service-visual::after {
  /* slow projector flicker / breathing veil */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 30%,
    color-mix(in srgb, var(--bg) 14%, transparent) 100%);
  pointer-events: none;
  animation: serviceBreath 7s ease-in-out infinite;
  mix-blend-mode: multiply;
}
.service:hover .service-visual {
  border-color: var(--rule-2);
}
@keyframes serviceBreath {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.65; }
}

@media (max-width: 1100px) {
  .service { grid-template-columns: 1fr; gap: 48px; padding: 64px 0; }
  .service.reverse .service-copy { order: 1; }
  .service.reverse .service-visual { order: 2; }
  .service-visual { aspect-ratio: 16 / 10; max-width: 640px; }
}

/* visual treatments inside service-visual */
.viz-slate {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.viz-grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
}
.viz-bars {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.viz-bars > div { height: 100%; }

.viz-label {
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.viz-label .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2.4s ease-in-out infinite;
}
.viz-corner {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

/* === clients strip === */
.clients-wrap {
  padding-top: 88px;
  padding-bottom: 88px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.clientele-row {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}
.clientele-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.clientele-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--fg);
  line-height: 1.1;
  transition: color 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              letter-spacing 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.clientele-item:hover .clientele-name {
  color: var(--accent);
  letter-spacing: 0.06em;
}
.clientele-company {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
@media (max-width: 700px) {
  .clientele-row { grid-template-columns: 1fr; gap: 24px; }
}
.clients-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 48px;
  align-items: center;
  margin-top: 56px;
}
.client-logo {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.client-logo:hover { opacity: 1; color: var(--fg); }
@media (max-width: 900px) {
  .clients-row { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}

/* === contact === */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 96px;
  align-items: start;
}
.contact-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 76px);
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 0 0 32px 0;
}
.contact-heading em { font-style: italic; color: var(--accent); }
.contact-blurb {
  color: var(--fg-2);
  max-width: 38ch;
  margin: 0 0 48px 0;
  font-size: 15px;
  line-height: 1.7;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-info-row span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.contact-info-row a, .contact-info-row p {
  color: var(--fg);
  margin: 0;
  font-size: 15px;
}
.contact-info-row a:hover { color: var(--accent); }

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  position: relative;
}
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  background: transparent;
  padding: 10px 0 12px;
  color: var(--fg);
  outline: none;
  font-size: 16px;
  transition: border-color 0.3s ease;
  border-radius: 0;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23888' stroke-width='1.2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  padding-right: 24px;
}
.field select option { background: var(--bg); color: var(--fg); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--accent);
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--fg-3);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.btn-submit {
  margin-top: 12px;
  align-self: flex-start;
  background: var(--fg);
  color: var(--bg);
  padding: 18px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: letter-spacing 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              background 0.4s ease, color 0.4s ease, opacity 0.3s ease;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 0%,
    transparent 35%,
    color-mix(in srgb, var(--accent) 35%, transparent) 50%,
    transparent 65%,
    transparent 100%);
  transform: translateX(-110%);
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.btn-submit:hover::before { transform: translateX(110%); }
.btn-submit { white-space: nowrap; }
.btn-submit:hover { letter-spacing: 0.28em; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-submit::after {
  content: '→';
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.btn-submit:hover::after { transform: translateX(8px); }

.success-card {
  border: 1px solid var(--accent);
  background: var(--accent-tint);
  padding: 28px 32px;
  color: var(--fg);
}
.success-card h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 22px;
  margin: 0 0 8px;
}
.success-card p { margin: 0; color: var(--fg-2); font-size: 14px; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .field-row { grid-template-columns: 1fr; }
}

/* === footer === */
.footer {
  padding: 48px var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer-links { display: flex; gap: 28px; }
.footer-links a:hover { color: var(--fg); }

/* === reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children inside a revealed service block */
.service .service-anim {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0ms);
}
.service.in .service-anim,
.service.reveal.in .service-anim {
  opacity: 1;
  transform: translateY(0);
}
.service-visual.service-anim {
  transform: translateY(20px) scale(0.985);
}
.service.in .service-visual.service-anim {
  transform: translateY(0) scale(1);
}

/* === density variants === */
[data-density="compact"] { --section-py: 96px; --gutter: 64px; }
[data-density="standard"] { --section-py: 140px; --gutter: 96px; }
[data-density="spacious"] { --section-py: 200px; --gutter: 128px; }
@media (max-width: 900px) {
  [data-density="compact"], [data-density="standard"], [data-density="spacious"] {
    --section-py: 80px; --gutter: 28px;
  }
}

/* === light direction overrides === */
[data-direction="light"] {
  --bg: #f6f4ee;
  --bg-2: #efece4;
  --surface: #e8e5dc;
  --surface-2: #ddd9cd;
  --fg: #16161a;
  --fg-2: #45454c;
  --fg-3: #8a8a8f;
  --rule: rgba(0,0,0,0.08);
  --rule-2: rgba(0,0,0,0.16);
  --accent: #4f6c81;
  --accent-soft: #5d7a8c;
  --accent-tint: rgba(79, 108, 129, 0.10);
}
[data-direction="light"] .invert-for-dark { filter: none; }
[data-direction="light"] .nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}
[data-direction="light"] .viz-slate {
  background: linear-gradient(180deg, #e8e5dc 0%, #d6d2c5 100%);
}
[data-direction="light"] .field select option { background: var(--bg); color: var(--fg); }

/* film color bars motif (used in viz-bars and a couple decorative spots) */
.bar-c0 { background: #efe9d8; }
.bar-c1 { background: #d9c66a; }
.bar-c2 { background: #6dbed0; }
.bar-c3 { background: #6cab47; }
.bar-c4 { background: #c463b1; }
.bar-c5 { background: #c1494a; }
.bar-c6 { background: #4859b8; }

/* film perforations (decorative film-strip across visual cards) */
.perforation {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 24px 0;
}
.perforation.left { left: 0; border-right: 1px solid var(--rule); }
.perforation.right { right: 0; border-left: 1px solid var(--rule); }
.perforation div {
  width: 6px;
  height: 8px;
  background: var(--bg);
  margin: 0 auto;
  border-radius: 1px;
}
[data-direction="light"] .perforation div { background: var(--bg-2); }

/* SMPTE bars (alternative visual) */
.smpte {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.smpte-main { display: grid; grid-template-columns: repeat(7, 1fr); flex: 1; }
.smpte-mid { display: grid; grid-template-columns: repeat(7, 1fr); height: 12%; }
.smpte-low { display: grid; grid-template-columns: 5fr 1fr 5fr 1fr 5fr; height: 16%; }

/* waveform decoration */
.waveform { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; }
.waveform svg { width: 80%; height: 60%; opacity: 0.85; }

/* clapper slate decoration */
.slate-wrap {
  position: absolute;
  inset: 12% 14% 14% 14%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.slate-stripes {
  height: 26px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}
.slate-stripes div:nth-child(odd) { background: var(--fg); }
.slate-stripes div:nth-child(even) { background: var(--bg); border: 1px solid var(--rule-2); }
.slate-rows {
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slate-rows > div {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.slate-rows > div span:first-child { color: var(--fg-3); }
.slate-rows > div:last-child { border-bottom: 0; }

/* === font pairings === */
[data-fontpair="A"] {
  --font-display: 'Cinzel', 'Trajan Pro', serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}
[data-fontpair="B"] {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}
[data-fontpair="C"] {
  --font-display: 'Italiana', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ────────────────────────────────────────────────────────────────────────
   ATMOSPHERIC HERO MOTION
   Slow, deliberate, frame-rate-feel. No bounce, no parallax.
   ──────────────────────────────────────────────────────────────────────── */

/* keep the existing static grain but let it drift slowly so it feels alive */
.hero-grain {
  animation: grainDrift 9s steps(8) infinite;
}
@keyframes grainDrift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0.5; }
  20%  { transform: translate3d(-1%, 0.5%, 0); opacity: 0.42; }
  40%  { transform: translate3d(0.7%, -0.4%, 0); opacity: 0.55; }
  60%  { transform: translate3d(-0.5%, 0.8%, 0); opacity: 0.48; }
  80%  { transform: translate3d(0.6%, 0.3%, 0); opacity: 0.52; }
  100% { transform: translate3d(0, 0, 0); opacity: 0.5; }
}

/* very slow vignette breath — projector lens warmth */
.hero-vignette {
  animation: vignetteBreath 11s ease-in-out infinite;
}
@keyframes vignetteBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.78; }
}

/* a single thin horizontal scan line — passes slowly, long pause between sweeps */
.hero-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.55;
}
[data-direction="light"] .hero-scan { mix-blend-mode: multiply; opacity: 0.35; }
.hero-scan::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 18%;
  background: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--accent) 8%, transparent) 45%,
    color-mix(in srgb, var(--accent) 16%, transparent) 50%,
    color-mix(in srgb, var(--accent) 8%, transparent) 55%,
    transparent 100%);
  top: -20%;
  animation: scanPass 16s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  filter: blur(8px);
}
@keyframes scanPass {
  0%   { top: -22%; opacity: 0; }
  4%   { opacity: 1; }
  46%  { opacity: 1; }
  50%  { top: 120%; opacity: 0; }
  100% { top: 120%; opacity: 0; }
}

/* ── hero entry choreography ──────────────────────────────────────────── */

.hero-anim-mark,
.hero-anim-word,
.hero-anim-sub,
.hero-anim-tag,
.hero-anim-meta {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* logo mark: fade + soft scale */
.hero-anim-mark {
  animation: heroMarkIn 1.6s 0.15s forwards cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: scale(0.94);
}
@keyframes heroMarkIn {
  to { opacity: 1; transform: scale(1); }
}

/* wordmark: classic title-sequence letter-spacing expand */
.hero-anim-word {
  animation: heroWordIn 2.2s 0.55s forwards cubic-bezier(0.22, 0.61, 0.36, 1);
  letter-spacing: 0.05em;
  filter: blur(6px);
}
@keyframes heroWordIn {
  0%   { opacity: 0; letter-spacing: 0.05em; filter: blur(6px); }
  40%  { opacity: 0.6; filter: blur(2px); }
  100% { opacity: 1; letter-spacing: 0.22em; filter: blur(0); }
}

/* italicized subtitle: fade in late */
.hero-anim-sub {
  animation: heroFade 1.4s 1.6s forwards cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-anim-tag {
  animation: heroFade 1.4s 2.0s forwards cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translateY(8px);
}
.hero-anim-meta {
  animation: heroFade 1.4s 2.4s forwards cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes heroFade {
  to { opacity: 1; transform: translateY(0); }
}

/* very subtle perpetual wordmark "breath" once entry completes */
.hero-anim-word {
  /* layered animation: entry runs, then breath loops afterwards */
  animation:
    heroWordIn 2.2s 0.55s forwards cubic-bezier(0.22, 0.61, 0.36, 1),
    heroWordBreath 10s 3s ease-in-out infinite;
}
@keyframes heroWordBreath {
  0%, 100% { letter-spacing: 0.22em; }
  50%      { letter-spacing: 0.225em; }
}

/* ────────────────────────────────────────────────────────────────────────
   SCORING WAVEFORM — gentle, staggered breath
   ──────────────────────────────────────────────────────────────────────── */

@keyframes waveBreath {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.18); }
}

/* ────────────────────────────────────────────────────────────────────────
   PRODUCTION SECTION — 35mm film texture, light leak, scroll-synced vignette
   All effects sit on a pointer-events:none overlay so they never block clicks.
   ──────────────────────────────────────────────────────────────────────── */

.service-production { position: relative; }
.service-production > .service-copy,
.service-production > .service-visual { position: relative; z-index: 1; }

.production-atmos {
  position: absolute;
  inset: -80px -40px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  --prod-progress: 0;
}

/* 35mm grain — fine + coarse turbulence layers drifting at different rates */
.production-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.55;
}
[data-direction="light"] .production-grain {
  mix-blend-mode: multiply;
  opacity: 0.45;
}
.production-grain .grain-fine {
  animation: grainShiftFine 1.6s steps(8) infinite;
  transform-origin: 50% 50%;
}
.production-grain .grain-coarse {
  animation: grainShiftCoarse 3.4s steps(6) infinite;
  opacity: 0.55;
}
@keyframes grainShiftFine {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-1.5px, 1px); }
  40%  { transform: translate(1px, -1.2px); }
  60%  { transform: translate(-0.8px, -0.6px); }
  80%  { transform: translate(1.2px, 0.8px); }
  100% { transform: translate(0, 0); }
}
@keyframes grainShiftCoarse {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(2px, -1px); }
  66%  { transform: translate(-1.5px, 1.2px); }
  100% { transform: translate(0, 0); }
}

/* Horizontal light leak — slow, warm, organic. Never feels like a lens flare. */
.production-leak {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -40%;
  width: 60%;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%,
      rgba(232, 168, 96, 0.32) 0%,
      rgba(216, 132, 76, 0.18) 25%,
      rgba(180, 96, 56, 0.08) 50%,
      transparent 75%);
  filter: blur(64px);
  mix-blend-mode: screen;
  opacity: 0;
  animation: lightLeak 28s ease-in-out infinite;
}
[data-direction="light"] .production-leak {
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%,
      rgba(196, 130, 70, 0.32) 0%,
      rgba(170, 102, 58, 0.18) 25%,
      rgba(140, 80, 44, 0.08) 50%,
      transparent 75%);
}
@keyframes lightLeak {
  /* drifts across the section, fading in/out with long quiet stretches */
  0%   { transform: translateX(0%);    opacity: 0; }
  10%  { opacity: 0.55; }
  35%  { transform: translateX(120%);  opacity: 0.65; }
  50%  { transform: translateX(180%);  opacity: 0; }
  100% { transform: translateX(180%);  opacity: 0; }
}

/* Vignette synchronized to scroll position (var set by JS on the parent) */
.production-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 30%,
    transparent 55%,
    color-mix(in srgb, var(--bg) 60%, transparent) 100%);
  pointer-events: none;
  /* peak vignette when section is centered (progress = 0.5);
     less when entering/leaving. Computed in JS as a 0..1 number on
     --prod-progress; we map to ~0.3..1 opacity via a parabolic curve. */
  opacity: calc(0.35 + 0.65 * (1 - 4 * (var(--prod-progress) - 0.5) * (var(--prod-progress) - 0.5)));
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Vintage-optics chromatic aberration on text reveal.
   Plays once when the production block enters view, then settles to clean. */
.service-production.in .service-copy .service-num,
.service-production.in .service-copy .service-title,
.service-production.in .service-copy .service-para,
.service-production.in .service-copy .service-list li {
  animation: chromaConverge 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes chromaConverge {
  0% {
    text-shadow:
      -3px 0 0 rgba(220, 90, 100, 0.55),
      3px 0 0 rgba(80, 170, 220, 0.55);
    filter: blur(0.4px);
  }
  60% {
    text-shadow:
      -1px 0 0 rgba(220, 90, 100, 0.3),
      1px 0 0 rgba(80, 170, 220, 0.3);
    filter: blur(0);
  }
  100% {
    text-shadow: none;
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-anim-mark,
  .hero-anim-word,
  .hero-anim-sub,
  .hero-anim-tag,
  .hero-anim-meta,
  .reveal,
  .service-anim {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    letter-spacing: 0.22em;
  }
  .hero-anim-word { letter-spacing: 0.22em !important; }
  .hero-grain, .hero-vignette, .hero-scan, .service-visual::after {
    animation: none !important;
  }
  .production-grain .grain-fine,
  .production-grain .grain-coarse,
  .production-leak {
    animation: none !important;
  }
  .service-production .service-num,
  .service-production .service-title,
  .service-production .service-para,
  .service-production .service-list li {
    animation: none !important;
    text-shadow: none !important;
    filter: none !important;
  }
}
