/* ============================================================
   NSL MEDIA — PORTFOLIO STYLESHEET
   Built mobile-first: base rules target small screens, then
   @media (min-width: ...) blocks layer on tablet/desktop styles.
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   Edit colors, fonts, and spacing here — everything else in
   this file references these variables, so a single change
   here updates the whole site.
   ------------------------------------------------------------ */
:root{
  /* Palette — charcoal-first dark theme, warm white text, with the
     olive accent pulled from the NSL Media logo badge. This keeps
     the page from cutting to a stark white right after the dark
     hero video — everything stays in the same tonal family. */
  --bg: #14130F;            /* primary background — near-black charcoal */
  --bg-alt: #201F1A;        /* slightly lighter charcoal, for alternating sections */
  --ink: #F7F5F2;           /* warm white — primary text */
  --ink-soft: #C9C3B4;      /* warm light gray — body copy */
  --ink-faint: #8C877C;     /* muted warm gray — captions, secondary labels */
  --line: #3A362E;          /* hairline dividers, visible on dark backgrounds */
  --stone: #A79E8E;         /* soft gray-earth accent */
  --olive: #8FA06A;         /* brand accent, sampled from the NSL Media logo (brightened slightly for legibility on dark backgrounds) */
  --olive-dark: #7E8959;    /* deeper olive, for accents on lighter surfaces */
  --film-dark: #0F0E0B;     /* deepest tone — footer, hero backdrop, overlays */
  --film-dark-soft: #1A1913;

  /* Typography */
  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Spacing — margin/gutter grow with viewport via clamp(), so
     there's no separate mobile/desktop spacing scale to maintain. */
  --margin: clamp(20px, 6vw, 96px);
  --gutter: clamp(14px, 2.4vw, 32px);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
h1, h2, h3, p{ margin: 0; }
ul{ list-style: none; margin: 0; padding: 0; }

/* Respect users who've asked for reduced motion at the OS level */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible{
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.wrap{
  max-width: 1600px;
  margin: 0 auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

/* Small reusable text styles */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.btn-ghost{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn-ghost:hover{ opacity: 0.6; transform: translateY(-1px); }

/* Fade/reveal-on-scroll utility — toggled by JS (see js/main.js) */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: none; }
.reveal-delay-1{ transition-delay: .08s; }
.reveal-delay-2{ transition-delay: .16s; }
.reveal-delay-3{ transition-delay: .24s; }

/* ------------------------------------------------------------
   3. NAVIGATION
   Mobile-first: logo + hamburger toggle by default.
   Full inline link row appears from tablet width up.
   ------------------------------------------------------------ */
.scroll-progress{
  /* Thin bar across the very top of the viewport that fills as
     the visitor scrolls — the site's one signature flourish,
     a nod to a film timeline. Driven by JS. */
  position: fixed;
  top: 0; left: 0; height: 2px;
  background: var(--ink);
  z-index: 101;
  width: 0%;
  transition: width .1s linear;
}

header.site-nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #F7F5F2;
  /* mix-blend-mode makes light text/UI auto-invert to stay legible
     over both light and dark sections of the page as you scroll */
  mix-blend-mode: difference;
}

.nav-logo{
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img{
  /* NSL Media badge — has its own transparent background, so it
     is placed directly (no blend-mode tricks needed on the image
     itself; only the surrounding UI uses mix-blend-mode). */
  height: 40px;
  width: 40px;
  object-fit: contain;
}

/* Hamburger toggle — visible by default (mobile-first) */
.nav-toggle{
  background: none;
  border: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span{
  width: 22px; height: 1px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav panel — full-screen overlay, hidden until toggled */
.nav-links{
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--film-dark);
  color: #F5F2EC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.nav-links.is-open{ opacity: 1; pointer-events: auto; }
.nav-links a{
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-timecode{
  /* Hidden on the smallest screens to keep the mobile nav bar
     uncluttered; reappears at tablet width (see media query below) */
  display: none;
}

/* ------------------------------------------------------------
   TABLET UP (≥ 700px): inline nav links replace the hamburger
   ------------------------------------------------------------ */
@media (min-width: 700px){
  .nav-toggle{ display: none; }
  .nav-links{
    position: static;
    background: none;
    flex-direction: row;
    gap: 32px;
    opacity: 1;
    pointer-events: auto;
    color: inherit;
  }
  .nav-links a{ font-size: 11px; opacity: 0.85; transition: opacity .3s; }
  .nav-links a:hover{ opacity: 1; }
  .nav-timecode{
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    opacity: 0.85;
    min-width: 92px;
    text-align: right;
  }
}

/* ------------------------------------------------------------
   4. HERO
   Full-viewport video section. Mobile gets a shorter viewport
   height (100svh handles mobile browser chrome correctly) and
   smaller type; desktop scales up via clamp() + media queries.
   ------------------------------------------------------------ */
.hero{
  position: relative;
  height: 100svh;
  min-height: 480px;
  width: 100%;
  overflow: hidden;
  /* Gradient fallback shown instantly, before/without video,
     so there is never a blank flash on slow connections */
  background:
    radial-gradient(120% 90% at 30% 20%, #2b281f 0%, transparent 60%),
    linear-gradient(160deg, #1d1c17 0%, #14130f 55%, #0f0e0b 100%);
}

.hero video{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.72;
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns{
  0%{ transform: scale(1.0); }
  100%{ transform: scale(1.06); }
}

.hero::after{
  /* Extremely subtle film grain texture, generated inline via SVG
     turbulence — no image file needed for this. */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero::before{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,14,11,0.35) 0%, rgba(15,14,11,0.15) 40%, rgba(15,14,11,0.55) 100%);
  z-index: 1;
}

.hero-content{
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 var(--margin);
  color: #F7F5F2;
}
.hero-mark{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #C9C3B4;
  margin-bottom: 20px;
  opacity: 0.9;
}
.hero-headline{
  /* clamp(min, preferred, max) means one rule scales smoothly
     across every screen size — no separate mobile/desktop font sizes */
  font-size: clamp(30px, 8vw, 88px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.hero-headline em{ font-style: italic; font-weight: 300; }
.hero-sub{
  margin-top: 18px;
  font-size: clamp(13px, 1.2vw, 17px);
  color: #D8D3C4;
  max-width: 42ch;
  font-weight: 300;
}
.hero-cta{ margin-top: 32px; color: #F7F5F2; }

.scroll-cue{
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #EDEAE1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0.8;
}
.scroll-cue .line{
  width: 1px; height: 30px; background: currentColor; opacity: .6;
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue{
  0%{ transform: scaleY(0); opacity: 0; }
  40%{ transform: scaleY(1); opacity: .7; }
  100%{ transform: scaleY(1); opacity: 0; }
}

@media (min-width: 700px){
  .hero-cta{ margin-top: 44px; }
  .hero-sub{ margin-top: 22px; }
  .scroll-cue{ bottom: 34px; }
  .scroll-cue .line{ height: 36px; }
}

/* ------------------------------------------------------------
   5. SECTION SCAFFOLDING
   Shared shell for every section below the hero. Individual
   sections (Featured Films, Categories, About, Contact) will
   be built out one at a time — for now these are placeholder
   stubs so navigation + scroll flow already work end to end.
   ------------------------------------------------------------ */
section{ padding: clamp(64px, 12vw, 170px) 0; }

.section-head{
  display: flex; flex-direction: column;
  gap: 16px; margin-bottom: clamp(36px, 6vw, 90px);
}
.section-head h2{
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 300;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.section-head .section-note{
  max-width: 34ch;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 300;
}
@media (min-width: 900px){
  .section-head{
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
  }
}

.placeholder-block{
  border: 1px dashed var(--line);
  border-radius: 2px;
  padding: clamp(40px, 8vw, 90px) clamp(20px, 4vw, 40px);
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   6. PORTFOLIO CATEGORIES
   Mobile-first: tabs scroll horizontally if they overflow, grid
   is single-column. From tablet width up, grid becomes 2 then
   3 columns. Video categories (Weddings/Music/Events/Commercial)
   open the shared lightbox on click; Photography tiles are plain
   — no click behavior, no play icon — since they're stills, not
   clips. That difference is just: photography tiles have no
   data-video attribute and no tabindex/role="button".
   ------------------------------------------------------------ */
.cat-tabs{
  display: flex;
  gap: clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar{ display: none; }

.cat-tab{
  background: none; border: none;
  padding: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  position: relative;
  white-space: nowrap;
  transition: color .3s;
}
.cat-tab::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.cat-tab[aria-selected="true"]{ color: var(--ink); }
.cat-tab[aria-selected="true"]::after{ transform: scaleX(1); }

.cat-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}

.cat-item{
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--stone);
}
.cat-item.is-video{ cursor: pointer; }

.cat-item .thumb{
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1s var(--ease);
  filter: saturate(0.92);
}
.cat-item.is-video:hover .thumb,
.cat-item.is-video:focus-visible .thumb{ transform: scale(1.05); }

.cat-item .cat-item-meta{
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(15,14,11,0.7));
  color: #F5F2EC;
}
.cat-item .cat-item-meta .tag{
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #C9C3B4;
}
.cat-item .cat-item-meta h4{
  font-weight: 400;
  font-size: 15px;
  margin-top: 4px;
}

/* Small play affordance, video categories only */
.cat-item .cat-play-dot{
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(247, 245, 242, 0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.85);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cat-item.is-video:hover .cat-play-dot,
.cat-item.is-video:focus-visible .cat-play-dot{ opacity: 1; transform: none; }
.cat-item .cat-play-dot svg{ width: 9px; height: 9px; }

.cat-item[hidden]{ display: none; }

.thumb-replace-label--small{
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.65);
  border: 1px dashed rgba(245, 242, 236, 0.35);
  padding: 4px 7px;
  border-radius: 2px;
  pointer-events: none;
}

@media (min-width: 600px){
  .cat-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px){
  .cat-grid{ grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------
   7. ABOUT
   Mobile-first: portrait stacks above the text, full width.
   From tablet width up, they sit side by side — portrait on
   one side, copy on the other, per the brief. Uses --bg-alt so
   it reads as a distinct "room" from the sections around it.
   ------------------------------------------------------------ */
.about{ background: var(--bg-alt); }

.about-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 6vw, 60px);
  align-items: center;
}

.about-portrait{
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(150deg, #3a352b, #1c1a15);
  border: 1px dashed var(--line);
}
.about-portrait img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.about-portrait .thumb-replace-label{
  /* Reuses the same dashed placeholder-label style as Featured
     Films — delete this <span> once a real photo is in place. */
  position: absolute; top: 16px; left: 16px;
}

.about-copy .eyebrow{ margin-bottom: 18px; }
.about-copy h2{
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.about-copy p{
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 15.5px;
  font-weight: 300;
  max-width: 56ch;
}

/* Optional stats row — delete the whole .about-stats block in
   index.html if you'd rather not include numbers. */
.about-stats{
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 36px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.about-stats div strong{ display: block; font-size: 22px; font-weight: 400; }
.about-stats div span{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (min-width: 800px){
  .about-grid{
    grid-template-columns: 0.85fr 1.15fr;
  }
}

/* ------------------------------------------------------------
   8. CONTACT
   Mobile-first: intro text stacks above the form, full width.
   From tablet width up, they sit side by side.
   ------------------------------------------------------------ */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 6vw, 80px);
}
@media (min-width: 800px){
  .contact-grid{ grid-template-columns: 1fr 1fr; }
}

.contact-intro h2{
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 300;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.contact-intro p{
  margin-top: 18px;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 42ch;
}
.contact-links{
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-links a{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  width: fit-content;
  transition: border-color 0.3s, color 0.3s;
}
.contact-links a:hover{
  border-color: var(--ink);
  color: var(--olive);
}

.contact-form{ width: 100%; }
.form-field{ margin-bottom: 24px; }
.form-field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea{
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-family: var(--font-display);
  font-size: 16px; /* 16px avoids iOS Safari auto-zoom on focus */
  color: var(--ink);
  transition: border-color 0.3s;
}
.form-field input:focus,
.form-field textarea:focus{
  outline: none;
  border-color: var(--ink);
}
.form-field textarea{
  resize: vertical;
  min-height: 90px;
}

/* Honeypot field — invisible to real visitors, catches simple bots */
.hp{
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-submit{ margin-top: 4px; }
#formStatus{
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  min-height: 1em; /* reserves space so the layout doesn't jump when a message appears */
}

/* ------------------------------------------------------------
   9. VIDEO LIGHTBOX
   Reused by Featured Films and Portfolio Categories alike.
   Opens full-screen when a Featured Film card or a video
   category tile is clicked. If the referenced video file
   doesn't exist yet (still a placeholder project), it shows a
   friendly message instead of a broken player — see js/main.js.
   ------------------------------------------------------------ */
.lightbox{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 14, 11, 0.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
  padding: var(--margin);
}
.lightbox.is-open{ opacity: 1; pointer-events: auto; }
.lightbox-inner{
  width: 100%; max-width: 1100px;
  aspect-ratio: 16/9;
  position: relative;
}
.lightbox-inner video,
.lightbox-inner iframe{
  width: 100%; height: 100%;
  background: #000;
  border: 0;
  display: none; /* JS sets display:block on whichever one is playing */
}
.lightbox-close{
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: #F5F2EC;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.lightbox-fallback{
  position: absolute; inset: 0;
  display: none; /* toggled on by JS if the video file 404s */
  flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: var(--film-dark-soft);
  color: #C9C3B4;
  padding: 40px;
}
.lightbox-fallback.is-visible{ display: flex; }
.lightbox-fallback p{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  max-width: 42ch;
}
.lightbox-fallback code{
  color: #F5F2EC;
  font-size: 11px;
}

/* ------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------ */
footer{
  background: var(--film-dark);
  color: #C9C3B4;
  padding: 40px var(--margin) 28px;
  border-top: 1px solid var(--line);
}
.footer-row{
  display: flex; flex-direction: column;
  gap: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
}
.footer-row a{ color: #F5F2EC; }
.footer-links{ display: flex; gap: 20px; flex-wrap: wrap; }

@media (min-width: 700px){
  .footer-row{
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
