/* ============================================================
   NAVIN HARISH — SITE STYLESHEET  (css/site.css)
   Used by the redesigned pages: portfolio, about, services and
   the case studies (korvo, zoyel, 2gz, vivi-rooms).
   Replaces rwhome.css (for these pages), portfolio-hero-v2.css,
   korvo-case-study.css, zoyel-page.css, 2gz-page.css,
   about-page.css and portfolio-page-rebuilt.css.

   Load order on every redesigned page:
     site.css -> nav.css -> navigation.css -> footer.css
   nav.css, navigation.css and footer.css are shared with the
   legacy pages and are deliberately NOT part of this file.

   CONTENTS
     1. Tokens
     2. Base (fonts, reset, body, type)
     3. Hero
     4. Case study system  (+ zoyel / 2gz extras, previous-next cards)
     5. About + Services
     6. Portfolio list
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ============================================================
   1. TOKENS
   Only values that were byte-identical across the old files are
   tokenised. Near-duplicates (#b90000, #FDE001, #ffd600, #f7f5f0,
   #f4eecf, #22211f, #171717, #111 ...) are left as literals so
   nothing shifts visually; see the "near-duplicate colours" note
   in the hand-off.
   ============================================================ */
:root {
  --red: #B70000;
  --yellow: #FFE714;
  --paper: #F7F5EF;
  --charcoal: #292725;
}

/* ============================================================
   2. BASE  (the parts of rwhome.css the redesigned pages use)
   ============================================================ */
@font-face {
  font-family: "ClashDisplay";
  src: url("ClashDisplay-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
  box-sizing: content-box;
}

body {
  margin: 0 auto;
  padding: 0;
  background-color: var(--yellow);
}

h2 {
  font-family: "ClashDisplay";
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 1.5rem 0;
}

h3, p strong {
  font-family: "ClashDisplay";
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 2rem;
  font-style: normal;
  color: var(--red);
}

h4 {
  font-family: "ClashDisplay";
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.6rem;
  font-style: normal;
  color: var(--red);
  margin-bottom: 1rem;
}

h5 {
  font-family: "ClashDisplay";
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.3rem;
  font-style: normal;
  color: var(--red);
}

p strong { font-size: 1.2rem; }

p, ul {
  color: #000;
  font-family: "inter", serif;
  font-optical-sizing: auto;
  font-size: 1.1rem;
  font-weight: 400;
  font-style: normal;
  margin: 0 0 2rem 0;
  line-height: 1.5em;
}

figcaption {
  color: #000;
  font-family: "inter";
  font-style: italic;
}

/* inline text links (used by the services call-to-action) */
p a { color: var(--red); text-decoration: none; }
p a:hover { color: var(--red); text-decoration: underline; }

.nopad { padding: 0; margin: 4px; }

@media (max-width: 800px) {
  *, *::before, *::after { box-sizing: border-box; }
  

  h2 { font-size: clamp(1.65rem, 7vw, 2.25rem); line-height: 1.08; margin: 0 0 1rem; }
  h3 { font-size: clamp(1.35rem, 5.5vw, 1.8rem); line-height: 1.15; margin: 1.6rem 0 .7rem; }
  h4 { font-size: clamp(1.15rem, 4.8vw, 1.45rem); line-height: 1.2; margin: 0 0 .65rem; }
  h5 { font-size: 1rem; line-height: 1.2; }

  p, ul { font-size: 1rem; line-height: 1.55; margin: 0 0 1.25rem; }

  img, video, iframe { max-width: 100%; }
}

/* ============================================================
   3. HERO  (full-viewport hero with tile reveal; scripts/hero.js)
   ============================================================ */
.case-hero,
.case-hero * { box-sizing: border-box; }

.case-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(5.5rem, 8vh, 7rem) 6.5%;
  background-color: var(--yellow);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.case-hero__tiles {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  pointer-events: none;
}
.case-hero__tile {
  display: block;
  min-width: 0;
  min-height: 0;
  background: var(--yellow);
  opacity: 1;
}
.case-hero__tile.is-off { opacity: 0; }

.case-hero__content {
  position: relative;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.01s linear, transform 0.01s linear, visibility 0s linear 0.01s;
  z-index: 2;
  width: 50vw;
  max-width: 100%;
  padding: clamp(1.8rem, 3.2vw, 3.8rem);
}

.case-hero.is-content-visible .case-hero__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: none;
}

.case-hero__title {
  max-width: 19ch;
  margin: 0;
  padding: 0;
  color: #000;
  font-family: "ClashDisplay", sans-serif;
  font-size: clamp(2.4rem, 3vw, 4rem);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.045em;
  text-transform: none;
  overflow-wrap: normal;
}
.case-hero__emphasis {
  color: #000;
  font-weight: 500;
  transition: color 0.55s ease, font-weight 0.55s ease;
}
.case-hero.is-emphasised .case-hero__emphasis {
  color: var(--red);
  font-weight: 700;
}

.case-hero__word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.02em 0.14em 0.18em;
  margin: -0.02em -0.14em -0.18em;
}
.case-hero__word-mask i {
  display: inline-block;
  font-style: normal;
  transform: translateY(105%);
  padding: 0 0.015em;
}
.case-hero.is-text-entering .case-hero__word-mask i {
  animation: caseHeroWordUp 0.9s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(0.15s + var(--word-index) * 0.09s);
}
@keyframes caseHeroWordUp { to { transform: translateY(0); } }

.case-hero__subtitle {
  max-width: 43ch;
  margin: clamp(1.5rem, 1vw, 2.5rem) 0 0;
  color: #000;
  font-family: "ClashDisplay", sans-serif;
  font-size: clamp(1.2rem, 1.5vw, 1.8rem);
  font-weight: 500;
  line-height: 1.22;
  opacity: 0;
  transform: translateY(1.5rem);
}
.case-hero__subtitle.is-visible {
  animation: caseHeroSubtitleUp 0.75s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes caseHeroSubtitleUp {
  to { opacity: 1; transform: translateY(0); }
}

/* On small screens, retain the full-bleed image but give the text room. */
@media (max-width: 800px) {
  .case-hero {
    padding: 7rem 5% 3rem;
    align-items: center;
    background-position: right center;
  }
  .case-hero__content {
    width: 100%;
    padding: clamp(1.35rem, 5vw, 2rem);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .case-hero__title {
    max-width: 16ch;
    font-size: clamp(2.65rem, 9.5vw, 4.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
  }
  .case-hero__subtitle {
    max-width: 34ch;
    margin-top: 1.25rem;
    font-size: clamp(1.25rem, 4.5vw, 1.8rem);
    line-height: 1.25;
  }
}

@media (max-width: 420px) {
  .case-hero { padding-left: 4.5%; padding-right: 4.5%; }
  .case-hero__title { font-size: clamp(2.35rem, 10.5vw, 3.25rem); }
  .case-hero__subtitle { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .case-hero__word-mask i { transform: none; animation: none !important; }
  .case-hero__subtitle { opacity: 1; transform: none; animation: none !important; }
}

/* Hero artwork, one modifier per page.
   Kept after the hero media queries on purpose: zoyel, 2gz and
   vivi-rooms pin the crop to "center top" at every width. */
.portfolio-hero      { background-image: url("../images/portfolio.webp"); }
.case-hero--korvo    { background-image: url("../images/serviceo.webp"); background-position: 65% top;}
.case-hero--zoyel    { background-image: url("../images/zoyel.webp");      background-position: 70% top; }
.case-hero--2gz      { background-image: url("../images/2gz.webp");        background-position: 80% top; }
.case-hero--vivi-rooms { background-image: url("../images/vivi-rooms.webp"); background-position: 80% top; }

/* ============================================================
   4. CASE STUDY SYSTEM  (korvo, zoyel, 2gz, vivi-rooms)
   ============================================================ */
.case-case-study,
.case-case-study * { box-sizing: border-box; }

.case-case-study {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #111;
  font-family: "DM Sans", Inter, Arial, sans-serif;
}

.case-section {
  width: 100%;
  padding: clamp(4.5rem, 7vw, 7.5rem) clamp(1.25rem, 12vw, 20rem);
}

.case-section__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.case-section--yellow { background: var(--yellow); color: #111; }
.case-section--black { background: #101010; color: #fff; }
.case-section--offwhite { background: var(--paper); color: #111; }

.case-eyebrow {
  margin: 0 0 1.15rem;
  color: var(--red);
  font-family: "DM Sans", Inter, Arial, sans-serif;
  font-size: clamp(.72rem, .85vw, .9rem);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}
.case-section__inner > .case-eyebrow { margin-bottom: 1rem; }
/* QUIRK (kept from the old cascade): eyebrows inside black sections render
   WHITE, because `.case-section--black p { color:#fff }` wins. The old file also
   had a yellow rule for them that a legacy override always beat. For yellow,
   add `.case-section--black .case-eyebrow { color: var(--yellow); }` here. */

.case-section h2,
.case-section h3,
.case-section h4 {
  margin-top: 0;
  font-family: "ClashDisplay", sans-serif;
  letter-spacing: -.035em;
}

.case-section h2 {
  margin-bottom: 1.4rem;
  color: var(--red);
  font-size: clamp(2.25rem, 3.1vw, 3.8rem);
  font-weight: 600;
  line-height: 1.02;
}

.case-section--black h2,
.case-section--black h3,
.case-section--black h4 { color: var(--yellow); }

.case-section h3 {
  margin-bottom: .9rem;
  color: var(--red);
  font-size: clamp(1.55rem, 2vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
}

.case-section h4 {
  margin-bottom: .45rem;
  color: var(--red);
  font-size: clamp(1.15rem, 1.35vw, 1.5rem);
  font-weight: 500;
  line-height: 1.2;
}

.case-section p {
  margin: 0 0 1rem;
  font-family: "DM Sans", Inter, Arial, sans-serif;
  font-size: clamp(1rem, 1.12vw, 1.2rem);
  line-height: 1.58;
}

.case-section p strong { color: var(--red); font-weight: 700; }

.case-section--black p,
.case-section--black li,
.case-section--black figcaption { color: #fff; }
.case-section--black p strong { color: var(--yellow); }

.case-lead {
  font-size: clamp(1.05rem, 1.25vw, 1.35rem) !important;
  line-height: 1.55 !important;
}

/* --- challenge section (korvo) --- */
.case-challenge__overview {
  max-width: 92ch;
  margin: 0 0 clamp(2.5rem, 4vw, 4rem) !important;
}

.case-challenge__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2.5rem, 5vw, 6rem);
}
/* QUIRK (kept from the old cascade): the challenge grid stays
   two columns on phones. The old file meant to stack it, but a later
   rule re-set the columns. To stack it, add
   `.case-challenge__grid { grid-template-columns: minmax(0, 1fr); }`
   inside the 680px query below. */

.case-challenge__intro {
  padding-right: clamp(1.5rem, 3vw, 3rem);
  border-right: 1px solid rgba(183, 0, 0, .38);
}
.case-challenge__intro h2 { font-size: clamp(2.3rem, 3.15vw, 3.85rem); }
.case-challenge__details > h3 { margin-bottom: 1.5rem; }

.case-challenge__item {
  padding: 0 0 1.35rem;
  margin: 0 0 1.35rem;
  border-bottom: 1px solid rgba(183, 0, 0, .25);
}
.case-challenge__item:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.case-challenge__item h4 { margin-bottom: .65rem; }
.case-challenge__item p:last-child { margin-bottom: 0; }

/* --- heading row: title left, copy right --- */
.case-section__heading--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: start;
  margin-bottom: clamp(2.25rem, 4vw, 4rem);
}
.case-section__heading--split > :first-child {
  align-self: start;
  padding-right: clamp(1.5rem, 3vw, 3rem);
  border-right: 1px solid currentColor;
  border-color: rgba(183, 0, 0, .28);
}
.case-section--black .case-section__heading--split > :first-child {
  border-color: rgba(255, 231, 20, .38);
}
.case-section__heading--split h2 { margin-bottom: 0; }
.case-section__heading--split .case-eyebrow { margin-bottom: 1rem; }

/* --- card grids: two-up (korvo, vivi-rooms), three-up (zoyel, 2gz) --- */
.case-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 5rem);
  margin: 0 0 clamp(2.5rem, 4vw, 4rem);
}
.case-two-up article {
  padding-top: 1.25rem;
  border-top: 2px solid var(--red);
}
.case-two-up--light article { border-color: var(--yellow); }
.case-two-up--light h3 { color: var(--yellow); }

/* a .case-two-up that holds 3 or 5 cards becomes three columns */
.case-two-up:has(> article:nth-child(3):last-child),
.case-two-up:has(> article:nth-child(5):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5%;
}

.case-three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 4rem);
  margin: clamp(2.5rem, 4vw, 4rem) 0;
}
.case-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4.5rem);
}
.case-insight-grid--five article:last-child {
  grid-column: 1 / -1;
  max-width: calc(50% - 2.25rem);
}
/* logo exploration (2gz) uses .case-two-up with three columns */
.case-logo-exploration { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.case-three-up article,
.case-insight-grid article,
.case-logo-exploration article {
  min-width: 0;
  padding-top: 1.2rem;
  border-top: 2px solid var(--red);
}
.case-section--black .case-three-up article,
.case-section--black .case-insight-grid article,
.case-section--black .case-logo-exploration article { border-color: var(--yellow); }
.case-section--black .case-three-up h3,
.case-section--black .case-insight-grid h3,
.case-section--black .case-logo-exploration h3 { color: var(--yellow); }

.case-subheading-row { margin-top: clamp(3rem, 5vw, 5rem); }
.case-subheading-row h3 { margin-bottom: 0; }

.case-section__subsection-heading {
  margin-top: clamp(3rem, 5vw, 5rem);
  margin-bottom: 1.5rem;
}
.case-section__subsection-heading h3 { margin: 0; }

/* --- quotes: user-need panel and brand statement --- */
.case-quote-panel,
.case-brand-quote {
  margin-top: clamp(3rem, 5vw, 5rem);
  padding: clamp(1.75rem, 3.5vw, 3.5rem);
  border-left: 4px solid var(--red);
  background: rgba(183, 0, 0, .055);
}
.case-quote-panel .case-eyebrow,
.case-brand-quote .case-eyebrow { margin-bottom: 1rem; }
.case-quote-panel blockquote,
.case-brand-quote blockquote {
  max-width: 48ch;
  margin: 0;
  color: var(--red);
  font-family: "ClashDisplay", sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.7rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.case-brand-quote {
  margin: clamp(2.5rem, 4vw, 4rem) 0;
  background: var(--charcoal);
  border-left-color: var(--yellow);
}
.case-brand-quote .case-eyebrow { color: var(--yellow); }
.case-brand-quote blockquote { color: #fff; }

/* --- figures --- */
.case-media {
  width: 100%;
  margin: clamp(2rem, 4vw, 4rem) 0 0;
}
.case-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
}
.case-media figcaption {
  max-width: 78ch;
  margin: 1rem 0 0;
  font-size: .95rem;
  line-height: 1.5;
  opacity: .78;
}

.case-media__card {
  overflow: hidden;
  border-radius: 16px;
  padding: 35px;
  background: #fff;
}
.case-media__card-dark {
  overflow: hidden;
  border-radius: 16px;
  padding: 35px;
  background: var(--charcoal);
}
.case-media__card img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
}
/* 2gz: maps and personas centred, never cropped */
.case-media--contained .case-media__card {
  max-width: 1100px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

/* --- page-specific differences (zoyel and 2gz were never identical) --- */
.page-2gz .case-insight-grid article { padding-bottom: 1rem; }
.page-2gz .case-brand-quote { margin: 2rem 0; }

/* --- section entrance --- */
.case-reveal {
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.case-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- previous / next project cards (replaces the legacy #botnav float layout) --- */
#botnav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  float: none;
  position: relative;
  clear: both;
  width: 100%;
  max-width: 1600px;
  margin: clamp(2rem, 3vw, 3rem) auto 1rem;
  padding: clamp(2rem, 5vw, 4rem) 10%;
  box-sizing: border-box;
  background: var(--yellow);
  border-top: 1px solid #D8C209;
  font-size: 1.1rem;
  font-family: "bitter", serif;
}
#botnav a { color: var(--red); text-decoration: none; }
#botnav a:hover { color: var(--red); text-decoration: underline; }
#botnav h4 { font-size: 1.3rem; margin: 0; }
#botnav h5 { font-size: 1rem; text-transform: uppercase; margin: 0 0 1rem 0; }

#botnav #botleft,
#botnav #botright,
#botnav .project-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  float: none;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 240px;
  margin: 0;
  padding: clamp(2rem, 3vw, 3.5rem);
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  font-size: .85rem;
  color: #111;
  text-align: left;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
#botnav #botleft:hover,
#botnav #botright:hover,
#botnav .project-nav-card:hover,
#botnav #botleft:focus-visible,
#botnav #botright:focus-visible,
#botnav .project-nav-card:focus-visible {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}
#botnav #botleft:focus-visible,
#botnav #botright:focus-visible,
#botnav .project-nav-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}
#botnav .project-nav-card h5 { margin: 0 0 1.25rem; }
#botnav .project-nav-card h4 { margin: 0 0 1rem; font-weight: 600; }
#botnav .project-nav-card p { margin: 0; font-family: "Inter", sans-serif; font-size: .9rem; }

/* --- case study responsive --- */
@media (max-width: 900px) {
  .case-section { padding: 4.25rem clamp(1.25rem, 4vw, 2.5rem); }

  .case-challenge__grid { gap: 2rem; }
  .case-section__heading--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 2rem;
  }
  .case-section__heading--split > :first-child { padding-right: 1.25rem; }

  #botnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 2rem 0 1rem;
    padding: 3rem 5%;
  }
}

@media (max-width: 800px) {
  .case-three-up,
  .case-logo-exploration { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-insight-grid--five article:last-child { max-width: none; }
}

@media (max-width: 768px) {
  .case-two-up:has(> article:nth-child(3):last-child),
  .case-two-up:has(> article:nth-child(5):last-child) {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 680px) {
  .case-section { padding: 3.5rem 1.25rem; }
.case-challenge__grid { grid-template-columns: minmax(0, 1fr); }
  .case-challenge__grid { gap: 1.75rem; }
  .case-section__heading--split,
  .case-two-up {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }
  .case-challenge__intro {
    padding-bottom: 1.5rem;
    border-right: 0;
    border-bottom: 1px solid rgba(183, 0, 0, .35);
  }
  .case-section__heading--split > :first-child {
    padding-right: 0;
    padding-bottom: 1.5rem;
    border-right: 0;
    border-bottom: 1px solid rgba(183, 0, 0, .35);
  }
  .case-section--black .case-section__heading--split > :first-child {
    border-bottom-color: rgba(255, 231, 20, .38);
  }
  .case-challenge__intro h2 { max-width: 18ch; }
  .case-section__heading--split { margin-bottom: 2rem; }
  .case-media { margin-top: 2rem; }

  .case-three-up,
  .case-insight-grid,
  .case-logo-exploration { grid-template-columns: 1fr; gap: 1.75rem; }
  .case-insight-grid--five article:last-child { grid-column: auto; }
  .case-quote-panel,
  .case-brand-quote { padding: 1.5rem; }

  #botnav {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 2rem 0 1rem;
    padding: 2rem 1.25rem;
  }
  #botnav #botleft,
  #botnav #botright,
  #botnav .project-nav-card { min-height: 0; }
}

/* longer titles get more room.
   QUIRK (kept from the old cascade): this sits after the responsive blocks
   on purpose, so these columns also win on tablets and phones (the heading
   stays two columns). To stack it on phones, add
   `.case-section__heading--wide-title { grid-template-columns: minmax(0, 1fr); }`
   inside the 680px query instead. */
.case-section__heading--wide-title {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
}
.case-section__heading--wide-title h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

@media (prefers-reduced-motion: reduce) {
  .case-reveal, .case-reveal.is-revealed, #botnav .project-nav-card {
    opacity: 1; transform: none; transition: none;
  }
}

/* ============================================================
   5. ABOUT + SERVICES  (body.about-page; services also has body.services-page)
   ============================================================ */
.about-page { --about-ink: #22211f; --about-muted: #696660; color: var(--about-ink); }
.about-page main { overflow: hidden; }

/* hero overrides: the about hero is a text-left variant of the shared hero */
.about-page .case-hero { background-position: center center; background-size: cover; }
.about-page .about-hero { background-image: url("../images/navin.webp"); }
.about-page .services-hero { background-image: url("../images/about.webp"); }
.about-page .case-hero__content {
  width: min(52vw, 760px);
  padding: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.about-page .case-hero__title {
  max-width: 15ch;
  font-size: clamp(2.8rem, 5.1vw, 5.8rem);
  letter-spacing: -.045em;
  line-height: .99;
}
.about-page .case-hero__subtitle {
  margin-top: 1.1rem;
  margin-bottom: 1rem;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
}
.about-page .about-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 650px; opacity: 0; transform: translateY(1rem); }
.about-page .about-tags.is-visible { animation: aboutTagsUp .65s ease forwards; }
@keyframes aboutTagsUp { to { opacity: 1; transform: translateY(0); } }
.about-page .about-tags span { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 12px; border: 1px solid rgba(0,0,0,.55); border-radius: 99px; background: rgba(247,245,239,.52); color: #22211f; font-family: inter; font-size: .8rem; font-weight: 500; letter-spacing: normal; line-height: 1.2; }
.about-page .about-tags .about-tags__standout { border-color: #222; background: #222; color: #fff; }
.about-page .case-hero.is-content-visible .about-tags { animation: aboutTagsUp .65s ease .5s forwards; }
.about-hero__scroll { position: absolute; z-index: 3; bottom: 28px; left: 6.5%; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(34,33,31,.5); border-radius: 50%; color: #22211f; text-decoration: none; font-size: 22px; }

.about-section { padding: clamp(10px, 9vw, 20px) clamp(28px, 8vw, 150px); }
.about-intro { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 8vw, 150px); align-items: start; background: #fff; }
.about-kicker { margin: 0 0 22px; font-size: 12px; font-weight: 700; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.about-section__heading h2, .about-beyond h2 { margin: 0; font-size: clamp(2.5rem, 3.5vw, 5rem); line-height: .98; letter-spacing: -.015em; font-weight: 700; }
.about-intro__copy { max-width: 620px; padding-top: 36px; }
.about-intro__copy p, .about-beyond__copy p, .about-engagement-card p { font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.7; color: var(--about-muted); }
.about-intro__copy .about-lead { margin-top: 0; color: var(--about-ink); font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1; font-family: clashdisplay; font-weight: 500; }

/* --- the four expanding capability cards --- */
.about-capabilities {
  padding: clamp(70px, 12vw, 120px) 0;
  background: var(--yellow);
  overflow: hidden;
}
.about-capabilities__inner {
  width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(20px, 10vw, 100px);
}
.about-capabilities__title {
  max-width: 760px;
  margin: 0 0 42px;
  color: #b90000;
  font-size: clamp(2.5rem, 3.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.055em;
}
.about-capabilities__title strong { font-weight: 800; }

.about-capabilities__cards {
  display: flex;
  gap: 12px;
  height: clamp(440px, 38vw, 610px);
}
.about-capability {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  isolation: isolate;
  color: #fff;
  background: #172d40;
  cursor: pointer;
  transition: flex 550ms cubic-bezier(.2,.8,.2,1);
}
.about-capability > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}
.about-capability::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0,0,0,.94) 0%, rgba(0,0,0,.68) 28%, rgba(0,0,0,.08) 75%);
  transition: background 450ms ease;
}
.about-capability__content { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2; }
.about-capability__number { display: block; margin-bottom: 12px; color: var(--yellow); font-size: 12px; letter-spacing: .12em; font-weight: 600; }
.about-capability h3 {
  max-width: 340px;
  margin: 0;
  font-size: clamp(1.25rem, 1.6vw, 1.8rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.015em;
  color: #FDE001;
}
.about-capability__intro { margin: 10px 0 0; color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.4; }
.about-capability__details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: max-height 500ms ease, opacity 350ms ease, transform 450ms ease;
}
.about-capability__details p { max-width: 560px; margin: 16px 0 0; color: rgba(255,255,255,.92); font-size: 15px; line-height: 1.55; }
.about-capability__expand {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  transition: transform 300ms ease, background 300ms ease;
}

/* open state = keyboard/touch focus, or mouse hover on devices that have one */
.about-capability:focus-visible,
.about-capability:focus { outline: 2px solid #b90000; outline-offset: 3px; }

.about-capability:focus .about-capability__details { max-height: 420px; opacity: 1; transform: translateY(0); }
.about-capability:focus::after { background: linear-gradient(to top, rgba(0,0,0,.97) 0%, rgba(0,0,0,.82) 65%, rgba(0,0,0,.3) 100%); }
.about-capability:focus .about-capability__expand { transform: rotate(45deg); background: rgba(255,255,255,.2); }

@media (hover: hover) and (pointer: fine) {
  .about-capabilities__cards:hover .about-capability { flex: .75 1 0; }
  .about-capabilities__cards .about-capability:hover { flex: 2.5 1 0; }
  .about-capability:hover .about-capability__details { max-height: 420px; opacity: 1; transform: translateY(0); }
  .about-capability:hover::after { background: linear-gradient(to top, rgba(0,0,0,.97) 0%, rgba(0,0,0,.82) 65%, rgba(0,0,0,.3) 100%); }
  .about-capability:hover .about-capability__expand { transform: rotate(45deg); background: rgba(255,255,255,.2); }
  .about-capability:hover > img { transform: scale(1.035); }
}

@media (max-width: 700px) {
  .about-capabilities {
    padding: 70px 0;
     background-position: right center;
  }

  .about-capabilities__title {
    margin-bottom: 28px;
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .about-capabilities__cards {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    gap: 16px;
  }

  .about-capability {
    flex: none;
    width: 100%;
    min-height: 380px;
  }

  .about-capability__content {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .about-capability__details p {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .about-capability,
  .about-capability * { transition: none !important; }
}

/* --- beyond / engagement / closing --- */
.about-beyond { padding-top: clamp(85px, 10vw, 150px); padding-bottom: clamp(85px, 10vw, 150px); background: var(--charcoal); color: #f8f5ee; }
.about-beyond__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 9vw, 150px); align-items: start; }
.about-beyond .about-kicker { color: #d8c77e; }
.about-beyond h2 { color: #fff; }
.about-beyond__copy { max-width: 620px; padding-top: 36px; }
.about-beyond__copy p { color: #d2cec6; }
.about-beyond__links { margin-top: 32px; }
.about-beyond__links a, .about-contact-link { display: inline-flex; gap: 14px; align-items: center; color: #ffd600; font-size: 16px; font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 8px; font-family: ClashDisplay; }
.about-engagement { background: #f4eecf; }
.about-section__heading--engagement { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8vw; align-items: end; }
.about-section__heading--engagement .about-kicker { grid-column: 1 / -1; }
.about-engagement__intro { max-width: 520px; margin: 0 0 6px; color: var(--about-muted); font-size: 1.1rem; line-height: 1.65; }
.about-engagement__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 70px; }
.about-engagement-card { min-height: 350px; padding: 34px; background: rgba(255,255,255,.58); }
.about-engagement-card img { width: 200px; height: 200px; object-fit: contain; margin-bottom: 0; }
.about-engagement-card h3 { margin: 0 0 18px; font-size: clamp(1.45rem, 1.8vw, 2rem); line-height: 1.05; letter-spacing: -.04em; }
.about-engagement-card p { font-size: 1rem; }
.about-contact-link { margin-top: 12px; color: #22211f; }
.about-closing 
{ margin: 90px 0 0; font-size: clamp(1.4rem, 2.6vw, 2.5rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.25; font-family: ClashDisplay; }
.about-page #footer { margin-top: 0; }

@media (max-width: 900px) {
  .about-page .case-hero { background-position: 78% center; }
  .about-page .case-hero__content { width: 55vw; }
  .about-page .case-hero__title { font-size: clamp(2.5rem, 5.5vw, 4.4rem); }
  .about-intro, .about-beyond__inner { grid-template-columns: 1fr; gap: 28px; }
  .about-intro__copy, .about-beyond__copy { padding-top: 0; }
  .about-engagement__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .about-page .case-hero { min-height: 92svh; padding: 7rem 5% 3rem; align-items: flex-end; background-position: right center; }
  .about-page .case-hero__content { width: 100%; padding: 22px; background: rgba(247,245,239,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .about-page .case-hero__title { max-width: 14ch; font-size: clamp(2.35rem, 10vw, 3.2rem); }
  .about-page .case-hero__subtitle { margin-top: 14px; font-size: 1rem; }
  .about-page .about-tags { gap: 6px; }
  .about-page .about-tags span { min-height: 28px; padding: 5px 9px; font-size: 10px; }
  .about-hero__scroll { left: 24px; bottom: 18px; }
  .about-section { padding: 76px 24px; }
  .about-section__heading h2, .about-beyond h2 { font-size: clamp(2.5rem, 11vw, 3.6rem); }
  .about-engagement__grid { grid-template-columns: 1fr; margin-top: 42px; }
  .about-engagement-card { min-height: 0; padding: 28px; }
  .about-engagement-card img { margin-bottom: 24px; }
  .about-section__heading--engagement { display: block; }
  .about-engagement__intro { margin-top: 24px; }
  .about-closing { margin-top: 56px; }
}

/* --- services page (was an inline <style> block in services.html;
       it sat after the about rules, so it wins at every width) --- */
.services-page .case-hero__title { font-size: clamp(2.5rem, 3.5vw, 4.4rem); }
.services-page .about-intro { grid-template-columns: .4fr .6fr; gap: clamp(40px, 8vw, 150px); }
.services-page .about-section { padding: clamp(40px, 5vw, 90px) clamp(28px, 8vw, 150px); }
/* QUIRK (kept from the old cascade): because of that, the services intro
   stays two columns on phones. To stack it, add
   `.services-page .about-intro { grid-template-columns: 1fr; }` inside a
   (max-width: 900px) query. */

.cta-para { padding: clamp(40px, 5vw, 90px) clamp(28px, 8vw, 150px); }
.cta-para a.mail {
  color: #fff;
  padding: 5px 15px 5px 15px;
  margin-left: 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 2px;
  transition-duration: 0.4s;
  background-color: #bf0000;
  border-radius: 25px;
  font-family: "ClashDisplay";
}
.cta-para a.mail:hover { background-color: #8A0000; }

/* ============================================================
   6. PORTFOLIO LIST  (body.nhp-page)
   Card = copy half on paper + visual half as a solid colour panel.
   Panels alternate red / grey so light and dark screenshots both
   have something to push against. No hover movement.
   ============================================================ */
.nhp-page .nhp-project-list,
.nhp-page .nhp-project-list *,
.nhp-page .nhp-project-list *::before,
.nhp-page .nhp-project-list *::after { box-sizing: border-box; }

.nhp-page .nhp-main { width: 100%; max-width: 100%; margin: 0; padding: 0; }

.nhp-page .nhp-project-list {
  --nhp-ink: #171717;
  --nhp-muted: #55514c;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  width: 100%;
  margin: 0;
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1rem, 6vw, 6rem);
  background: var(--yellow);
}

.nhp-page .nhp-project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  width: min(100%, 1480px);
  min-width: 0;
  min-height: clamp(380px, 36vw, 580px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
}
.nhp-page .nhp-project--device-left { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }

.nhp-page .nhp-project-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding: clamp(2rem, 4.6vw, 5rem);
}
.nhp-page .nhp-project-visual { grid-column: 2; grid-row: 1; }
.nhp-page .nhp-project--device-left .nhp-project-copy   { grid-column: 2; }
.nhp-page .nhp-project--device-left .nhp-project-visual { grid-column: 1; }

/* whole card is clickable via the link's stretched hit area */
.nhp-page .nhp-project-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.nhp-page .nhp-project:has(.nhp-project-link:focus-visible) { outline: 3px solid var(--nhp-ink); outline-offset: -3px; }

.nhp-page .nhp-project-kicker {
  margin: 0 0 clamp(.9rem, 1.4vw, 1.3rem);
  padding: 0;
  color: var(--red);
  font-family: "Inter", sans-serif;
  font-size: clamp(.9rem, 1vw, 1.02rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
}
.nhp-page .nhp-project-heading {
  max-width: 15ch;
  margin: 0 0 clamp(1rem, 1.6vw, 1.5rem);
  padding: 0;
  color: var(--nhp-ink);
  font-family: "ClashDisplay", sans-serif;
  font-size: clamp(1.9rem, 3vw, 3.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.018em;
  word-spacing: .04em;
  text-transform: none;
  overflow-wrap: normal;
}
.nhp-page .nhp-project-description {
  max-width: 44ch;
  margin: 0 0 clamp(1.2rem, 1.8vw, 1.7rem);
  padding: 0;
  color: var(--nhp-muted);
  font-family: "Inter", sans-serif;
  font-size: clamp(.98rem, 1.1vw, 1.12rem);
  font-weight: 400;
  line-height: 1.65;
}

/* tags: quiet outlined chips, secondary to the description */
.nhp-page .nhp-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .45rem;
  margin: 0 0 clamp(1.5rem, 2.2vw, 2.2rem);
  padding: 0;
  list-style: none;
}
.nhp-page .nhp-project-tags li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: .32rem .7rem;
  border: 1px solid rgba(23, 23, 23, .22);
  border-radius: 999px;
  background: transparent;
  color: var(--nhp-ink);
  font-family: "Inter", sans-serif;
  font-size: clamp(.72rem, .78vw, .8rem);
  font-weight: 500;
  line-height: 1.2;
  list-style: none;
}

/* link: label + round arrow button */
.nhp-page .nhp-project-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: ClashDisplay;
  background: transparent;
  color: var(--nhp-ink);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.nhp-page .nhp-project-link span[aria-hidden="true"] {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--nhp-ink);
  color: var(--yellow);
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  line-height: 1;
  transition: background-color .25s ease, color .25s ease;
}
.nhp-page .nhp-project:hover .nhp-project-link span[aria-hidden="true"],
.nhp-page .nhp-project-link:focus-visible span[aria-hidden="true"] {
  background: var(--red);
  color: #fff;
}

/* visual panel */
.nhp-page .nhp-project-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100%;
  padding: clamp(2rem, 4vw, 4.5rem) clamp(1.5rem, 3.5vw, 4rem);
  overflow: hidden;
  background: var(--red);
}
.nhp-page .nhp-project--panel-red .nhp-project-visual {
  background: radial-gradient(90% 80% at 50% 42%, #D40D0D 0%, #B70000 55%, #920000 100%);
}
.nhp-page .nhp-project--panel-ink .nhp-project-visual {
  background: radial-gradient(90% 80% at 50% 42%, #7A7E83 0%, #686C71 55%, #595D62 100%);
}

/* laptop (flat, modern) */
.nhp-page .nhp-device {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 640px);
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .38));
}
.nhp-page .nhp-device-display {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 2% 2% 2.4%;
  border-radius: 3.2% 3.2% .8% .8% / 5.1% 5.1% 1.3% 1.3%;
  background: #101010;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.nhp-page .nhp-device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: .7% / 1.1%;
  background: #f4f1e9;
}
.nhp-page .nhp-device-screen img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: top center;
}
.nhp-page .nhp-device-base {
  position: relative;
  width: 108%;
  margin: 0 0 0 -4%;
  aspect-ratio: 40 / 1;
  min-height: 12px;
  border-radius: 0 0 1.8% 1.8% / 0 0 100% 100%;
  background: linear-gradient(180deg, #e9eaec 0%, #cfd0d3 55%, #b4b6b9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.nhp-page .nhp-device-trackpad {
  position: absolute;
  top: 0;
  left: 50%;
  width: 17%;
  height: 58%;
  border-radius: 0 0 999px 999px / 0 0 100% 100%;
  background: linear-gradient(180deg, #9a9c9f 0%, #b9bbbe 100%);
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .nhp-page .nhp-project,
  .nhp-page .nhp-project--device-left { min-height: 360px; }
  .nhp-page .nhp-project-copy { padding: clamp(1.4rem, 3.6vw, 2.6rem); }
  .nhp-page .nhp-project-heading { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
  .nhp-page .nhp-project-description { font-size: .95rem; }
  .nhp-page .nhp-project-visual { padding: 1.5rem 1rem; }
}

/* mobile: copy first, panel second */
@media (max-width: 640px) {
  .nhp-page .nhp-project-list { gap: 1.25rem; padding: 1.25rem .75rem 1.75rem; }
  .nhp-page .nhp-project,
  .nhp-page .nhp-project--device-left { display: flex; flex-direction: column; min-height: 0; }
  .nhp-page .nhp-project-copy,
  .nhp-page .nhp-project--device-left .nhp-project-copy { order: 1; width: 100%; padding: 2rem 1.4rem 1.6rem; }
  .nhp-page .nhp-project-visual,
  .nhp-page .nhp-project--device-left .nhp-project-visual { order: 2; width: 100%; min-height: 0; padding: 2rem 1rem 2.2rem; }
  .nhp-page .nhp-project-heading { max-width: 17ch; font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .nhp-page .nhp-project-description { max-width: 55ch; font-size: 1rem; }
  .nhp-page .nhp-device { width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .nhp-page .nhp-project-link span[aria-hidden="true"] { transition: none; }
}

@media (max-width: 600px) {
  .services-page .about-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}



/* --- project outcome metrics --- */

.nhp-page .nhp-project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 clamp(1.5rem, 2.2vw, 2.2rem);
}

.nhp-project-metrics--2 {
  display: grid;
  gap: 0;
  margin: 0 0 clamp(1.5rem, 2.2vw, 2.2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


.nhp-page .nhp-metric {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 clamp(.5rem, 1.2vw, 1.2rem);
  border-right: 1px solid rgba(23, 23, 23, .25);
}

.nhp-page .nhp-metric:first-child {
  padding-left: 0;
}

.nhp-page .nhp-metric:last-child {
  padding-right: 0;
  border-right: 0;
}

.nhp-page .nhp-metric-number {
  display: block;
  margin-bottom: .25rem;
  color: var(--red);
  font-family: "ClashDisplay", sans-serif;
 font-size: clamp(1.6rem, 2.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.nhp-page .nhp-metric-label {
  display: block;
  color: var(--nhp-muted);
  font-family: "Inter", sans-serif;
  font-size: clamp(.72rem, .95vw, .95rem);
  font-weight: 400;
  line-height: 1.4;
}

/* Give the Zoyel card enough vertical room */
.nhp-page .nhp-project--with-metrics {
  min-height: clamp(480px, 42vw, 680px);
}

/* Tablet */
@media (max-width: 900px) {
  .nhp-page .nhp-metric-number {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
  }

  .nhp-page .nhp-metric-label {
    font-size: .75rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .nhp-page .nhp-project-metrics {
    margin-bottom: 1.75rem;
  }

  .nhp-page .nhp-metric {
    padding: 0 .45rem;
  }

  .nhp-page .nhp-metric:first-child {
    padding-left: 0;
  }

  .nhp-page .nhp-metric-number {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .nhp-page .nhp-metric-label {
    font-size: .7rem;
    line-height: 1.35;
  }
}



















/* ---- Results at a glance: floating glass card centred on the hero / first-section boundary ---- */
.case-metrics,
.case-metrics * { box-sizing: border-box; }

.case-metrics {
  position: relative;
  z-index: 5;
  height: 0;                          /* zero-height anchor: the card is centred on this line */
}

.case-metrics__card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: min(1100px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding: clamp(1.5rem, 2.6vw, 2.5rem) clamp(1rem, 3vw, 3rem);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: clamp(18px, 2vw, 28px);
  background: linear-gradient(135deg, rgba(16, 16, 16, .68), rgba(16, 16, 16, .5));
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 24px 60px rgba(0, 0, 0, .28);
  transform: translateY(max(-50%, -9rem));   /* half the card sits over the hero (capped at 9rem for tall stacked cards) */
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .case-metrics__card { background: rgba(16, 16, 16, .92); }
}

/* hidden until the visitor has scrolled into the hero (JS adds .is-armed, then .is-visible) */
.case-metrics.is-armed .case-metrics__card {
  opacity: 0;
  transform: translateY(calc(max(-50%, -9rem) + 36px)) scale(.97);
  pointer-events: none;
}
.case-metrics.is-armed.is-visible .case-metrics__card {
  opacity: 1;
  transform: translateY(max(-50%, -9rem));
  pointer-events: auto;
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}

/* keep the first section clear of the card's lower half (--metrics-h is set by metrics.js) */
.case-metrics + .case-section,
.case-metrics + .case-case-study > .case-section:first-child {
  padding-top: calc(var(--metrics-h, 11rem) - min(var(--metrics-h, 11rem) / 2, 9rem) + clamp(3rem, 5vw, 5rem));
}

.case-metrics__row {
  display: grid;
  grid-auto-flow: column;             /* 2, 3 or 4 metrics: always one row */
  grid-auto-columns: minmax(0, 1fr);  /* ...sharing the card's width equally */
}
.case-metric {
  padding-inline: clamp(.5rem, 1.6vw, 1.5rem);
  text-align: center;
  border-left: 1px solid rgba(255, 231, 20, .35);
}
.case-metric:first-child { border-left: 0; }

.case-metrics .case-metric__value {
  margin: 0;
  color: var(--yellow);
  font-family: "ClashDisplay", sans-serif;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; /* digits keep their width while counting */
}
.case-metric__rule {
  display: block;
  width: 2.25rem;
  height: 2px;
  margin: .8rem auto .65rem;
  background: var(--yellow);
}
.case-metrics.is-armed .case-metric__rule { transform: scaleX(0); }
.case-metrics.is-armed.is-visible .case-metric__rule {
  transform: scaleX(1);
  transition: transform 1.6s cubic-bezier(.2, .8, .2, 1) .25s;
}
.case-metrics .case-metric__label {
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(.85rem, 1vw, 1.05rem);
  line-height: 1.35;
}

@media (max-width: 680px) {
  .case-metrics__row { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .case-metric { padding: 1.1rem 0; border-left: 0; border-top: 1px solid rgba(255, 231, 20, .3); }
  .case-metric:first-child { padding-top: 0; border-top: 0; }
  .case-metric:last-child  { padding-bottom: 0; }
  .case-metrics .case-metric__value { font-size: clamp(2.75rem, 13vw, 3.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .case-metrics.is-armed .case-metrics__card,
  .case-metrics.is-armed .case-metric__rule { transition: none; }
}