/* ==========================================================================
   PRESTON SCHEEL — PORTFOLIO
   ========================================================================== */

:root {
  --bg: #0e0d0c;
  --bg-2: #161514;
  --ink: #f2efe9;
  --muted: #969086;
  --line: rgba(242, 239, 233, 0.14);
  --accent: #2e5fd9;
  --font: "Archivo", system-ui, -apple-system, sans-serif;
  --display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }
html:has(.lightbox.open) { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad);
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled {
  background: rgba(14, 13, 12, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand img { height: 32px; width: auto; transition: transform 0.4s; }
.brand:hover img { transform: rotate(-6deg); }

.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.nav a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }
.nav .cta {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 9px 20px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav .cta::after { display: none; }
.nav .cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* mobile nav */
.nav-toggle { display: none; z-index: 110; }
.nav-toggle span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  margin: 6px 0; transition: transform 0.3s, opacity 0.3s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: rgba(14, 13, 12, 0.97);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  body.nav-open .nav { opacity: 1; pointer-events: auto; }
  .nav a { font-size: 22px; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  padding: calc(var(--header-h) + 24px) var(--pad) 0;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(14,13,12,0.35) 45%, rgba(14,13,12,0.55) 100%);
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(18%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(56px, 13.5vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow: hidden;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; will-change: transform; }
.hero-title .accent-dot { color: var(--accent); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta .scroll-hint { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .scroll-hint::after {
  content: "↓";
  color: var(--accent);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(4px); } }

/* ----------------------------------------------------------------- marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 14px 0;
  background: var(--bg);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  padding-right: 48px;
  animation: marquee 26s linear infinite;
  will-change: transform;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee span {
  font-family: var(--display);
  font-size: clamp(16px, 2.2vw, 26px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.marquee span b { color: var(--ink); font-weight: inherit; }
.marquee span i { color: var(--accent); font-style: normal; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(64px, 9vw, 130px) var(--pad); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 84px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.section-head h2 em { font-style: normal; color: var(--accent); }
.section-head .count {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----------------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(24px, 3vw, 40px); }
.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* -------------------------------------------------------------------- grid */
.grid-group { margin-bottom: clamp(40px, 6vw, 72px); }
.grid-group:last-child { margin-bottom: 0; }
.grid-cat-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 32px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.grid-cat-heading .n {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.grid { columns: 3 320px; column-gap: 18px; }
.grid figure {
  break-inside: avoid;
  margin: 0 0 18px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
  cursor: zoom-in;
}
.grid img {
  width: 100%;
  height: auto;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}
.grid figure:hover img { transform: scale(1.045); }
/* while the WebGL warp canvas covers a figure, the shader does the zoom */
.grid figure.warp-on img { transform: none !important; transition: none; }
.warp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.grid figcaption {
  z-index: 2;
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.grid figure:hover figcaption { opacity: 1; transform: none; }
.grid figcaption .t { font-weight: 700; font-size: 15px; }
.grid figcaption .c { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
@media (hover: none) {
  .grid figcaption { opacity: 1; transform: none; }
}

/* --------------------------------------------- collapsible sections
   Each section shows PREVIEW (4) thumbnails until "Show more" is clicked.
   The nth-child threshold below must stay PREVIEW + 1. */
.grid-group.collapsed .grid > figure:nth-child(n + 5) { display: none; }
.film-row.collapsed > .film:nth-child(n + 5) { display: none; }
.show-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.films .show-more-wrap { margin-top: 34px; }
.show-more {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.show-more:hover { color: #fff; border-color: var(--accent); background: var(--accent); }

/* ------------------------------------------------------------------- films */
.films { background: var(--bg-2); }
.film-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}
@media (max-width: 900px) {
  .film-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .film-row { grid-template-columns: 1fr; }
}
.film {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
}
.film.landscape { aspect-ratio: 16 / 9; }
.film img, .film video { width: 100%; height: 100%; object-fit: cover; }
.film iframe { width: 100%; height: 100%; border: 0; }
.film .play {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.3s;
}
.film .play:hover { background: rgba(0, 0, 0, 0.15); }
.film .play .btn-circle {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.film .play:hover .btn-circle { transform: scale(1.12); }
.film .play .btn-circle::after {
  content: "";
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.film .play .label {
  font-family: var(--display);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.film .play .sub { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.75); }

/* ------------------------------------------------------------- about teaser */
.about-teaser { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.about-teaser p {
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.about-teaser .portrait { border-radius: 6px; overflow: hidden; max-width: 420px; justify-self: end; }
.about-teaser .portrait img { transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.about-teaser .portrait:hover img { transform: scale(1.04); }
@media (max-width: 820px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser .portrait { justify-self: start; }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.link-arrow .arr { color: var(--accent); transition: transform 0.3s; }
.link-arrow:hover .arr { transform: translateX(6px); }

/* ---------------------------------------------------------------- services */
.services-list { border-top: 1px solid var(--line); }
.services-list li {
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.6vw, 30px) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 48px);
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s, padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.services-list li:hover { color: var(--ink); padding-left: 18px; }
.services-list li .idx { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; }

/* ------------------------------------------------------------------ footer */
.footer-cta {
  padding: clamp(80px, 12vw, 170px) var(--pad) clamp(40px, 5vw, 70px);
  text-align: left;
}
.footer-cta .eyebrow {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.footer-cta a.big {
  display: block;
  font-family: var(--display);
  font-size: clamp(38px, 9vw, 150px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}
.footer-cta a.big:hover { color: var(--accent); }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 26px var(--pad) 34px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-footer .socials { display: flex; gap: 22px; }
.site-footer .socials a { text-transform: uppercase; font-weight: 600; transition: color 0.25s; }
.site-footer .socials a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 9, 8, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; touch-action: none; }
.lightbox img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox .lb-caption {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.lightbox button {
  position: absolute;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px;
  color: var(--muted);
  transition: color 0.25s;
  z-index: 2;
}
.lightbox button:hover { color: var(--ink); }
.lb-close { top: 18px; right: var(--pad); }
.lb-prev { left: var(--pad); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--pad); top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lb-prev { top: auto; bottom: 60px; transform: none; }
  .lb-next { top: auto; bottom: 60px; transform: none; }
  .lightbox .lb-caption { bottom: 110px; }
}

/* ------------------------------------------------------------- inner pages */
.page-hero {
  padding: calc(var(--header-h) + clamp(48px, 8vw, 110px)) var(--pad) clamp(30px, 5vw, 60px);
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 10vw, 150px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero .sub {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.about-layout .portrait { border-radius: 6px; overflow: hidden; position: sticky; top: calc(var(--header-h) + 20px); }
.about-copy p { font-size: clamp(17px, 1.6vw, 21px); color: var(--ink); margin-bottom: 1.2em; }
.about-copy h3 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 2.2em 0 0.9em;
}
@media (max-width: 820px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-layout .portrait { position: static; max-width: 420px; }
}

/* ----------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s, transform 0.3s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.contact-card .k {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.contact-card .v { font-family: var(--display); font-size: clamp(17px, 1.8vw, 24px); word-break: break-word; }

/* --------------------------------------------------------------- reveal fx */
.reveal { opacity: 0; transform: translateY(36px); }
.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation-duration: 80s; }
  .reveal { opacity: 1; transform: none; }
}
