/* ═══════════════════════════════════════════════════════════
   IAN MATHERS FILMS — Design System
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colours */
  --color-bg:          #FAFAF8;
  --color-bg-dark:     #111111;
  --color-text:        #111111;
  --color-text-light:  #FAFAF8;
  --color-text-muted:  #666666;
  --color-text-dim:    rgba(17, 17, 17, 0.4);
  --color-border:      rgba(17, 17, 17, 0.12);
  --color-border-med:  rgba(17, 17, 17, 0.22);
  --color-border-light:rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Layout */
  --max-width:  1200px;
  --nav-height: 72px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: var(--font-sans); cursor: pointer; }
ul { list-style: none; }

/* ═══ CURSOR GLOW ═══ */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 70, 10, 0.28) 0%, rgba(200, 55, 5, 0.12) 45%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.4s ease;
  will-change: transform;
  opacity: 0;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ═══ FILM GRAIN ═══ */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10%       { transform: translate(-2%, -3%); }
  20%       { transform: translate(3%, 2%); }
  30%       { transform: translate(-1%, 4%); }
  40%       { transform: translate(2%, -2%); }
  50%       { transform: translate(-3%, 1%); }
  60%       { transform: translate(1%, -4%); }
  70%       { transform: translate(3%, 3%); }
  80%       { transform: translate(-2%, 2%); }
  90%       { transform: translate(2%, -3%); }
}

/* ═══ UTILITY ═══ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.section__label--light {
  color: rgba(255, 255, 255, 0.45);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.28s ease;
}

.btn--dark {
  background: var(--color-text);
  color: var(--color-text-light);
}
.btn--dark:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn--light {
  background: var(--color-text-light);
  color: var(--color-bg-dark);
}
.btn--light:hover {
  background: rgba(250,250,248,0.88);
  transform: translateY(-1px);
}

.btn--full { width: 100%; text-align: center; }

/* ═══ NAV ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

/* Over hero: transparent, white text */
.nav.over-hero .nav__logo,
.nav.over-hero .nav__links a { color: rgba(255,255,255,0.9); }
.nav.over-hero .nav__cta { border-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.9); }
.nav.over-hero .nav__hamburger span { background: white; }

/* Scrolled into white page */
.nav.scrolled {
  background: rgba(250,250,248,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
}
.nav.scrolled .nav__logo,
.nav.scrolled .nav__links a { color: var(--color-text); }
.nav.scrolled .nav__cta { border-color: var(--color-border-med); color: var(--color-text); }
.nav.scrolled .nav__hamburger span { background: var(--color-text); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-decoration: none;
  transition: color 0.3s;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 0.6; }

.nav__cta {
  border: 1px solid;
  padding: 0.5rem 1.4rem;
  transition: background 0.25s, color 0.25s;
}
.nav.scrolled .nav__cta:hover {
  background: var(--color-text);
  color: var(--color-text-light);
  border-color: var(--color-text);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__mobile {
  display: none;
  background: rgba(250,250,248,0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.nav__mobile.open { max-height: 280px; }
.nav__mobile ul { padding: 1.5rem 2rem 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.nav__mobile a { font-family: var(--font-display); font-size: 1.8rem; font-weight: 300; color: var(--color-text); text-decoration: none; }
.nav__mobile a:hover { opacity: 0.6; }

/* ═══ HERO ═══ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
}

.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.2) 50%,
    rgba(0,0,0,0.75) 90%,
    rgba(0,0,0,0.95) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 2rem 6rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  animation: fadeUp 1s ease 0.3s both;
}

.hero__label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}

/* ── Hero idle overlay (press play) ── */
.hero__idle {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  cursor: pointer;
  transition: opacity 0.5s ease;
}
.hero__idle.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero__press-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.65);
  animation: fadeUp 1s ease 1.2s both;
}

.hero__big-play {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  padding-left: 5px;
  animation: fadeUp 1s ease 1.2s both;
}
.hero__big-play:hover {
  background: rgba(255,255,255,0.22);
  border-color: white;
  transform: scale(1.08);
}

/* ── Hero playing overlay (hover to pause) ── */
.hero__playing-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.hero.is-playing .hero__playing-overlay {
  pointer-events: all;
}
.hero.is-playing:hover .hero__playing-overlay {
  opacity: 1;
}

.hero__big-pause {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}
.hero__big-pause:hover {
  background: rgba(0,0,0,0.7);
  border-color: white;
}

/* ── Mute button ── */
.hero__mute-btn {
  position: absolute;
  bottom: 2.5rem;
  right: 2rem;
  z-index: 3;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}
.hero__mute-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
  color: white;
}
.hero__mute-btn.sound-on {
  border-color: rgba(255,255,255,0.6);
  color: white;
}

/* ── Scroll indicator ── */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  animation: fadeUp 1s ease 0.8s both;
}
.hero__scroll span {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.4);
}
.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ═══ ETHOS ═══ */
.ethos {
  padding: 8rem 0 6rem;
  border-bottom: 1px solid var(--color-border);
}

.ethos__headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--color-text);
  max-width: 900px;
}

/* ═══ SERVICES ═══ */
.services {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--color-border-med);
  margin-top: 0;
}

.service-card {
  padding: 3.5rem;
  border-right: 1px solid var(--color-border-med);
  transition: background 0.3s;
}
.service-card:last-child { border-right: none; }
.service-card:hover { background: rgba(17,17,17,0.02); }

.service-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* ═══ WORK ═══ */
.work {
  padding: var(--space-xl) 0 0;
  border-bottom: 1px solid var(--color-border);
}

.work__header {
  margin-bottom: 3.5rem;
}

.work__headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  max-width: 700px;
}

/* ── Scrolling photo marquee ── */
.work__marquee {
  overflow: hidden;
  background: var(--color-bg);
}

.work__marquee-track {
  display: flex;
  gap: 3px;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.work__marquee-track img {
  height: 420px;
  width: auto;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter 0.5s ease;
  display: block;
}
.work__marquee-track img:hover {
  filter: grayscale(0%);
  cursor: pointer;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══ ABOUT ═══ */
.about {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.about__inner {
  max-width: 720px;
}

.about__headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.about__copy {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}
.about__copy:last-child { margin-bottom: 0; }

/* ═══ CONTACT (dark section) ═══ */
.contact {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: var(--space-xl) 0;
}

.contact__header { margin-bottom: 4rem; }

.contact__headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

.contact__sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  line-height: 1.7;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__group label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.form__optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.6;
}

.form__group input,
.form__group textarea {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--color-text-light);
  padding: 0.9rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s;
  border-radius: 0;
  -webkit-appearance: none;
}
.form__group input::placeholder,
.form__group textarea::placeholder { color: rgba(255,255,255,0.2); }
.form__group input:focus,
.form__group textarea:focus { border-color: rgba(255,255,255,0.55); }
.form__group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
.form__group textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

/* Custom select */
.select-wrap {
  position: relative;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--color-text-light);
  padding: 0.9rem 2.5rem 0.9rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s;
  border-radius: 0;
}
.select-wrap select:focus { border-color: rgba(255,255,255,0.55); }
.select-wrap select option { background: var(--color-bg-dark); color: var(--color-text-light); }
.select-chevron {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

/* Contact details column */
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 0.5rem;
}

.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__detail-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.contact__detail a,
.contact__detail span {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.contact__detail a:hover { color: white; }

/* ═══ FOOTER ═══ */
.footer {
  background: #080808;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2.5rem 2rem;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__logo {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.35);
}

.footer__copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
}

/* ═══ KEYFRAMES ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 0.8; transform: scaleY(1.15); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Mobile hero: full 16:9 video, no cropping */
@media (max-width: 900px) {
  .hero {
    height: auto !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    margin-top: var(--nav-height);
  }
  .hero__video-wrap {
    position: absolute !important;
    inset: 0 !important;
  }
  .hero__video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: unset !important;
    min-width: unset !important;
    transform: none !important;
  }
  /* Darker overlay to suppress YouTube branding */
  .hero__overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.5) 0%,
      rgba(0,0,0,0.15) 40%,
      rgba(0,0,0,0.55) 75%,
      rgba(0,0,0,0.88) 100%
    ) !important;
  }
  /* Hide cluttered label on small video */
  .hero__content { display: none !important; }
  .hero__scroll  { display: none !important; }
  /* Compact mute button */
  .hero__mute-btn {
    bottom: 0.5rem !important;
    right: 0.5rem !important;
    font-size: 0.55rem !important;
    padding: 0.35rem 0.6rem !important;
    gap: 0.4rem !important;
  }
  /* Tighten press play UI */
  .hero__big-play { width: 64px !important; height: 64px !important; }
  .hero__press-label { font-size: 0.6rem !important; }
}

@media (max-width: 900px) {
  :root { --space-xl: 5rem; }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__mobile { display: block; }

  .services__grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; border-bottom: 1px solid var(--color-border-med); }
  .service-card:last-child { border-bottom: none; }

  .work__marquee-track img { height: 240px; }

  .contact__inner { grid-template-columns: 1fr; gap: 3rem; }
  .form__row { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  :root { --space-xl: 4rem; }
  .ethos__headline { font-size: 2rem; }
  .contact__headline { font-size: 2.4rem; }
  .service-card { padding: 2.25rem 1.75rem; }
  .container { padding: 0 1.25rem; }
  .nav__inner { padding: 0 1.25rem; }

}
