/* Shared styles for carlajemio.com — values from the Figma file */
:root {
  /* Figma color styles */
  --bg-bone: #f4f4f2;
  --bg-light-bone: #f5f5f3;
  --bg-black: #26272c;
  --text-dark: #121213;
  --text-light: #fffff8;
  --blue: #315eff;
  --blue-light: #4e75ff;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tracking: 0.358px;

  /* Figma "GENTLE" spring and the custom spring used by links/buttons */
  --ease-gentle: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);

  --content: 1018px;
  --gutter-left: max(16px, env(safe-area-inset-left, 0px));
  --gutter-right: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg-bone);
  color: var(--text-dark);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header (Link/header) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px max(40px, env(safe-area-inset-right, 0px)) 8px max(40px, env(safe-area-inset-left, 0px));
  background: rgba(239, 239, 237, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.site-header .logo { display: block; width: 86px; height: 59px; flex: none; }
.site-header .logo img { width: 86px; height: 59px; }

.nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; align-items: center; gap: 24px; }

/* ---------- Link (Default / hover / selected) ---------- */
.link {
  position: relative;
  display: inline-flex;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform-origin: right;
  transition: opacity 0.6s ease, transform 1.2s var(--ease-gentle);
}
.link:hover::after, .link:focus-visible::after { opacity: 1; }
.link.is-selected::after { opacity: 1; transform: scaleX(0); }
.link--light { color: var(--bg-bone); }

/* ---------- c_button (default / hover / press) ---------- */
.c-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 114px;
  height: 32px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--blue);
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.35s var(--ease-spring), border-color 0.35s;
}
.c-button .c-button__icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.9s var(--ease-spring);
}
.c-button .c-button__icon img { width: 12px; height: 12px; }
.c-button .c-button__label { transition: transform 0.9s var(--ease-spring); }
/* hover: arrow travels from the left of the label to the right */
.c-button:hover .c-button__icon,
.c-button:focus-visible .c-button__icon { transform: translateX(var(--label-w, 74px)); }
.c-button:hover .c-button__label,
.c-button:focus-visible .c-button__label { transform: translateX(-20px); }
.c-button:active { background: var(--text-dark); border-color: var(--bg-black); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 20px max(40px, env(safe-area-inset-right, 0px)) 20px max(40px, env(safe-area-inset-left, 0px));
  background: var(--bg-black);
  color: var(--bg-bone);
}
.site-footer p { margin: 0; font-size: 18px; }
.site-footer .footer-links { display: flex; gap: 24px; }

/* ---------- Page transitions (Figma "Dissolve") ---------- */
body.page-enter main, body.page-enter .site-footer { animation: dissolve-in 0.6s ease-out both; }
body.page-leave { opacity: 0; transition: opacity 0.3s ease-in; }
@keyframes dissolve-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Case study shared layout ---------- */
.case {
  max-width: calc(1360px + 80px);
  margin: 0 auto;
  padding: 100px max(40px, var(--gutter-right)) 80px max(40px, var(--gutter-left));
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.case img { max-width: 100%; height: auto; }

/* Intro: brand, headline, tags, "My Role" on the left, visual on the right */
.case-hero {
  width: 100%;
  max-width: var(--hero-w, 1187px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 495px) minmax(0, var(--hero-media, 666px));
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}
.case-hero h1 { margin: 0 0 24px; font-weight: 400; }
.case-hero h1 .brand { display: block; color: var(--blue); font-size: 56px; font-weight: 600; line-height: 1.5; }
.case-hero h1 .headline { display: block; color: var(--text-dark); font-size: 48px; line-height: 1.5; text-wrap: balance; }
.case-hero .media { position: relative; }

.chips { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 8px;
  border: 1px solid var(--bg-black);
  border-radius: 12px;
  color: var(--bg-black);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Text block: "My Role:" / bold subtitle / rule / body */
.story { display: flex; flex-direction: column; gap: 16px; }
.story-head { padding-bottom: 16px; border-bottom: 1px solid #000; font-size: 18px; color: #000; }
.story-head p { margin: 0; }
.story-head strong { display: block; font-weight: 700; }
.story-body { color: #000; font-size: 16px; font-weight: 400; }
.story-body p { margin: 0 0 8px; }
.story-body p:last-child { margin-bottom: 0; }
.story-body b { font-weight: 600; }
.case-hero .story { margin-top: 40px; }

/* Split: 322px narrative next to a large visual */
.split {
  display: grid;
  grid-template-columns: var(--cols, minmax(0, 322px) minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}
.split--reverse { grid-template-columns: var(--cols, minmax(0, 1fr) minmax(0, 322px)); }
.split--reverse .story { order: 2; }
.split .visual { justify-self: end; }
.split--reverse .visual { justify-self: start; }

.full-shot { margin: 0; }
.full-shot img { width: 100%; }

.section-head { min-height: 114px; }
.section-head h2 { margin: 0 0 16px; font-size: 32px; font-weight: 700; line-height: 1.5; }

.more { display: flex; justify-content: flex-end; }

/* Fixed-size Figma compositions, scaled to the available width by main.js */
.stage-wrap { position: relative; width: 100%; overflow: hidden; }
.stage { position: relative; overflow: hidden; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.stage .piece {
  position: absolute;
  max-width: none;
  transform: var(--from);
  transition: transform var(--dur, 1.2s) var(--ease, var(--ease-gentle));
}
.stage.in .piece { transform: none; }
.hp-collage { background: var(--bg-light-bone); }
.stage .piece > img { display: block; max-width: none; width: 100%; height: 100%; }
.stage .piece { transition: transform var(--dur, 1.2s) var(--ease, var(--ease-gentle)), opacity 0.4s ease; }
.stage .piece.is-closed { opacity: 0; pointer-events: none; }

/* ---------- Mockup hotspots (HP store states from the Figma components) ---------- */
.hs {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
/* image placeholder: 380 → 400 (zoom) */
.hs--zoom { overflow: hidden; background-repeat: no-repeat; }
.hs--zoom::before { content: ""; position: absolute; inset: 0; background: inherit; transition: transform 0.3s ease-in-out; }
.hs--zoom:hover::before { transform: scale(1.053); }
/* c_link: container #212121 @ 20% */
.hs--link { border-radius: 2px; }
.hs--link:hover { background: rgba(33, 33, 33, 0.2); }
/* c_checkbox / Checkbox: hover fill */
.hs--cb { border-radius: 2px; }
.hs--cb:hover { background: rgba(0, 0, 0, 0.07); }
/* cc_btn_secondary_dark: hover */
.hs--tint { border-radius: 2px; }
.hs--tint:hover { background: rgba(44, 48, 56, 0.08); }
/* cc_link_dark: label #2c3038 → #767676 + 3px border */
.hs--dlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: #767676; opacity: 0; transition: opacity 0.3s ease-in-out; }
.hs--dlink:hover { background: rgba(255, 255, 255, 0.45); }
.hs--dlink:hover::after { opacity: 1; }
/* e_header_us_link: #165dba stroke */
.hs--hdr { border-radius: 2px; }
.hs--hdr:hover { box-shadow: inset 0 0 0 1px #165dba; }
/* search: stroke #cccccc → #767676 */
.hs--search { border-radius: 10px; }
.hs--search:hover { box-shadow: inset 0 0 0 1px #767676; }
/* cc_link_breadcrumb: underline */
.hs--crumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.5px; background: #2c3038; opacity: 0; transition: opacity 0.3s ease-in-out; }
.hs--crumb:hover::after { opacity: 1; }
/* c_btn-secondary black: outline → filled #212121, white label */
.hs--invert { border-radius: 3px; }
.hs--invert:hover { background: #fff; mix-blend-mode: difference; }
/* cc_link_body: label → #767676 */
.hs--blink:hover { background: rgba(255, 255, 255, 0.45); }
/* c_btn-icon close: container #212121 */
.hs--close { border-radius: 50%; }
.hs--close:hover { background: #fff; mix-blend-mode: difference; }
/* c_btn-secondary accent: outline → filled #165dba */
.hs--accent { display: grid; place-items: center; border-radius: 2px; font-family: var(--font); font-size: 6.6px; letter-spacing: 0; color: #fff; }
.hs--accent span { opacity: 0; transition: opacity 0.3s ease-in-out; }
.hs--accent:hover { background: #165dba; }
.hs--accent:hover span { opacity: 1; }
/* MSRP: click → State=Active (bubble) */
.hs--msrp { border-radius: 2px; }
.hs--msrp:hover { background: rgba(33, 33, 33, 0.2); }
.msrp-bubble {
  position: absolute;
  left: -4px;
  bottom: calc(100% + 4px);
  width: 140px;
  padding: 8px 10px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.12);
  color: #2c3038;
  font-family: var(--font);
  font-size: 7px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.msrp-bubble strong { display: block; margin-bottom: 2px; font-size: 8px; }
.hs--msrp[aria-expanded="true"] .msrp-bubble { opacity: 1; transform: none; }

/* PepsiCo bento: Rotating Prompts inside the AI search field */
.bento { position: relative; container-type: inline-size; width: 100%; max-width: 958px; }
.bento > img { width: 100%; }
.bento-prompts {
  position: absolute;
  left: calc(799 / 958 * 100%);
  top: calc(323 / 471 * 100%);
  width: calc(72 / 958 * 100%);
  height: calc(11 / 471 * 100%);
  overflow: hidden;
  background: #fff;
}
.bento-prompts span {
  position: absolute;
  inset: 0;
  font-family: var(--font);
  font-size: calc(5.69 / 958 * 100cqw);
  line-height: calc(11 / 958 * 100cqw);
  letter-spacing: 0;
  color: #6c767f;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.bento-prompts span.is-current { opacity: 1; transform: none; }
.bento-prompts span.is-leaving { opacity: 0; transform: translateY(-100%); }

/* ---------- Motion system ----------
   One easing family (expo-out for entrances, standard in-out for state changes),
   three durations, and short staggers so content arrives in reading order. */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur-base: 450ms;
  --dur-slow: 800ms;
  --stagger: 70ms;
}

/* Scroll reveal: only hidden once JS has confirmed it can show it again */
.js [data-rise] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out-expo), transform var(--dur-slow) var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js [data-rise].in { opacity: 1; transform: none; }

/* Pressed feedback for every button-like control */
.c-button, .card, .home-btn { -webkit-tap-highlight-color: transparent; }
.c-button:active { transform: scale(0.97); }
.c-button { transition: background-color 0.35s var(--ease-spring), border-color 0.35s, transform var(--dur-fast) var(--ease-standard); }

/* Cross-page transitions (View Transitions API, progressive enhancement):
   the page crossfades with a short lift, and the project image morphs between
   the landing card and the case-study hero. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out var(--dur-base) var(--ease-standard) both; }
::view-transition-new(root) { animation: vt-in var(--dur-slow) var(--ease-out-expo) both; }
::view-transition-group(*) { animation-duration: var(--dur-slow); animation-timing-function: var(--ease-out-expo); }
::view-transition-group(site-header) { animation: none; }
::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; }
.site-header { view-transition-name: site-header; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

@media (max-width: 1000px) {
  .case-hero, .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .story { order: 0; }
  .split .visual, .split--reverse .visual { justify-self: start; }
  .more { margin: 0 !important; }
}
@media (max-width: 760px) {
  .case { padding-top: 45px; gap: 56px; padding-left: var(--gutter-left); padding-right: var(--gutter-right); }
  .case-hero h1 .brand { font-size: 40px; }
  .case-hero h1 .headline { font-size: 32px; }
  .chips { gap: 8px; }
  .section-head h2 { font-size: 26px; }
}

@media (max-width: 760px) {
  /* Phone: logo + "Let's talk" on the first row, the three links on the second */
  .site-header { padding-left: var(--gutter-left); padding-right: var(--gutter-right); flex-wrap: wrap; row-gap: 4px; }
  .site-header .logo, .site-header .logo img { width: 58px; height: 40px; }
  .nav { display: contents; }
  .nav .c-button { margin-left: auto; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
  .nav-links .link { font-size: 13px; letter-spacing: 0; }
  .site-footer { padding-left: var(--gutter-left); padding-right: var(--gutter-right); }
  .site-footer p { font-size: 15px; }
}


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

/* HP Storybook visual runs 36px into the right gutter, as in Figma */
@media (min-width: 1001px) { .split--bleed { margin-right: -36px; } }

/* "Let's talk" confirmation: shows the address in case no mail app opens */
.mail-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--text-dark);
  color: var(--text-light);
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(18, 18, 19, 0.25);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out-expo), transform var(--dur-base) var(--ease-out-expo);
}
.mail-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mail-toast span { color: #b9bac0; font-size: 13px; }
.mail-toast strong { color: var(--text-light); font-weight: 600; user-select: all; }

/* =====================================================================
   Velto-inspired layer: floating pill navigation, scroll-bound motion,
   oversized masked section words, rounded surfaces and soft gradients.
   ===================================================================== */
:root {
  --radius-card: 24px;
  --radius-panel: 32px;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-line: rgba(18, 18, 19, 0.07);
  --glow-blue: rgba(49, 94, 255, 0.13);
  --glow-peach: rgba(255, 176, 140, 0.16);
  --glow-lilac: rgba(170, 140, 255, 0.12);
}

/* Lenis smooth scroll housekeeping */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }


/* ---------- Floating pill navigation ---------- */
.site-header {
  position: sticky;
  top: calc(12px + env(safe-area-inset-top, 0px));
  width: min(960px, calc(100% - 32px));
  height: 56px;
  margin: 12px auto 0;
  padding: 0 8px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(245, 245, 243, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 30px rgba(18, 18, 19, 0.06);
  transition: box-shadow var(--dur-base) var(--ease-standard), background-color var(--dur-base) var(--ease-standard);
}
.site-header.is-scrolled { background: rgba(245, 245, 243, 0.82); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 40px rgba(18, 18, 19, 0.12); }
.site-header .logo, .site-header .logo img { width: 47px; height: 32px; }
.nav { gap: 28px; }
.nav-links { gap: 22px; }
.c-button { border-radius: 999px; height: 40px; padding: 4px 18px; }
.site-header .c-button { height: 40px; }
.menu-btn { display: none; }
.chips li, .tags li { border-radius: 999px; padding: 8px 12px; }

/* ---------- Scroll-bound reveals (bidirectional) ---------- */
[data-scrub] { --p: 1; }
.js [data-scrub] {
  opacity: calc(0.15 + 0.85 * var(--p));
  transform: translateY(calc((1 - var(--p)) * 48px)) scale(calc(0.97 + 0.03 * var(--p)));
  will-change: transform, opacity;
}
/* second card of each row trails slightly behind, like a stagger */
.js .work .card[data-scrub]:nth-child(even) { transform: translateY(calc((1 - var(--p)) * 80px)) scale(calc(0.97 + 0.03 * var(--p))); }

/* Oversized section words that slide up from behind a mask */
.mega {
  margin: 0;
  font-size: clamp(56px, 10.5vw, 168px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--text-dark);
}
.mega .mask { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.mega .word { display: block; transform: translateY(calc((1 - var(--p)) * 105%)); }
.js .mega[data-scrub] { opacity: 1; transform: none; }
.mega .accent { color: var(--blue); }
.mega-wrap { max-width: calc(1360px + 80px); margin: 0 auto; padding: 120px max(40px, var(--gutter-right)) 0 max(40px, var(--gutter-left)); }


/* ---------- Rounded surfaces ---------- */
.card-media { border-radius: var(--radius-card); box-shadow: 0 18px 50px rgba(18, 18, 19, 0.08); }
.card:hover .card-media, .card:focus-visible .card-media { border-radius: 40px; }
.card-media img { transition: transform var(--dur-slow) var(--ease-out-expo); }
.card:hover .card-media img { transform: scale(1.035); }
.full-shot img, .split > img.visual, .case-hero .media img { border-radius: var(--radius-card); }
.trusted { border: 0; background: transparent; }
.slider { margin: 0 16px; border-radius: 999px; }
.site-footer { margin: 0 16px; border-radius: 8px 8px 0 0; }


/* ---------- Phone: pill with a menu ---------- */
@media (max-width: 760px) {
  .site-header { height: 52px; padding: 0 6px 0 14px; flex-wrap: nowrap; row-gap: 0; }
  .nav { display: flex; gap: 6px; }
  .nav .c-button { margin-left: 0; height: 38px; padding: 4px 14px; font-size: 15px; }
  .menu-btn {
    display: grid;
    place-items: center;
    gap: 5px;
    align-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--text-dark);
    cursor: pointer;
  }
  .menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--text-light); transition: transform var(--dur-base) var(--ease-out-expo); }
  .menu-open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .menu-open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
    order: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background: rgba(245, 245, 243, 0.92);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(18, 18, 19, 0.14);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out-expo), transform var(--dur-base) var(--ease-out-expo);
  }
  .menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links .link { padding: 14px 12px; font-size: 17px; border-radius: 14px; }
  .nav-links .link::after { display: none; }
  .nav-links .link:hover { background: rgba(18, 18, 19, 0.05); }
  .slider { margin: 0; border-radius: 0; }
  .site-footer { margin: 0; }
  .mega-wrap { padding-top: 72px; }
  .js [data-scrub] { transform: translateY(calc((1 - var(--p)) * 40px)); }
}
.experience .mega { font-size: clamp(48px, 8vw, 116px); margin-bottom: 8px; }

/* =====================================================================
   Readability pass: nothing overlaps, and content that slides under the
   navigation softens (blur + fade) instead of colliding with it.
   ===================================================================== */
/* Frosted band at the top of the viewport, beneath the pill navigation */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(96px + env(safe-area-inset-top, 0px));
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(239, 239, 237, 0.9), rgba(239, 239, 237, 0));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
  mask-image: linear-gradient(to bottom, #000 35%, transparent);
}
/* Elements leaving through the top fade and blur (--x: 0 → 1, set by main.js) */
.js [data-scrub] { opacity: calc((0.15 + 0.85 * var(--p)) * (1 - 0.75 * var(--x, 0))); }
.js .mega[data-scrub] { opacity: calc(1 - 0.75 * var(--x, 0)); }
.hero-zoom.is-static { height: auto; }
.hero-zoom.is-static .hero-sticky { position: relative; height: 100vh; height: 100svh; }

/* =====================================================================
   Consistency pass: one background (#F4F4F2), one accent (#315EFF), one
   typeface (Manrope), one tag style, 16px image corners, sentence case.
   ===================================================================== */
:root { --radius-img: 16px; --radius-card: 16px; }
body { background: var(--bg-bone); }
.site-header { background: rgba(244, 244, 242, 0.72); }
.site-header.is-scrolled { background: rgba(244, 244, 242, 0.88); }
body::before { background: linear-gradient(to bottom, rgba(244, 244, 242, 0.92), rgba(244, 244, 242, 0)); }

/* Tags: solid accent, white text, sentence case */
.label, .chips li, .tags li {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: none;
}
.chips, .tags { gap: 8px; }

/* Images: 16px corners everywhere, no radius change on hover */
.card-media,
.card:hover .card-media, .card:focus-visible .card-media,
.full-shot img, .split > img.visual, .split .visual img, .split img.visual,
.case-hero .media img, .media img, .stage-wrap, .vr-scene > img,
.photo-card, .bento, .glico { border-radius: var(--radius-img); }
.card-media { box-shadow: none; }

/* Section titles share the hero's type: Manrope 500, same scale and tracking */
.mega {
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.11;
  letter-spacing: var(--tracking);
}
.mega-wrap .mega { font-size: clamp(44px, 5vw, 72px); }

/* Logo band: sharp, full width */
.slider { margin: 0; border-radius: 0; }

/* Case studies: "More projects" stays at the bottom of the screen, in its own lane */
.case .more {
  position: sticky;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  justify-content: center;
  margin: 0 !important;
  padding-top: 8px;
  pointer-events: none;
}
.case .more .c-button { pointer-events: auto; box-shadow: 0 10px 30px rgba(18, 18, 19, 0.18); }
/* frosted fade at the bottom so designs slide under the button instead of colliding with it */
body:has(.case .more)::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(104px + env(safe-area-inset-bottom, 0px));
  z-index: 29;
  pointer-events: none;
  background: linear-gradient(to top, rgba(244, 244, 242, 0.92), rgba(244, 244, 242, 0));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
  mask-image: linear-gradient(to top, #000 30%, transparent);
}

/* HP: the composition exactly as exported from Figma */
.hp-collage-shot img { width: 100%; border-radius: 0; }

/* ISDIN: GlicoISDIN launch email, the product name fades from 5% to 100% */
.glico { position: relative; overflow: hidden; container-type: inline-size; aspect-ratio: 545 / 718; }
.glico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.glico-word {
  position: absolute;
  left: 0;
  right: 0;
  top: 53.9%;
  text-align: center;
  font-family: var(--font);
  font-size: 11.4cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.035em;
  color: #e3c36b;
  opacity: 0.05;
}
.glico-word sup { font-size: 0.32em; font-weight: 500; vertical-align: 1.9em; margin-left: 0.08em; }
.glico.is-playing .glico-word { animation: glico-in 5s var(--ease-standard) infinite; }
@keyframes glico-in {
  0%, 12% { opacity: 0.05; }
  55%, 88% { opacity: 1; }
  100% { opacity: 0.05; }
}

/* Isidor-style decode: text resolves from 0/1 while it enters */
.is-decoding { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .glico-word { opacity: 1; } }
.at-end body:has(.case .more)::after { opacity: 0; }
body:has(.case .more)::after { transition: opacity var(--dur-base) var(--ease-standard); }
.label.is-decoding { white-space: nowrap; }
