/* ============================================================
   YESTE - cinematic production studio
   Dark theme lock · single orange accent · PP Radio Grotesk
   Radius scale: media/tiles 18px · cards 16px · buttons pill · inputs 12px
   ============================================================ */

@font-face {
  font-family: "Radio Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/PPRadioGrotesk-Regular.woff2") format("woff2");
}

:root {
  --bg:        #0E0E0F;
  --bg-2:      #131315;
  --surface:   #1A1A1D;
  --surface-2: #222226;
  --line:      rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text:      #F4F2EE;
  --muted:     #9C9CA1;
  --muted-2:   #6A6A6F;

  --accent:      #FF5A1E;
  --accent-2:    #FF8A3D;
  --accent-deep: #E83A0A;
  --grad: linear-gradient(100deg, #FF3D00 0%, #FF8A3D 100%);

  --r-tile: 18px;
  --r-card: 16px;
  --r-pill: 999px;
  --r-input: 12px;

  --shell: 1500px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Radio Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #0E0E0F; }

.shell {
  width: min(92%, var(--shell));
  margin-inline: auto;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============================================================
   Reveal animation (driven by IntersectionObserver)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14, 14, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo img { width: 92px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 38px;
  font-size: 15px;
}
.nav__links a { color: var(--muted); transition: color 0.25s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.nav__cta:hover { border-color: transparent; background: var(--accent); color: #0E0E0F !important; }
.nav__cta .arrow { transition: transform 0.3s var(--ease); }
.nav__cta:hover .arrow { transform: translate(2px, -2px); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile[hidden] { display: none; }
.nav__mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4% 22px;
  background: rgba(14, 14, 15, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__mobile a {
  font-size: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 64px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease, transform 7s ease;
  transform: scale(1.06);
  filter: brightness(0.6) saturate(0.92);
}
.hero__frame.is-active { opacity: 1; transform: scale(1.14); }
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(14,14,15,0.62) 32%, rgba(14,14,15,0.5) 66%, rgba(14,14,15,0.72) 100%),
    linear-gradient(to right, rgba(14,14,15,0.9) 0%, rgba(14,14,15,0.55) 42%, rgba(14,14,15,0.2) 100%),
    radial-gradient(120% 90% at 12% 88%, rgba(255, 61, 0, 0.14), transparent 55%);
}

.hero__inner { position: relative; z-index: 2; }
.hero__eyebrow {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero__sub {
  margin-top: 26px;
  max-width: 52ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted);
}
.hero__actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@keyframes slide { to { transform: translateX(-50%); } }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--primary { background: var(--accent); color: #0E0E0F; }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }

/* ============================================================
   Section primitives
   ============================================================ */
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  max-width: 20ch;
}
.section-title--center { text-align: center; max-width: none; }

/* ============================================================
   ABOUT / STATS
   ============================================================ */
.about { padding: clamp(90px, 13vh, 170px) 0 clamp(60px, 8vh, 110px); }
.about__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: end;
}
.about__text {
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  max-width: 56ch;
}
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.stat {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 24px;
}
.stat:last-child { border-bottom: 1px solid var(--line); }
.stat__num {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  color: var(--muted);
  font-size: 1rem;
  max-width: 26ch;
  justify-self: end;
  text-align: right;
}

/* ============================================================
   SERVICES - bento (5 cells)
   ============================================================ */
.services { padding: clamp(70px, 9vh, 130px) 0; }
.services .section-title { margin-bottom: clamp(34px, 5vw, 60px); }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 16px;
}
.cell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.cell:hover { border-color: rgba(255, 138, 61, 0.5); transform: translateY(-4px); }
.cell--lg { grid-column: span 1; grid-row: span 2; }
.cell__media {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  transform: scale(1.04);
  transition: transform 0.8s var(--ease), opacity 0.4s;
}
.cell:hover .cell__media { transform: scale(1.1); opacity: 0.55; }
.cell:has(.cell__media)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,14,15,0.95) 8%, rgba(14,14,15,0.35) 65%, rgba(14,14,15,0.15));
}
.cell__body { position: relative; z-index: 2; padding: 26px; }
.cell__body h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.01em;
  margin: 8px 0 10px;
}
.cell__body p { color: var(--muted); font-size: 0.98rem; max-width: 36ch; }

/* ============================================================
   WORK - filterable grid
   ============================================================ */
.work { padding: clamp(70px, 9vh, 130px) 0; }
.work__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 50px);
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--text); color: #0E0E0F; border-color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(180px, 16.5vw, 234px);
  gap: 16px;
}
.tile {
  position: relative;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: transform 0.45s var(--ease), opacity 0.45s, border-color 0.3s;
}
/* featured projects span two columns, same row height (wider, not taller) */
.tile--wide { grid-column: span 2; }
/* when a category filter is active, collapse to a uniform grid so no gaps appear */
.grid--filtered .tile--wide { grid-column: span 1; }
.tile__img { position: absolute; inset: 0; }
.tile__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s;
  filter: saturate(0.92) brightness(0.82);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,14,15,0.92) 4%, rgba(14,14,15,0.1) 50%, transparent);
  z-index: 1;
}
.tile:hover { border-color: rgba(255, 138, 61, 0.5); }
.tile:hover .tile__img img { transform: scale(1.06); filter: saturate(1.05) brightness(0.95); }
.tile__meta {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  padding: 22px;
}
.tile__cat {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.tile__meta h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  max-width: 24ch;
}
.tile--wide .tile__meta { padding: 26px; }
.tile--wide .tile__meta h3 { font-size: clamp(1.3rem, 1.9vw, 1.75rem); max-width: 32ch; }
.tile__play {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 2;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s, background 0.3s;
}
.tile__play svg { width: 18px; height: 18px; fill: var(--text); transition: fill 0.3s; margin-left: 2px; }
.tile:hover .tile__play { opacity: 1; transform: scale(1); background: var(--accent); border-color: transparent; }
.tile:hover .tile__play svg { fill: #0E0E0F; }

/* filtering states */
.tile.hide {
  display: none;
}

/* ============================================================
   CLIENTS marquee
   ============================================================ */
.clients { padding: clamp(70px, 9vh, 120px) 0; }
.clients .section-title { margin-bottom: clamp(36px, 5vw, 60px); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  animation: slide 40s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.logo {
  flex-shrink: 0;
  width: 188px; height: 116px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s;
}
.logo img {
  max-width: 56%;
  max-height: 46%;
  opacity: 0.78;
  filter: grayscale(1) brightness(1.6);
  transition: opacity 0.3s, filter 0.3s;
}
.logo:hover { border-color: rgba(255,138,61,0.45); }
.logo:hover img { opacity: 1; filter: grayscale(0) brightness(1); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: clamp(80px, 11vh, 160px) 0 clamp(70px, 9vh, 120px); }
.contact__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.contact__title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.contact__sub {
  margin-top: 24px;
  color: var(--muted);
  max-width: 44ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
}
.contact__links { display: flex; flex-direction: column; }
.contact__row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px 6px;
  border-top: 1px solid var(--line);
  transition: padding 0.3s var(--ease), color 0.3s;
}
.contact__links .contact__row:last-child { border-bottom: 1px solid var(--line); }
.contact__row:hover { padding-left: 18px; }
.contact__k { color: var(--muted-2); font-size: 14px; letter-spacing: 0.04em; }
.contact__v { font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
.contact__row .arrow {
  color: var(--muted-2);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.contact__row:hover .arrow { color: var(--accent); transform: translate(3px, -3px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 42px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo img { width: 96px; }
.footer__copy { color: var(--muted-2); font-size: 14px; text-align: right; line-height: 1.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell--lg { grid-row: span 2; }
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(170px, 26vw, 220px); }
  .tile--wide { grid-column: span 1; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .hero { padding-bottom: 40px; }
  .hero__title { font-size: clamp(2.1rem, 9vw, 3.2rem); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }

  .about__inner { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .stat { grid-template-columns: 1fr; gap: 6px; }
  .stat__label { justify-self: start; text-align: left; }

  .bento { grid-template-columns: 1fr; }
  .cell--lg { grid-row: span 1; }
  .cell { min-height: 180px; }

  .grid { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .tile--wide { grid-column: span 1; }
  .tile--wide .tile__meta { padding: 22px; }
  .tile__play { opacity: 1; transform: scale(1); }

  .work__head { align-items: flex-start; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; }

  .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .contact__row { grid-template-columns: 90px 1fr auto; gap: 12px; padding: 20px 4px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__copy { text-align: left; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__frame { transition: opacity 0.4s ease; transform: none; }
  .hero__frame.is-active { transform: none; }
  .marquee__track { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.15s !important; }
}
