@view-transition { navigation: auto; }

/* Yes on K in-depth — Figma 777:12858 (ads view: 924:18072).
   Every value below is from that frame: shell bg #e9dbc4, shrub #585b33,
   800px content column.
   Spacing is one three-step scale, used everywhere on the page:
     --yok-major  between sections                     80 / 56 mobile
     --yok-block  between elements inside a section    40 / 28
     --yok-tight  a heading and its body, paired lines,
                  a caption and its image              20 / 16 */

/* standalone pages only — this sheet stays loaded on /portfolio/ after the overlay closes */
body:has(> .yok-page, > .yok-ads-page) { margin: 0; font-family: "Host Grotesk", sans-serif; color: #000; -webkit-font-smoothing: antialiased; }

/* The page paints its own shell bg in BOTH modes (the overlay container is white).
   overflow-x: clip clips the full-bleed bands without becoming a scroll container. */
.yok-page {
  --yok-major: 80px; --yok-block: 40px; --yok-tight: 20px;
  position: relative; font-family: "Host Grotesk", sans-serif; color: #000; -webkit-font-smoothing: antialiased;
  background: #e9dbc4; min-height: 100vh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: var(--yok-block);
  padding: 0 0 120px; overflow-x: clip;
}

/* the close button floats over the masthead photo, at the spot the old 100px header row put it,
   and stays there as the page scrolls */
.yok-header { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50; max-width: 1280px; width: 100%; height: 100px; display: flex; justify-content: flex-end; align-items: center; padding-right: 40px; /* 40 from the edge, like the other case studies */ box-sizing: border-box; pointer-events: none; }
.yok-header > * { pointer-events: auto; }
.yok-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ffffff; border: 1.838px solid rgba(0,0,0,0.1); border-radius: 16px; box-shadow: 0 14.703px 58.811px -4px rgba(0,0,0,0.1); overflow: hidden; text-decoration: none; flex-shrink: 0; transition: opacity 0.15s ease; }
.yok-close:hover { opacity: 0.7; }

.yok-content { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: var(--yok-major); }
.yok-top { display: flex; flex-direction: column; gap: var(--yok-block); }
.yok-group { width: 100%; display: flex; flex-direction: column; gap: var(--yok-tight); }
.yok-content p { margin: 0; }

/* ── type ramp (Figma text styles) ───────────────────────────────────── */
.yok-body { font-size: 30px; font-weight: 300; line-height: 1.4; text-align: center; }      /* Body (Figma 777:13188) */
.yok-large { font-size: 35px; font-weight: 400; line-height: 1.4; text-align: center; }     /* Body - Large */
.yok-small { font-size: 22px; font-weight: 300; line-height: 1.4; }                          /* Body - Small */
.yok-subhead { font-size: 35px; font-weight: 700; line-height: 1.2; text-align: center; margin: 0; } /* Subheader */
.yok-b { font-weight: 700; }   /* after the ramp so it wins over .yok-large etc. */
.yok-link { color: inherit; text-decoration: underline; text-underline-position: from-font; }
.yok-link:hover { opacity: 0.7; }
.yok-list { margin: 0; padding-left: 33px; list-style: disc; }

/* ── masthead: full-bleed header photo, logo 121px down (Figma 979:25883) ─
   1300 × 651 at the design width; wider screens keep 651 tall and crop the sky. */
.yok-masthead { position: relative; width: 100%; aspect-ratio: 1300 / 651; max-height: 651px; overflow: hidden; background: #a9bccb; }
/* a 32px blurred copy of the photo shows instantly while the real one downloads */
.yok-masthead::before {
  content: ""; position: absolute; inset: -20px;
  background: url("data:image/webp;base64,UklGRpgAAABXRUJQVlA4IIwAAABQBACdASogABAAPu1krU2ppaSiMAgBMB2JYgCxDHADA1q/swcgrfiPPGygAP3IwTkOTua2QrTigI1RwOY9qCMG3wWQnmEX8JrBP4Zmh6Jez2a4LksR7RgrGKpb408yVAJ9s6i8T7PRDEP3jf/hweUa2ytvE90yJYTk4XlNe70h6fItDHEZcb0lcWAAAA==") 50% 70% / cover no-repeat; filter: blur(14px);
}
.yok-masthead__img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.yok-logo { position: absolute; top: 18.59%; /* 121 / 651 */ left: 0; right: 0; margin: 0; display: flex; justify-content: center; line-height: 0; }
.yok-logo img { display: block; width: 608px; max-width: calc(100% - 32px); height: auto; }

/* ── intro + results ─────────────────────────────────────────────────── */
/* Figma 958:10043: 480 lead + 40 gap + 280 results */
.yok-intro { display: flex; gap: var(--yok-block); align-items: flex-start; }
.yok-intro__lead { flex: 0 1 480px; display: flex; flex-direction: column; gap: var(--yok-tight); font-size: 30px; font-weight: 300; line-height: 1.4; }
.yok-results { flex: 0 0 280px; min-width: 0; }
.yok-results__inner { width: 100%; font-size: 22px; font-weight: 300; line-height: 1.4; }
.yok-results__inner p { margin-bottom: 10px; }
.yok-results__inner p:last-child { margin-bottom: 0; }

/* ── brand ───────────────────────────────────────────────────────────── */
.yok-brand { display: flex; flex-direction: column; align-items: center; gap: var(--yok-block); }

/* brand style guide flip-through: Content Standards card stack at the Figma
   placeholder's size (the 11×8.5 pages fit 424px tall → 549px wide) */
.yok-sg { width: 100%; display: flex; justify-content: center; padding-bottom: 24px; /* the 6 × 4px card peek, so the visible gap below is a full step */ }
.yok-deck { position: relative; width: 549px; height: 424px; /* the Figma box; the peek hangs below it */ flex-shrink: 0; touch-action: none; }
.yok-card {
  position: absolute; left: 0; width: 549px; height: 424px;
  border: 0.5px solid #1d1d1d; box-shadow: 0 2px 6px rgba(0,0,0,0.14);
  overflow: hidden; cursor: grab; background: #fff;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  will-change: transform;
}
.yok-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }

.yok-brand__body { width: 100%; display: flex; flex-direction: column; gap: var(--yok-tight); }

/* ── bringing the beach to the city ──────────────────────────────────── */
.yok-city { display: flex; flex-direction: column; align-items: center; gap: var(--yok-block); }
.yok-hero { position: relative; width: 100vw; aspect-ratio: 1300 / 542; overflow: hidden; }
.yok-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yok-hero__title {
  position: absolute; top: 28.74px; left: 50%; transform: translateX(-50%);
  width: 800px; max-width: calc(100% - 32px); margin: 0;
  font-size: 50px; font-weight: 500; line-height: 1.2; color: #fff; text-align: center;
}
/* joy posts strip — full-bleed, between the intro and the brand section (958:10321) */
.yok-joy { width: 100vw; align-self: center; overflow: hidden; }
/* seamless left marquee — same motion as the Dear algo error carousel (two copies of the
   strip, translate by one copy). The 30.874px margin matches the gap between posts. */
.yok-joy__track { display: flex; width: max-content; animation: yok-joy 50s linear infinite; }
.yok-joy img { display: block; width: 2781px; height: 321px; max-width: none; flex: 0 0 auto; margin-right: 30.874px; }
@keyframes yok-joy { to { transform: translateX(-50%); } }

/* ── case study (shrub card, 956 wide — 78px past the column each side) ─ */
.yok-case {
  margin: 0 -78px; box-sizing: border-box;
  background: #585b33; border-radius: 30px; padding: var(--yok-major) 100px; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: var(--yok-block);
}
.yok-case__intro { width: 100%; display: flex; flex-direction: column; gap: 10px; /* eyebrow sits on its title */ text-align: center; }
.yok-case__eyebrow { font-size: 20px; font-weight: 700; line-height: 1.4; }
.yok-case__title { margin: 0; font-size: 45px; font-weight: 700; line-height: 1.2; }

.yok-case__figure { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--yok-tight); }
.yok-ba { display: flex; align-items: center; }
.yok-ba__before, .yok-ba__after { display: block; height: 417px; width: auto; }
.yok-ba__arrow { display: block; width: 46.5px; height: 18.41px; margin: 0 25.75px 0 41.75px; }

.yok-case__caption { width: 100%; font-size: 20px; font-weight: 400; line-height: 1.4; text-align: center; }

.yok-steps { width: 756px; max-width: 100%; display: flex; flex-direction: column; gap: var(--yok-block); }
.yok-step { position: relative; box-sizing: border-box; padding-left: 33px; /* 3px bar + 30px gap */ max-width: 633px; font-size: 22px; font-weight: 300; line-height: 1.4; }
.yok-step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #fff; border-radius: 0 0 1.5px 1.5px; }
.yok-step .yok-list li { font-size: 22px; }

.yok-case__more { font-size: 20px; font-weight: 400; line-height: 1.4; color: #fff; text-decoration: underline; text-underline-position: from-font; text-align: center; }
.yok-case__more:hover { opacity: 0.75; }

/* ── closing ─────────────────────────────────────────────────────────── */
.yok-impact { text-align: center; }
.yok-impact .yok-large p + p { margin-top: var(--yok-tight); }

/* ═══ Ad progression (924:18072) — lightbox from the case study, and the
   standalone /portfolio/yes-on-k/ads/ page. White, like the ZAR image view. ═══ */
.yok-ads { position: fixed; inset: 0; z-index: 1000; background: #fff; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: none; }
.yok-ads.is-open { display: block; }
.yok-ads-page { min-height: 100vh; background: #fff; }

.yok-ads__close {
  position: fixed; top: 20px; right: 20px; z-index: 3;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0;
  background: #fff; border: 1.5px solid rgba(0,0,0,0.12); border-radius: 14px;
  box-shadow: 0 10px 40px -6px rgba(0,0,0,0.14); cursor: pointer; text-decoration: none;
}
.yok-ads__close:hover { opacity: 0.7; }

/* left edge = the Figma 151px inset at 1300 wide, centred on wider screens */
/* Strips follow the window height and the rows sit closer than the Figma 193px, so the
   next row's title peeks in at the bottom of the first screen — there's more below. */
.yok-ads__body { --yok-edge: max(24px, calc(50vw - 499px)); --yok-strip: clamp(300px, 56vh, 500px); padding: 104px 0 160px; font-family: "Host Grotesk", sans-serif; color: #000; }
.yok-ads__sec + .yok-ads__sec { margin-top: 112px; }
.yok-ads__title { margin: 0 0 40px; padding: 0 var(--yok-edge); font-size: 35px; font-weight: 700; line-height: 1.2; }

.yok-ads__row { position: relative; }
.yok-ads__scroller { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.yok-ads__scroller::-webkit-scrollbar { display: none; }
.yok-ads__scroller.is-dragging { cursor: grabbing; }
.yok-ads__strip { display: flex; width: max-content; padding: 0 var(--yok-edge); }
.yok-ads__strip img { display: block; height: var(--yok-strip); width: auto; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.yok-ads__strip img.is-cropped { height: calc(var(--yok-strip) * 0.948); margin-bottom: calc(var(--yok-strip) * 0.052); } /* A/B row: donor disclaimer band cropped off; keep the row rhythm */

/* row counter "1/3 ↓" — bottom centre; jumps to the next row ("3/3 ↑" goes back to the first) */
.yok-ads__next {
  position: fixed; z-index: 3; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 14px 11px 18px; font-variant-numeric: tabular-nums; border: 0; border-radius: 999px; cursor: pointer;
  background: #000; color: #fff; font: 600 15px/1 "Host Grotesk", sans-serif; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.45);
  transform: translate(-50%, 0); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.yok-ads__next svg { width: 16px; height: 16px; display: block; }
.yok-ads__next.is-hidden { opacity: 0; visibility: hidden; transform: translate(-50%, 12px); }
.yok-ads__next:hover { background: #222; }
.yok-ads__next:focus-visible { outline: 2px solid #f29a21; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .yok-ads__next svg { animation: yok-nudge 1.6s ease-in-out 0.6s 3; }
}
@keyframes yok-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }

.yok-ads__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid rgba(0,0,0,0.12); box-shadow: 0 8px 28px -6px rgba(0,0,0,0.25);
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.yok-ads__arrow--next { right: 24px; }
.yok-ads__arrow--prev { left: 24px; }
.yok-ads__arrow:hover { transform: translateY(-50%) scale(1.06); }
.yok-ads__arrow:active { transform: translateY(-50%) scale(0.94); }
.yok-ads__arrow[hidden] { display: none; }

/* ── between desktop and mobile: the 956px case card would overflow ──── */
@media (max-width: 1020px) {
  .yok-case { margin: 0; }
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .yok-page { --yok-major: 56px; --yok-block: 28px; --yok-tight: 16px; padding: 0 0 72px; }
  .yok-header { top: 0; height: 64px; padding-right: 16px; }
  .yok-masthead { aspect-ratio: 4 / 3; }
  .yok-logo { top: 72px; }   /* clears the close button */
  .yok-logo img { width: 300px; }
  .yok-content { padding: 0 16px; box-sizing: border-box; }

  .yok-large { font-size: 24px; }
  .yok-body { font-size: 22px; }
  .yok-subhead { font-size: 26px; }
  .yok-small, .yok-results__inner, .yok-step, .yok-step .yok-list li { font-size: 19px; }

  .yok-intro { flex-direction: column; gap: var(--yok-block); }
  .yok-intro__lead { flex: 1 1 auto; font-size: 24px; }
  .yok-results { flex: 1 1 auto; }

  .yok-deck { width: 300px; height: 232px; }   /* 300 × 424/549 */
  .yok-card { width: 300px; height: 232px; }

  .yok-hero { aspect-ratio: 4 / 3; }
  .yok-hero__title { font-size: 30px; top: 18px; }
  .yok-joy img { width: 1733px; height: 200px; margin-right: 19.24px; }

  .yok-case { border-radius: 20px; padding: var(--yok-major) 20px; }
  .yok-case__title { font-size: 30px; }
  .yok-case__eyebrow, .yok-case__caption, .yok-case__more { font-size: 17px; }
  .yok-ba { width: 100%; justify-content: center; }
  .yok-ba__before, .yok-ba__after { height: auto; width: calc(50% - 28px); max-width: 235px; min-width: 0; }
  .yok-ba__arrow { width: 32px; height: auto; margin: 0 12px; }
  .yok-step { padding-left: 20px; }

  .yok-ads__body { --yok-strip: clamp(240px, 46vh, 380px); padding: 88px 0 120px; }
  .yok-ads__sec + .yok-ads__sec { margin-top: 64px; }
  .yok-ads__title { font-size: 26px; margin-bottom: 20px; }
  .yok-ads__arrow { width: 44px; height: 44px; }
  .yok-ads__arrow--next { right: 12px; }
  .yok-ads__arrow--prev { left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .yok-joy__track { animation: none; }
  .yok-joy { overflow-x: auto; }
}
