/* ============================================================
   ZRP STUDIOS — Zach Purnell portfolio
   style.css  (all visual styling lives here)
   You will rarely need to touch this file. To add a video,
   edit the VIDEO LIST near the top of index.html instead.
   ============================================================ */

:root {
  --bg:        #000000;   /* page background        */
  --bg-2:      #161618;   /* cards / form fields    */
  --bg-3:      #1f1f22;   /* hover / borders        */
  --text:      #f2f2f0;   /* main text              */
  --muted:     #a7a7a3;   /* secondary text         */
  --accent:    #2C819B;   /* teal accent            */
  --accent-hi: #3aa0bd;   /* lighter teal on hover  */
  --line:      #2a2a2e;   /* hairline borders       */
  --maxw:      1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,14,15,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 68px;
}
.logo {
  position: absolute;
  left: 24px;            /* match the menu's right-edge padding (.wrap padding) */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.logo.visible {
  opacity: 1;
  pointer-events: auto;
}
/* Menu sits right when the logo is showing; glides to center when it fades. */
nav {
  transition: transform 0.8s ease;
  transform: translateX(var(--nav-center, 0px));
}
nav.sliding {
  filter: url(#nav-motion-blur);
}
.logo.visible ~ nav {
  transform: translateX(0);
}
.logo img {
  height: 36px;
  width: auto;
  display: block;
}
.logo span { color: var(--accent); }
nav ul { display: flex; gap: 30px; list-style: none; }
nav a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
nav a:hover { color: var(--text); }

/* ---- Hamburger (shown only when the menu would otherwise overlap the logo) ---- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;   /* keep it on the right when shown */
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Collapsed mode: hamburger replaces the inline menu. */
body.nav-collapsed .nav-toggle { display: flex; }
body.nav-collapsed nav {
  position: absolute;
  top: 100%;
  right: 0;
  transform: none !important;     /* cancel the center-slide while collapsed */
  filter: none !important;
  background: rgba(14,14,15,0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  min-width: 180px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}
body.nav-collapsed nav ul {
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
}
body.nav-collapsed nav li { width: 100%; }
body.nav-collapsed nav a {
  display: block;
  padding: 12px 22px;
}
/* Open state */
body.nav-collapsed.nav-open nav {
  max-height: 60vh;
  opacity: 1;
  pointer-events: auto;
}
body.nav-collapsed.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-collapsed.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-collapsed.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 64px 24px 64px;
}

/* ===== Intro animation — single timeline keyed to page load (t = 0) =====
   t0.0s            logo begins its grow-from-center -> settle move (1.4s)
   t0.4s            nav fades in   (early in the slide)
   t0.65s           hero-name fades in
   t0.9s            hero-callout fades in
   t1.1s            portfolio reveals line by line from here    */

/* Hidden initial state — present even before JS so there's no flash.
   Start blurred; the blur clears as the opacity fade completes. */
body.intro .nav,
body.intro .hero-name,
body.intro .hero-callout,
body.intro .intro-line {
  opacity: 0;
  filter: blur(8px);
}

/* Respect reduced-motion: skip the move/stagger, show everything immediately. */
@media (prefers-reduced-motion: reduce) {
  body.intro .nav,
  body.intro .hero-name,
  body.intro .hero-callout,
  body.intro .intro-line { opacity: 1; filter: none; }
  body.intro .hero-logo { animation: none; }
}

/* Logo move: 1.4s settle, no hold. */
body.intro .hero-logo {
  animation: heroIntro 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.intro .hero-logo.logo-blurring {
  filter: url(#logo-motion-blur);
}
@keyframes heroIntro {
  0%   { transform: translateY(38vh) scale(2); opacity: 0.5; }
  100% { transform: translateY(0) scale(1);   opacity: 1; }
}

/* Fade-in transitions + staggered delays, triggered when .intro-play is set.
   Blur and opacity share the same duration/delay so the blur reaches 0 exactly
   when the fade completes. */
.nav, .hero-name, .hero-callout { transition: opacity 1.094s ease, filter 1.094s ease; }
.intro-line { opacity: 0; filter: blur(8px); transition: opacity 0.938s ease, filter 0.938s ease; }

body.intro-play .nav          { opacity: 1; filter: blur(0); transition-delay: 0.4s;  }
body.intro-play .hero-name    { opacity: 1; filter: blur(0); transition-delay: 0.65s; }
body.intro-play .hero-callout { opacity: 1; filter: blur(0); transition-delay: 0.9s;  }
/* Portfolio reveals line by line starting at t1.1s.
   Each .intro-line gets an inline --line-delay from JS. */
body.intro-play .intro-line {
  opacity: 1;
  filter: blur(0);
  transition-delay: calc(1.1s + var(--line-delay, 0s));
}
/* Video tiles used as intro lines: also clear their start transform, and use the
   intro line timing instead of the scroll-reveal timing. */
body.intro-play .vid.intro-line {
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 0.938s ease, transform 0.938s ease, filter 0.938s ease;
  transition-delay: calc(1.1s + var(--line-delay, 0s));
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.hero-logo {
  margin: 0 auto;
  line-height: 0;
  transform-origin: center center;
}
.hero-logo img {
  width: min(420px, 72vw);
  height: auto;
  display: block;
  margin: 0 auto;
}
.hero .hero-name {
  margin-top: 18px;
  color: var(--accent);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 1.04rem;
}
.hero p.hero-callout {
  margin: 22px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
.section-title {
  font-size: 1.014rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 500;
  text-align: center;
  margin-bottom: 44px;
}

/* ---------- Video gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0 18px;
}
.vid {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.vid.revealed {
  opacity: 1;
  transform: translateY(0);
}
.vid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5625s ease, opacity 0.375s ease;
}
.vid:hover img { transform: scale(1.03); }
.vid .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 55%);
}
.vid .title { font-size: 0.85rem; font-weight: 500; line-height: 1.3; }
.vid .dur {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text);
}
.vid .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(44,129,155,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3125s ease, transform 0.3125s ease;
}
.vid:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: playPulse 3s ease-in-out infinite; }
.vid .play::after {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

/* ---------- Modal player ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-box { width: min(960px, 100%); }
.modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.modal-frame iframe { width: 100%; height: 100%; border: 0; }
.modal-close {
  display: block;
  margin: 0 0 12px auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-yt {
  display: block;
  margin: 14px auto 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.modal-yt:hover { color: var(--accent-hi); }

/* ---------- Bio ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: center;
}
.bio-text p { margin-bottom: 16px; color: var(--muted); }
.bio-text p strong { color: var(--text); font-weight: 500; }
.bio-text .greeting {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 20px;
}
.bio-text .ig { color: var(--accent); font-weight: 500; }
/* Selfie / portrait beside the text */
.bio-portrait img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  aspect-ratio: 3 / 4;
}
/* Two horizontal shots, side by side and full-bleed below the text + portrait.
   Side padding + gap match the gallery so they line up at full window size. */
.bio-shoots {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 18px;
}
.bio-shoots img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}
@media (min-width: 1119px) {
  .bio-shoots { padding: 0 clamp(18px, 24.4vw - 255px, 160px); }
}
/* Scroll-reveal fade for the three bio images (same feel as the gallery videos). */
.bio-portrait img,
.bio-shoots img {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.bio-portrait img.revealed,
.bio-shoots img.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Stack the two shoots once a stacked photo would render ~850px wide, matching
   the ~859px each photo gets side by side at full width. */
@media (max-width: 886px) {
  .bio-shoots { grid-template-columns: 1fr; }
}

/* ---------- Contact form ---------- */
#contact { background: rgba(14,14,15,0.82); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.form {
  max-width: 640px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 130px; resize: vertical; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 13px 38px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}
.btn:hover { background: var(--accent-hi); }
.btn:disabled { opacity: 0.6; cursor: default; }

.form-status {
  margin: 16px 0 0;
  font-size: 0.92rem;
  min-height: 1.2em;
}
.form-status.ok  { color: var(--accent-hi); }
.form-status.err { color: #e06b6b; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 48px 24px;
}
.socials { display: flex; gap: 18px; justify-content: center; margin-bottom: 20px; }
.socials a {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: all 0.2s ease;
}
.socials a:hover { color: var(--text); border-color: var(--accent); background: var(--bg-2); }
.socials svg { width: 18px; height: 18px; }
footer .copy { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.05em; }

/* ============================================================
   Haley + Josh page  (haley-josh.html)
   ============================================================ */

/* Page-load intro:
   - banner fades in first, slowly (1.4s, like the home page's hero-logo move)
   - then nav / title / subtitle fade+blur in with the home page's stagger
   - the films, credit and footer follow just after. No movement. */
body.hj-intro > * {
  opacity: 0;
  filter: blur(8px);
}
/* Banner: slow fade only (no blur, mirrors the logo move duration). */
body.hj-intro .hj-banner {
  filter: none;
  transition: opacity 1.4s ease;
}
/* Everything else: blur + fade, started after the banner is underway. */
body.hj-intro .nav,
body.hj-intro .hj-credit,
body.hj-intro footer {
  transition: opacity 1.094s ease, filter 1.094s ease;
}
/* The films container isn't faded by the intro — all three photos handle their
   own scroll-reveal (see .hj-film.scroll-reveal below). */
body.hj-intro .hj-films { opacity: 1; filter: none; }

body.hj-intro.hj-intro-play > * { opacity: 1; filter: blur(0); }
body.hj-intro.hj-intro-play .hj-banner { transition-delay: 0s;   }
body.hj-intro.hj-intro-play .nav       { transition-delay: 0.4s;  }
/* .hj-head holds both the title (Mount Rainier) and subtitle (date); fade the
   two child lines separately so they match hero-name / hero-callout timing. */
body.hj-intro .hj-head { opacity: 1; filter: none; }      /* container stays put */
body.hj-intro .hj-head > * { opacity: 0; filter: blur(8px); transition: opacity 1.094s ease, filter 1.094s ease; }
body.hj-intro.hj-intro-play .hj-head > *:nth-child(1) { opacity: 1; filter: blur(0); transition-delay: 0.65s; }
body.hj-intro.hj-intro-play .hj-head > *:nth-child(2) { opacity: 1; filter: blur(0); transition-delay: 0.9s;  }
body.hj-intro.hj-intro-play .hj-credit { transition-delay: 1.1s; }
body.hj-intro.hj-intro-play footer     { transition-delay: 1.1s; }

@media (prefers-reduced-motion: reduce) {
  body.hj-intro > *,
  body.hj-intro .hj-head > * { opacity: 1; filter: none; }
}

/* First film photo: scroll-reveal fade in/out (same as the gallery videos). */
.hj-film.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.hj-film.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hj-banner {
  width: 100%;
  margin: 0;
  padding: 0;
}
.hj-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.hj-head {
  text-align: center;
  padding: 48px 24px 8px;
}
.hj-head h1 {
  font-size: 1.014rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hj-head .where {
  margin-top: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 500;
}
.hj-films {
  width: 100%;
  margin: 0;
  padding: clamp(5px, 13.6vw, 128px);
  padding-top: 40px;   /* + .hj-head's 8px bottom = 48px, matching the banner->head gap */
  display: grid;
  gap: clamp(5px, 13.6vw, 128px);
}
.hj-film {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: 6px;
}
.hj-film img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.625s ease, opacity 0.375s ease;
}
.hj-film:hover img { transform: scale(1.02); }
.hj-film .hj-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 22px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
}
.hj-film .hj-label {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hj-film .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(44,129,155,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3125s ease, transform 0.3125s ease;
}
.hj-film:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: playPulse 3s ease-in-out infinite; }
@keyframes playPulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
}
.hj-film .play::after {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.hj-credit {
  text-align: center;
  color: var(--muted);
  padding: 20px 24px 8px;
  font-size: 0.95rem;
}
.hj-credit a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1118px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1119px) {
  .gallery { padding: 0 clamp(18px, 24.4vw - 255px, 160px); }
}
@media (max-width: 860px) {
  .bio-grid { grid-template-columns: 1fr; gap: 36px; }
  /* Stacked: shrink the portrait to roughly half width, centered. */
  .bio-portrait { padding: 0 25%; }
}
@media (max-width: 780px) {
  .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 64px 20px 48px; }
}
