/* ============== RESET & TOKENS ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050507;
  --bg-2: #0a0a0f;
  --ink: #f0f1f5;
  --ink-dim: #8b8e9a;
  --ink-faint: #4a4d57;
  --neon: #2bb8ff;
  --neon-deep: #0a6cff;
  --neon-soft: #6dd3ff;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;

  --max: 1640px;
  --pad: clamp(20px, 4vw, 56px);
  --nav-h: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

::selection { background: var(--neon); color: #000; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }

.display { font-family: var(--font-display); font-weight: 700; }

/* ============== BACKGROUND FX ============== */
.bg-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--bg);
}
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ============== NAV (Love&Money inspired: bold, wide, even-spaced) ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
  backdrop-filter: blur(8px);
}
.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  gap: 24px;
}
.logo { justify-self: start; display: flex; align-items: center; }
.logo img {
  height: 36px; width: auto;
  transition: filter 0.3s ease;
}
.logo:hover img { filter: drop-shadow(0 0 12px rgba(43, 184, 255, 0.6)); }

.nav nav {
  display: flex;
  gap: clamp(20px, 4vw, 64px);
  justify-content: center;
}
.nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--ink);
  position: relative;
  padding: 4px 2px;
  transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--neon);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: #fff; }

.nav-corner {
  justify-self: end;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.nav-corner:hover { color: var(--neon); }

@media (max-width: 820px) {
  .nav-inner { grid-template-columns: auto 1fr auto; }
  .logo img { height: 26px; }
  .nav nav { gap: 14px; }
  .nav-link { font-size: 11px; }
  .nav-corner { font-size: 10px; }
}
@media (max-width: 540px) {
  .nav nav { display: none; } /* fall back to bottom rail */
}

/* ============== HERO: cinematic full-bleed video ============== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  background: #000;
  z-index: 2;
}

.hero-stage {
  position: absolute; inset: 0;
}

.hero-frame {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.hero-frame.active { opacity: 1; pointer-events: auto; }

.hero-frame iframe {
  position: absolute;
  /* Vimeo background videos: fill viewport keeping 16:9, crop overflow */
  top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; /* 16:9 */
  min-height: 100vh; min-width: 177.77vh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.frame-fallback {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -1;
  filter: brightness(0.7) contrast(1.05);
}

.hero-overlay {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 25%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.85) 100%),
    linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 50%);
}

/* Caption — bold display, bottom-left, Love&Money style */
.hero-caption {
  position: absolute;
  left: var(--pad);
  bottom: 110px;
  z-index: 5;
  max-width: 70vw;
  pointer-events: none;
}
.caption-eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--neon);
  margin-bottom: 18px;
  text-shadow: 0 0 24px rgba(0,0,0,0.8);
}
.caption-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7.5vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.4);
  margin-bottom: 10px;
}
.caption-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 36px);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  letter-spacing: 0.005em;
}

/* Prev / next arrows */
.hero-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.6);
  z-index: 6;
  transition: color 0.25s, transform 0.25s, background 0.25s;
  border-radius: 50%;
  background: rgba(0,0,0,0.0);
}
.hero-arrow:hover { color: #fff; background: rgba(0,0,0,0.4); transform: translateY(-50%) scale(1.05); }
.hero-prev { left: clamp(8px, 2vw, 28px); }
.hero-next { right: clamp(8px, 2vw, 28px); }

/* Pagination dots */
.hero-dots {
  position: absolute;
  bottom: 110px; right: var(--pad);
  display: flex; gap: 12px;
  z-index: 6;
}
.hero-dot {
  width: 28px; height: 2px;
  background: rgba(255,255,255,0.3);
  transition: background 0.3s;
  cursor: pointer;
  padding: 0; border: 0; border-radius: 0;
}
.hero-dot.active { background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.hero-dot:hover { background: rgba(255,255,255,0.6); }

/* Bottom rail (Love&Money "PRODUCTION DIRECTORS" treatment) */
.hero-rail {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  background: rgba(5,5,7,0.95);
  border-top: 1px solid var(--line);
  height: 64px;
}
.rail-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: 0.05em;
  color: var(--ink);
  text-align: center;
  padding: 18px;
  transition: color 0.25s, background 0.25s;
}
.rail-link:hover { color: var(--neon); background: rgba(43, 184, 255, 0.05); }
.rail-sep { width: 1px; height: 24px; background: var(--line); }

@media (max-width: 720px) {
  .hero-caption { bottom: 100px; max-width: 90vw; }
  .hero-dots { bottom: 80px; right: 50%; transform: translateX(50%); }
  .hero-arrow { width: 40px; height: 40px; }
  .hero-arrow svg { width: 24px; height: 24px; }
  .hero-rail { height: 56px; }
  .rail-link { font-size: 13px; padding: 12px 6px; }
}

/* ============== SECTIONS ============== */
section {
  position: relative; z-index: 2;
  padding: 0 var(--pad);
}

.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px; letter-spacing: 0.25em;
  color: var(--neon);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--neon); }

.glow { color: var(--neon); text-shadow: 0 0 24px rgba(43, 184, 255, 0.5); }
.glow-soft { color: var(--neon-soft); text-shadow: 0 0 12px rgba(109, 211, 255, 0.4); }

/* ============== WORK GRID ============== */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}
.work-head {
  margin-bottom: 80px;
  display: flex; flex-direction: column;
}
.work-head h2 {
  font-size: clamp(48px, 8vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px 28px;
}
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 540px) { .work-grid { grid-template-columns: 1fr; gap: 36px; } }

/* Asymmetric pattern matching Love&Money's editorial feel */
.work-grid > .case:nth-child(1) { grid-column: span 7; }
.work-grid > .case:nth-child(2) { grid-column: span 5; }
.work-grid > .case:nth-child(3),
.work-grid > .case:nth-child(4),
.work-grid > .case:nth-child(5) { grid-column: span 4; }
.work-grid > .case:nth-child(6) { grid-column: span 5; }
.work-grid > .case:nth-child(7) { grid-column: span 7; }
.work-grid > .case:nth-child(8),
.work-grid > .case:nth-child(9),
.work-grid > .case:nth-child(10),
.work-grid > .case:nth-child(11) { grid-column: span 3; }
.work-grid > .case:nth-child(12) { grid-column: span 7; }
.work-grid > .case:nth-child(13) { grid-column: span 5; }
.work-grid > .case:nth-child(14),
.work-grid > .case:nth-child(15),
.work-grid > .case:nth-child(16) { grid-column: span 4; }
@media (max-width: 900px) { .work-grid > .case { grid-column: span 1 !important; } }

.case {
  display: flex; flex-direction: column;
  gap: 18px;
  cursor: pointer;
  text-align: left;
  padding: 0;
  background: transparent;
}
.case-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  aspect-ratio: 16/9;
  transition: border-color 0.3s ease;
}
.case-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s;
  filter: grayscale(30%) contrast(1.05) brightness(0.78);
}
.case-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(5, 5, 7, 0.4) 0%, transparent 60%);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}
.case-play {
  position: absolute;
  bottom: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--neon);
  color: #000;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 24px rgba(43, 184, 255, 0.5);
}

.case:hover .case-thumb { border-color: var(--neon); }
.case:hover .case-thumb img { transform: scale(1.05); filter: grayscale(0%) contrast(1.05) brightness(0.95); }
.case:hover .case-overlay { opacity: 0.2; }
.case:hover .case-play { opacity: 1; transform: translateY(0); }

.case-meta { display: flex; flex-direction: column; gap: 6px; }
.case-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--neon);
  font-feature-settings: "tnum";
}
.case-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.15;
}
.case-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--ink-dim);
  line-height: 1.3;
}
.case-credits {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 6px;
  text-transform: uppercase;
}
.dot-sep { color: var(--ink-faint); }

.work-foot {
  margin-top: 100px;
  display: flex; justify-content: center;
}
.work-cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 22px 44px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--ink);
  transition: all 0.3s ease;
}
.work-cta:hover { border-color: var(--neon); color: var(--neon); box-shadow: 0 0 32px rgba(43, 184, 255, 0.2); }
.work-cta svg { transition: transform 0.3s ease; }
.work-cta:hover svg { transform: translate(2px, -2px); }

/* ============== ABOUT ============== */
.about {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(80px, 12vw, 160px);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
}
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 32px; } }

.manifesto-lead {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 92px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.manifesto-body {
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink-dim);
  display: flex; flex-direction: column; gap: 24px;
}
.manifesto-sign {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--ink);
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============== CONTACT ============== */
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: 120px;
}
.contact h2 {
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 60px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  background: linear-gradient(135deg, rgba(43, 184, 255, 0.04), transparent 50%);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, var(--neon), transparent 30%, transparent 70%, var(--neon-deep));
  border-radius: 12px;
  z-index: -1;
  opacity: 0.3;
}
@media (max-width: 720px) { .contact-card { grid-template-columns: 1fr; gap: 40px; } }

.contact-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.contact-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.contact-email {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--neon);
  display: inline-flex; align-items: center; gap: 12px;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}
.contact-email:hover { border-color: var(--neon); }
.contact-email svg { transition: transform 0.3s; }
.contact-email:hover svg { transform: translate(2px, -2px); }

.contact-side { display: flex; flex-direction: column; gap: 12px; color: var(--ink-dim); font-size: 14px; }
.contact-side .reply { color: var(--ink-faint); font-size: 12px; letter-spacing: 0.05em; }
.contact-vimeo {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--neon);
  letter-spacing: 0.12em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
  align-self: flex-start;
}
.contact-vimeo:hover { border-color: var(--neon); }

/* ============== FOOTER ============== */
.foot {
  border-top: 1px solid var(--line);
  padding: 32px var(--pad);
  position: relative; z-index: 2;
}
.foot-row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
}

/* ============== MODAL VIDEO PLAYER ============== */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 60px);
}
.modal.open { display: flex; }
.modal-frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 80px rgba(43, 184, 255, 0.15);
}
.modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.modal-meta {
  position: absolute;
  bottom: clamp(24px, 5vw, 60px);
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 1280px;
  padding: 16px 4px 0;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline;
}
.m-num { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.2em; color: var(--neon); }
.m-client { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }
.m-title { font-family: var(--font-serif); font-style: italic; color: var(--ink-dim); font-size: 16px; }
.m-dir { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-faint); margin-left: auto; text-transform: uppercase; }
@media (max-width: 720px) {
  .modal-meta { position: static; transform: none; padding-left: 0; padding-right: 0; }
  .modal { flex-direction: column; gap: 20px; }
  .m-dir { margin-left: 0; width: 100%; }
}

.modal-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(0,0,0,0.3);
  z-index: 210;
  transition: all 0.25s ease;
}
.modal-close:hover { border-color: var(--neon); color: var(--neon); transform: rotate(90deg); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
