/* ============================================================
   KLIKRZ — components.css
   Media-frame placeholders, page templates, and grids used
   across the multi-page site. Loads after styles.css.
   ============================================================ */

/* ---------- Aspect-ratio helpers ---------- */
.r-ultra { aspect-ratio: 21 / 9; }
.r-wide { aspect-ratio: 16 / 9; }
.r-landscape { aspect-ratio: 4 / 3; }
.r-square { aspect-ratio: 1 / 1; }
.r-portrait { aspect-ratio: 3 / 4; }
.r-tall { aspect-ratio: 4 / 5; }

/* ---------- Media frame placeholder ---------- */
.frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: var(--muted);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(0, 0, 0, 0.045), transparent 60%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0 1px, transparent 1px 13px);
  pointer-events: none;
}

.frame__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4em 0.7em;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
}

.frame__label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

.frame__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.04);
  transition: transform 0.6s var(--ease), background 0.4s var(--ease);
}

.frame__name {
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.frame__dim {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.frame--bg .frame__label {
  display: none;
}

/* Drop a real <video> or <img> into a .frame or the phone screen
   and it fills the slot (object-fit: cover, clipped to the rounded
   corners). Just replace the placeholder's inner content. */
.frame > video,
.frame > img,
.device__screen > video,
.device__screen > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

/* Hover affordance when a frame sits inside a link/card */
a:hover > .frame .frame__icon,
.case-card:hover .frame__icon,
.industry:hover .frame__icon {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.08);
}

/* ---------- Lift reveal (one-shot) ---------- */
.lift {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .lift.in,
.js .lift {
  /* keep default until observed; .in flips it */
}

.lift.in {
  opacity: 1;
  transform: none;
}

/* Without JS, never hide content */
html:not(.js) .lift {
  opacity: 1;
  transform: none;
}

/* ---------- Generic layout helpers ---------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.media {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section-head {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad-x);
  margin-bottom: clamp(2.5rem, 6vh, 5rem);
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 1.4rem;
}

.section-title {
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
  font-size: clamp(2rem, 5vw, 4rem);
  max-width: 20ch;
}

/* ============================================================
   HOME — hero: full-bleed product video + phone mockup
   ============================================================ */
.home-hero {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  background: radial-gradient(120% 100% at 72% 35%, #161616 0%, #060606 60%, #000 100%);
  z-index: 0;
}

/* Parallax: the hero video is pinned (sticky) and the rest of the page —
   wrapped in .scroll-over — slides UP over it on scroll, covering it. */
.scroll-over {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* Soft leading edge so the cream content melts over the video. */
.scroll-over::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * clamp(320px, 70vh, 760px));
  height: clamp(320px, 70vh, 760px);
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* Scroll-linked veil: the hero video dissolves into the dark background
   color as you scroll the first screen (and smoothly returns on scroll-up).
   Sits above the video but below the foot/title, so those stay clear. */
.home-hero::before,
.page-hero-v::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}

@keyframes hero-veil {
  to {
    opacity: 1;
  }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .home-hero::before,
    .page-hero-v::before {
      animation: hero-veil linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}

/* Reduced-motion: fall back to a normal-scrolling hero (no overlap). */
@media (prefers-reduced-motion: reduce) {
  .home-hero,
  .page-hero-v {
    position: relative;
  }
}

/* Soft seam: the page's cream bleeds up over the bottom of the hero
   video so there is no hard line into the next section. */
.home-hero::after,
.page-hero-v::after {
  /* Old 10px seam disabled — the long scroll fade handles the transition. */
  content: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(5px, 0.85vh, 10px);
  /* eased stops: zero-slope at both ends so neither edge of the
     fade reads as a visible band against video or cream */
  background: linear-gradient(
    180deg,
    rgba(251, 238, 237, 0) 0%,
    rgba(251, 238, 237, 0.03) 12%,
    rgba(251, 238, 237, 0.12) 25%,
    rgba(251, 238, 237, 0.28) 38%,
    rgba(251, 238, 237, 0.5) 50%,
    rgba(251, 238, 237, 0.72) 62%,
    rgba(251, 238, 237, 0.88) 75%,
    rgba(251, 238, 237, 0.97) 88%,
    var(--bg) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Full-bleed background video */
.home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

body.is-loaded .home-hero__bg {
  opacity: 1;
}

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

.home-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Only a light top darkening for logo/Explore legibility — no bottom
     darkening (the scroll fade + veil handle the transition smoothly). */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0) 36%
  );
}

.home-hero .hero__bg {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  z-index: 0;
}

.home-hero .hero__bg::before {
  opacity: 0.45;
}

.home-hero .hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.12) 40%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

/* Phone mockup (placeholder for the product showreel video) */
.device {
  position: absolute;
  z-index: 1;
  right: 9%;
  top: 50%;
  width: min(32vw, 330px);
  aspect-ratio: 9 / 19.3;
  transform: translateY(-50%) rotate(-9deg);
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.2s;
}

body.is-loaded .device {
  opacity: 1;
}

.device__frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(155deg, #242426, #0a0a0a);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.04);
}

.device__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 20px;
  background: #000;
  border-radius: 12px;
  z-index: 3;
}

.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #14181d, #0b0d10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  overflow: hidden;
}

.device__play {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 3px;
}

.device__caption {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.device__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35em 0.7em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* Foot bar: "Lead by Design" (left) + scroll cue (right) */
.home-hero__foot {
  position: absolute;
  left: 0;
  bottom: 100%;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--pad-x);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  color: #fff; /* sits over the dark hero video */
  z-index: 2;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease) 0.4s, transform 1s var(--ease) 0.4s;
}

body.is-loaded .home-hero__foot {
  opacity: 1;
  transform: none;
}

.home-hero__tagline {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Hero CTA: brighter outline on the dark video, and the same rounded-
   rectangle radius as the Explore button (not the pill .btn default). */
.home-hero__cta {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.home-hero__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.home-hero__scroll {
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
}

.home-hero__scroll-arrow {
  display: inline-block;
  animation: bob 1.8s var(--ease-soft) infinite;
}

@media (max-width: 820px) {
  .device {
    right: 50%;
    top: 45%;
    width: min(62vw, 250px);
    transform: translate(50%, -50%) rotate(-6deg);
  }
}

/* Menu toggle: "Menu" text pill at the top, hamburger icon once
   scrolled (or whenever the menu is open). */
.menu-toggle {
  position: relative;
  width: 84px;
  height: 35px;
  padding: 0.72em 1.15em;
  border-radius: 10px;
  overflow: hidden;
  transition: width 0.6s var(--ease-soft), padding 0.6s var(--ease-soft),
    background 0.6s var(--ease-soft), border-color 0.6s var(--ease-soft);
}

/* "Explore" label is absolutely centered so its width never offsets the
   hamburger box — only the box sizes the grid cell, keeping it centered.
   The two crossfade in place via opacity. */
.menu-toggle__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.55s var(--ease-soft);
}

.menu-toggle__box {
  opacity: 0;
  transition: opacity 0.55s var(--ease-soft);
}

body.scrolled .menu-toggle,
body.menu-open .menu-toggle {
  width: 35px;
  height: 35px;
  padding: 0;
  border-radius: 10px;
}

body.scrolled .menu-toggle__label,
body.menu-open .menu-toggle__label {
  opacity: 0;
}

body.scrolled .menu-toggle__box,
body.menu-open .menu-toggle__box {
  opacity: 1;
}

/* ============================================================
   HOME — featured statement + big video
   ============================================================ */
.featured {
  /* Extra top space = the gap that will hold the animated logos (right side). */
  padding: clamp(14rem, 40vh, 28rem) 0 clamp(3rem, 7vh, 6rem);
}

/* On home the gap below the engines block is owned by .reel margin-top,
   so drop featured's own bottom padding (it's shared with other pages). */
body[data-page="home"] .featured {
  padding-bottom: 0;
}

/* ---------- Client-logo rotator (one card, logos crossfade through it) ---------- */
.logo-rotator {
  position: absolute;
  top: clamp(1rem, 5vh, 3.5rem);
  right: var(--pad-x);
  z-index: 2;
  width: clamp(200px, 22vw, 300px);
  aspect-ratio: 3 / 2;
  transform: translate(-60px, 25px); /* nudge: ~60px left, 25px down */
}

.logo-rotator__item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(8px, 1vw, 16px);
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.logo-rotator__item.is-active {
  opacity: 1;
}

.featured__media {
  margin-top: clamp(2.5rem, 6vh, 5rem);
}

/* "#letitClick" eyebrow + descriptive paragraph in the featured block */
.featured__eyebrow {
  display: block;
  margin-bottom: clamp(0.9rem, 2.5vh, 1.5rem);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.featured__desc {
  margin-top: clamp(1.4rem, 3.5vh, 2.4rem);
  max-width: 54ch;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

/* Centered "Our Creative Engines" statement */
.engines {
  max-width: var(--maxw);
  margin-inline: auto;
  /* Top padding tuned so the gap above this block is ~250px.
     Bottom gap (to the video reel) is controlled by .reel margin-top. */
  padding: 251px var(--pad-x) 0;
  text-align: center;
}

.engines .eyebrow {
  display: block;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
}

.engines__title {
  font-size: clamp(2.4rem, 7vw, 5.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.engines__desc {
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
  max-width: 56ch;
  margin-inline: auto;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
}

/* ============================================================
   HOME — case-study masonry grid
   ============================================================ */
.case-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--pad-x);
  columns: 3;
  column-gap: clamp(1rem, 2vw, 2rem);
}

.case-card {
  break-inside: avoid;
  margin-bottom: clamp(1.2rem, 2.4vw, 2.4rem);
  display: block;
}

.case-card__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1rem;
}

.case-card__name {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.case-card__cat {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .case-grid { columns: 2; }
}
@media (max-width: 600px) {
  .case-grid { columns: 1; }
}

/* ============================================================
   HOME — creative-engines reel: one pinned "cinema".
   The 5 videos crossfade in place (the stage never scrolls away);
   each caption rises from the bottom, sharpens early, holds, then
   scrolls up and off the top before the next video fades in. Motion
   is driven by reel-cinema.js via the .is-cinema class. Without JS /
   reduced motion it degrades to plain stacked full-screen panels.
   ============================================================ */
.reel {
  position: relative;
  /* 253px box margin nets ~250px clear of the engines paragraph above. */
  margin-block: 253px clamp(5rem, 12vh, 10rem);
}

/* ---------- Base (no-JS / reduced motion): stacked full-screen panels ---------- */
.reel__item {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.reel__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.reel__bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim — darken the top (for the risen heading) and the bottom (for the
   description) so white text stays legible over any footage. */
.reel__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 42%, rgba(0, 0, 0, 0) 66%);
  pointer-events: none;
}

/* Site-grid-aligned, full-height layer the heading + description sit within. */
.reel__inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  max-width: var(--maxw);
  margin-inline: auto;
  color: #fff;
}

.reel__head {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  top: clamp(5rem, 13vh, 9rem);
}

/* Description + Explore button, grouped so they reveal / scroll as one. */
.reel__foot {
  position: absolute;
  left: var(--pad-x);
  bottom: clamp(3rem, 11vh, 8rem);
  max-width: 46ch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.2rem, 3vh, 2rem);
}

.reel__desc {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.reel__num {
  display: block;
  margin-bottom: clamp(0.8rem, 2vh, 1.3rem);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.65);
}

.reel__title {
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-size: clamp(2.8rem, 9vw, 8rem);
}

/* ---------- Cinema mode (JS, motion OK): one sticky stage; layers crossfade ---------- */
.reel.is-cinema {
  /* One viewport + one 150vh scroll "slice" per video, except the last gets a
     half slice (it only reveals, then rides the pin release out):
     100vh + (4 + 0.5) × 150vh. reel-cinema.js mirrors these slice weights. */
  height: calc(100vh + 4.5 * 150vh);
}

.reel.is-cinema .reel__viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.reel.is-cinema .reel__item {
  position: absolute;
  inset: 0;
  min-height: 0;
  /* Panels are stacked full-screen; only the active one should accept the
     mouse, so the (transparent) panels on top don't block its button's
     hover/click. reel-cinema.js sets the active panel back to auto. */
  pointer-events: none;
}

/* Hidden by default in cinema mode; reel-cinema.js fades/positions them. */
.reel.is-cinema .reel__bg,
.reel.is-cinema .reel__head,
.reel.is-cinema .reel__foot {
  opacity: 0;
}

/* JS positions these via translateY (vh) from the top of the stage. */
.reel.is-cinema .reel__head {
  top: 0;
  will-change: transform, opacity, filter;
}

.reel.is-cinema .reel__foot {
  top: 0;
  bottom: auto;
  will-change: transform, opacity, filter;
}

/* ============================================================
   HOME — services rows
   ============================================================ */
.home-services {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(5rem, 12vh, 10rem) var(--pad-x);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.home-service {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.home-service__media {
  margin-bottom: 0.5rem;
}

.home-service__num {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.home-service__title {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

.home-service__desc {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-service__link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  display: inline-flex;
  gap: 0.5em;
  color: var(--accent);
}

.home-service__link span {
  transition: transform 0.5s var(--ease);
}

.home-service:hover .home-service__link span {
  transform: translateX(5px);
}

@media (max-width: 860px) {
  .home-services { grid-template-columns: 1fr; gap: clamp(3rem, 8vw, 5rem); }
}

/* ============================================================
   HOME — full-bleed showcase
   ============================================================ */
.showcase {
  padding: clamp(4rem, 10vh, 9rem) 0;
}

.showcase__caption {
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  padding-inline: var(--pad-x);
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   SUB-PAGE — hero + intro
   ============================================================ */
.page-hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(9rem, 24vh, 17rem) var(--pad-x) clamp(1.5rem, 4vh, 3rem);
}

.page-hero .eyebrow {
  display: block;
  margin-bottom: 1.4rem;
}

.page-hero__title {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.85;
  font-size: clamp(4.5rem, 20vw, 19rem);
}

/* Sub-page hero with a full-bleed background video (like the home page) */
.page-hero-v {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: var(--pad-x);
  /* keeps the white title above the cream fade at the bottom edge */
  padding-bottom: clamp(6rem, 16vh, 11rem);
  z-index: 0;
}

.page-hero-v__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

body.is-loaded .page-hero-v__bg {
  opacity: 1;
}

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

.page-hero-v__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Top darkening only — keeps the title legible without a hard bottom band. */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0) 40%
  );
}

.page-hero-v__content {
  /* In the scrolling layer, pinned to the bottom of the first screen so it
     scrolls away with the page (the video stays pinned behind). */
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad-x) clamp(6rem, 16vh, 11rem);
  color: #fff; /* over the hero video */
  opacity: 0;
  transform: translateY(18px);
}

body.is-loaded .page-hero-v__content {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease) 0.2s, transform 1s var(--ease) 0.2s;
}

.page-hero-v__content .eyebrow {
  display: block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.65);
}

.page-hero-v__content .page-hero__title {
  font-size: clamp(3.19rem, 10.92vw, 10.01rem);
  line-height: 0.9;
}

.page-hero-v__scroll {
  position: absolute;
  right: var(--pad-x);
  bottom: calc(100% + clamp(3rem, 8vh, 6rem));
  z-index: 2;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff; /* sits over the dark hero video */
}

.page-intro {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 11vh, 10rem) var(--pad-x);
}

.page-intro p {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-size: clamp(1.7rem, 4.4vw, 3.6rem);
  max-width: 24ch;
}

/* ============================================================
   WORK — case-study list
   ============================================================ */
.case-list {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2rem, 5vh, 4rem) var(--pad-x) clamp(4rem, 10vh, 9rem);
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 9vh, 8rem);
}

.case {
  display: block;
}

.case__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.case__name {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.case__meta {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.case__index {
  display: block;
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

/* ============================================================
   SERVICES — alternating blocks + industries grid
   ============================================================ */
.service-block {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vh, 8rem) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.service-block:nth-child(even) .service-block__media {
  order: 2;
}

.service-block__num {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 1rem;
}

.service-block__title {
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.service-block__desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 1.5rem;
}

.service-block__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tagchip {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.5em 0.9em;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .service-block { grid-template-columns: 1fr; }
  .service-block:nth-child(even) .service-block__media { order: 0; }
}

.industries {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 10vh, 9rem) var(--pad-x);
  border-top: 1px solid var(--line);
}

.industries__grid {
  margin-top: clamp(2.5rem, 6vh, 5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.industry {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.industry__name {
  font-size: 0.95rem;
  font-weight: 400;
}

@media (max-width: 900px) {
  .industries__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   IMPACT — stats grid + firsts
   ============================================================ */
.stats {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 8vh, 7rem) var(--pad-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.stat__num {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.stat__label {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 22ch;
}

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
}

.firsts {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 10vh, 9rem) var(--pad-x);
}

.firsts__list {
  margin-top: clamp(2rem, 5vh, 4rem);
  border-top: 1px solid var(--line);
}

.firsts__item {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.firsts__num {
  font-size: 0.85rem;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.firsts__title {
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.firsts__year {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.highlight {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(5rem, 12vh, 11rem) var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line);
}

.highlight__num {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(3.5rem, 11vw, 11rem);
}

.highlight__label {
  margin-top: 1rem;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--muted);
}

@media (max-width: 560px) {
  .firsts__item { grid-template-columns: 2.5rem 1fr; }
  .firsts__year { grid-column: 2; text-align: left; }
}

/* ---------- Active nav item ---------- */
.menu__link.is-current {
  color: var(--fg);
}
.menu__link.is-current span::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.4em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

/* ============================================================
   GAMES PAGE
   ============================================================ */

/* Accent words inside the games headlines */
.games-hero__title .accent,
.games-cta__title .accent {
  color: var(--accent);
}

/* Eyebrow with a leading accent dot (hero label) */
.eyebrow--dot::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.7em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

/* ---------- Hero: copy + phone mockup ---------- */
.games-hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(8rem, 20vh, 13rem) var(--pad-x) clamp(3rem, 8vh, 6rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.games-hero__text {
  opacity: 0;
  transform: translateY(18px);
}

body.is-loaded .games-hero__text {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease) 0.1s, transform 1s var(--ease) 0.1s;
}

html:not(.js) .games-hero__text {
  opacity: 1;
  transform: none;
}

.games-hero__text .eyebrow {
  display: block;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
}

.games-hero__title {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(2.6rem, 7vw, 6rem);
}

.games-hero__desc {
  margin-top: clamp(1.4rem, 3.5vh, 2.2rem);
  max-width: 40ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
}

.games-hero__cta {
  margin-top: clamp(2rem, 4.5vh, 3rem);
}

.games-hero__media {
  display: flex;
  justify-content: center;
}

/* Independent hero artwork (transparent PNG, no frame box) */
.games-hero__img {
  display: block;
  width: min(100%, 440px);
  height: auto;
}

/* ---------- Featured games ---------- */
.featured-games {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--pad-x);
}

.featured-games__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 4vh, 3rem);
  flex-wrap: wrap;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(0.8rem, 1.1vw, 1.1rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.game-card:hover {
  border-color: rgba(251, 238, 237, 0.28);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
}

.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 0.35rem 0.35rem;
}

.game-card__name {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.game-card__meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.game-card__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.game-card__num {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.game-card__genre {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
}

.game-card__cap {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.game-card__go {
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease);
}

.game-card:hover .game-card__go {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- What we build ---------- */
.build {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--pad-x);
}

.build .eyebrow {
  display: block;
  margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
}

.build__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.build-chip {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: clamp(1rem, 1.6vw, 1.35rem) clamp(1.2rem, 2vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}

.build-chip:hover {
  border-color: rgba(251, 238, 237, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.build-chip__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.build-chip__name {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 400;
}

/* ---------- Selected work ---------- */
.selected {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--pad-x);
}

.selected .eyebrow {
  display: block;
  margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
}

.selected__card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

/* Full-bleed media: the artwork fills the left cell edge-to-edge and the
   card's rounded corners clip it (matches the reference selected-work look). */
.selected__media {
  position: relative;
  min-height: 260px;
}

.selected__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.selected__body {
  padding: clamp(1.8rem, 3vw, 2.8rem);
  align-self: center;
}

.selected__title {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.selected__desc {
  margin-top: clamp(0.9rem, 2vh, 1.4rem);
  max-width: 42ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.55;
  color: var(--muted);
}

.selected__stats {
  margin-top: clamp(1.4rem, 3vh, 2.2rem);
  padding-top: clamp(1.4rem, 3vh, 2.2rem);
  border-top: 1px solid var(--line);
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.selected__stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line);
}

.selected__stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.selected__num {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.selected__cap {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.selected__go {
  flex: 0 0 auto;
  align-self: center;
  margin-right: clamp(1.8rem, 3vw, 2.8rem);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

.selected__go:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- Our process ---------- */
.process {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--pad-x);
}

.process .eyebrow {
  display: block;
  margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.process__step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.process__num {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.process__title {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.process__desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 26ch;
}

/* ---------- CTA ---------- */
.games-cta {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(6rem, 16vh, 12rem) var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.games-cta__title {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
}

/* Word-by-word reveal (built by cta-reveal.js): each word rises + fades
   in with a stagger when the heading scrolls into view. A fixed-duration
   @keyframes animation (not a scroll-linked effect) drives it, so the
   reveal always plays at the same speed regardless of how fast you scroll.
   Removing .is-in resets the words so it replays on the next entry. */
.games-cta__title .cta-w {
  display: inline-block;
  opacity: 0;
  will-change: opacity, transform;
}

.games-cta__title.is-in .cta-w {
  animation: cta-word-in 0.6s var(--ease) both;
}

@keyframes cta-word-in {
  from {
    opacity: 0;
    transform: translateY(0.5em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Games page responsive ---------- */
@media (max-width: 1080px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .build__grid { grid-template-columns: repeat(2, 1fr); }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .games-hero {
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 7vh, 4rem);
  }

  .games-hero__media {
    order: -1;
  }

  .games-hero__img {
    width: min(78%, 340px);
  }

  .selected__card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .selected__media {
    min-height: 200px;
  }

  /* Keep all three stats on one row (don't let "Countries" wrap) */
  .selected__stats {
    gap: clamp(0.8rem, 3vw, 1.4rem);
    flex-wrap: nowrap;
  }

  .selected__stat {
    padding-left: clamp(0.8rem, 3vw, 1.4rem);
  }

  /* Arrow sits at the bottom-right */
  .selected__go {
    justify-self: end;
    margin: 0 clamp(1.6rem, 6vw, 2.6rem) clamp(1.6rem, 4vh, 2.4rem) 0;
  }
}

@media (max-width: 600px) {
  .games-grid { grid-template-columns: 1fr; }
  .build__grid { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: 1fr; }

  .games-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 100px;
  }
}

/* ============================================================
   POLICY / LEGAL PAGE
   ============================================================ */

/* Big centered title that fills the first screen */
.policy-hero {
  min-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(8rem, 16vh, 12rem) var(--pad-x) clamp(3rem, 8vh, 6rem);
}

.policy-hero__title {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-size: clamp(2.1rem, 8.4vw, 7.7rem);
}

/* The policy document sits in a right-aligned reading column */
.policy {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad-x) clamp(5rem, 12vh, 9rem);
}

.policy__doc {
  max-width: 620px;
  margin-left: auto;
}

.policy__doc-title {
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin-bottom: 1rem;
}

.policy__date {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.policy__intro {
  margin-bottom: clamp(2rem, 5vh, 3rem);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.policy__section {
  margin-top: clamp(2rem, 5vh, 3rem);
}

.policy__section h3 {
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  margin-bottom: 1rem;
}

.policy__section p {
  margin-bottom: 0.9rem;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  color: var(--muted);
}

.policy a {
  color: var(--accent);
}

.policy a:hover {
  text-decoration: underline;
}

/* Contact block inside the policy page's bottom reveal */
.policy-contact__lead {
  max-width: 36ch;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  color: var(--fg);
}

.policy-contact__card {
  margin-top: clamp(1.4rem, 3.5vh, 2.2rem);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.policy-contact__name {
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.policy-contact__email a {
  color: var(--accent);
}

.policy-contact__email a:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .policy__doc {
    max-width: none;
    margin-left: 0;
  }
}

/* Policy page: scroll-to-unveil footer.
   The content (main) is opaque and scrolls up over a pinned reveal block,
   uncovering the "Let's talk" CTA + footer beneath it. */
body.legal main#top {
  position: relative;
  z-index: 1;
  background: var(--bg);
  margin-bottom: 74svh; /* scroll room; policy stops ~26% from the top */
}

.policy-reveal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74svh; /* the "Let's talk" block fills the lower ~74% */
  z-index: 0;
  background: #151515;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Full-width, left-aligned to the page edge (same as the logo) */
body.legal .cta {
  max-width: none;
  margin-inline: 0;
  margin-top: 40px; /* nudge the "Let's talk" + button down */
  padding-block: clamp(3.5rem, 9vh, 7rem);
}

/* Reduced motion: drop the pin/parallax — normal stacked flow. */
@media (prefers-reduced-motion: reduce) {
  body.legal main#top {
    margin-bottom: 0;
  }
  .policy-reveal {
    position: static;
    height: auto;
  }
}
