:root {
  --bg: #0b0c0e;
  --text: #f2f0ea;
  --text-dim: #d50000;
  --accent: #f2f0ea;
  --line: rgba(242, 240, 234, 0.14);

  --font-display: 'neue-haas-grotesk-display', sans-serif;
  --font-body: 'neue-haas-grotesk-display', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-nav-title: 'neue-haas-grotesk-display', sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.tc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11,12,14,0.75) 0%, rgba(11,12,14,0.15) 22%, rgba(11,12,14,0.05) 55%, rgba(11,12,14,0.9) 100%);
}

.hero-overlay {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Center play button, shown only while the video is paused */
.play-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(11, 12, 14, 0.45);
  backdrop-filter: blur(6px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}

.play-toggle:hover,
.play-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.play-toggle .icon-play {
  width: 26px;
  height: 26px;
  margin-left: 3px; /* optical centering for the play triangle */
}

.play-toggle[data-hidden="true"] {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  border-bottom: 1px solid rgba(242, 240, 234, 0.12);
  padding: 28px 32px;
}

.site-mark {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--text-dim);
  font-family: var(--font-nav-title);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: 32px;
  bottom: 28px;
  width: 1px;
  height: 46px;
  background: var(--line);
  display: block;
}

.scroll-cue span {
  position: absolute;
  top: 0;
  left: -1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
  0% { top: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 42px; opacity: 0; }
}

/* ---------- ABOUT ---------- */

.about {
  padding: 120px 32px;
  border-bottom: 1px solid var(--line);
}

.about-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.eyebrow {
  display: block;
  margin-bottom: 40px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-right: 10px;
  vertical-align: middle;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #17181a;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-text p {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-family: var(--font-nav-title);
  font-weight: 700;
  color: var(--text);
  max-width: 42ch;
}

.about-text p + p { margin-top: 20px; }

/* ---------- INNER PAGES ---------- */

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  border-bottom: 1px solid var(--line);
}

.page-main {
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
  padding: 120px 0;
  flex: 1;
}

.reel-main,
.commercials-main,
.tv-film-main,
.contact-page-main {
  padding-top: 80px;
}

.reel-main {
  width: 100%;
}

.reel-main .page-heading {
  width: calc(100vw - 64px);
  max-width: none;
  margin-left: calc((100% - (100vw - 64px)) / 2);
}

.page-heading {
  max-width: 720px;
  margin-bottom: 72px;
}

.page-heading h1 {
  margin-top: 18px;
  font-family: var(--font-nav-title);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  font-style: normal;
  line-height: 0.98;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work-item {
  min-height: 240px;
  padding: 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.work-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  margin: 28px 0;
  overflow: hidden;
  background: #17181a;
}

.work-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.work-thumb:hover img,
.work-thumb:focus-visible img { opacity: 0.72; transform: scale(1.02); }

.play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(242, 240, 234, 0.72);
  border-radius: 50%;
  background: rgba(11, 12, 14, 0.62);
  transform: translate(-50%, -50%);
}

.play-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 52%;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--text);
  transform: translate(-50%, -50%);
}

.video-modal[hidden] { display: none; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 32px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 16px;
}

.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:hover,
.video-modal-close:focus-visible { color: var(--accent); border-color: var(--accent); }

.video-frame {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.work-item h2 {
  font-family: var(--font-nav-title);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
}

.work-item p { color: var(--text); }

.work-item .tc { color: var(--accent); }

.portfolio-grid {
  display: grid;
  width: calc(100vw - 64px);
  margin-left: calc((100% - (100vw - 64px)) / 2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  align-items: start;
}

.tv-film-main .page-heading {
  width: calc(100vw - 64px);
  max-width: none;
  margin-left: calc((100% - (100vw - 64px)) / 2);
}

.commercials-main .page-heading,
.commercials-main .work-list {
  width: calc(100vw - 64px);
  margin-left: calc((100% - (100vw - 64px)) / 2);
}

.commercials-main .page-heading { max-width: none; }

.portfolio-item {
  margin: 0;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
}

.portfolio-item:nth-child(9) { grid-column: span 2; }

.portfolio-placeholder {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text-dim);
}

.portfolio-item:nth-child(2) .portfolio-placeholder,
.portfolio-item:nth-child(5) .portfolio-placeholder { min-height: 360px; }

.portfolio-item:nth-child(3) .portfolio-placeholder,
.portfolio-item:nth-child(6) .portfolio-placeholder { min-height: 300px; }

.portfolio-placeholder .tc { color: var(--accent); }

.contact-page-grid {
  display: grid;
  position: relative;
  width: min(900px, calc(100vw - 64px));
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  grid-template-areas:
    "photo heading"
    "photo links";
  gap: 48px;
  align-items: start;
}

.contact-photo {
  grid-area: photo;
  width: 100%;
  min-width: 0;
  max-width: 380px;
  margin-top: 22px;
  justify-self: center;
}

.contact-page-heading {
  grid-area: heading;
  z-index: 1;
}

.contact-page-heading .eyebrow {
  position: absolute;
  top: -28px;
  left: calc(16px - (100vw - 900px) / 2);
}

.contact-page-heading .page-heading {
  margin-bottom: 0;
}

.contact-page-heading h1 {
  margin-top: 18px;
}

.contact-page-heading h1 span {
  display: block;
}

.contact-page-heading h1 span:last-child {
  margin-left: 250px;
}

.contact-page-grid > .contact-links {
  grid-area: links;
  width: 100%;
  align-self: center;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-left: 0;
  margin-top: 34px;
  transform: translateY(20px);
}

.contact-page-grid > .contact-links a {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
}

.contact-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.reel-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  margin-left: 0;
  overflow: hidden;
  background: #000;
}

.reel-stage .hero-video,
.reel-stage .hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

.reel-stage .hero-video { object-fit: cover; }

.reel-stage .hero-overlay { object-fit: contain; }

.reel-stage .play-toggle {
  top: 50%;
  left: 50%;
}

.icon-pause { display: none; }

.play-toggle[data-state="playing"] .icon-play { display: none; }

.play-toggle[data-state="playing"] .icon-pause { display: block; }

/* ---------- CONTACT ---------- */

.contact {
  padding: 100px 32px 40px;
}

.contact-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.contact-main {
  font-family: var(--font-nav-title);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-main:hover,
.contact-main:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-links {
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 24px;
}

.contact-links a {
  font-family: var(--font-nav-title);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--text-dim);
}

.contact-bottom {
  margin: 64px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  color: var(--text);
}

/* ---------- FOCUS STATES ---------- */

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-image { aspect-ratio: 16 / 10; }
  .about, .contact { padding-left: 20px; padding-right: 20px; }
  .hero-top { padding-left: 20px; padding-right: 20px; }
  .site-nav { gap: 14px; }
  .page-main { width: min(100% - 40px, 1080px); padding: 80px 0; }
  .reel-main,
  .commercials-main,
  .tv-film-main {
    padding-top: 56px;
  }
  .reel-main { width: 100%; }
  .reel-main .page-heading {
    width: calc(100vw - 40px);
    margin-left: 0;
  }
  .page-heading { margin-bottom: 48px; }
  .work-list, .contact-page-grid { grid-template-columns: 1fr; }
  .contact-page-grid {
    gap: 24px;
    grid-template-areas:
      "heading"
      "photo"
      "links";
  }
  .portfolio-grid {
    width: calc(100vw - 40px);
    margin-left: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 20px;
  }
  .tv-film-main .page-heading {
    width: calc(100vw - 40px);
    margin-left: 0;
  }
  .commercials-main .page-heading,
  .commercials-main .work-list {
    width: calc(100vw - 40px);
    margin-left: 0;
  }
  .portfolio-item,
  .portfolio-item:nth-child(n) {
    grid-column: auto;
    margin-top: 0;
  }
  .portfolio-placeholder,
  .portfolio-item:nth-child(n) .portfolio-placeholder { min-height: 260px; }
  .work-item { min-height: 200px; }
  .reel-stage { width: 100%; height: 100vh; margin-left: 0; }
  .contact-page-grid { width: 100%; margin-left: 0; }
  .contact-page-heading h1 { margin-top: 36px; }
  .contact-page-heading h1 span:last-child { margin-left: 0; }
  .contact-page-grid .page-heading { margin-bottom: 36px; margin-left: 0; }
  .contact-page-heading .eyebrow { position: static; }
  .contact-photo { margin-top: 0; transform: none; }
  .contact-page-grid > .contact-links { margin-left: 0; margin-top: 0; transform: none; }
  .contact-links { flex-wrap: wrap; }
  .contact-main { overflow-wrap: anywhere; }
  .contact-main { border-bottom: none; }
}
