/* ---------------------------------------------------------
   Pitch Studios: base styles
   Single page, showreel-led. Edit colours/type below.
--------------------------------------------------------- */

:root {
  --black: #0b0b0c;
  --white: #f7f6f3;

  /* Page tones below the reel. Warm off-white, taken from the Elevenv
     reference Rich liked (their body is rgb 240,236,232). */
  --page-bg: #f0ece8;
  --page-text: #14130f;
  --page-muted: #4a4742;
  --page-faint: #bcb6ae;   /* unlit words in the scroll reveal */
  --page-line: rgba(20, 19, 15, 0.14);

  /* Rich, 10 Nov: logo up ~10% on phones, ~150% on desktop (read as 150% of
     the old 30px; 30 x 1.5 = 45). Phones: 30 x 1.1 = 33. */
  --nav-height: 80px;
  --logo-height: 45px;

  /* Rich asked for Helvetica "only if possible". Helvetica Neue Light is on
     every Mac and iPhone; elsewhere this falls back to Arial. No webfont, as
     Helvetica is licensed. */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: var(--font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.1;
  margin: 0 0 0.6em;
}

/* ---------- NAV ----------
   Fixed. Slides away on scroll down and back on scroll up (Elevenv does the
   same, 0.6s ease-in-out). The logo is never recoloured and only reads on
   dark, so once past the reel the bar goes solid near-black. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 100;
  background: transparent;
  transition: transform 0.6s ease-in-out, background-color 0.3s ease;
}

.nav--solid { background: rgba(11, 11, 12, 0.94); }
.nav--hidden { transform: translateY(-100%); }

/* Logo stays on the left at every size, links to the right. */
.nav__logo {
  flex: none;
  z-index: 2;
}
.nav__logo img {
  height: var(--logo-height);
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 36px;
}

.nav__links a {
  position: relative;
  color: var(--white);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: auto;
  position: relative;
  cursor: pointer;
  z-index: 3;
}
.nav__burger span {
  display: block;
  position: absolute;
  left: 6px; right: 6px;
  height: 1px;
  background: var(--white);
  transition: transform 0.35s ease, top 0.35s ease;
}
.nav__burger span:nth-child(1) { top: 13px; }
.nav__burger span:nth-child(2) { top: 22px; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { top: 17px; transform: rotate(-45deg); }

/* ---------- HERO ----------
   Full screen on every device and orientation: no band above or below. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}

.hero__video {
  position: absolute;
  inset: 0;
  background-color: var(--black);
  background-size: cover;
  background-position: center;
}

/* Cover-crop the 16:9 player to whatever shape the screen is. */
.hero__video iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw;
  height: 56.25vw;      /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh;  /* 16:9 */
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Poster (set via JS from Vimeo's own thumbnail) shows through until
   playback actually starts, so there's no black flash while it loads. */
.hero__video.is-playing iframe { opacity: 1; }

/* Short gradient at the top only, so the nav stays readable on a bright
   frame. A full-height scrim was rejected as a "smoky filter". */
.hero__overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 130px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.18) 60%, rgba(0,0,0,0) 100%);
}

.hero__controls {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 3;
  display: flex;
  gap: 12px;
}

.hero__control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.35);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero__control:hover {
  background: rgba(0,0,0,0.55);
  border-color: rgba(255,255,255,0.8);
}
.hero__control .icon { width: 20px; height: 20px; }

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 20px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 12px;
}
.hero__scroll span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 6px;
  background: var(--white);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s infinite ease;
}
@keyframes scrollDot {
  0% { top: 6px; opacity: 1; }
  70% { top: 18px; opacity: 0; }
  100% { top: 18px; opacity: 0; }
}

/* Loading spinner: shown while the player starts and whenever it re-buffers. */
.hero__spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  z-index: 3;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  animation: heroSpin 0.9s linear infinite;
}
.hero__spinner.is-active { opacity: 1; }
@keyframes heroSpin { to { transform: rotate(360deg); } }

/* ---------- ABOUT + SERVICES ---------- */
.about {
  padding: 128px 28px 144px;
}

/* Single centred column (Rich, 10 Nov: studio photo out, all text centred). */
.about__grid {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

/* One line at every width: the size follows the viewport so it never wraps. */
.about h2 {
  font-size: clamp(22px, 6.6vw, 58px);
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-bottom: 0.9em;
}

.reveal p {
  font-size: clamp(20px, 1.9vw, 25px);
  line-height: 1.45;
  margin: 0 0 1.1em;
  color: var(--page-text);
}

/* Font transition, Elevenv style: with JS on, each word starts pale and
   inks in as the copy scrolls up the screen. Without JS (or with reduced
   motion) the rules below never apply and the text is simply solid. */
.js-reveal .reveal .w {
  color: var(--page-faint);
  transition: color 0.6s ease;
}
.js-reveal .reveal .w.is-lit { color: var(--page-text); }

.services { margin-top: 88px; }

.services h3 {
  font-size: clamp(26px, 3vw, 38px);
  margin-bottom: 0.8em;
}

.services ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--page-line);
}
.services li {
  font-size: clamp(19px, 1.8vw, 24px);
  padding: 22px 0;
  border-bottom: 1px solid var(--page-line);
}

/* ---------- CONTACT ---------- */
.contact {
  padding: 112px 28px 120px;
  text-align: center;
  background: #060606;
  color: var(--white);
}

.contact__inner { max-width: 880px; margin: 0 auto; }

.contact h2 { font-size: clamp(34px, 4.4vw, 58px); }

.contact__lead {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: rgba(247,246,243,0.75);
  max-width: 24em;
  margin: 0 auto 40px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.contact__link {
  font-size: clamp(22px, 2.6vw, 32px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.contact__link:hover { border-color: currentColor; }

/* The drawing's own ground is rgb(6,6,6), so Contact and the footer use
   exactly that and the image sits in the page with no visible box. */
.contact__art {
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 72px auto 0;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(247,246,243,0.45);
  background: #060606;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer p { margin: 0; }
.footer a { text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .about { padding: 88px 24px 96px; }
  .services { margin-top: 64px; }
  .contact { padding: 80px 24px 88px; }
}

@media (max-width: 767px) {
  .nav { padding: 0 20px; }

  :root { --nav-height: 64px; --logo-height: 33px; }

  .nav__burger { display: block; }

  /* Menu: slides a full-height off-white panel in under the bar, with the
     links stepping in one after another. */
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    width: auto;
    background: var(--page-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 32px 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
  }
  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.45s ease;
  }
  .nav__links a:nth-child(2) { margin-right: 0; }
  .nav__links a {
    color: var(--page-text);
    font-size: clamp(34px, 11vw, 52px);
    font-weight: 300;
    letter-spacing: -0.01em;
    text-transform: none;
    padding: 12px 0;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .nav__links a::after { display: none; }
  .nav__links.is-open a { opacity: 1; transform: none; }
  .nav__links.is-open a:nth-child(1) { transition-delay: 0.10s; }
  .nav__links.is-open a:nth-child(2) { transition-delay: 0.17s; }
  .nav__links.is-open a:nth-child(3) { transition-delay: 0.24s; }
  .nav__links.is-open a:nth-child(4) { transition-delay: 0.31s; }

  .hero__controls { bottom: 20px; right: 20px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav, .nav__links, .nav__links a, .services li { transition: none; }
}
