/* =========================================================
   Project page template — shared by the 5 project pages.
   Each page sets its own colours on <body>:
     --accent     main colour  (= Figma variable "accent", one mode per project)
     --on-accent  text colour on top of the accent
   and, when its design differs from the default (Shadio, dark), any theme token
   below. Loaded after style.css (fonts, tokens, header).
   ========================================================= */

.project {
  --accent: #d9ff00;
  --on-accent: #000000;

  /* Theme tokens — default = dark theme (Shadio) */
  --header-bg: var(--accent);
  --header-text: var(--on-accent);
  --tag-bg: var(--accent);
  --tag-text: var(--on-accent);
  --tag-border: transparent;
  --category: var(--accent);
  --year: var(--accent);
  --slogan-family: var(--font-sans);
  --slogan-weight: 800;
  --slogan-style: italic;
  --surface: #000;              /* Summary + quote background */
  --surface-text: #fff;
  --acc-border: var(--accent);  /* accordion, closed */
  --acc-bg: transparent;
  --acc-text: #fff;
  --acc-hover-bg: var(--accent);
  --acc-hover-text: var(--on-accent);
  --acc-hover-border: var(--accent);
  --acc-open-title: var(--accent);
  --acc-open-text: #fff;
  --quote-transform: uppercase;
  --quote-bg: var(--surface);
  --quote-text: var(--surface-text);
  --quote-family: var(--font-marfa);
  --quote-weight: 700;
  --quote-style: italic;
  --quote-tracking: -0.035em;
  --caption-bg: var(--accent);
  --caption-text: var(--on-accent);
  --slogan-transform: uppercase;
  --slogan-size: clamp(56px, 7.5vw, 108px);
  --slogan-leading: .86;
  --symbol-bg: #000;

  background: var(--surface);
}

/* Header bar takes the project colour */
.project .site-header {
  background: var(--header-bg);
  color: var(--header-text);
}
.site-header a { color: inherit; }

/* ---------- Hero ---------- */
.p-hero {
  position: relative;
  display: grid;
  grid-template-columns: 650fr 790fr;          /* 650 / 790 px at 1440 */
  min-height: max(717px, calc(100svh - var(--header-h)));
  isolation: isolate;
  overflow: hidden;
  /* Photo in "Multiply" over a gradient: darker only behind the texts (top),
     photo fully visible lower down. Tweak --hero-shade-top / --hero-shade-mid. */
  --hero-shade-top: .68;
  --hero-shade-mid: .32;
  /* Each page can set its own --hero-gradient (MAK: blue → white, from Figma) */
  background: #fff var(--hero-gradient, linear-gradient(180deg,
    rgb(0 0 0 / var(--hero-shade-top)) 0%,
    rgb(0 0 0 / var(--hero-shade-mid)) 50%,
    rgb(0 0 0 / 0) 100%));
}
.p-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
.p-hero__left,
.p-hero__right {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap);
  min-width: 0;
}
.p-hero__title {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
}
.p-tags {
  display: flex;
  gap: 5px;
  margin-top: var(--gap);
}
.p-tags li {
  flex: 1;
  min-width: 0;
  padding: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  box-shadow: inset 0 0 0 1px var(--tag-border);
  font-size: clamp(18px, 1.806vw, 26px);
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
}
.p-hero__bio {
  padding: 30px 0 0 4px;
}
.p-hero__category {
  font-family: var(--font-mono);
  font-size: var(--fs-pretitle);
  letter-spacing: -0.1em;
  color: var(--category);
}
.p-hero__text {
  max-width: 14.4em;             /* = 447px at 31px */
  font-size: var(--fs-paragraph);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.p-hero__year {
  min-height: 147px;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
  color: var(--year);
}
.p-hero__years { display: flex; gap: 2em; }
.p-hero__slogan {
  font-family: var(--slogan-family);
  font-size: var(--slogan-size);
  font-weight: var(--slogan-weight);
  font-style: var(--slogan-style);
  line-height: var(--slogan-leading);
  letter-spacing: -0.03em;
  text-transform: var(--slogan-transform);
}

/* ---------- Summary ---------- */
.p-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: var(--gap);
  background: var(--surface);
  color: var(--surface-text);
}
.p-summary__title {
  font-size: clamp(72px, 10.42vw, 150px);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
  color: var(--summary-title, var(--accent));
}

/* Accordion = native <details>: works without JavaScript, keyboard accessible.
   States from Figma: Default (accent outline) → Hover (whole frame filled with accent,
   black text) → Clicked/open (no outline, accent title). */
.acc {
  border: 1px solid var(--acc-border);
  interpolate-size: allow-keywords;   /* smooth open/close where supported */
  transition: border-color .2s ease;
}
.acc[open] { border-color: transparent; }
.acc summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  column-gap: 5px;
  min-height: 178px;
  padding: 0 10px 20px;
  background-color: var(--acc-bg);
  /* optional photo behind a closed accordion (Vodka, Minecraft): set inline on <summary> */
  background-size: cover;
  background-position: center;
  color: var(--acc-text);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.acc summary::-webkit-details-marker { display: none; }
.acc__title {
  font-family: var(--font-marfa);
  font-weight: 600;
  font-size: clamp(34px, 4.583vw, 66px);
  line-height: 1.2;
  letter-spacing: -0.045em;   /* Inter Tight is narrower than ABC Marfa */
}
.acc__text {
  display: block;
  grid-column: 1;
  max-width: 700px;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(14px, 1.32vw, 19px);
  letter-spacing: -0.05em;
}
.acc__chevron {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 6px;
  transition: transform .3s ease;
}
/* Hover: the whole closed frame takes the accent colour */
.acc:not([open]) summary:hover,
.acc:not([open]) summary:focus-visible {
  background: var(--acc-hover-bg) !important;
  color: var(--acc-hover-text);
  box-shadow: inset 0 0 0 1px var(--acc-hover-border);
}
/* Open: accent title and chevron, no outline, no fill */
.acc[open] summary { background: transparent !important; color: var(--acc-open-text); }
.acc[open] .acc__title,
.acc[open] .acc__chevron { color: var(--acc-open-title); }
.acc[open] .acc__chevron { transform: rotate(180deg); }
.acc summary:focus-visible { outline: none; }

.acc::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .45s ease, content-visibility .45s allow-discrete;
}
.acc[open]::details-content { block-size: auto; }

.acc__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-bottom: 30px;
}

/* Photo grid (Visual brand): rows of 463px, Figma proportions */
.grid-row {
  display: grid;
  overflow: hidden;
  min-height: 0;
  height: clamp(220px, 32.15vw, 463px);
}
.grid-row--wide-left  { grid-template-columns: 852fr 548fr; }
.grid-row--wide-right { grid-template-columns: 548fr 852fr; }
.grid-row--thirds     { grid-template-columns: repeat(3, 1fr); }
.grid-row--full       { grid-template-columns: 1fr; }
.grid-row--tall       { height: clamp(300px, 51.67vw, 744px); }
.acc-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }  /* never crop an infographic */
.grid-row > img { min-height: 0; }
.grid-row img,
.posts img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  background: #1a1a1a;
}

/* Social posts (Visual content) */
.posts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.posts__labels {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  background: var(--accent);
  font-family: var(--font-mono);
  font-weight: 100;
  font-size: 15px;
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
  color: #000;
}
.posts__labels span { background: #fff; }
.posts__labels span:first-child { background: #d9d9d9; }
.posts img.posts__banner { height: clamp(180px, 29.17vw, 420px); }
.posts__trio { overflow: hidden; }
.posts__trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  height: clamp(300px, 40.56vw, 584px);
}

/* Rebranding: logo slide + label box (MAK) */
.brand-row {
  display: grid;
  grid-template-columns: 852fr 548fr;
  min-height: clamp(260px, 32.15vw, 463px);
}
.brand-row__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 9vw, 132px);
  padding: 10px;
  background: var(--accent);
  color: #fff;
}
.brand-row__logo { position: relative; width: clamp(180px, 30vw, 431px); }
.brand-row__logo svg { display: block; width: 100%; height: auto; }
.brand-row__reg {
  position: absolute; top: -4%; right: -10%;
  font-size: clamp(16px, 2vw, 28px);
}
.brand-row__note {
  align-self: flex-end;
  margin-bottom: 18%;
  font-size: 19px;
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
}
.brand-row__label {
  background: #fff;
  color: #000;
  display: flex;
  justify-content: flex-end;
  padding: 0 3px;
}
.brand-row__label > div {
  margin-left: auto;
  width: min(405px, 100%);
  padding: 0 3px;
  font-family: var(--font-mono);
  font-size: 19px;
  letter-spacing: -0.03em;
}
.brand-row__label strong { display: block; font-weight: 700; margin-bottom: 10px; }
.brand-row__label p + p { margin-top: 1.2em; }

/* Labels bar above an asset block */
.asset-labels {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-weight: 100;
  font-size: 15px;
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
  color: #000;
}
.asset-labels span { background: #d9d9d9; }
.asset-banner { width: 100%; height: clamp(180px, 29.17vw, 420px); object-fit: cover; background: #eee; }
.asset-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  height: clamp(180px, 29.17vw, 420px);
  overflow: hidden;
}
.asset-duo > * { min-height: 0; }
.asset-duo img,
.asset-duo video { width: 100%; height: 100%; object-fit: cover; background: #eee; display: block; }

/* Collaborators: infinite logo banner (CSS only, pauses on hover) */
.collab { padding: 30px 0 10px; text-align: center; color: #000; }
.collab h4 {
  margin: 0 0 30px;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.marquee { overflow: hidden; }
.marquee__track {
  display: flex;
  align-items: center;
  gap: 80px;
  width: max-content;
  animation: marquee 10s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: clamp(50px, 6vw, 90px); width: auto; max-width: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - 40px)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* Video banner with title on top (Vodka) */
.video-banner {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(200px, 29.17vw, 420px);
  overflow: hidden;
  background: #000a3a;
}
.video-banner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-banner p {
  position: relative;
  margin: 0;
  font-family: "Gotham", "Montserrat", var(--font-sans);
  font-weight: 400;
  font-size: clamp(32px, 5.9vw, 85px);
  line-height: .92;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
}
/* Three phone mock-ups playing the story videos */
.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  align-items: center;
  padding: clamp(30px, 5vw, 78px) 0;
  background: #fff;
}
.phones video {
  width: min(100%, 316px);
  aspect-ratio: 316 / 684;
  object-fit: contain;      /* the exported videos already include the phone frame */
  background: transparent;
  border-radius: 9.5% / 4.4%;   /* same corners as the phone frame (story 2 is exported square) */
}


/* ================= Whoops Agency blocks ================= */
.brands-row { width: 100%; height: auto; }

/* Client block: text left, animated visual right */
.client {
  display: grid;
  grid-template-columns: minmax(0, 500fr) minmax(0, 880fr);
  gap: 20px;
  align-items: start;      /* text stays at the top, as in Figma */
  padding: 20px 10px;
}
.client__title {
  margin: 0 0 20px;
  font-size: clamp(28px, 3.06vw, 44px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.client__text, .vid-section__text {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(13px, 1.04vw, 15px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  white-space: pre-line;
}
.client__text b, .vid-section__text b, .p-hero__text b { font-weight: 700; }
.client__visual { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 20px; }

/* Slide + light fade between states (CSS only).
   --n = number of states, --step = seconds per state.
   Negative delays: every state is already in its place when the page opens. */
.fade { display: grid; place-items: center; overflow: hidden; height: var(--fade-h, auto); }
.fade[style*="--fade-h"] { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.fade[style*="--fade-h"] > * { height: 100%; }
.fade > * {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: slide2 calc(var(--n, 2) * var(--step, 10s)) cubic-bezier(.65, 0, .35, 1) infinite both;
  animation-delay: calc((var(--i, 0) - var(--n, 2)) * var(--step, 10s));
}
@keyframes slide2 {
  0%, 45%  { transform: translateX(0);    opacity: 1; }
  50%      { transform: translateX(-12%); opacity: 0; }
  50.01%, 95% { transform: translateX(12%); opacity: 0; }
  100%     { transform: translateX(0);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fade > * { animation: none; }
  .fade > *:not(:first-child) { visibility: hidden; }
}
.vertical-word {
  writing-mode: vertical-rl;
  font-size: clamp(60px, 7.6vw, 110px);
  font-weight: 800;
  line-height: .85;
  letter-spacing: -0.02em;
  color: #fff;
}
.client__grid { width: 100%; height: auto; border-radius: 6px; }

/* Video editing: clickable logo row + sections */
.logo-map { position: relative; }
.logo-map img { width: 100%; height: auto; }
.logo-map a { position: absolute; top: 0; bottom: 0; }
.logo-map a:focus-visible { outline: 1px dashed #fff; }
.vid-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 500fr) minmax(0, 880fr);
  gap: 20px;
  min-height: clamp(360px, 32vw, 461px);
  padding: 20px;
  color: #fff;
  scroll-margin-top: calc(var(--header-h) + 10px);
}
.vid-section__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.vid-section::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(0 0 0 / .45); }
.vid-section__title { margin: 0 0 20px; font-size: clamp(30px, 3.47vw, 50px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.vid-section__logo { margin-top: 24px; max-width: 180px; max-height: 90px; width: auto; height: auto; }
.vid-section__videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.play {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 236 / 421; border-radius: 14px; overflow: hidden;
  background-color: #111;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.play::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .25); transition: background .25s ease; }
.play::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -40% -50%;
  border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff;
}
.play__label {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.03em;
  opacity: 0; translate: 0 6px; transition: opacity .25s ease, translate .25s ease;
}
.play:hover, .play:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 24px rgb(0 0 0 / .35); }
.play:hover::before, .play:focus-visible::before { background: rgb(255 89 8 / .35); }
.play:hover .play__label, .play:focus-visible .play__label { opacity: 1; translate: 0 0; }
@media (hover: none) { .play__label { opacity: 1; translate: 0 0; } }
.play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 767px) {
  .client, .vid-section { grid-template-columns: 1fr; }
  .vid-section__videos { grid-template-columns: repeat(3, 1fr); }
  .vertical-word { writing-mode: horizontal-tb; }
  .client__visual { flex-wrap: wrap; }
}

/* ---------- Quote ---------- */
.p-quote {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  min-height: clamp(560px, 76.25vw, 1098px);
  padding: 200px 10px;
  background: var(--quote-bg);
  color: var(--quote-text);
  text-align: center;
}
.p-quote blockquote {
  margin: 0;
  max-width: 1286px;
  font-family: var(--quote-family);
  font-weight: var(--quote-weight);
  font-style: var(--quote-style);
  font-size: clamp(44px, 7.92vw, 114px);
  line-height: .91;
  letter-spacing: var(--quote-tracking);
  text-transform: var(--quote-transform);
}
.p-quote em { font-style: inherit; color: var(--accent); }
.p-quote__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.p-hero__logo { width: min(100%, 717px); height: auto; margin-top: clamp(20px, 5vw, 73px); }  /* Figma: x 660, y 240, 717 × 294 */
.p-quote figcaption {
  padding: 0 2px;
  background: var(--caption-bg);
  color: var(--caption-text);
  font-family: var(--font-mono);
  font-weight: 100;
  font-style: italic;
  font-size: 15px;
  line-height: var(--lh-tight);
  letter-spacing: -0.05em;
}

/* ---------- Next section ---------- */
.p-next {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  min-height: 717px;
  padding: 155px 20px 0;
  background: #fff;
  color: #000;
}
.p-next__top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  text-align: right;
}
.p-next__name {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.p-next__slogan {
  font-size: clamp(22px, 2.153vw, 31px);
  font-style: italic;
  letter-spacing: -0.05em;
}
.p-next__line {
  width: 205px;
  height: 1px;
  background: #000;
  border: 0;
  margin: 0;
}
.p-nav {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: var(--gap);
  height: 234px;
  background: var(--nav-bg, var(--accent));
}
.p-nav > * {
  padding: 0 5px;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
/* The whole frame is the clickable zone, not only the text */
.p-nav a {
  display: block;
  background: #fff;
  color: #000;
  transition: background-color .2s ease, color .2s ease;
}
.p-nav a:hover,
.p-nav a:focus-visible { background: #000; color: #fff; }
.p-nav__next { text-align: right; }
/* optional video behind the navigation band (Vodka) */
.p-nav__bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover;
}
.p-nav__year { display: flex; gap: 1.5em; }
.p-nav__year { color: var(--on-accent); }
.p-symbol {
  display: flex;
  justify-content: flex-end;
  padding: 33px 0;
  background: var(--symbol-bg);
}
.p-symbol svg { width: 207px; height: auto; }
.p-symbol img {
  width: 215px;
  height: 120px;
  object-fit: cover;
  object-position: 50% 45%;     /* same crop as Figma — the PNG itself is untouched */
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .p-hero { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .p-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .p-hero__year { min-height: 0; }
  .p-hero__right { padding-bottom: 40px; }
  .p-tags li { font-size: 18px; }

  .acc summary { min-height: 140px; }
  .grid-row,
  .posts__trio {
    height: auto;
    grid-template-columns: 1fr;
  }
  .grid-row img,
  .posts__trio img { aspect-ratio: 4 / 3; }
  .grid-row { gap: 10px; }
  .posts img.posts__banner { height: 200px; }

  .brand-row { grid-template-columns: 1fr; }
  .brand-row__slide { min-height: 260px; }
  .brand-row__label { padding: 20px 10px; }
  .asset-duo { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .asset-duo img,
  .asset-duo video { aspect-ratio: 4 / 3; }

  .phones { grid-template-columns: 1fr; gap: 30px; }

  .p-quote { min-height: 0; padding: 120px 10px; }

  .p-next { min-height: 0; padding-top: 80px; }
  .p-nav {
    height: auto;
    grid-template-columns: 1fr 1fr;
    padding-top: 120px;
  }
  .p-nav__year { grid-column: 1 / -1; grid-row: 1; }
}
