:root {
  --blue: #0046FF;
  --ink: #16181d;
  --paper: #f4f2ec;
  --muted: #8a8479;
  --line: #16181d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Halftone paper texture overlay */
/* Scroll-driven dim layer: darkens the page as you reach the collage */
.bg-dim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000000;
  opacity: 0;
  will-change: opacity;
}

/* Apple-style launch entrance: elements drop into place and fade in */
@keyframes fallIn {
  from { opacity: 0; transform: translateY(-32px); }
  to   { opacity: 1; transform: translateY(0); }
}
nav            { animation: fallIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.1s; }
.showreel-frame{ animation: fallIn 1s   cubic-bezier(0.2, 0.8, 0.2, 1) both 0.28s; }
.intro h2      { animation: fallIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.5s; }
.intro p       { animation: fallIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.62s; }

@media (prefers-reduced-motion: reduce) {
  nav, .showreel-frame, .intro h2, .intro p { animation: none; }
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(244, 242, 236, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(33, 29, 24, 0.15);
  z-index: 50;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
}

/* Same creep-in halftone shadow behind the nav text on hover */
.nav-links a::before,
.nav-links a::after {
  content: '';
  position: absolute;
  inset: -16px -20px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-links a::before {
  background: radial-gradient(ellipse 52% 52% at 50% 50%,
    rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.32) 48%, transparent 80%);
  filter: blur(5px);
}
.nav-links a::after {
  background-image: radial-gradient(circle, #000 1px, transparent 1.4px);
  background-size: 4px 4px;
  -webkit-mask: radial-gradient(ellipse 56% 56% at 50% 50%,
    transparent 26%, rgba(0, 0, 0, 0.9) 46%, transparent 100%);
  mask: radial-gradient(ellipse 56% 56% at 50% 50%,
    transparent 26%, rgba(0, 0, 0, 0.9) 46%, transparent 100%);
  filter: url(#roughEdge);
}
.nav-links a:hover::before,
.nav-links a:hover::after {
  opacity: 0.48;
  transform: scale(1);
}

/* Showreel hero */
.showreel {
  padding: 6rem 1.25rem 1.25rem;
  position: relative;
  z-index: 2;
}

.showreel-frame {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0046FF, #0a0a0a);
  box-shadow: 0 18px 40px rgba(33, 29, 24, 0.18);
}

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

.showreel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blue);
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.45));
}

.showreel-overlay h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  filter: url(#roughEdge);
}

.showreel-overlay p {
  margin-top: 0.75rem;
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.9;
}

/* Intro */
.intro {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 13rem 2rem 14rem;
  text-align: center;
  will-change: opacity, transform, filter;
}

.intro h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.98;
}

.intro p {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Section label above the collage */
.collage-intro {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  text-align: center;
}

.reveal-text {
  font-size: 0.95rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Word reveal scrubbed by scroll — JS sets each word's state per frame */
.reveal-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  will-change: opacity, transform, filter;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-text span { opacity: 1; transform: none; filter: none; }
}

/* Project collage */
.collage {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.tile {
  display: block;
  position: relative;
  background: transparent;
  opacity: 0;
  transform: translateY(22px);
  filter: brightness(0.18);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.8s ease, filter 1s ease;
}

.tile.in {
  opacity: 1;
  transform: translateY(0);
  filter: brightness(1);
}

.tile.in:hover {
  transform: translateY(-5px);
}

@media (prefers-reduced-motion: reduce) {
  .tile { opacity: 1; transform: none; filter: none; }
}

.tile-large { grid-column: 1 / -1; }
.tile-wide  { grid-column: 1 / -1; }
.tile-tall  { grid-row: span 1; }

.tile-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2d33, #16181d);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.3s ease;
}

/* Halftone shadow that creeps in BEHIND the video on hover:
   ::before = dark solid core, ::after = uneven halftone-dot edge */
.tile::before,
.tile::after {
  content: '';
  position: absolute;
  inset: -24px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* dark core — solid in the middle, fading out softly */
.tile::before {
  background: radial-gradient(ellipse 52% 52% at 50% 50%,
    rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.4) 48%, transparent 80%);
  filter: blur(10px);
}
/* halftone dots, masked into a soft rounded blob that feathers out
   gradually, roughened so the silhouette is uneven */
.tile::after {
  background-image: radial-gradient(circle, #000 1.9px, transparent 2.4px);
  background-size: 7px 7px;
  -webkit-mask: radial-gradient(ellipse 56% 56% at 50% 50%,
    transparent 30%, rgba(0, 0, 0, 0.9) 46%, transparent 100%);
  mask: radial-gradient(ellipse 56% 56% at 50% 50%,
    transparent 30%, rgba(0, 0, 0, 0.9) 46%, transparent 100%);
  filter: url(#roughEdge);
}
.tile.in:hover::before,
.tile.in:hover::after {
  opacity: 0.6;
  transform: scale(1);
}

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

.tile-large .tile-media { aspect-ratio: 21 / 9; }
.tile-wide .tile-media  { aspect-ratio: 21 / 9; }
.tile-tall .tile-media  { aspect-ratio: 4 / 5; }

.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 2.5rem 1.4rem 1.2rem;
  pointer-events: none;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32) 55%, rgba(0, 0, 0, 0));
}

.tile-caption h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ffffff;
}

.tile-caption p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* CTA */
.cta {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 5rem 2rem 6rem;
}

.cta h2,
.cta .btn {
  will-change: opacity, transform;
}

.cta h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.98;
  margin-bottom: 2rem;
  color: #ffffff;
}

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 70, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  background: #0038cc;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 70, 255, 0.32);
}

/* Contact page */
.contact-page {
  position: relative;
  z-index: 2;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
}

.contact-inner {
  width: 100%;
  max-width: 560px;
}

.contact-page h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.contact-lead {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.field input,
.field textarea {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(22, 24, 29, 0.22);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 70, 255, 0.14);
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.contact-alt {
  margin-top: 2rem;
  color: var(--muted);
}

.contact-alt a {
  color: var(--blue);
  font-weight: 500;
}

/* Footer */
footer {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(138, 132, 121, 0.25);
}
.footer-links {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.footer-links a:hover {
  opacity: 0.6;
}

/* Mobile */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .collage {
    grid-template-columns: 1fr;
  }
  .tile-tall .tile-media { aspect-ratio: 16 / 9; }
  .intro { padding: 8rem 1.5rem 9rem; }

  /* Full-bleed showreel on phones — reaches the screen edges */
  .showreel { padding: 4.5rem 0 0; }
  .showreel-frame {
    border-radius: 0;
    max-width: none;
    aspect-ratio: 4 / 5;
    box-shadow: none;
  }
  .project-hero, .project-body { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ---------------- Project detail pages ---------------- */
.project-page {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
}

.back-link {
  display: inline-block;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.back-link:hover { color: var(--blue); }

.project-hero {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
}

.project-hero .eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
}

.project-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin-top: 0.75rem;
}

.project-hero .meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-media {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 2rem;
}
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0a0a;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed .frame {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.project-media .frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #d4d8de, #b6bcc6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(22, 24, 29, 0.42);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.project-body {
  max-width: 740px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}
.project-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2b2f36;
  margin-bottom: 1.25rem;
}

.project-credits {
  max-width: 740px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(22, 24, 29, 0.14);
}
.project-credits dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.6rem 1rem;
  font-size: 0.9rem;
}
.project-credits dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}
.project-credits dd { margin: 0; }

.project-nav {
  max-width: 1100px;
  margin: 4rem auto 0;
  padding: 2rem;
  border-top: 1px solid rgba(22, 24, 29, 0.14);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
}
.project-nav a { color: var(--blue); }

/* ---------------- Stills gallery ---------------- */
.stills-page {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 7rem;
}

.stills-header {
  padding: 0 2rem 2.5rem;
}
.stills-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}
.stills-header p {
  margin-top: 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

.stills-grid {
  padding: 0 2rem 5rem;
  column-count: 3;
  column-gap: 1rem;
}
@media (max-width: 900px) { .stills-grid { column-count: 2; } }
@media (max-width: 560px) { .stills-grid { column-count: 1; } }

.still {
  break-inside: avoid;
  margin: 0 0 1rem;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef0f3, #cdd2da);
  border: 1px solid rgba(22, 24, 29, 0.14);
  box-shadow: 0 8px 22px rgba(22, 24, 29, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(22, 24, 29, 0.42);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.still.in { opacity: 1; transform: none; }
.still img { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) { .still { opacity: 1; transform: none; } }

/* ---------------- About page ---------------- */
.about-page {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8rem 2rem 5rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 3rem;
  align-items: center;
}
.about-portrait {
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #d4d8de, #b6bcc6);
  aspect-ratio: 4 / 5;
  box-shadow: 0 12px 30px rgba(22, 24, 29, 0.14);
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-text h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}
.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #34373d;
  margin-bottom: 1.1rem;
}
.about-text .btn {
  margin-top: 1rem;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .about-page { padding: 6.5rem 1.5rem 4rem; }
}

/* ---------------- Projects page ---------------- */
.projects-page {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 7rem;
}
.projects-header {
  padding: 0 1.25rem 2.5rem;
}
.projects-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
}
.projects-header p {
  margin-top: 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}
