/* ============================================================
   MAXOUT Films — v2 stylesheet (mobile-first, cinematic, minimal)
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #0e0e10;
  --bg-3: #141417;
  --text: #f6f6f7;
  --muted: #9a9aa1;
  --muted-2: #6f6f77;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #e7352b;
  --accent-2: #ff4438;

  --maxw: 1180px;
  --pad-x: clamp(18px, 5vw, 28px);
  --section-y: clamp(64px, 9vw, 120px);

  /* type scale */
  --fs-h1: clamp(46px, 11vw, 130px);
  --fs-h2: clamp(30px, 6vw, 60px);
  --fs-h3: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  --fs-body: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  --fs-tag: 0.72rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-dist: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.display {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

/* offset anchored scrolling for the fixed header */
section[id] { scroll-margin-top: 72px; }

/* ---------- shared section rhythm ---------- */
.section { padding: var(--section-y) 0; }
.section--tight { padding: clamp(34px, 5vw, 52px) 0; }

.tag {
  display: inline-block;
  color: var(--accent);
  font-size: var(--fs-tag);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tag--center { display: block; text-align: center; }

.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-title { font-size: var(--fs-h2); margin-top: 12px; }
.sec-note { color: var(--muted); margin-top: 14px; max-width: 42ch; font-size: 0.95rem; }
.grid-hint { color: var(--muted-2); font-size: 0.82rem; letter-spacing: 0.02em; margin: 0 0 18px; }
.strip-note { color: var(--muted); text-align: center; max-width: 46ch; margin: 12px auto 0; font-size: 0.95rem; }
.email-btn { margin-top: 4px; }

.prose p { color: var(--muted); margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }

/* ============================================================
   NAV
   ============================================================ */
#header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
#header.scrolled {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand img { height: 26px; }

.nav-links { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s var(--ease);
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active:not(.nav-cta)::after { width: 100%; }
.nav-cta {
  color: #fff !important; border: 1px solid var(--line-2);
  padding: 9px 18px; border-radius: 2px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-cta:hover { border-color: var(--accent); background: rgba(231, 53, 43, 0.12); }

.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 10px; z-index: 120; }
.menu-bars { display: block; width: 26px; height: 14px; position: relative; }
.menu-bars i {
  position: absolute; left: 0; height: 2px; width: 100%; background: #fff; border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease);
}
.menu-bars i:nth-child(1) { top: 0; }
.menu-bars i:nth-child(2) { top: 6px; }
.menu-bars i:nth-child(3) { top: 12px; }
body.menu-open .menu-bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
body.menu-open .menu-bars i:nth-child(2) { opacity: 0; }
body.menu-open .menu-bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-video, .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(10,10,11,0.25) 45%, rgba(10,10,11,0.55) 100%),
    radial-gradient(120% 80% at 80% 10%, rgba(231,53,43,0.10), transparent 60%);
}
.hero-inner { padding-bottom: clamp(64px, 10vh, 110px); padding-top: 90px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; opacity: 0.9; font-size: var(--fs-tag); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--accent); }
.hero h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
.hero h1 .accent { color: var(--accent); }
.hero-intro {
  color: #dcdcde; font-weight: 300; font-size: clamp(1rem, 0.95rem + 0.5vw, 1.25rem);
  max-width: 34ch; margin: 22px 0 32px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: 2px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn svg { transition: transform 0.18s var(--ease); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px rgba(231,53,43,0.32); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost { border-color: var(--line-2); color: #fff; }
.btn-ghost:hover { border-color: #fff; transform: translateY(-2px) scale(1.02); }
.btn-ghost:active { transform: translateY(0) scale(0.98); }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid rgba(255,255,255,0.4); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; z-index: 1; }
.scroll-cue span { width: 3px; height: 7px; background: #fff; border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 80%,100% { opacity: 0; transform: translateY(9px); } }

/* ============================================================
   SHOWREEL
   ============================================================ */
.reel-frame {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-2); aspect-ratio: 16 / 9; background: #000;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.03);
}
.reel-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 10px;
  box-shadow: inset 0 0 70px rgba(231,53,43,0.10);
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-caption { color: var(--muted); text-align: center; margin-top: 18px; font-size: 0.95rem; }

/* ============================================================
   WORK GRID
   ============================================================ */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  position: relative; border-radius: 9px; overflow: hidden; aspect-ratio: 16 / 9;
  background: var(--bg-3); border: 1px solid var(--line); cursor: pointer; display: block;
  width: 100%; text-align: left; font: inherit; color: inherit;
  -webkit-appearance: none; appearance: none;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.9; transition: transform 0.6s var(--ease), opacity 0.35s var(--ease);
}
.card:hover .card-img { transform: scale(1.04); opacity: 1; }
.card-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.15) 55%, transparent 100%); }
.card-info { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; }
.card-cat { color: var(--accent); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.card-title { font-size: var(--fs-h3); font-weight: 500; margin-top: 5px; letter-spacing: 0.01em; }
.card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.85);
  z-index: 2; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(231,53,43,0.92); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-play svg { width: 22px; height: 22px; fill: #fff; }
.card-play svg[stroke] { fill: none; stroke: #fff; }

/* ============================================================
   CLIENTS
   ============================================================ */
/* logo banner (v2) */
.clients-banner {
  margin-top: 26px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.clients-banner::-webkit-scrollbar { display: none; }
.clients-banner img {
  display: block; margin: 0 auto; height: auto;
  width: 100%; max-width: 1100px; min-width: 660px;
  /* render the logos as understated white on the dark theme (assumes transparent PNG) */
  filter: brightness(0) invert(1);
  opacity: 0.8; transition: opacity 0.3s var(--ease);
}
.clients-banner:hover img { opacity: 0.92; }

.clients { margin-top: 22px; }
.clients-row {
  display: flex; gap: clamp(22px, 5vw, 52px); align-items: center;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; justify-content: flex-start;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.clients-row::-webkit-scrollbar { display: none; }
.clients-row span {
  font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.03em;
  font-size: clamp(18px, 3.4vw, 28px); color: #57575d; white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.clients-row span:hover { color: #97979e; }

/* ============================================================
   INSTAGRAM / FEATURED ON
   ============================================================ */
.ig-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ig-grid .instagram-media { margin: 0 auto !important; min-width: 0 !important; width: 100% !important; }
.ig-skeleton {
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg-3);
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 0.8rem; letter-spacing: 0.05em;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 1fr; gap: clamp(26px, 4vw, 50px); align-items: center; }
.about-media { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; max-width: 360px; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-body .sec-title { margin: 12px 0 18px; }
.about-body .btn { margin-top: 22px; }

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact { padding-bottom: clamp(80px, 12vw, 150px); }
.contact { text-align: center; }
.contact-title { font-size: clamp(40px, 10vw, 104px); margin: 14px 0 18px; letter-spacing: -0.01em; }
.contact-blurb { color: var(--muted); max-width: 38ch; margin: 0 auto 30px; }
.email-link {
  display: inline-block; font-size: clamp(1.05rem, 1rem + 1vw, 1.6rem); font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid var(--accent);
  transition: color 0.2s var(--ease);
}
.email-link:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
footer { border-top: 1px solid var(--line); padding: 28px 0; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 0.8rem; }
.foot img { height: 20px; opacity: 0.6; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(5,5,6,0.94); opacity: 0; transition: opacity 0.25s var(--ease);
}
.lb.open { display: flex; opacity: 1; }
.lb-box { width: 100%; max-width: 1080px; }
.lb-box video { width: 100%; border-radius: 8px; background: #000; max-height: 84vh; }
.lb-close { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; opacity: 0.8; transition: opacity 0.2s, transform 0.2s var(--ease); }
.lb-close:hover { opacity: 1; transform: scale(1.1); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
/* Elements are visible by DEFAULT. JS adds .anim-ready to opt in to the
   reveal animation, so if JS ever fails the content still shows (never blank). */
[data-animate].anim-ready {
  opacity: 0; transform: translateY(var(--reveal-dist));
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-animate].anim-ready.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE — tablet/desktop enhancements
   ============================================================ */
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .clients-row { justify-content: center; }
  .sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 24px; }
  .sec-head .tag { grid-column: 1; }
  .sec-head .sec-title { grid-column: 1; }
  .sec-head .sec-note { grid-column: 2; grid-row: 1 / span 2; align-self: end; text-align: right; margin-top: 0; }
}

@media (min-width: 940px) {
  .about { grid-template-columns: 0.85fr 1fr; gap: 56px; }
  .about-media { max-width: none; }
}

/* ============================================================
   MOBILE NAV (slide-in full-screen)
   ============================================================ */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 8px;
    background: rgba(10,10,11,0.97); backdrop-filter: blur(8px);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    z-index: 110;
  }
  body.menu-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.6rem; font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; color: #fff; padding: 12px 0; }
  .nav-links a::after { display: none; }
  .nav-cta { border: 0; padding: 12px 0; color: var(--accent) !important; }
  .nav-cta:hover { background: none; }
  body.menu-open { overflow: hidden; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue span { animation: none; }
  .card:hover .card-img { transform: none; }
  .btn:hover, .card:hover { transform: none; }
  * { scroll-behavior: auto !important; }
}
