/* Josh Pugach — portfolio */
:root {
  --bg: #0E0F0E;
  --surface: #161816;
  --surface-2: #1E211E;
  --text: #F2EEE6;
  --muted: #9C9A92;
  --accent: #F2A65A;
  --accent-rgb: 242, 166, 90;
  --accent-2: #7FC8C2;
  --line: #2A2D2A;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Inter Tight", "Geist", system-ui, sans-serif;
  --tshadow: 0 1px 2px rgba(5,5,10,.9), 0 3px 12px rgba(5,5,10,.6), 0 10px 44px rgba(5,5,10,.6);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1; margin: 0; letter-spacing: -.035em; }
h2 { font-size: clamp(2.1rem, 4.8vw, 3.9rem); }
h3 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.1rem; font-weight: 500;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, color .3s;
  text-shadow: none; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #1a1208; }
.btn--primary:hover { transform: translateY(-2px); background: #f6b678; }
.btn--ghost { border-color: rgba(242,238,230,.4); color: var(--text); background: rgba(14,15,14,.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--text); transform: translateY(-2px); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter); transition: background-color .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(14,15,14,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-color: var(--line); }
.nav__mark { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; text-shadow: var(--tshadow); min-height: 44px; display: inline-flex; align-items: center; }
.nav.is-solid .nav__mark { text-shadow: none; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav__links a:not(.btn) { text-decoration: none; font-size: .92rem; color: rgba(242,238,230,.86); text-shadow: var(--tshadow); position: relative; padding: 6px 0; }
.nav.is-solid .nav__links a:not(.btn) { text-shadow: none; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__call { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 48px; height: 48px; padding: 0 12px; background: rgba(14,15,14,.4); border: 1px solid rgba(242,238,230,.2);
    border-radius: 999px; cursor: pointer; z-index: 2; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .nav__toggle span { display: block; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: rgba(14,15,14,.97); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a:not(.btn) { font-family: var(--font-head); font-weight: 600; letter-spacing: -.03em; font-size: 2rem; text-shadow: none; }
  .nav__call { min-height: 52px; font-size: 1rem; padding: 0 26px; margin-top: 10px; }
}

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(72px, 12vh, 120px); isolation: isolate; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; background: #0b0c0b url("assets/img/posters/hero.jpg") center / cover no-repeat; }
.hero__video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero__video.is-ready { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,9,8,.55) 0%, rgba(8,9,8,0) 22%),
    linear-gradient(0deg, rgba(8,9,8,.88) 0%, rgba(8,9,8,.35) 38%, rgba(8,9,8,0) 62%),
    radial-gradient(70% 60% at 18% 82%, rgba(8,9,8,.45), rgba(8,9,8,0) 70%);
}
.hero__copy { position: relative; max-width: 900px; text-shadow: var(--tshadow); }
.hero__copy .eyebrow { color: rgba(242,238,230,.82); }
.hero__title { font-size: clamp(3.4rem, 11vw, 9.5rem); line-height: .9; letter-spacing: -.055em; margin-left: -.04em; }
.hero__lede { font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -.01em; margin: .9em 0 1.6em; color: rgba(242,238,230,.9); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  .hero { padding-bottom: 56px; }
  .hero__ctas .btn { flex: 1 1 auto; }
}
@media (max-aspect-ratio: 10/13) {
  .hero__media { background-image: url("assets/img/posters/hero-portrait.jpg"); }
}

/* Trust line */
.clients { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px var(--gutter); }
.clients__row {
  max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  font-family: var(--font-head); font-weight: 500; letter-spacing: -.025em; font-size: clamp(1.1rem, 2.2vw, 1.7rem); color: rgba(242,238,230,.9);
}
.clients__row i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 640px) { .clients__row { justify-content: center; } }

/* Sections */
section { scroll-margin-top: 70px; }
.work, .film, .services, .about, .contact { padding: clamp(80px, 12vw, 150px) var(--gutter); }
.work > *, .film > *, .services > *, .contact > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head__note { margin: 0; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  cursor: pointer; font-size: .92rem; color: rgba(242,238,230,.8); transition: border-color .3s, background-color .3s, color .3s;
}
.chip span { color: var(--muted); font-size: .8em; margin-left: 4px; }
.chip:hover { border-color: rgba(242,238,230,.4); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.is-active span { color: rgba(14,15,14,.6); }

/* Gallery (masonry by columns) */
.gallery { columns: 3 320px; column-gap: 14px; }
.shot {
  position: relative; display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: var(--surface);
  break-inside: avoid; cursor: zoom-in; overflow: hidden; border-radius: 4px;
  opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.shot.in { opacity: 1; transform: none; }
.shot.is-hidden { display: none; }
.shot img { width: 100%; height: auto; transition: transform 1.2s var(--ease), filter .6s; }
.shot:hover img { transform: scale(1.035); }
.shot::before, .shot::after {
  content: ""; position: absolute; width: 22px; height: 22px; z-index: 2; pointer-events: none;
  border: 0 solid var(--text); opacity: 0; transition: opacity .35s, transform .45s var(--ease);
}
.shot::before { top: 12px; left: 12px; border-top-width: 1.5px; border-left-width: 1.5px; transform: translate(6px, 6px); }
.shot::after { bottom: 12px; right: 12px; border-bottom-width: 1.5px; border-right-width: 1.5px; transform: translate(-6px, -6px); }
.shot:hover::before, .shot:hover::after, .shot:focus-visible::before, .shot:focus-visible::after { opacity: .95; transform: none; }
@media (max-width: 700px) { .gallery { columns: 2; column-gap: 8px; } .shot { margin-bottom: 8px; } }

/* Film */
.film { background: var(--surface); }
.reels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.reel { grid-column: span 4; position: relative; display: block; padding: 0; border: 0; background: #000; cursor: pointer; text-align: left; border-radius: 4px; overflow: hidden; height: clamp(240px, 30vw, 460px); }
.reel--feature { grid-column: span 12; height: auto; aspect-ratio: 21 / 9; }
.reel--wide { grid-column: span 8; }
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel img { transition: transform 1.2s var(--ease), opacity .5s; }
.reel video { opacity: 0; transition: opacity .5s; }
.reel.is-playing video { opacity: 1; }
.reel:hover img { transform: scale(1.03); }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,6,5,.82) 0%, rgba(5,6,5,0) 55%); pointer-events: none; }
.reel__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(14px, 2vw, 26px); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.reel__title { font-family: var(--font-head); font-weight: 600; letter-spacing: -.025em; font-size: clamp(1.15rem, 1.9vw, 1.6rem); line-height: 1.1; display: block; }
.reel--feature .reel__title { font-size: clamp(1.5rem, 3.2vw, 2.7rem); letter-spacing: -.035em; }
.reel__meta { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(242,238,230,.75); margin-top: 6px; }
.reel__play {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(242,238,230,.75); display: grid; place-items: center;
  transition: background-color .3s, border-color .3s, transform .3s var(--ease);
}
.reel__play::before { content: ""; border-left: 13px solid var(--text); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.reel:hover .reel__play { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.reel:hover .reel__play::before { border-left-color: #1a1208; }
@media (max-width: 900px) { .reel, .reel--wide { grid-column: span 6; height: auto; aspect-ratio: 4 / 3; } .reel--feature { grid-column: span 12; aspect-ratio: 16 / 9; } }
@media (max-width: 600px) { .reels { gap: 10px; } .reel, .reel--wide, .reel--feature { grid-column: span 12; height: auto; aspect-ratio: 16 / 10; } }

/* Services */
.services__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 28px); }
.service { display: flex; flex-direction: column; }
.service__img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--surface); }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.service:hover .service__img img { transform: scale(1.05); }
.service__body { padding-top: 20px; border-top: 1px solid var(--line); margin-top: 20px; }
.service h3 { margin-bottom: 10px; }
.service p { color: rgba(242,238,230,.74); font-size: .96rem; margin: 0; }
@media (max-width: 1000px) { .services__list { grid-template-columns: repeat(2, 1fr); row-gap: 48px; } }
@media (max-width: 560px) { .services__list { grid-template-columns: 1fr; } .service__img { aspect-ratio: 16 / 11; } }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.about__img { margin: 0; overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 5; }
.about__img img { width: 100%; height: 100%; object-fit: cover; animation: drift 22s ease-in-out -6s infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
.about__copy h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); margin-bottom: 28px; }
.about__copy p { color: rgba(242,238,230,.8); font-size: 1.06rem; max-width: 46ch; }
.link-arrow { display: inline-flex; gap: 10px; align-items: center; margin-top: 10px; min-height: 44px; color: var(--accent); text-decoration: none; font-weight: 500; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about__img { aspect-ratio: 16 / 11; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); border-top: 1px solid var(--line); }
.contact > * { margin: 0; }
.contact__lead h2 { margin-bottom: 30px; }
.contact__phone { display: inline-block; font-family: var(--font-head); font-weight: 600; letter-spacing: -.045em; font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: 1; text-decoration: none; color: var(--accent); transition: opacity .3s; }
.contact__phone:hover { opacity: .85; }
.contact__phone, .contact__email { padding: 6px 0; width: fit-content; }
.contact__phone { display: block !important; }
.contact__email { display: flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: 1.05rem; color: rgba(242,238,230,.85); text-decoration-color: var(--line); text-underline-offset: 5px; word-break: break-all; }
.socials { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; transition: border-color .3s, background-color .3s; }
.socials a:hover { border-color: var(--text); background: var(--surface-2); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 3vw, 36px); align-self: start; }
.form__row { margin-bottom: 18px; }
.form label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; transition: border-color .3s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #e0715b; }
.form__submit { width: 100%; margin-top: 6px; }
.form__error { color: #f0907d; font-size: .9rem; margin: 12px 0 0; }
.form__success { padding: 8px 0 0; }
.form__success h3 { font-size: 1.6rem; margin-bottom: 12px; color: var(--accent); }
.form__success p { color: rgba(242,238,230,.8); }
.form.is-sent .form__row, .form.is-sent .form__submit { display: none; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.footer { padding: 56px var(--gutter) 40px; border-top: 1px solid var(--line); text-align: center; }
.footer__mark { font-family: var(--font-head); font-weight: 600; letter-spacing: -.05em; font-size: clamp(2.4rem, 6.4vw, 4.6rem); text-decoration: none; display: inline-block; margin-bottom: 10px; }
.footer__small { font-size: .82rem; margin: 0; }

/* Lightbox + player */
.lightbox, .player {
  position: fixed; inset: 0; z-index: 80; background: rgba(6,7,6,.96); display: flex; align-items: center; justify-content: center;
  padding: 64px clamp(8px, 5vw, 90px); opacity: 0; transition: opacity .3s;
}
.lightbox.is-open, .player.is-open { opacity: 1; }
.lightbox[hidden], .player[hidden] { display: none; }
.lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lb__fig img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 2px; transition: opacity .25s; }
.lb__fig img.is-loading { opacity: .35; }
.lb__fig figcaption, .player__cap { display: flex; gap: 14px; justify-content: space-between; width: 100%; margin-top: 14px; font-size: .9rem; color: rgba(242,238,230,.86); }
.lb__close { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; }
.lb__close:hover { border-color: var(--text); }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(22,24,22,.8); font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 2; }
.lb__nav:hover { border-color: var(--text); }
.lb__prev { left: clamp(8px, 2vw, 24px); } .lb__next { right: clamp(8px, 2vw, 24px); }
@media (max-width: 700px) { .lb__nav { top: auto; bottom: 14px; transform: none; } .lightbox { padding-bottom: 84px; } }
.player__wrap { width: min(1400px, 100%); }
.player video { width: 100%; max-height: calc(100vh - 160px); max-height: calc(100svh - 160px); background: #000; border-radius: 4px; }

/* Entrances */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .no-js .shot { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .shot { opacity: 1; transform: none; }
}
