/* ==========================================================================
   SPOILT: styles
   ========================================================================== */
@font-face {
  font-family: "MADE Sunflower";
  src: url("../fonts/made-sunflower.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f2ede4;          /* cream */
  --bg-2: #e9e3d8;        /* slightly darker cream for panels */
  --ink: #151311;
  --muted: #7a7368;
  --line: rgba(21, 19, 17, .14);
  --white: #fbf9f5;

  --serif: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* headings, set in bold below */
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Helvetica Neue", Helvetica, Arial, sans-serif;    /* small uppercase labels */
  --accent: "MADE Sunflower", Georgia, serif;                 /* matches the logo, used sparingly */

  --gutter: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.h2 {
  font: 700 clamp(44px, 6.4vw, 104px)/.92 var(--serif);
  letter-spacing: -.045em;
  margin: 0;
}
.count { font: 400 14px var(--mono); vertical-align: top; color: var(--muted); letter-spacing: 0; margin-left: 6px; position: relative; top: .6em; }
.section { padding: clamp(72px, 10vw, 150px) var(--gutter); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 60px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px; border-radius: 100px; white-space: nowrap;
  font: 500 15px var(--sans); letter-spacing: -.005em;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
}
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--ghost { border: 1px solid rgba(251,249,245,.5); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(251,249,245,.1); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: #2c2925; }
.btn--dark:disabled { opacity: .5; cursor: default; }
.btn__icon { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; margin-left: -12px; }
.btn__icon svg { width: 9px; height: 10px; margin-left: 2px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  color: var(--white);
  transition: transform .5s var(--ease), background .4s, padding .4s, color .4s;
}
.nav.is-scrolled, body.menu-open .nav {
  background: rgba(242,237,228,.86); color: var(--ink);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-top: 14px; padding-bottom: 14px;
}
body.menu-open .nav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { display: grid; }
.nav__logo img { grid-area: 1 / 1; height: 30px; width: auto; transition: opacity .4s; }
.nav__logo .logo-dark { opacity: 0; }
.nav.is-scrolled .logo-light, body.menu-open .logo-light { opacity: 0; }
.nav.is-scrolled .logo-dark, body.menu-open .logo-dark { opacity: 1; }
.nav__links { display: flex; gap: 34px; font-size: 15px; }
.nav__links a, .footer__links a { position: relative; }
.nav__links a::after, .footer__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav__links a:hover::after, .footer__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-size: 15px; padding: 10px 18px; border: 1px solid currentColor; border-radius: 100px; transition: background .3s, color .3s; }
.nav__cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__burger span:first-child { top: 17px; } .nav__burger span:last-child { top: 26px; }
body.menu-open .nav__burger span:first-child { top: 21px; transform: rotate(45deg); }
body.menu-open .nav__burger span:last-child { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 var(--gutter);
  clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease-io);
}
.menu a { font: 700 clamp(48px, 14vw, 88px)/1.05 var(--serif); letter-spacing: -.04em; }
body.menu-open .menu { clip-path: inset(0 0 0 0); }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 580px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; color: var(--white); background: var(--ink); }
.hero__media { position: absolute; inset: 0; }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; }
.hero__video.is-ready { opacity: 1; }
.hero__video iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: 100vw; height: 75vw;             /* 4:3 reel */
  min-height: 100%; min-width: 133.34svh;
  transform: translate(-50%, -50%);
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,8,.45) 0%, rgba(10,9,8,0) 20%),
    linear-gradient(0deg, rgba(10,9,8,.78) 0%, rgba(10,9,8,.25) 42%, rgba(10,9,8,0) 65%);
}
.hero__inner { position: relative; padding: 0 var(--gutter) clamp(40px, 7vh, 80px); }
.hero__eyebrow { color: rgba(251,249,245,.75); }
.hero__title {
  margin: 0 0 clamp(20px, 2.6vw, 36px);
  font: 700 clamp(60px, 12vw, 200px)/.88 var(--serif);
  letter-spacing: -.055em;
}
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: inline-block; transform: translateY(105%); animation: lineUp 1.1s var(--ease) forwards; }
.line:nth-child(2) > span { animation-delay: .1s; }
@keyframes lineUp { to { transform: translateY(0); } }
.reveal-load { opacity: 0; animation: fadeIn 1s var(--ease) .5s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; }
.hero__lede { max-width: 420px; margin: 0; font-size: clamp(16px, 1.3vw, 19px); color: rgba(251,249,245,.88); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- clients ---------- */
.clients { border-bottom: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.marquee { display: flex; width: max-content; max-width: none; }
.marquee__track { display: flex; align-items: center; gap: 34px; padding-right: 34px; animation: marquee 60s linear infinite; white-space: nowrap; }
.marquee__track span { font: 700 clamp(24px, 3vw, 40px)/1 var(--serif); letter-spacing: -.035em; }
.marquee__track i { font-style: normal; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 14px var(--sans); padding: 8px 16px; border-radius: 100px; border: 1px solid var(--line);
  color: var(--muted); transition: all .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: rgba(21,19,17,.4); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- work grid ----------
   Each row is a flex line. Cards grow in proportion to their video's shape,
   so every card in a row is the same height and nothing gets cropped.     */
.work__grid { display: grid; gap: clamp(32px, 3.4vw, 56px); }
.work__row { display: flex; gap: clamp(12px, 1.4vw, 22px); align-items: flex-start; }
.card { flex: var(--r) 1 0%; min-width: 0; cursor: pointer; }
.card.is-hidden { display: none; }
.card__media { position: relative; overflow: hidden; border-radius: 3px; background: var(--bg-2); aspect-ratio: var(--r); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.03); }
.card__preview { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.card__preview.is-ready { opacity: 1; }
.card__preview iframe { position: absolute; top: 50%; left: 50%; border: 0; transform: translate(-50%,-50%); }
.card__info { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; align-items: baseline; }
.card__client { font: 700 clamp(17px, 1.4vw, 21px)/1.2 var(--serif); letter-spacing: -.02em; }
.card__title { color: var(--muted); font-size: 15px; margin-top: 2px; }
.card__meta { color: var(--muted); white-space: nowrap; text-align: right; line-height: 1.7; }
.card { opacity: 0; transition: opacity .9s var(--ease); }
.card.in { opacity: 1; }

/* ---------- about ---------- */
.studio { border-top: 1px solid var(--line); }
.statement {
  margin: 0 0 clamp(56px, 7vw, 110px); max-width: 1100px;
  font: 400 clamp(26px, 3.2vw, 48px)/1.15 var(--sans); letter-spacing: -.03em;
}
.services { border-top: 1px solid var(--line); }
.service { padding: clamp(20px, 2.4vw, 32px) 0; border-bottom: 1px solid var(--line); }
.service__title { margin: 0; font: 700 clamp(24px, 2.8vw, 42px)/1.05 var(--serif); letter-spacing: -.04em; }

/* ---------- stills ---------- */
.stills { border-top: 1px solid var(--line); }
.stills__grid { columns: 4 260px; column-gap: clamp(10px, 1.2vw, 18px); }
.still {
  break-inside: avoid; margin: 0 0 clamp(10px, 1.2vw, 18px); overflow: hidden; border-radius: 3px;
  cursor: zoom-in; background: var(--bg-2);
  opacity: 0; transition: opacity .8s var(--ease);
}
.still.in { opacity: 1; }
.still.is-hidden { display: none; }
.still img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.still:hover img { transform: scale(1.03); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 120px); align-items: start; border-top: 1px solid var(--line); }
.contact__title { font: 700 clamp(48px, 6.4vw, 108px)/.92 var(--serif); letter-spacing: -.05em; margin: 0 0 24px; }
.contact__title em { font-style: normal; }

/* Accent words set in the logo's typeface */
.accent { font-family: var(--accent); font-weight: 400; font-style: normal; letter-spacing: -.02em; }
.contact__lede { color: var(--muted); max-width: 420px; font-size: 17px; margin: 0 0 36px; }
.contact__details { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 440px; }
.contact__details li { display: flex; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact__details li span { color: var(--muted); width: 72px; flex: none; }
.contact__details a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.contact__details a:hover { text-decoration-color: currentColor; }

.form { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 3vw, 40px); display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; margin: 0 0 8px; }
.field > span { margin: 0; }
.field em { font-style: normal; opacity: .7; text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 17px var(--sans); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid rgba(21,19,17,.22); border-radius: 0; padding: 8px 0 10px; outline: none;
  transition: border-color .3s;
}
.field select { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a7368' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(21,19,17,.3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #c0392b; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; font-size: 14px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); transition: all .2s; }
.chips label:hover span { border-color: rgba(21,19,17,.4); color: var(--ink); }
.chips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form__submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.form__status { margin: 0; font-size: 15px; color: var(--muted); }
.form__status.ok { color: #2f7a3b; }
.form__status.err { color: #c0392b; }

/* ---------- footer ---------- */
.footer { padding: clamp(40px, 6vw, 80px) var(--gutter) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__logo { width: 100%; height: auto; margin-bottom: clamp(28px, 4vw, 56px); }
.footer__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer__links a:hover { color: var(--ink); }

/* ---------- viewers (kept dark so the work looks right) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,11,10,.96); color: var(--white);
  display: grid; place-items: center; padding: 70px var(--gutter) 40px;
  opacity: 0; transition: opacity .35s var(--ease);
}
.modal.is-open { opacity: 1; }
.modal__close { position: absolute; top: 20px; right: var(--gutter); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; border: 1px solid rgba(251,249,245,.2); border-radius: 100px; z-index: 2; }
.modal__close:hover { background: var(--white); color: var(--ink); }
.modal__stage { width: min(100%, calc((100vh - 190px) * var(--r, 1.7778))); }
.modal__frame { position: relative; aspect-ratio: var(--r, 16/9); background: #000; border-radius: 3px; overflow: hidden; }
.modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__caption { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; align-items: baseline; flex-wrap: wrap; }
.modal__caption strong { font: 700 20px var(--serif); letter-spacing: -.02em; margin-right: 8px; }
.modal__caption span { color: rgba(251,249,245,.6); }
.modal__nav { display: flex; gap: 20px; color: rgba(251,249,245,.6); }
.modal__nav button:hover { color: var(--white); }

.modal--stills { padding: 70px 80px 30px; }
.modal__photo { margin: 0; display: grid; justify-items: center; gap: 12px; }
.modal__photo img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 3px; transition: opacity .3s; }
.modal__photo img.loading { opacity: .3; }
.modal__photo figcaption { color: rgba(251,249,245,.55); }
.modal__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(251,249,245,.2); font-size: 18px; transition: all .3s; }
.modal__arrow:hover { background: var(--white); color: var(--ink); }
.modal__arrow--prev { left: 16px; } .modal__arrow--next { right: 16px; }

/* ---------- cursor label (only shows over films and photos) ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
    width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--white); color: var(--ink);
    opacity: 0; scale: .5; transition: opacity .25s var(--ease), scale .35s var(--ease);
  }
  .cursor__label { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .cursor.is-on { opacity: 1; scale: 1; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .contact { grid-template-columns: 1fr; }
  .modal--stills { padding: 70px 12px 80px; }
  .modal__arrow { top: auto; bottom: 16px; transform: none; }
  .modal__arrow--prev { left: calc(50% - 64px); } .modal__arrow--next { right: calc(50% - 64px); }
}
@media (max-width: 640px) {
  .work__row { flex-direction: column; gap: clamp(32px, 3.4vw, 56px); }
  .card { width: 100%; flex: none; }
  .work__filler { display: none; }
  .form__row { grid-template-columns: 1fr; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; padding: 0 16px; }
  .stills__grid { columns: 2; }
  .nav__logo img { height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
