/* ============================================================================
   PLACEHOLDER PORTFOLIO — styles
   Palette + type are intentionally "reference-like placeholders":
     bg  #000  (black)          text #DFE0CB (warm cream, from the reference)
   Swap these later; they're wired as CSS variables so it's a one-line change.
   ========================================================================== */

:root {
  --bg:        #000000;
  --fg:        #dfe0cb;   /* warm cream */
  --muted:     #8b8c7e;   /* dimmed cream */
  --line:      rgba(223, 224, 203, 0.16);
  --nav-solid: rgba(8, 8, 6, 0.85);

  --font-display: "Oswald", "Arial Narrow", sans-serif;      /* condensed */
  --font-body:    "Space Grotesk", system-ui, sans-serif;    /* grotesk    */
  --font-mono:    "Space Mono", ui-monospace, monospace;     /* mono       */

  --pad: clamp(1.25rem, 4vw, 4rem);   /* consistent horizontal page padding */
  --maxw: 1600px;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
em { font-style: normal; color: var(--muted); } /* used for accents in headlines */

/* Utility: mono label look used all over the reference */
.mono-label,
.hero__meta p,
.nav__links a,
.nav__brand,
.statement__eyebrow,
.work__count,
.allies__label,
.cta__eyebrow,
.footer__nav a,
.footer__social a,
.footer__base,
.hero__scroll,
.reel-btn__label,
.loader__label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

/* ============================================================================
   INTRO LOADER
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-content: center; gap: 1.25rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__bar {
  width: min(60vw, 520px); height: 1px; background: var(--line); position: relative;
  overflow: hidden;
}
.loader__bar::after {
  content: ""; position: absolute; inset: 0; transform-origin: left;
  background: var(--fg); animation: load 1.4s ease forwards;
}
.loader__label { color: var(--muted); text-align: center; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--nav-solid);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.1rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand { font-size: 0.95rem; letter-spacing: 0.22em; display: inline-flex; gap: 2px; }
.nav__brand-mark { color: var(--muted); }
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.4rem); }
.nav__links a { color: var(--fg); opacity: 0.75; transition: opacity 0.2s ease; font-size: 0.85rem; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 24px; height: 1.5px; background: var(--fg); transition: transform .3s ease, opacity .3s ease; }

/* ============================================================================
   HERO
   ========================================================================== */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;          /* fill any viewport, no letterbox — responsive */
  object-position: center;
}
.hero__scrim {
  position: absolute; inset: 0;
  /* gradient keeps nav + bottom meta readable over bright frames */
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top,    rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 34%);
}
.hero__meta { position: absolute; left: var(--pad); bottom: clamp(1.5rem, 4vw, 3rem); max-width: min(92vw, 720px); }
.hero__headline {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  line-height: 1.0; letter-spacing: -0.005em;
  font-size: clamp(2rem, 5vw, 3.9rem);
  margin-bottom: 0.9rem;
}
.hero__meta-title { letter-spacing: 0.2em; }
.hero__meta-sub { margin-top: 0.35rem; }
.hero__scroll {
  position: absolute; right: var(--pad); bottom: clamp(1.5rem, 4vw, 3rem);
  color: var(--muted); animation: nudge 2s ease-in-out infinite;
}
@keyframes nudge { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }

/* Play Reel button — centered, glassy ring */
.reel-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.4rem; cursor: pointer;
  color: var(--fg); background: rgba(0,0,0,0.18);
  border: 1px solid rgba(223,224,203,0.55); border-radius: 999px;
  backdrop-filter: blur(4px);
  transition: background 0.25s ease, transform 0.25s ease, border-color .25s ease;
}
.reel-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: translate(-50%, -50%) scale(1.04); }
.reel-btn__icon { display: inline-grid; place-content: center; }

/* ============================================================================
   SHARED SECTION RHYTHM
   ========================================================================== */
section { padding-left: var(--pad); padding-right: var(--pad); }
.statement, .work, .allies, .cta { max-width: var(--maxw); margin: 0 auto; }

/* Scroll-reveal helper (JS adds .is-in) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---- Intro statement ---- */
.statement { padding-top: clamp(5rem, 14vw, 10rem); padding-bottom: clamp(4rem, 10vw, 8rem); }
.statement__eyebrow { color: var(--muted); }
.statement__headline {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 8vw, 7rem);
  margin: 1.5rem 0;
}
.statement__body { max-width: 46ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.statement__lead { color: var(--fg); font-weight: 500; }

/* ============================================================================
   SELECTED WORK GRID
   ========================================================================== */
.work { padding-bottom: clamp(4rem, 10vw, 8rem); }
.work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.work__title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; line-height: 0.9; font-size: clamp(2rem, 6vw, 4.5rem); }
.work__count { color: var(--muted); }

/* Single vertical column: one project per row, full width. Because each tile
   is large, usually only one is on screen at a time — and the JS plays only
   the most-visible one, so the viewer watches them one at a time. */
.grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 1100px;   /* keep the cinematic column from getting too tall */
  margin: 0 auto;
}

.tile {
  position: relative; overflow: hidden; background: #0a0a08;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  cursor: default;
}
.tile--clickable { cursor: pointer; }
.tile__media { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile__media video { width: 100%; height: 100%; object-fit: cover; }
/* Video is always visible (its poster attribute shows the still until the
   first frame plays) — exactly like the hero. No hover scale/zoom. */

.tile__overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
}
.tile__top { display: flex; justify-content: flex-end; align-items: flex-start; }
.tile__index { font-family: var(--font-mono); font-size: .62rem; color: var(--muted); }

/* Centered "Watch More" play button — the click affordance on clickable tiles.
   pointer-events:none so the click passes through to the tile itself. */
.tile__cta {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  border: 1px solid rgba(223, 224, 203, .65); background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(4px);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em;
  font-size: .7rem; color: var(--fg); white-space: nowrap;
  pointer-events: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.tile__cta-icon { display: inline-grid; place-content: center; }
/* Fill on hover (desktop) so it reads clearly as a button */
.tile--clickable:hover .tile__cta,
.tile--clickable:focus-visible .tile__cta { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tile--clickable:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.tile__title { font-family: var(--font-display); text-transform: uppercase; font-weight: 500; font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1; }
.tile__cat { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-top: .35rem; }

/* Testimonial rendered under a project tile */
.quote { max-width: 820px; margin: 0; padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 clamp(0.5rem, 1.5vw, 1rem); }
.quote__label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: var(--muted); margin-bottom: 1.1rem; }
.quote__text { margin: 0; color: var(--fg); font-weight: 300; font-size: clamp(1.05rem, 1.7vw, 1.4rem); line-height: 1.55; }
.quote__author {
  margin-top: 1.35rem; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: .12em; font-size: .85rem; color: var(--fg);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem;
}
/* (attribution dash removed) */
.quote__role { color: var(--muted); }

/* ============================================================================
   ALLIES / LOGO MARQUEE
   ========================================================================== */
.allies { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.allies__label { color: var(--muted); text-align: center; padding-bottom: 2.5rem; }
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.75rem 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 4rem; width: max-content; animation: scroll-x 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1.2rem, 2.2vw, 1.9rem); color: var(--muted); white-space: nowrap; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================================
   PHOTO GRID (3-across still gallery)
   ========================================================================== */
.gallery { max-width: var(--maxw); margin: 0 auto; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.5rem, 1.2vw, 1rem); }
.gallery__item { margin: 0; overflow: hidden; aspect-ratio: 1280 / 534; background: #0a0a08; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.gallery__item:hover img { transform: scale(1.04); }
@media (max-width: 720px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================================
   PROCESS / THE PLAN
   ========================================================================== */
.process { max-width: var(--maxw); margin: 0 auto; padding-top: clamp(4rem, 10vw, 8rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.process__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.process__label { color: var(--muted); }
.process__title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; line-height: 0.9; font-size: clamp(2rem, 6vw, 4.5rem); }
.process__steps {
  list-style: none; padding: 0; margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem);
  counter-reset: step;
}
.process__step { display: flex; flex-direction: column; gap: 0.85rem; }
.process__num { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--muted); }
.process__step-title { font-family: var(--font-display); text-transform: uppercase; font-weight: 500; letter-spacing: 0.01em; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.05; }
.process__step-body { color: var(--muted); font-size: clamp(0.95rem, 1.2vw, 1.05rem); max-width: 34ch; }
.process__step { padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ============================================================================
   CTA
   ========================================================================== */
.cta { text-align: center; padding-top: clamp(5rem, 12vw, 9rem); padding-bottom: clamp(5rem, 12vw, 9rem); }
.cta__eyebrow { color: var(--muted); }
.cta__headline { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: 0.9; font-size: clamp(3rem, 13vw, 10rem); margin: 1rem 0 1.5rem; }
.cta__sub { color: var(--muted); max-width: 48ch; margin: 0 auto 2.5rem; font-size: clamp(1rem, 1.4vw, 1.15rem); }
.cta__btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  padding: 1rem 1.8rem; border: 1px solid var(--fg); border-radius: 999px;
  transition: background .25s ease, color .25s ease;
}
.cta__btn:hover { background: var(--fg); color: var(--bg); }

/* ============================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 1.5rem; }
.footer__grid { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; }
.footer__logo { font-family: var(--font-mono); letter-spacing: .18em; font-size: 1rem; }
.footer__tag { margin-top: .5rem; font-size: .8rem; }
.footer__nav, .footer__social { display: flex; flex-direction: column; gap: .6rem; }
.footer__nav a, .footer__social a { opacity: .8; transition: opacity .2s ease; }
.footer__nav a:hover, .footer__social a:hover { opacity: 1; }
.footer__base { max-width: var(--maxw); margin: 3rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; }

/* ============================================================================
   MODAL (Play Reel)
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(6px); animation: fade .3s ease; }
.modal__frame { position: relative; width: min(92vw, 1200px); aspect-ratio: 16/9; z-index: 1; animation: pop .35s cubic-bezier(.2,.8,.2,1); }
.modal__video { width: 100%; height: 100%; background: #000; object-fit: contain; border: 0; display: block; }
.modal__close { position: absolute; top: -2.5rem; right: 0; background: none; border: 0; color: var(--fg); font-size: 1.25rem; cursor: pointer; font-family: var(--font-mono); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .nav__links { position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); flex-direction: column; justify-content: center; gap: 1.5rem; padding: var(--pad); background: var(--nav-solid); backdrop-filter: blur(12px); transform: translateX(100%); transition: transform .35s ease; }
  .nav__links a { font-size: 1rem; }
  .nav.is-open .nav__links { transform: translateX(0); }
  .nav__toggle { display: flex; z-index: 101; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }

  /* Work tiles are already a single column; give them a taller crop on phones */
  .tile { aspect-ratio: 16 / 11; }

  /* Process steps stack into one column */
  .process__steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* On narrow phones the scroll cue collides with the hero meta line — hide it */
  .hero__scroll { display: none; }
}

/* ============================================================================
   MOTION / DATA PREFERENCES
   If the user prefers reduced motion, we stop autoplay + marquee + reveals and
   just show the posters. script.js reads the same query to skip video autoplay.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .hero__scroll { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .loader { display: none; }
}
