/* Inter, self-hosted (SIL Open Font License 1.1, see fonts/OFL.txt). The same variable font files Google Fonts served, for the same
   subsets (latin, latin-ext) and the same weights (300-600), so the typography is identical to the previous setup. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/Inter-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/Inter-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Design tokens ===== */
:root {
  --bg: #1c1c1e;
  --bg-elevated: #262629;
  --fg: #ffffff;
  --muted: #9a9a9f;
  --line: #35353a;
  --divider: rgba(255, 255, 255, 0.1);
  --accent: #f5c518;

  /* Portfolio Colors — see COLORS.md */
  --graphite: #696969;
  --soft-yellow: #FFFBE4;
  --card-bg: #232326;
  --card-hover: #2c2c30;
  --max: 880px;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===== Type systems (per page) ===== */
.type-grotesk {
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-hero: 75px;      --lh-hero: 1.25;     --w-hero: 500;
  --fs-hero-sub: 32px;  --lh-hero-sub: 1.25; --w-hero-sub: 300;
  --fs-hero-meta: 25px; --lh-hero-meta: 1.2; --w-hero-meta: 300;
  --fs-h1: 56px;        --lh-h1: 1.2;        --w-h1: 500;
  --fs-h2: 35px;        --lh-h2: 1.2;        --w-h2: 500;
  --fs-h3: 26px;        --lh-h3: 1.2;        --w-h3: 500;
  --fs-body: 28px;      --lh-body: 1.6;      --w-body: 300;
  --fs-caption: 22px;   --lh-caption: 1.45;  --w-caption: 300;
}

.type-inter {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-hero: 75px;      --lh-hero: 1.25;     --w-hero: 600;
  --fs-hero-sub: 32px;  --lh-hero-sub: 1.2;  --w-hero-sub: 300;
  --fs-hero-meta: 25px; --lh-hero-meta: 1.2; --w-hero-meta: 300;
  --fs-h1: 56px;        --lh-h1: 1.2;        --w-h1: 600;
  --fs-h2: 35px;        --lh-h2: 1.2;        --w-h2: 600;
  --fs-h3: 26px;        --lh-h3: 1.2;        --w-h3: 500;
  --fs-body: 25px;      --lh-body: 1.6;      --w-body: 400;
  --fs-caption: 20px;   --lh-caption: 1.4;   --w-caption: 400;
}

/* Scale the display sizes down on small screens */
@media (max-width: 720px) {
  .type-grotesk, .type-inter {
    --fs-hero: 40px;
    --fs-hero-sub: 22px;
    --fs-hero-meta: 16px;
    --fs-h1: 34px;
    --fs-h2: 26px;
    --fs-h3: 21px;
    --fs-body: 18px;
    --fs-caption: 15px;
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* contain full-bleed sections' 100vw width without a horizontal scrollbar.
     Must live on <html>, not <body>: `overflow-x: clip` on <body> does NOT
     propagate to the viewport, so it silently kills vertical page scrolling. */
  overflow-x: clip;
}

body {
  font-family: var(--font);
  font-size: var(--fs-body, 16px);
  font-weight: var(--w-body, 400);
  line-height: var(--lh-body, 1.6);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* ===== Site header (project pages) ===== */
.site-header {
  padding: 40px 0 0;
}

.brand {
  font-size: 18px;
  font-weight: var(--w-h3, 600);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-block;
}

.brand:hover { color: var(--accent); }

/* ======================================================================
   Home page — editorial single-viewport canvas.
   Pure white ground that transitions into the white case-study pages.
   Typography: Space Grotesk (same family as "Optimizing the Investing
   Experience"), light weights. Restrained charcoal / grey palette with a
   single warm vermilion accent used only on the project arrows, the
   Portfolio PDF outline, one geometry node and hover/focus states.
   ====================================================================== */
body.home-page {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-name: "Merriweather", Georgia, "Times New Roman", serif;   /* the "Anna Müller" heading only */

  --hp-ink: #242424;      /* base text colour */
  --hp-line: #D9D9D9;     /* dividers + geometry */
  --hp-accent: #F5763E;   /* warm orange: highlights, separators, chevrons, hover */
  --hp-nav: #727272;      /* top navigation, footer link */
  --hp-name: #211F26;     /* name */
  --hp-intro: #3B383E;    /* introduction */
  --hp-num: #696969;      /* project numbers, button */
  --hp-title: #000000;    /* project titles */
  --hp-meta: #666666;     /* project categories */

  /* Figma desktop frame is 1920 px wide: --u is "one Figma pixel". It equals 1px at
     1920 and above and scales down with the viewport, but never below 0.7px, so the
     composition keeps its proportions on smaller desktops. */
  --u: clamp(0.7px, calc(100vw / 1920), 1px);

  background: #FFFFFF;
  color: var(--hp-ink);
  min-height: 100vh;
}

.home {
  position: relative;
  overflow-x: clip;        /* geometry never widens the page */
}

/* wrapper around the mountain SVG. Desktop: it fills the page, so nothing changes. The compact and
   vertical layouts below reuse the very same element and just crop / place it with CSS. */
.hp-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- mountain composition: photo + routes in one SVG (decorative, hidden from AT) --- */
.hp-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Desktop only (>= 1280px): the whole mountain composition — photo, routes, nodes, labels, Clarity and the
   glow all live in this one SVG — is shown at 90% of its size. One uniform scale on the single element, anchored
   at the bottom-right corner (the corner the SVG is already aligned to), so everything stays exactly in step and
   the right and bottom edges stay flush with the page; the freed 10% becomes breathing room on the left. The
   photo's left and top edges are pure white, so nothing hard shows. On very wide screens (>= 2:1) the top of the
   photo is cropped, so there a soft fade hides the new top edge. */
@media (min-width: 1280px) {
  .hp-geo { transform: scale(0.9); transform-origin: 100% 100%; }
}
@media (min-width: 1280px) and (min-aspect-ratio: 2/1) {
  .hp-geo {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 10%);
  }
}
/* reflected sunrise light, entering from the upper-left corner: three very large, very soft
   radial washes (golden yellow, apricot, a little coral) that all die out well inside the box,
   so there is no edge and no visible circle; it sits behind the text and the script drives
   its opacity in step with the mountain sunrise */
.hp-ambient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.50;     /* permanent resting warmth from the very first frame (~50% of the sunrise peak; was 0.243); the script lifts it with the sunrise and settles back here */
  background:
    radial-gradient(ellipse 27.6% 34% at 0% 0%,
      rgba(246, 161, 154, 0.18) 0%,
      rgba(246, 161, 154, 0.083) 42%,
      rgba(246, 161, 154, 0) 100%),
    radial-gradient(ellipse 47.84% 58% at 0% 0%,
      rgba(255, 196, 138, 0.345) 0%,
      rgba(255, 196, 138, 0.195) 36%,
      rgba(255, 196, 138, 0.068) 70%,
      rgba(255, 196, 138, 0) 100%),
    radial-gradient(ellipse 62.56% 74% at 0% 0%,
      rgba(255, 227, 160, 0.39) 0%,
      rgba(255, 227, 160, 0.255) 24%,
      rgba(255, 227, 160, 0.113) 52%,
      rgba(255, 227, 160, 0.034) 78%,
      rgba(255, 227, 160, 0) 100%);
}
/* ---- EXPERIMENTAL cloud layer, version 2 (left side) ---------------------------------
   Soft gray-blue mist drifting out of the mountain fog into the white space behind the
   typography. Pure CSS, static. Two blurred pseudo-elements hold elongated, unevenly sized
   cloud banks (denser ones in the upper-left and under the project cards, paler wisps
   between); each is tilted a different small angle and masked to fade out towards the
   mountains, so there are no circles, edges or repeats. The layer sits above the photo and
   below the corner light and all text, is not part of the SVG, and ignores the pointer.
   TO RESTORE VERSION 1: replace this block with backup-before-clouds-v2/hp-clouds-v1.css.
   TO REMOVE: delete this block and the <div class="hp-clouds"> in index.html.
   TO SWITCH OFF TEMPORARILY: set --hp-cloud-strength: 0 (or display: none) below.
   TO TUNE: change --hp-cloud-strength (1 = as designed, 1.4 = stronger, 0.6 = fainter). */
.hp-clouds {
  --hp-cloud-strength: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;                  /* clips the blurred pseudo-elements at the page edge */
  opacity: var(--hp-cloud-strength);
}
.hp-clouds::before,
.hp-clouds::after {
  content: "";
  position: absolute;
  inset: -6%;                        /* oversize, so the blur never fades at the visible edge */
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 38%, rgba(0, 0, 0, 0.45) 58%, transparent 80%);
          mask-image: linear-gradient(to right, #000 0%, #000 38%, rgba(0, 0, 0, 0.45) 58%, transparent 80%);
}
.hp-clouds::before {
  filter: blur(16px);
  transform: rotate(-2.2deg);
  background:
    radial-gradient(ellipse 32.1% 5.8% at 18.7% 21.4%,
      rgba(128, 147, 168, 0.1500) 0%,
      rgba(128, 147, 168, 0.1350) 15%,
      rgba(128, 147, 168, 0.1020) 30%,
      rgba(128, 147, 168, 0.0570) 50%,
      rgba(128, 147, 168, 0.0225) 70%,
      rgba(128, 147, 168, 0.0060) 85%,
      rgba(128, 147, 168, 0.0000) 100%),
    radial-gradient(ellipse 21.4% 8.0% at 9.8% 29.5%,
      rgba(128, 147, 168, 0.1200) 0%,
      rgba(128, 147, 168, 0.1080) 15%,
      rgba(128, 147, 168, 0.0816) 30%,
      rgba(128, 147, 168, 0.0456) 50%,
      rgba(128, 147, 168, 0.0180) 70%,
      rgba(128, 147, 168, 0.0048) 85%,
      rgba(128, 147, 168, 0.0000) 100%),
    radial-gradient(ellipse 23.2% 4.0% at 33.0% 17.0%,
      rgba(150, 167, 184, 0.0850) 0%,
      rgba(150, 167, 184, 0.0765) 15%,
      rgba(150, 167, 184, 0.0578) 30%,
      rgba(150, 167, 184, 0.0323) 50%,
      rgba(150, 167, 184, 0.0128) 70%,
      rgba(150, 167, 184, 0.0034) 85%,
      rgba(150, 167, 184, 0.0000) 100%),
    radial-gradient(ellipse 26.8% 4.9% at 25.9% 34.8%,
      rgba(150, 167, 184, 0.0750) 0%,
      rgba(150, 167, 184, 0.0675) 15%,
      rgba(150, 167, 184, 0.0510) 30%,
      rgba(150, 167, 184, 0.0285) 50%,
      rgba(150, 167, 184, 0.0112) 70%,
      rgba(150, 167, 184, 0.0030) 85%,
      rgba(150, 167, 184, 0.0000) 100%),
    radial-gradient(ellipse 13.4% 8.9% at 7.1% 14.3%,
      rgba(128, 147, 168, 0.1000) 0%,
      rgba(128, 147, 168, 0.0900) 15%,
      rgba(128, 147, 168, 0.0680) 30%,
      rgba(128, 147, 168, 0.0380) 50%,
      rgba(128, 147, 168, 0.0150) 70%,
      rgba(128, 147, 168, 0.0040) 85%,
      rgba(128, 147, 168, 0.0000) 100%),
    radial-gradient(ellipse 15.2% 8.0% at 8.9% 50.0%,
      rgba(150, 167, 184, 0.0850) 0%,
      rgba(150, 167, 184, 0.0765) 15%,
      rgba(150, 167, 184, 0.0578) 30%,
      rgba(150, 167, 184, 0.0323) 50%,
      rgba(150, 167, 184, 0.0128) 70%,
      rgba(150, 167, 184, 0.0034) 85%,
      rgba(150, 167, 184, 0.0000) 100%),
    radial-gradient(ellipse 23.2% 3.6% at 36.6% 42.0%,
      rgba(176, 190, 204, 0.0500) 0%,
      rgba(176, 190, 204, 0.0450) 15%,
      rgba(176, 190, 204, 0.0340) 30%,
      rgba(176, 190, 204, 0.0190) 50%,
      rgba(176, 190, 204, 0.0075) 70%,
      rgba(176, 190, 204, 0.0020) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 28.6% 4.5% at 22.3% 68.8%,
      rgba(128, 147, 168, 0.1000) 0%,
      rgba(128, 147, 168, 0.0900) 15%,
      rgba(128, 147, 168, 0.0680) 30%,
      rgba(128, 147, 168, 0.0380) 50%,
      rgba(128, 147, 168, 0.0150) 70%,
      rgba(128, 147, 168, 0.0040) 85%,
      rgba(128, 147, 168, 0.0000) 100%),
    radial-gradient(ellipse 25.0% 3.8% at 39.3% 74.1%,
      rgba(150, 167, 184, 0.0750) 0%,
      rgba(150, 167, 184, 0.0675) 15%,
      rgba(150, 167, 184, 0.0510) 30%,
      rgba(150, 167, 184, 0.0285) 50%,
      rgba(150, 167, 184, 0.0112) 70%,
      rgba(150, 167, 184, 0.0030) 85%,
      rgba(150, 167, 184, 0.0000) 100%),
    radial-gradient(ellipse 23.2% 6.2% at 13.4% 80.4%,
      rgba(128, 147, 168, 0.0900) 0%,
      rgba(128, 147, 168, 0.0810) 15%,
      rgba(128, 147, 168, 0.0612) 30%,
      rgba(128, 147, 168, 0.0342) 50%,
      rgba(128, 147, 168, 0.0135) 70%,
      rgba(128, 147, 168, 0.0036) 85%,
      rgba(128, 147, 168, 0.0000) 100%),
    radial-gradient(ellipse 17.9% 3.2% at 45.5% 61.6%,
      rgba(176, 190, 204, 0.0500) 0%,
      rgba(176, 190, 204, 0.0450) 15%,
      rgba(176, 190, 204, 0.0340) 30%,
      rgba(176, 190, 204, 0.0190) 50%,
      rgba(176, 190, 204, 0.0075) 70%,
      rgba(176, 190, 204, 0.0020) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 21.4% 2.9% at 29.5% 56.2%,
      rgba(176, 190, 204, 0.0450) 0%,
      rgba(176, 190, 204, 0.0405) 15%,
      rgba(176, 190, 204, 0.0306) 30%,
      rgba(176, 190, 204, 0.0171) 50%,
      rgba(176, 190, 204, 0.0067) 70%,
      rgba(176, 190, 204, 0.0018) 85%,
      rgba(176, 190, 204, 0.0000) 100%);
}
.hp-clouds::after {
  filter: blur(30px);
  transform: rotate(1.6deg);
  background:
    radial-gradient(ellipse 39.3% 8.9% at 25.0% 25.0%,
      rgba(176, 190, 204, 0.0800) 0%,
      rgba(176, 190, 204, 0.0720) 15%,
      rgba(176, 190, 204, 0.0544) 30%,
      rgba(176, 190, 204, 0.0304) 50%,
      rgba(176, 190, 204, 0.0120) 70%,
      rgba(176, 190, 204, 0.0032) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 23.2% 12.5% at 14.3% 41.1%,
      rgba(176, 190, 204, 0.0700) 0%,
      rgba(176, 190, 204, 0.0630) 15%,
      rgba(176, 190, 204, 0.0476) 30%,
      rgba(176, 190, 204, 0.0266) 50%,
      rgba(176, 190, 204, 0.0105) 70%,
      rgba(176, 190, 204, 0.0028) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 30.4% 8.0% at 34.8% 57.1%,
      rgba(176, 190, 204, 0.0550) 0%,
      rgba(176, 190, 204, 0.0495) 15%,
      rgba(176, 190, 204, 0.0374) 30%,
      rgba(176, 190, 204, 0.0209) 50%,
      rgba(176, 190, 204, 0.0083) 70%,
      rgba(176, 190, 204, 0.0022) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 35.7% 8.0% at 28.6% 76.8%,
      rgba(176, 190, 204, 0.0750) 0%,
      rgba(176, 190, 204, 0.0675) 15%,
      rgba(176, 190, 204, 0.0510) 30%,
      rgba(176, 190, 204, 0.0285) 50%,
      rgba(176, 190, 204, 0.0112) 70%,
      rgba(176, 190, 204, 0.0030) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 19.6% 5.4% at 48.2% 32.1%,
      rgba(176, 190, 204, 0.0400) 0%,
      rgba(176, 190, 204, 0.0360) 15%,
      rgba(176, 190, 204, 0.0272) 30%,
      rgba(176, 190, 204, 0.0152) 50%,
      rgba(176, 190, 204, 0.0060) 70%,
      rgba(176, 190, 204, 0.0016) 85%,
      rgba(176, 190, 204, 0.0000) 100%),
    radial-gradient(ellipse 14.3% 12.5% at 8.0% 67.9%,
      rgba(176, 190, 204, 0.0600) 0%,
      rgba(176, 190, 204, 0.0540) 15%,
      rgba(176, 190, 204, 0.0408) 30%,
      rgba(176, 190, 204, 0.0228) 50%,
      rgba(176, 190, 204, 0.0090) 70%,
      rgba(176, 190, 204, 0.0024) 85%,
      rgba(176, 190, 204, 0.0000) 100%);
}
@media (max-width: 900px), (max-width: 1279px) and (orientation: portrait) {
  .hp-clouds { display: none; }       /* the vertical layouts keep a plain white page behind the text */
}
/* ---- end of experimental cloud layer --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hp-glow { display: none; }   /* static composition only; the faint corner-light baseline stays */
}

/* --- composition (Figma 1920x1080 frame; every size is a multiple of --u) --- */
.home-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(69 * var(--u)) calc(155 * var(--u)) clamp(28px, 4vh, 52px);
}

/* --- top navigation: x=155, y=69, 35px apart --- */
.hp-top {
  display: flex;
  gap: calc(35 * var(--u));
  font-size: calc(22 * var(--u));
  line-height: 1.2;
  font-weight: 300;
  color: var(--hp-nav);
}
.hp-top-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
a.hp-top-link:focus-visible { color: var(--hp-accent); }
a.hp-top-link:focus-visible { outline: 2px solid var(--hp-accent); outline-offset: 4px; border-radius: 2px; }

/* --- name + introduction: the main column starts at y=205 --- */
.hp-intro { margin-top: calc(109.6 * var(--u)); }   /* 205 - (69 + 26.4) */

.hp-name {
  font-family: var(--font-name);
  font-size: calc(100 * var(--u));
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--hp-name);
}

.hp-statement {
  margin-top: calc(15 * var(--u));
  max-width: calc(671 * var(--u));
  font-size: calc(29 * var(--u));
  line-height: 1.2;
  font-weight: 400;
  color: var(--hp-intro);
}
.hp-hl { color: var(--hp-accent); }

/* --- project index: three cards, 661.58 wide, 95.92 tall, 17 apart (Figma) --- */
.hp-projects {
  margin-top: calc(40 * var(--u));
  width: calc(661.58 * var(--u));
  max-width: 100%;
}

.hp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;                               /* one continuous list: the rows touch */
}

/* each project is one row of a single editorial list: the whole row is the hover / focus target.
   No card borders or corners; the 1px separators are drawn INSIDE the rows (a top line on every row,
   plus a bottom line on the last), so they can never change a row's size or double up. */
.hp-link {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: calc(95.92 * var(--u));
  padding: calc(14.72 * var(--u) + 1px);     /* + the 1px the old card border took, so the content sits exactly where it did */
  border: 0;
  border-radius: 0;
  background-color: rgba(245, 118, 62, 0);   /* transparent; same hue so the fade stays clean */
  box-shadow: inset 0 1px 0 0 #E3E3E3;
  text-decoration: none;
  color: var(--hp-title);
  transition: background-color 250ms ease-out, box-shadow 250ms ease-out;
}
.hp-row:last-child .hp-link { box-shadow: inset 0 1px 0 0 #E3E3E3, inset 0 -1px 0 0 #E3E3E3; }

.hp-link:focus-visible {
  background-color: rgba(245, 118, 62, 0.05);
  box-shadow: inset 0 1px 0 0 var(--hp-accent);
}
.hp-row:last-child .hp-link:focus-visible { box-shadow: inset 0 1px 0 0 var(--hp-accent), inset 0 -1px 0 0 var(--hp-accent); }
/* the line under a highlighted row is the next row's top line */
.hp-row:has(> .hp-link:focus-visible) + .hp-row > .hp-link { box-shadow: inset 0 1px 0 0 var(--hp-accent); }
.hp-row:has(> .hp-link:focus-visible) + .hp-row:last-child > .hp-link { box-shadow: inset 0 1px 0 0 var(--hp-accent), inset 0 -1px 0 0 #E3E3E3; }

/* number column ends where the orange separator starts (91 from the card edge) */
.hp-num {
  flex: 0 0 calc(76.28 * var(--u) - 1px);
  font-size: calc(25 * var(--u));
  line-height: 1.2;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--hp-num);
  transition: color 250ms ease-out;
}
.hp-link:focus-visible .hp-num { color: var(--hp-accent); }

/* the orange separator is drawn on the info column's left edge */
.hp-info {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding-left: calc(40 * var(--u));     /* 2px separator + 38px gap */
}
.hp-info::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: calc(2 * var(--u));
  height: calc(53 * var(--u));
  transform: translateY(-50%);
  background: var(--hp-accent);
}

.hp-title {
  display: block;
  font-size: calc(24 * var(--u));
  line-height: 1.2;
  font-weight: 400;
  color: var(--hp-title);
  transition: color 250ms ease-out;
}
.hp-link:focus-visible .hp-title { color: var(--hp-accent); }

.hp-meta {
  display: block;
  margin-top: calc(8 * var(--u));
  font-size: calc(22 * var(--u));
  line-height: 1.2;
  font-weight: 400;
  color: var(--hp-meta);
}

.hp-arrow {
  flex: 0 0 auto;
  width: calc(13 * var(--u));
  height: calc(22 * var(--u));
  margin-right: calc(15.4 * var(--u));
  color: var(--hp-accent);
  transition: transform 250ms ease-out;     /* a transform: moves the chevron only, nothing around it */
}
.hp-link:focus-visible .hp-arrow { transform: translateX(6px); }

.hp-link:focus-visible {
  outline: 2px solid var(--hp-accent);
  outline-offset: -3px;                 /* inside the row, so it never overlaps its neighbours */
}

/* --- Portfolio PDF: 250x54 pill --- */
.hp-pdf-wrap { margin-top: calc(40 * var(--u)); }

/* Desktop only (>= 1280px): the main left block — name + introduction, project list, Portfolio PDF
   button — starts on the same left margin as the case-study pages' content container
   (max-width 1400px, centred, 40px gutters: left edge = max(40px, (page width - 1400px) / 2 + 40px)).
   The navigation keeps its own position (x = 155u). The shift is the difference between the two, written
   against this column's width W' = page - 2*155u:  max(40px - 155u, W'/2 - 660px). Only the horizontal
   position changes; the blocks' widths, vertical positions and spacing are untouched. */
@media (min-width: 1280px) {
  .hp-intro,
  .hp-projects,
  .hp-pdf-wrap { margin-left: max(calc(40px - 155 * var(--u)), calc(50% - 660px)); }

  /* Top navigation: upper-left, directly above the heading — its left edge is the main block's left edge (same
     formula). Vertical position, order, type, spacing and hover are unchanged. */
  .hp-top { margin-left: max(calc(40px - 155 * var(--u)), calc(50% - 660px)); }
}

.hp-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(250 * var(--u));
  height: calc(54 * var(--u));
  border: calc(1.2 * var(--u)) solid var(--hp-num);
  border-radius: calc(38 * var(--u));
  background: #FFFFFF;
  font-size: calc(24 * var(--u));
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  color: var(--hp-num);
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.hp-pdf:focus-visible { border-color: var(--hp-accent); color: var(--hp-accent); }
.hp-pdf:focus-visible { outline: 2px solid var(--hp-accent); outline-offset: 3px; }

/* hover = the same look as keyboard focus, but only on devices that can really hover, so a tap
   on a touch screen never leaves a card stuck in its highlighted state */
@media (hover: hover) and (pointer: fine) {
  a.hp-top-link:hover { color: var(--hp-accent); }
  .hp-link:hover {
    background-color: rgba(245, 118, 62, 0.05);
    box-shadow: inset 0 1px 0 0 var(--hp-accent);
  }
  .hp-row:last-child .hp-link:hover { box-shadow: inset 0 1px 0 0 var(--hp-accent), inset 0 -1px 0 0 var(--hp-accent); }
  /* the line under the hovered row is the next row's top line */
  .hp-row:hover + .hp-row > .hp-link { box-shadow: inset 0 1px 0 0 var(--hp-accent); }
  .hp-row:hover + .hp-row:last-child > .hp-link { box-shadow: inset 0 1px 0 0 var(--hp-accent), inset 0 -1px 0 0 #E3E3E3; }
  .hp-link:hover .hp-num,
  .hp-link:hover .hp-title { color: var(--hp-accent); }
  .hp-link:hover .hp-arrow { transform: translateX(6px); }
  .hp-pdf:hover { border-color: var(--hp-accent); color: var(--hp-accent); }
}

@media (prefers-reduced-motion: reduce) {
  .hp-link,
  .hp-num,
  .hp-title,
  .hp-arrow,
  .hp-pdf,
  .hp-top-link { transition: none; }
}

/* ======================================================================================
   RESPONSIVE LAYOUTS (homepage). Decided by viewport size and orientation, not device names.

     Desktop            >= 1280 px wide ........ the approved composition above, unchanged
     Compact landscape  901-1279 px, landscape . two columns: text left, mountain scene right
                                                  (iPad landscape 1024x768, 1180x820, 1194x834)
     Vertical           <= 900 px, or <= 1279 px in portrait. One column, normal page scroll:
                        nav, name, intro, MOUNTAIN SCENE, project cards, PDF button
                        - tablet portrait  600-900 px (iPad 768x1024, 820x1180, 834x1194)
                        - mobile           <= 599 px
   The three ranges never overlap: landscape needs width >= 901, vertical covers everything
   narrower plus every portrait window up to 1279 px.
   The one mountain SVG (photo + routes + nodes + glow in a 1920x1080 coordinate system) is
   reused everywhere; each layout only decides which window of it is visible.
   ====================================================================================== */

/* --- compact landscape: two columns ------------------------------------------------- */
@media (min-width: 901px) and (max-width: 1279px) and (orientation: landscape) {
  /* the desktop sizes keep their proportions through --u, with a gentler floor */
  body.home-page { --u: clamp(0.66px, calc(100vw / 1440), 1px); }
  .home-inner { padding-left: 5vw; padding-right: 0; }

  /* scene = the right-hand part of the page, starting just after the cards; only the art from
     x=960 to the right edge (the three routes, Clarity and the mountains) is shown */
  .hp-scene {
    inset: 0 0 0 calc(5vw + 661.58 * var(--u) + 14px);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 100%);
  }
  .hp-geo {
    inset: auto;
    left: -100%;                       /* shifts art x=960 to the scene's left edge (window 960 wide) */
    top: 50%;
    width: 200%;                       /* 1920 / 960 */
    height: auto;
    aspect-ratio: 16 / 9;
    transform: translateY(-75%);       /* centred (-50%) and then lifted by a quarter of the scene's own height (~130px at 980 wide); scales with the width */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
  }
}

/* --- vertical layouts: tablet portrait + mobile --------------------------------------- */
@media (max-width: 900px), (max-width: 1279px) and (orientation: portrait) {
  body.home-page { --hp-pad: clamp(22px, 5vw, 48px); }

  /* one column; the text layer's children become items of .home so the scene can sit
     between the intro and the project cards */
  .home {
    display: flex;
    flex-direction: column;
    padding: clamp(18px, 3vw, 32px) var(--hp-pad) clamp(40px, 7vw, 64px);
  }
  .home-inner { display: contents; }
  .hp-top, .hp-intro, .hp-projects, .hp-pdf-wrap { position: relative; z-index: 1; }

  .hp-top      { order: 1; }
  .hp-intro    { order: 2; }
  .hp-scene    { order: 3; }
  .hp-projects { order: 4; }
  .hp-pdf-wrap { order: 5; }

  .hp-top { gap: 0 clamp(20px, 3.4vw, 35px); flex-wrap: wrap; font-size: clamp(16px, 1.2vw + 11px, 22px); }
  .hp-top-link { display: inline-block; padding-block: 13px; }      /* comfortable touch targets (>= 44px) */

  .hp-intro { margin-top: clamp(28px, 6vw, 64px); }
  .hp-name { font-size: clamp(44px, 11vw, 96px); line-height: 1.1; }
  .hp-statement { max-width: none; margin-top: clamp(12px, 2vw, 18px); font-size: clamp(19px, 2.4vw + 10px, 30px); }

  /* the mountain scene: its own full-width section. A window of the shared art is shown:
     --sx0/--sy0 = top-left of the window, --sw/--sh = its size, all in art units (1920x1080) */
  .hp-scene {
    --sx0: 900; --sy0: 170; --sw: 1020; --sh: 583;
    position: relative;
    inset: auto;
    aspect-ratio: var(--sw) / var(--sh);
    margin: clamp(18px, 4vw, 36px) calc(-1 * var(--hp-pad));         /* full-bleed */
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 100%),
                        linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 100%),
                        linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
  }
  .hp-geo {
    inset: auto;
    left:   calc(-100% * var(--sx0) / var(--sw));
    top:    calc(-100% * var(--sy0) / var(--sh));
    width:  calc(100% * 1920 / var(--sw));
    height: calc(100% * 1080 / var(--sh));
  }

  /* the corner light still reaches in from the top-left, but only over the upper part of the page */
  .hp-ambient { height: min(100%, 95vw); }

  /* project cards: full width of the page margins */
  .hp-projects { margin-top: 0; width: auto; max-width: none; }
  .hp-link {
    height: auto;
    min-height: clamp(80px, 11vw, 96px);
    padding: calc(clamp(12px, 1.6vw, 14.72px) + 1px);
  }
  .hp-num { flex: 0 0 clamp(36px, 8vw, 75px); font-size: clamp(20px, 1.2vw + 15px, 25px); }
  .hp-info { padding-left: clamp(16px, 4vw, 40px); }
  .hp-info::before { width: 2px; height: clamp(40px, 6vw, 53px); }
  .hp-title { font-size: clamp(18px, 1.4vw + 12.5px, 24px); }
  .hp-meta { margin-top: clamp(5px, 0.8vw, 8px); font-size: clamp(15px, 1vw + 11px, 22px); }
  .hp-arrow { width: clamp(11px, 1.6vw, 13px); height: clamp(18px, 2.6vw, 22px); margin-right: clamp(4px, 2vw, 15px); }

  .hp-pdf-wrap { margin-top: clamp(24px, 4vw, 36px); }
  .hp-pdf { width: clamp(220px, 28vw, 250px); height: clamp(48px, 6vw, 54px); font-size: clamp(20px, 2.6vw, 24px); }
}

/* --- mobile (<= 599 px): the scene is framed around Clarity ------------------------------- */
@media (max-width: 599px) {
  .hp-statement br { display: none; }                 /* let the intro reflow naturally */
  .hp-scene { --sx0: 1050; --sy0: 145; --sw: 860; --sh: 670; }
  /* the three route labels would be too small at this scale; the Clarity label stays, enlarged */
  #label-users, #label-business, #label-technology { display: none; }
  #label-clarity { font-size: 34px; }
}
@media (max-width: 420px) {
  .hp-num { flex-basis: 32px; }
  .hp-info { padding-left: 14px; }
}


/* ===== Project page head (hero) ===== */
.project-head {
  padding: 72px 0 40px;
}

.project-head h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  font-weight: var(--w-hero);
  letter-spacing: -0.02em;
}

.project-head .subtitle {
  margin-top: 20px;
  font-size: var(--fs-hero-sub);
  line-height: var(--lh-hero-sub);
  font-weight: var(--w-hero-sub);
  color: var(--muted);
  max-width: 24em;
}

.tags {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  font-size: var(--fs-hero-meta);
  line-height: var(--lh-hero-meta);
  font-weight: var(--w-hero-meta);
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.tab {
  appearance: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-caption);
  line-height: 1.2;
  color: var(--muted);
  padding: 16px 4px;
  margin-right: 28px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.tab:hover { color: var(--fg); }

.tab[aria-selected="true"] {
  color: var(--fg);
  font-weight: 500;
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ===== Impact figures ===== */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}

.impact-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.impact-card .figure {
  font-size: 44px;
  font-weight: var(--w-hero);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--accent);
  white-space: nowrap;
}

.impact-card .label {
  margin-top: 14px;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--w-caption);
  color: var(--muted);
}

/* ===== Content sections ===== */
.block {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.block:first-of-type { border-top: none; }

.block h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--w-h2);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.block h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--w-h3);
  color: var(--fg);
  margin: 32px 0 10px;
}

.block h3:first-child { margin-top: 0; }

.block p,
.block li {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--w-body);
  max-width: 28em;
}

.block p { max-width: 28em; }

.block p + p { margin-top: 16px; }

.block ul {
  max-width: 28em;
  margin: 6px 0 0;
  padding-left: 1.1em;
}

.block ul li { margin-top: 8px; }

.lead {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--w-body);
  color: var(--muted);
  max-width: 28em;
  margin-bottom: 32px;
}

.back-link {
  display: inline-block;
  margin: 48px 0 80px;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--w-caption);
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

/* ======================================================================
   project-1.html — light theme, rebuilt from Figma (canvas 1600×900).
   Scoped to body.project-light so index.html / project-2 / project-3 are
   untouched. Palette: Petrol #004B5A, Post Yellow #FFCC00, Black #292929,
   Grey #666666, Light Grey #B3B3B3, Supporting Green #F4F9F5 — the same
   brand set documented in COLORS.md.
   ====================================================================== */

body.project-light {
  background: #FFFFFF;
  color: #333333;
}

/* Match the standard .wrap (site-header, tabs+panels, back-link) to the wide
   hero container's box model (1400px / 40px padding) so their left edges —
   and everything inside them — line up in one vertical line with the
   title/subtitle/tags above. */
.project-light .wrap {
  max-width: 1400px;   /* same OUTER box-width + padding as .p1-hero-wrap, so both
                           clamp against the viewport identically and stay aligned */
  padding: 0 40px;
}

/* --- Hero: wide two-column wrap (text + decorative illustration) --- */
.p1-hero {
  position: relative;      /* the glow layer (.p1-j-lights) is placed in the hero; and the hero clips it at the page edge */
  isolation: isolate;      /* the hero is one blending group: the glows blend with its photo, and sit under its content */
  overflow: clip;          /* the large soft glows end at the hero's edges (over the photo's white fade they are invisible, so no seam) and never widen the page */
  padding: 72px 0 68px;
  /* background photo (same layering as project-2 / project-3: the photo is the hero section's own background, all
     content paints above it). The picture already fades to white on its left, so no extra wash on that side.
     Anchored to the right; "cover" scales it without distortion. It is pushed DOWN (its bottom edge sits 13vw below
     the hero's bottom edge, so the lower part of the picture is cropped), which leaves the upper part of the hero
     as clean white fog and keeps the road in the lower right. The top layer is a fade back to white at the bottom
     of the hero, so the crop never shows as a hard edge. */
  --p1-top-fade: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));   /* off; the stacked layout turns it on (below) */
  background:
    linear-gradient(to top, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 6%, rgba(255, 255, 255, 0.55) 18%, rgba(255, 255, 255, 0) 36%),
    var(--p1-top-fade),
    url("images/Hero-Picture 1.webp") right 0 bottom calc(-1 * 13vw) / cover no-repeat,
    #FFFFFF;
}

.p1-hero-wrap {
  max-width: 1400px;   /* was 1240 — extra room lets the text column fit "Investing Experience" on one line */
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 40px;            /* was 56 — a little tighter, gives the text column more room */
}

.p1-hero-text {
  flex: 6 1 460px;   /* was 1 1 460px — claims most of the extra row space so "Investing
                        Experience" fits on one line at 75px, and the subtitle has room
                        for its own 680px max-width (3 lines). .p1-hero-art's own rule is
                        untouched; it ends up a bit narrower purely as a side effect of
                        sharing the row — flagged for a follow-up illustration pass. */
  min-width: 0;
}

.project-light .project-head h1 {
  font-weight: 500;
  font-size: 75px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #004B5A;
}

.p1-title-line { display: inline; }
.p1-title-accent { color: #FFCC00; }

/* short yellow underline rule beneath the title */
.p1-underline {
  display: block;
  width: 100px;
  height: 0;
  margin-top: 24px;
  border-top: 5px solid #FFCC00;
}

.project-light .project-head .subtitle {
  margin-top: 28px;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.25;
  color: #004B5A;
  max-width: 680px;   /* wraps this exact copy into exactly 3 lines at 32px */
}

/* Hero metadata — outlined pills (Figma: Space Grotesk Light / #292929) */
.project-light .tags { margin-top: 36px; margin-bottom: 12px; }

.project-light .tag {
  font-weight: 300;
  font-size: 18px;
  line-height: 1.2;
  color: #292929;
  background: transparent;
  border: 1px solid #B3B3B3;
  border-radius: 20px;
  padding: 8px 22px;
}

/* --- Hero illustration: exact Figma SVG (line + glow + 3 markers) --- */
.p1-hero-art {
  position: relative;
  flex: 1 1 460px;
  min-width: 280px;
  max-width: 640px;
  aspect-ratio: 1005 / 560;   /* matches the SVG's (cropped) viewBox */
  /* rendered ~20% larger than its flex slot, growing into the whitespace to
     its left so the hero's shared left edge / page grid is untouched */
  transform: scale(1.2);
  transform-origin: right center;
}

/* The new illustration (see project-1.html). The frame sits in the same .p1-hero-art box as before, with exactly the
   size and position it had as the static image (full width of the box, centred vertically). The layers inside
   (4 glows, then the line and the 3 milestones) all fill the frame. */
.p1-journey {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;                 /* overall size: a share of the .p1-hero-art box */
  aspect-ratio: 853 / 470;
  transform: translateY(-50%); /* vertical position: centred in the box (fixed, not animated) */
}
.p1-journey svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The four glows: soft golden sunlight (warm golden yellow, blended with "overlay" so the photo keeps its contrast). They are NOT inside the illustration (its scaled frame would stop them blending
   with the photo); they are a layer directly on the hero, placed over the illustration's box by a small script in
   project-1.html, behind everything else in the hero (z-index -1 inside the isolated hero). The layer blends with the
   photograph (mix-blend-mode), so the light takes on the mist and the hills instead of sitting on them like paint. */
.p1-j-lights {
  position: absolute;
  z-index: -1;
  visibility: hidden;                /* shown by the script once it has placed the layer */
  pointer-events: none;
  mix-blend-mode: overlay;
}
.p1-j-glow { position: absolute; inset: 0; }
.p1-j-glow svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; opacity: 0.75; }   /* 0.75 = resting (ambient) brightness when not animated */

/* ---- Animation: plays once on load (the line is drawn once; nothing is ever repeated). Only the glows keep moving
   afterwards (a slow breathing). Everything is inside "no-preference": with prefers-reduced-motion (or a browser that
   can't tell) the illustration is simply shown complete and still. ---- */
@media (prefers-reduced-motion: no-preference) {
  /* 1) the line: a stroked mask along the ribbon's centre line is drawn from the start (pathLength is normalised to 1).
        No delay, and an easing that moves from the very first frame (fast start, soft landing). */
  .p1-j-draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: p1-j-draw 3.6s cubic-bezier(0.2, 0.55, 0.4, 1) 0s 1 forwards;
  }
  @keyframes p1-j-draw { to { stroke-dashoffset: 0; } }

  /* 2) milestones: icon + label fade in together, quickly (250ms), the moment the line's tip reaches the circle. The delay
        is where the line is at that moment (23.9% / 52.7% / 82.5% of its length with this easing); the line never waits. */
  .p1-j-marker { opacity: 0; animation: p1-j-fade 0.25s ease-out both; }
  .p1-j-icon   { transform-box: fill-box; transform-origin: center; animation: p1-j-settle 0.25s ease-out both; }
  .p1-j-uncertainty, .p1-j-uncertainty .p1-j-icon { animation-delay: 0.33s; }
  .p1-j-clarity,     .p1-j-clarity .p1-j-icon     { animation-delay: 0.82s; }
  .p1-j-confidence,  .p1-j-confidence .p1-j-icon  { animation-delay: 1.69s; }
  @keyframes p1-j-fade   { from { opacity: 0; } to { opacity: 1; } }
  @keyframes p1-j-settle { from { transform: scale(0.92); } to { transform: scale(1); } }

  /* 3) glows: each light fades in softly with its milestone (glow 1 / 2 with Uncertainty / Clarity, glows 3 + 4 with
        Confidence) and from then on breathes forever: brighter and a little larger, then softer and smaller. The fade-in is
        on the wrapper and the breathing on the layer inside it, so the two never fight over one property. Each glow has its
        own period (and glow 4 a later phase), so they never pulse in step. */
  .p1-j-glow { opacity: 0; animation: p1-j-glow-in 1.2s ease-out forwards; }
  @keyframes p1-j-glow-in { from { opacity: 0; } to { opacity: 1; } }
  .p1-j-glow svg { will-change: transform, opacity; animation: p1-j-breathe 8s ease-in-out infinite; }
  .p1-j-glow-1 { animation-delay: 0.33s; }
  .p1-j-glow-2 { animation-delay: 0.82s; }
  .p1-j-glow-3, .p1-j-glow-4 { animation-delay: 1.69s; }
  .p1-j-glow-1 svg { transform-origin: 27.2% 78.1%; --breathe-d: 6.8s;  --breathe-delay: 0.33s; }
  .p1-j-glow-2 svg { transform-origin: 54.8% 62.0%; --breathe-d: 8.6s;  --breathe-delay: 0.82s; }
  .p1-j-glow-3 svg { transform-origin: 89.4% 21.2%; --breathe-d: 7.6s;  --breathe-delay: 1.69s; }
  .p1-j-glow-4 svg { transform-origin: 79.6% 32.3%; --breathe-d: 9.8s;  --breathe-delay: 4.09s; }
  .p1-j-glow svg { animation-duration: var(--breathe-d); animation-delay: var(--breathe-delay); }
  /* resting (ambient) -> brighter and spread wider -> softer and a little narrower (never gone) -> resting. Only brightness and
     spread change: the colour of the light stays exactly the same. */
  @keyframes p1-j-breathe {
    0%   { transform: scale(1);    opacity: 0.75; }
    25%  { transform: scale(1.1);  opacity: 1;    }
    75%  { transform: scale(0.95); opacity: 0.5;  }
    100% { transform: scale(1);    opacity: 0.75; }
  }
}

/* desktop: moved 60px to the right as one unit. The .p1-hero-art box is drawn 1.2x larger (transform: scale(1.2)),
   so 50px in the box is 60px on screen. Size and vertical position are unchanged. (In the stacked layout, <= 900px,
   the box is not scaled and the illustration keeps its original position.) */
@media (min-width: 901px) {
  .p1-journey { left: calc(60px / 1.2); }
}

/* The original animated illustration stays in the HTML but is hidden here, and its animations are switched off
   (display:none already stops them; the second rule makes sure). To bring it back, delete these two rules. */
.p1-hero-art .p1-wave-svg { display: none; }
.p1-hero-art .p1-wave-svg *,
.p1-hero-art .p1-wave-svg { animation: none !important; transition: none !important; }

.p1-wave-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 1) The line + its glow "draw themselves" left → right. The line is an
   exported filled shape (not a stroke), so instead of stroke-dashoffset we
   wipe it in with a clip rect that scales open along the X axis. */
.p1-wave-reveal-rect {
  transform: scaleX(0);
  transform-origin: 0 0;      /* SVG user-space origin = left edge of the rect */
  animation: p1-wave-reveal 2.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes p1-wave-reveal {
  to { transform: scaleX(1); }
}

/* 2) The three markers fade + scale in, staggered, once the line is under way:
   Uncertainty → Clarity → Confidence. */
.p1-marker {
  opacity: 0;
  transform: scale(0.6);
  transform-box: fill-box;
  transform-origin: center;
  animation: p1-marker-in 0.7s cubic-bezier(0.34, 1.4, 0.5, 1) forwards;
}

.p1-marker-uncertainty { animation-delay: 0.6s; }
.p1-marker-clarity     { animation-delay: 1.15s; }
.p1-marker-confidence  { animation-delay: 1.7s; }

@keyframes p1-marker-in {
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .p1-wave-reveal-rect,
  .p1-marker {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .p1-wave-reveal-rect { transform: scaleX(1) !important; }
}

@media (max-width: 900px) {
  .p1-hero-wrap { flex-direction: column; align-items: flex-start; gap: 40px; }
  /* stack: let both columns size to their content (the desktop flex-basis
     of 460px is a width hint, meaningless once stacked and it was leaving a
     tall empty gap under the text / around the illustration) */
  .p1-hero-text { flex: none; }
  .p1-hero-art { flex: none; width: 100%; max-width: 480px; transform: none; }
  /* stacked layout: the picture is as tall as the hero, so pushing it down leaves a strip above it; this fade
     (solid white over that strip, then dissolving) hides the picture's top edge */
  .p1-hero { --p1-top-fade: linear-gradient(to bottom, #FFFFFF 13vw, rgba(255, 255, 255, 0.85) calc(13vw + 30px), rgba(255, 255, 255, 0.5) calc(13vw + 75px), rgba(255, 255, 255, 0.18) calc(13vw + 125px), rgba(255, 255, 255, 0) calc(13vw + 180px)); }
}

@media (max-width: 640px) {
  .project-light .project-head h1 { font-size: 40px; }
  .project-light .project-head .subtitle { font-size: 20px; }
  .project-light .tag { font-size: 16px; padding: 6px 14px; }
  .p1-underline { width: 72px; border-top-width: 4px; margin-top: 18px; }
}

/* --- Tabs: light --- */
.project-light .tabs { border-bottom: 1px solid #E5E5E5; }
.project-light .tab { color: #808080; }
.project-light .tab:hover { color: #004B5A; }
.project-light .tab[aria-selected="true"] { color: #004B5A; }
.project-light .tab[aria-selected="true"]::after { background: #FFCC00; }

/* tabs on the left, a compact "open the PDF" link on the right, one line;
   the underline for the tablist moves up to this wrapper so the selected
   tab's marker still lands on it */
.project-light .tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 48px;
}
.project-light .tabs-row .tabs {
  border-bottom: none;
  margin-bottom: 0;
}

.project-light .tabs-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  margin-bottom: 15px;      /* sits it roughly level with the tab labels */
  font-size: 16px;
  line-height: 1.2;
  color: #999999;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.project-light .tabs-pdf-link:hover { color: #004B5A; }
.project-light .tabs-pdf-link svg { flex-shrink: 0; }

@media (max-width: 560px) {
  .project-light .tabs-pdf-link { margin-bottom: 12px; }
}

/* --- Impact cards --- */
.project-light .impact-card {
  background: #F4F9F5;
  border: 1px solid #DCEBE1;
}
.project-light .impact-card .figure {
  color: #004B5A;
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-light .impact-card .label { color: #004B5A; }   /* was #666666 — brighter, matches body text color */
.p1-trend-icon { flex-shrink: 0; }

/* Cards equalize within a row via grid's default stretch, but when auto-fit
   wraps them across rows (e.g. 3+1 on narrower widths) each row stretches
   independently, so a lone card can still end up shorter/taller than the
   row above it. Reserving 2 lines of height on the label — the only part
   whose line count varies between these cards — keeps every card the same
   height regardless of how the grid wraps, not just within one row. */
.project-light .impact-card .label {
  min-height: calc(var(--lh-caption) * var(--fs-caption) * 2);
}

/* "Impact" heading above the Project Overview tab's stat cards — matches .block h2 */
.p1-impact-heading {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--w-h2);
  letter-spacing: -0.02em;
  color: #004B5A;
  margin-bottom: 24px;
}

/* --- Content blocks / lead / back-link --- */
.project-light .block { border-top: 1px solid #E5E5E5; }
.project-light .block h2,
.project-light .block h3 { color: #004B5A; }
.project-light .block p,
.project-light .block li { color: #333333; }
.project-light .lead { color: #666666; }
.project-light .back-link { color: #666666; }
.project-light .back-link:hover { color: #004B5A; }

/* --- Figma type system for the content blocks below the hero ---
   H2 section headings ("What was the project", "What I did",
   "What changed", "Impact"): Space Grotesk Medium 35 / 120% / #004B5A
   Body copy: Space Grotesk Light 28 / 145% / #333333
   (--fs-h2/body, --lh-h2, --w-h2/body already carry the right values from
   the .type-grotesk scale — only body line-height needs an override.) */
.project-light .block p,
.project-light .block li {
  line-height: 1.45;   /* 145% — base .block rule uses 1.6 for the dark theme */
}

/* "What changed?" — same light-blue callout treatment as the Impact figures */
.p1-changed-box {
  background: #EAF5F5;
  border-left: 1.25px solid #004B5A;
  padding: 18.75px;
}

.p1-changed-box p { margin: 0; }

/* Project Overview tab: "What was the project / What I did / What changed"
   block below Impact — reuses the .block type system above, but (a) forces
   its top divider on (base .block:first-of-type would otherwise hide it,
   since it's the tab's only .block) and (b) runs full content width instead
   of the 28em reading-width cap used elsewhere. */
#panel-overview .block { border-top: 1px solid #E5E5E5; }

.p1-fullwidth-block p,
.p1-fullwidth-block ul,
.p1-fullwidth-block li { max-width: none; }

/* base .block h2 only carries margin-bottom (it's normally the single
   heading in a block) — this block stacks three, so give the 2nd/3rd
   the same top breathing room .block h3 gets elsewhere */
.p1-fullwidth-block h2 { margin-top: 32px; }
.p1-fullwidth-block h2:first-child { margin-top: 0; }

/* ======================================================================
   "Final Solution" tab — full-bleed #EAF5F5 band holding just the
   "Concept…" heading and a 4-column image grid (3 narrow phone cards +
   1 wide mockup). Figma canvas 1600px.
   ====================================================================== */

/* (horizontal overflow from the full-bleed sections is clipped on <html> —
   see the base rule near the top; clipping it on <body> would break scroll) */

.p1-final {
  /* break out of .wrap to the viewport edges, keep the background full-bleed */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 40px;
  background: #EAF5F5;
  padding: 96px 0;
}

.p1-final-inner {
  /* same box model as .p1-hero-wrap / .project-light .wrap so the concept
     headings (and the grids) start on the page's shared left line, not an
     inset of their own */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* "Concept: A New Entry Point into Investing" — the tab's only heading;
   the section's own 96px top padding gives it its space from the tab bar */
.p1-final-concept {
  font-size: var(--fs-h2);      /* 35px */
  line-height: var(--lh-h2);    /* 120% */
  font-weight: var(--w-h2);     /* Medium */
  color: #004B5A;
}

.p1-final-grid {
  margin-top: 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.93fr;
  gap: 39px 31px;               /* row-gap column-gap */
}

/* Screens 1–6 — narrow white cards, image keeps its own aspect ratio */
.p1-screen {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 18px 13px;
}
.p1-screen img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Screen 7 — wide card, pinned to column 4 and spanning both rows.
   Explicit placement means screens 1–6 auto-flow around it: 1-2-3 on
   row 1, 4-5-6 on row 2. Image fills the full card height (flush top and
   bottom); it sits ~2% narrower than the card, and the Screen 7 asset
   already carries its own white side margins, so together they read as
   the mockup frame. (A literal 62px CSS side padding would force the
   portrait asset to letterbox top/bottom instead — dropped in favour of
   the flush-height look the brief describes.) */
.p1-screen-wide {
  grid-column: 4;
  grid-row: 1 / span 2;
  background: #FFFFFF;
  border-radius: 19.5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p1-screen-wide img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

/* ---- Part 2: "Concept: ETF Savings Plan" — big left screen + a feature
   list above a cascade of three overlapping screens on the right. ---- */

/* second concept heading: separate it clearly from the grid above */
.p1-final-concept ~ .p1-final-concept { margin-top: 112px; }

.p1-etf {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 37% 61%;   /* ~37 / ~61, the 2% left over becomes the gap */
  justify-content: space-between;
  align-items: stretch;   /* right column matches Screen 8's height so the
                             cascade can bottom-align with it */
}

/* left column — one tall mobile mockup on a white card
   (Screen 8 already carries its own white side margins) */
.p1-etf-left {
  background: #FFFFFF;
  border-radius: 19.5px;
  overflow: hidden;
}
.p1-etf-left img {
  display: block;
  width: 100%;
  height: auto;
}

/* right column — feature list, then the cascade */
.p1-etf-right {
  display: flex;
  flex-direction: column;
}

.p1-etf-list {
  list-style: disc;
  padding-left: 1.2em;
  margin-bottom: 56px;
  font-size: var(--fs-caption);     /* 22px */
  line-height: var(--lh-caption);   /* 145% */
  font-weight: var(--w-caption);    /* Light */
  color: #333333;
}
.p1-etf-list li + li { margin-top: 12px; }

/* Cascade: the container fills whatever height is left in the right column
   after the feature list, so its bottom lines up with Screen 8's bottom in
   the left column. Card width = 100 / (222% + 100%) ≈ 31% of the container;
   horizontal offsets stay 0 / 34.41% / 68.82% (the +111% / +222%-of-card-width
   stagger). Vertically: Screen 9 pinned to the top, Screen 11 pinned to the
   bottom, Screen 10 centred — so the step 9→10 equals the step 10→11. */
.p1-cascade {
  position: relative;
  flex: 1;
  min-height: 0;
}
.p1-cascade-card {
  position: absolute;
  width: 31%;
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
}
.p1-cascade-card img {
  display: block;
  width: 100%;
  height: auto;
}
.p1-cascade-1 { left: 0;        top: 0; }
.p1-cascade-2 { left: 34.41%;   top: 50%; transform: translateY(-50%); }
.p1-cascade-3 { left: 68.82%;   bottom: 0; }

/* Mobile: single column, all 7 grid screens stacked 1 → 7, and the Part 2
   cascade flattened to a plain vertical stack (Screen 8 → 9 → 10 → 11). */
@media (max-width: 900px) {
  .p1-final { padding: 64px 0; }
  .p1-final-grid {
    margin-top: 48px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .p1-screen-wide {
    grid-column: auto;
    grid-row: auto;
    display: block;
    border-radius: 8px;
    padding: 18px 13px;
  }
  .p1-screen-wide img {
    width: 100%;
    height: auto;
  }

  .p1-final-concept ~ .p1-final-concept { margin-top: 64px; }

  .p1-etf {
    margin-top: 40px;
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .p1-etf-list { margin-bottom: 24px; }
  .p1-cascade {
    position: static;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .p1-cascade-card {
    position: static;
    width: 100%;
  }
  .p1-cascade-2 { transform: none; }
}


/* ======================================================================
   project-2.html — photo-background hero + two-column overview
   (reuses the shared .project-light / .block / .tags / .tabs-row /
   .p1-changed-box / .p1-trend-icon system; only the pieces below differ)
   ====================================================================== */

/* --- Hero: full-bleed photo, dark text over a white gradient on the left,
       PostFinance mark bottom-right --- */
.p2-hero {
  position: relative;
  padding: 0;                     /* override .project-head padding */
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;             /* the photo sits on a layer of its own (::after, below) so a filter can touch only the photo */
  background: #FFFFFF;
}

/* the city photograph on its own layer, behind the white wash (::before) and the content. The picture, its size, position and
   crop and the bottom fade are exactly as before; the filter softens ONLY this layer a little: saturation -7%, contrast -4%.
   The brightness 1.02 cancels the contrast step on white, so the faded bottom edge stays pure white (no visible seam). */
.p2-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 4%, rgba(255, 255, 255, 0.58) 12%, rgba(255, 255, 255, 0.22) 20%, rgba(255, 255, 255, 0) 27%) 0 0 / 100% 100% no-repeat,
    /* a very soft haze, strongest over the glass building and its sun reflections and gone toward the left; a pale cool white, not pure white */
    radial-gradient(ellipse 60% 85% at 84% 38%, rgba(244, 246, 249, 0.30) 0%, rgba(244, 246, 249, 0.27) 15%, rgba(244, 246, 249, 0.20) 32%, rgba(244, 246, 249, 0.11) 52%, rgba(244, 246, 249, 0.04) 74%, rgba(244, 246, 249, 0) 100%) 0 0 / 100% 100% no-repeat,
    url("images/entrepreneur-city-hero.webp") right center / cover no-repeat;   /* anchored right so the glass building and the skyline stay on the right */
  filter: contrast(0.93) brightness(1.03) saturate(0.93);
}

/* white wash: near-opaque behind the whole heading, faded out by ~80% so the
   people on the right stay visible */
.p2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
              rgba(255, 255, 255, 0.94) 0%,
              rgba(255, 255, 255, 0.93) 44%,
              rgba(255, 255, 255, 0.74) 56%,
              rgba(255, 255, 255, 0.32) 68%,
              rgba(255, 255, 255, 0) 80%);
  pointer-events: none;
}

.p2-hero-inner {
  position: relative;            /* stacking + anchor for the logo */
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 40px;            /* same 40px side gutter as .wrap / .p1-hero-wrap */
}

.p2-hero-text {
  max-width: 820px;              /* wide enough for "for New Entrepreneurs" on one line at 75px */
}

/* "‹ Back" in the top-right corner of the hero — one design and one behaviour on all three case studies
   (.p2-back on project-2, .proj-back on project-1 and project-3; the markup is identical). A small pill-shaped
   outline: Inter Regular 16px, neutral dark gray, a very light gray 1px border. Absolutely positioned, so it takes
   no space in the page flow; the top / right offsets are the homepage navigation's top spacing (unchanged). */
.p2-back,
.proj-back {
  --u: clamp(0.7px, calc(100vw / 1920), 1px);        /* the homepage's unit: one Figma pixel */
  position: absolute;
  z-index: 2;                                         /* above the hero wash and the hero content */
  top: calc(69 * var(--u));
  right: calc(69 * var(--u));
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 6px 14px 6px 12px;                         /* compact; the chevron side is a touch tighter */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #4A4A4A;                                     /* neutral dark gray, the same on every project */
  background: rgba(255, 255, 255, 0.85);              /* barely there on a white page; keeps the text readable over a photo */
  border: 1px solid #DCDCDC;                          /* very light neutral gray */
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  --back-accent: #FFCC00;                             /* the project accent used for the hover: yellow (project-1, project-2) ... */
  transition: border-color 200ms ease-out, transform 200ms ease-out;
}
.project-green .proj-back { --back-accent: #009639; } /* ... RESO green (project-3) */
.p2-back::before,
.proj-back::before {                                   /* the hover tint: a layer of the accent colour, faded in on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;                                         /* above the pill's own background, below its text */
  border-radius: inherit;
  background: var(--back-accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.p2-back::after,
.proj-back::after {                                    /* an invisible, larger hit area (about 45px tall) around the pill */
  content: "";
  position: absolute;
  inset: -6px -4px;
}
.p2-back-chevron,
.proj-back-chevron { flex: none; width: 0.41em; height: 0.68em; transition: transform 200ms ease-out; }
.p2-back-chevron path,
.proj-back-chevron path { stroke-width: 1.4; }

.p2-back:active,
.proj-back:active { transform: scale(0.97); }          /* a gentle press */
.p2-back:focus-visible,
.proj-back:focus-visible { border-color: #BDBDBD; outline: 2px solid #8A8A8A; outline-offset: 2px; }   /* visible, understated */
@media (hover: hover) and (pointer: fine) {
  .p2-back:hover,
  .proj-back:hover { border-color: var(--back-accent); }   /* the border takes the project accent ... */
  .p2-back:hover::before,
  .proj-back:hover::before { opacity: 0.10; }              /* ... over a very faint tint of the same colour */
  .p2-back:hover .p2-back-chevron,
  .proj-back:hover .proj-back-chevron { transform: translateX(-3px); }   /* ... and only the chevron moves, 3px to the left */
}
@media (prefers-reduced-motion: reduce) {
  .p2-back,
  .proj-back,
  .p2-back::before,
  .proj-back::before,
  .p2-back-chevron,
  .proj-back-chevron { transition: none; }
  .p2-back:active,
  .proj-back:active,
  .p2-back:hover .p2-back-chevron,
  .proj-back:hover .proj-back-chevron { transform: none; }
}
/* the homepage's own responsive ranges for the offsets (unchanged) */
@media (min-width: 901px) and (max-width: 1279px) and (orientation: landscape) {
  .p2-back,
  .proj-back { --u: clamp(0.66px, calc(100vw / 1440), 1px); }
}
@media (max-width: 900px), (max-width: 1279px) and (orientation: portrait) {
  .p2-back,
  .proj-back { top: clamp(18px, 3vw, 32px); right: clamp(22px, 5vw, 48px); }
}


/* Project Overview reuses project-1's exact structure — Impact heading +
   cards first, then the .p1-fullwidth-block (with its own top divider). No
   project-2-specific overrides needed here. */

/* --- Final Solution: placeholder tab on project-2 and project-3 --- */
.project-light .block .p2-coming-soon {
  color: #999999;
  font-size: var(--fs-h3);
  font-weight: 300;
  padding: 32px 0;
  max-width: none;
}

/* --- Final Solution: "Concept: A New Startup Package Page" — one tall
   screenshot on the (slightly wider) left column; the right column is
   stretched to the exact same height, with step-1 pinned to the top, the
   order-form page pinned to the bottom, and steps 2–3 spread evenly
   between them. The left column is a touch wider so the four right-hand
   images add up to less than the tall screenshot, leaving room for the
   even gaps. The image assets are already fully styled (their own frames
   / shadows), so there are no card wrappers here: images are just
   width:100%. Reuses .p1-final / .p1-final-inner / .p1-final-concept from
   the project-1 block for the #EAF5F5 full-bleed band + H2. --- */
.p2-startup {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 54% 45%;   /* left untouched; right widened, ~1% is the gap */
  justify-content: space-between;
  align-items: stretch;             /* right column matches the left image's height */
}
.p2-startup-left { min-width: 0; }
.p2-startup-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* step-1 top, page-2 bottom, 2–3 spread evenly */
  gap: 4px;                         /* minimum spacing between images */
  /* nudge the first step down 5px and lift the order-form page off the
     bottom without touching the even spread of steps 2–3 in between */
  padding-top: 2px;
  padding-bottom: 9px;
}
.p2-startup img {
  display: block;
  width: 100%;
  height: auto;
}

/* startup-page-1 carries ~3.84% of transparent margin baked into the asset;
   pull the box left by that much so the visible screenshot lines up with
   the "Concept:" heading (and the page's shared left edge). Size unchanged. */
.p2-startup-left img { margin-left: -3.84%; }

/* Right-hand screenshots ~9% larger: every asset here also has ~3.9% of
   transparent margin on each side, so widen the box and pull it back with
   symmetric negative margins — the visible screenshot grows, the overflow
   is only the transparent border and stays inside the section padding.
   (Kept just under 10% so the four images still fit inside the tall
   screenshot's height with room for the 5px/7px top-bottom nudges and
   even gaps between steps 2–3.) */
.p2-startup-right img {
  width: calc(100% + 9%);
  margin-inline: -4.5%;
}

@media (max-width: 900px) {
  .p2-hero { min-height: auto; }
  .p2-hero::before {
    background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.96) 0%,
                rgba(255, 255, 255, 0.9) 55%,
                rgba(255, 255, 255, 0.78) 100%);
  }
  .p2-hero-inner { padding: 48px 40px; }
  .p2-hero-text { max-width: none; }

  /* stack the two columns into one; right column falls back to a plain
     even-gap list (no height to distribute), images back to plain 100% */
  .p2-startup {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 40px;
  }
  .p2-startup-right {
    justify-content: flex-start;
    gap: 32px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .p2-startup-left img { margin-left: 0; }
  .p2-startup-right img {
    width: 100%;
    margin-inline: 0;
  }
}


/* ======================================================================
   project-3.html — RESO Green (#009639) + Inter, dark text on a light
   photo hero, plain-text metadata. Layered on top of .project-light: the
   .project-green class re-tints the accent and headings. Type sizes come
   from the .type-inter scale on <body>.
   ====================================================================== */

/* --- Hero: full-bleed photo, no wash panel (the bridge photo is pale
       enough for #333333 text to read directly on it) --- */
.p3-hero {
  position: relative;
  padding: 0;                     /* override .project-head padding */
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* the bridge picture (2172 x 724, 3:1): scaled to the hero's height ("cover") and anchored right, so the bridge's whole
     curve stays in view and any crop comes off its white left side, where the headline sits. The vertical 75% only
     matters on very wide screens, where it keeps the bridge in view. */
  /* a soft white fade along the bottom edge only (the top layer): the picture dissolves into the page like on project-1.
     It is a separate background layer, so the picture's size, position and crop are unchanged. */
  background:
    linear-gradient(to top, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 4%, rgba(255, 255, 255, 0.58) 12%, rgba(255, 255, 255, 0.22) 20%, rgba(255, 255, 255, 0) 27%) 0 0 / 100% 100% no-repeat,
    #EAEEEC url("images/Hero-Picture 3 new 1.webp") right 75% / cover no-repeat;
}

.p3-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 40px;             /* same 40px side gutter as .wrap */
}

.p3-hero-text {
  max-width: 920px;               /* fits "Insurance Operations" on one line at 75px */
}

/* metadata: one plain line, dot-separated, no pills */
.p3-meta {
  margin-top: 32px;
  font-weight: 300;               /* Inter Light */
  font-size: var(--fs-hero-meta); /* 25px, scales down on small screens */
  line-height: 1.2;
  color: #666666;
}

/* --- Accent re-tint: yellow -> RESO Green, petrol -> dark text --- */
.project-green .project-head h1 {
  font-weight: 600;               /* Inter Semi-Bold */
  color: #333333;
}
.project-green .p1-title-accent { color: #009639; }

.project-green .p1-underline {
  width: 100px;                   /* same size as Project 1's underline (100 x 5; 72 x 4 on phones) */
  margin-top: 24px;
  border-top: 5px solid #009639;
}

.project-green .project-head .subtitle {
  font-weight: 400;               /* Inter Regular */
  line-height: 1.2;
  color: #333333;
}

.project-green .tab:hover { color: #009639; }
.project-green .tab[aria-selected="true"] { color: #009639; }
.project-green .tab[aria-selected="true"]::after { background: #009639; }
.project-green .tabs-pdf-link:hover { color: #009639; }

.project-green .p1-impact-heading { color: #333333; }
.project-green .block h2,
.project-green .block h3 { color: #333333; }

/* Body copy back to 160% line-height (base .project-light override uses 145%) */
.project-green .block p,
.project-green .block li { line-height: 1.6; }

/* "What changed?" callout in a muted green instead of blue */
.project-green .p1-changed-box {
  background: #F4F9F5;
  border-left: 1.25px solid #009639;
}

.project-green .back-link:hover { color: #009639; }

/* No Impact section on this page — the overview block is the tab's first
   child, so drop the top divider it would otherwise pick up (would double
   with the tabs divider just above it). */
#panel-overview .p1-fullwidth-block:first-child {
  border-top: none;
  padding-top: 0;
}

/* Final Solution — two "Concept:" headings, each followed by one full-width
   screenshot. Reuses .p1-final / .p1-final-inner / .p1-final-concept for the
   full-bleed band + heading; re-tinted to the muted green here. The image
   assets are already fully composed, so the shots have no card/border/shadow. */
.project-green .p3-final { background: #F4F9F5; }
.project-green .p3-final .p1-final-concept { color: #333333; }
.p3-final-shot { margin-top: 40px; }
.p3-final-shot img { display: block; width: 100%; height: auto; }
/* the second heading's gap from the shot above comes from the shared
   .p1-final-concept ~ .p1-final-concept rule (112px / 64px on mobile) */

@media (max-width: 900px) {
  .p3-hero { min-height: auto; background-position: right top; }   /* right, so the bridge (not just open water) is what shows in the narrow crop */
  .p3-hero-inner { padding: 48px 40px; }
  .p3-hero-text { max-width: none; }

  /* Final Solution screenshots carry fine print — below this width a
     full-bleed fit makes the in-image text unreadable, so keep each shot
     at a legible minimum width and let it scroll horizontally instead. */
  .p3-final-shot {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .p3-final-shot img { min-width: 760px; }
  /* the phone-width crop lifts the bridge into the text; a soft top-down
     whitening (a fade, not a boxed panel) keeps the dark text readable */
  .p3-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.9) 0%,
                rgba(255, 255, 255, 0.88) 52%,
                rgba(255, 255, 255, 0.45) 74%,
                rgba(255, 255, 255, 0) 100%);
  }
}

@media (max-width: 640px) {
  .project-green .p1-underline { width: 72px; border-top-width: 4px; margin-top: 18px; }
}


/* ======================================================================
   Lightbox — shared component for the Final Solution screenshots on
   project-1/2/3. Markup is created by lightbox.js; every <img> inside
   #panel-final becomes a trigger.
   ====================================================================== */
#panel-final img { cursor: pointer; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(0, 0, 0, 0.8);
}
.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  touch-action: none;            /* JS owns pinch / pan gestures */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.25s ease;
}
.lightbox img.is-zoomed { cursor: grab; }
.lightbox img.is-panning { cursor: grabbing; }

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #FFFFFF;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.lightbox-close:hover,
.lightbox-close:focus-visible { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox { animation: lightbox-fade 0.15s ease-out; }
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }


/* ======================================================================================
   TYPOGRAPHY EXPERIMENT — project-1 and project-2 use Project 3's typography.
   Project 3 gets its type from the .type-inter token set on <body> (Inter; hero 75/600, h2 35/600, body 25/400,
   caption 20/400 ...) plus three typography overrides under .project-green. project-1 / project-2 now carry the
   same .type-inter body class, and this block repeats those three overrides — typography only, no colours — and
   points the metadata pills at Project 3's metadata style. Scoped to .type-inter.project-light:not(.project-green),
   i.e. exactly these two pages. To undo: restore body class="type-grotesk project-light" and delete this block
   (or restore backup-before-typography-p3-ref/).
   ====================================================================================== */
.type-inter.project-light:not(.project-green) .project-head h1 { font-weight: 600; }                 /* = .project-green h1: Inter Semi-Bold */
.type-inter.project-light:not(.project-green) .project-head .subtitle { font-weight: 400; line-height: 1.2; }   /* = .project-green subtitle */
.type-inter.project-light:not(.project-green) .block p,
.type-inter.project-light:not(.project-green) .block li { line-height: 1.6; }                          /* = .project-green body copy: 160% */
/* the metadata pills' text = Project 3's metadata line (25px / 120% / Light); size scales down on small screens like it does there */
.type-inter.project-light:not(.project-green) .tag { font-size: var(--fs-hero-meta); line-height: var(--lh-hero-meta); font-weight: var(--w-hero-meta); }


/* ======================================================================================
   Hero metadata on all three case studies: one plain inline text row, no pills. The same markup
   (.tags > .tag) and the same rules on every page. Colour #666666 (project-3's existing metadata gray);
   the middle-dot separators are a lighter gray. Font size is NOT set here: it keeps coming from the existing
   --fs-hero-meta token (25px, 16px on phones) and the desktop block below (22px at >= 901px), so the
   tablet / mobile sizes are unchanged. Items wrap naturally; each separator stays with the item before it.
   ====================================================================================== */
.project-light .project-head .tags {
  display: block;
  font-size: var(--fs-hero-meta);   /* set on the row itself too, so the line box (the "strut") is this size, not the page's body size */
  line-height: 1.2;
}
.project-light .project-head .tags .tag {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  color: #666666;
  white-space: nowrap;              /* an item never breaks in the middle; the row wraps between items */
}
.project-light .project-head .tags .tag:not(:last-child)::after {
  content: "\00B7";
  color: #B8B8B8;
  margin: 0 0.1em 0 0.35em;
}
/* project-3 keeps its own spacing above the row (it had no bottom margin) */
.project-green .project-head .tags { margin-top: 32px; margin-bottom: 0; }


/* ======================================================================================
   Hero description and metadata on all three case studies (desktop only).
   Description: Inter 29px / Regular (400).  Metadata (pills on project-1 and project-2, plain line on project-3):
   Inter 22px / Regular (400).  Line heights, colours and letter-spacing are left exactly as they are (they keep
   their existing declarations). Tablet and mobile keep their existing sizes: they are the stacked layout
   (<= 900px), which this block does not touch.
   ====================================================================================== */
@media (min-width: 901px) {
  .project-light .project-head .subtitle {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 29px;
    font-weight: 400;
  }
  .project-light .project-head .tags,
  .project-light .project-head .tags .tag,
  .project-light .project-head .p3-meta {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 400;
  }
}

/* ======================================================================================
   Project 3: the animated journey illustration over the bridge (markup in project-3.html).
   It is an overlay on the hero (absolute, no layout impact). Its box is derived from the hero photo's own geometry
   (the picture is "cover", anchored right / 75%), so the line keeps its place on the bridge at every width: --S is the
   picture's scale, --oy its vertical offset. At full size it matches the design (about 0.95 px per svg unit at 1920);
   where the headline would be reached, it shrinks toward its right end instead, and below 1400px it is not shown.
   ====================================================================================== */
.p3-journey {
  position: absolute;
  inset: 0;
  pointer-events: none;
  container-type: size;           /* cqw / cqh below = the hero's own width / height */
  --S: max(calc(100cqw / 2172), calc(100cqh / 724));                      /* hero photo scale */
  --oy: calc((100cqh - 724 * var(--S)) * 0.75);                           /* hero photo vertical offset (75%) */
  --RE: calc(100cqw - 298.4 * var(--S));                                  /* where the graphic's right edge sits on the bridge */
  --Tm: calc(max(40px, calc((100cqw - 1400px) / 2 + 40px)) + 10.347 * var(--p3-h));     /* the headline's right edge + a gap (776px at the 75px heading) */
  --g: max(0px, min(calc(1.084 * var(--S)), calc((var(--RE) - var(--Tm)) / 531)));   /* px per svg unit */
}
.p3-journey-svg {
  position: absolute;
  display: block;
  overflow: visible;
  width: calc(531 * var(--g));
  height: calc(265 * var(--g));
  left: calc(var(--RE) - 531 * var(--g));
  top: calc(var(--oy) + 468.2 * var(--S) - 205 * var(--g));              /* keeps the hook at the same spot on the bridge when shrunk */
}
@supports not (width: 1cqw) { .p3-journey { display: none; } }

/* Animation. ONE timeline drives everything: the script in project-3.html moves a single drawing front along the line (the
   mask path is redrawn up to that point, so nothing can show ahead of it) and, as the front reaches each anchor dot, switches
   that milestone on (class "p3j-on"), which starts the small animations below. Without the script, or with reduced motion,
   none of this applies and the finished illustration is simply shown. */
.p3j-anim .p3j-dot, .p3j-anim .p3j-conn, .p3j-anim .p3j-icon, .p3j-anim .p3j-label { opacity: 0; transform-box: fill-box; }
.p3j-anim .p3j-glow-wrap { opacity: 0; }
.p3j-ms.p3j-on .p3j-dot   { transform-origin: 50% 50%;  animation: p3j-dot  0.16s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0s both; }
.p3j-ms.p3j-on .p3j-conn  { transform-origin: 50% 100%; animation: p3j-conn 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) 0.05s both; }
.p3j-ms.p3j-on .p3j-icon  { animation: p3j-rise 0.36s cubic-bezier(0.2, 0.8, 0.3, 1) 0.13s both; }
.p3j-ms.p3j-on .p3j-label { animation: p3j-lift 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) 0.25s both; }
@keyframes p3j-dot  { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes p3j-conn { from { opacity: 1; transform: scaleY(0); }  to { opacity: 1; transform: scaleY(1); } }
@keyframes p3j-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes p3j-lift { from { opacity: 0; transform: translateY(7px); }  to { opacity: 1; transform: translateY(0); } }

/* the soft white glows (beneath the line): fade in with their milestone, then slowly brighten and dim, each on its own timing */
.p3j-glow-wrap.p3j-on { animation: p3j-glow-in 0.9s ease-out 0.1s both; }
.p3j-glow { transform-box: fill-box; transform-origin: 50% 50%; }
.p3j-glow-wrap.p3j-on .p3j-glow { animation: p3j-breathe 7s ease-in-out 0.1s infinite; }
.p3j-glow-wrap.p3j-glow-legacy.p3j-on .p3j-glow         { animation-duration: 6.4s; }
.p3j-glow-wrap.p3j-glow-transformation.p3j-on .p3j-glow { animation-duration: 8.2s; }
.p3j-glow-wrap.p3j-glow-future.p3j-on .p3j-glow         { animation-duration: 7.3s; }
@keyframes p3j-glow-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes p3j-breathe { 0%, 100% { opacity: 0.55; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.08); } }

/* ======================================================================================
   RESPONSIVE REFINEMENT (project-1 / project-2 / project-3)
   A shared, fluid layer for the three case studies. From 1024px up every value below equals the approved desktop value,
   so the desktop designs are unchanged; below that, type, gutters and spacing scale smoothly instead of jumping at a few
   breakpoints, and the three heroes share one stacked structure: heading, description, metadata, then the picture.
   ====================================================================================== */

/* ---- 1) page: no sideways scroll (the full-bleed Final Solution band is sized with 100vw, which includes the scrollbar) ---- */
body.project-light { overflow-x: clip; }

/* ---- 2) fluid type scale (375px -> 1024px; the desktop values at 1024px and up) ---- */
.type-inter {
  --fs-hero:     clamp(40px, calc(40px + 0.05393 * (100vw - 375px)), 75px);
  --fs-h1:       clamp(34px, calc(34px + 0.03390 * (100vw - 375px)), 56px);
  --fs-h2:       clamp(26px, calc(26px + 0.01387 * (100vw - 375px)), 35px);
  --fs-h3:       clamp(21px, calc(21px + 0.00770 * (100vw - 375px)), 26px);
  --fs-body:     clamp(18px, calc(18px + 0.01079 * (100vw - 375px)), 25px);
  --fs-caption:  clamp(15px, calc(15px + 0.00770 * (100vw - 375px)), 20px);
  --fs-hero-sub: clamp(20px, calc(20px + 0.01387 * (100vw - 375px)), 29px);
  --fs-hero-meta:clamp(16px, calc(16px + 0.00924 * (100vw - 375px)), 22px);
}
.project-light .project-head h1 { font-size: clamp(40px, calc(40px + 0.05393 * (100vw - 375px)), 75px); text-wrap: balance; }
.project-light .project-head .subtitle { font-size: clamp(20px, calc(20px + 0.01387 * (100vw - 375px)), 29px); text-wrap: pretty; }
.project-light .project-head .tags { font-size: clamp(16px, calc(16px + 0.00924 * (100vw - 375px)), 22px); }
.project-light .project-head .tags .tag { font-size: inherit; }

/* ---- 3) fluid side gutter: 20px on phones, the usual 40px from 768px ---- */
.project-light { --gutter: clamp(20px, 5.4vw, 40px); }
.project-light .wrap,
.p1-hero-wrap,
.p1-final-inner { padding-left: var(--gutter); padding-right: var(--gutter); }
.p2-hero-inner,
.p3-hero-inner { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- 4) Impact cards: two columns (a balanced 2 x 2) on phones and tablets, four in one row from 1180px (as on desktop); one column only
        when two would not fit (narrower than 340px). Card padding and figure size scale so two columns stay comfortable. ---- */
.impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: clamp(10px, 2.4vw, 16px); }
@media (min-width: 1180px) { .impact-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; } }
@media (max-width: 339px)  { .impact-grid { grid-template-columns: minmax(0, 1fr); } }
.project-light .impact-card { padding: clamp(16px, 4.6vw, 32px) clamp(14px, 4vw, 28px); }
.project-light .impact-card .figure { font-size: clamp(24px, 5.8vw, 44px); gap: clamp(6px, 1.4vw, 10px); }
.project-light .impact-card .p1-trend-icon { width: clamp(16px, 3.6vw, 26px); height: auto; }
.project-light .impact-card .label { margin-top: clamp(8px, 1.8vw, 14px); overflow-wrap: anywhere; }

/* ---- 5) tabs row: "Project Overview | Final Solution | View full case study (PDF)" stay on ONE line at every width.
        Tab spacing and type scale with the width; the PDF link is shortened to "Case study (PDF)" and then "PDF" only when the
        row would otherwise not fit. Touch targets stay at least 44px high on phones and touch screens. ---- */
.project-light .tabs-row { flex-wrap: nowrap; gap: 0 clamp(8px, 2vw, 24px); }
.project-light .tabs-row .tabs { flex: 0 1 auto; min-width: 0; }
.project-light .tab { margin-right: clamp(12px, 3.4vw, 28px); padding-left: clamp(2px, 0.5vw, 4px); padding-right: clamp(2px, 0.5vw, 4px); white-space: nowrap; }
.project-light .tabs-row .tabs .tab:last-child { margin-right: 0; }
.project-light .tabs-pdf-link { gap: clamp(4px, 1vw, 7px); }
.project-light .tabs-pdf-link .pdf-l-mid,
.project-light .tabs-pdf-link .pdf-l-short { display: none; }
@media (max-width: 767px), (pointer: coarse) {
  .project-light .tabs-pdf-link { padding: 12px 0; margin-bottom: 0; }
  .project-light .tab { min-height: 44px; }
}
/* phones and small tablets (up to 599px): "Project Overview | Final Solution | Full Study (PDF)" on one row. The PDF link has exactly the
   same font (family, size, weight, line height) as the inactive tab, the three items share one text baseline, and the size scales
   with the width (10.7px at 320px up to 15px from 430px; as large as fits, gaps shrink first) so the row always fits. */
@media (max-width: 599px) {
  .project-light .tabs-row { --nav-fs: clamp(10.7px, calc(10.7px + (100vw - 320px) * 0.0391), 15px); align-items: baseline; gap: 0 clamp(4px, 1.4vw, 16px); }
  .project-light .tab,
  .project-light .tabs-pdf-link {
    font-family: inherit;
    font-size: var(--nav-fs);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: normal;
  }
  .project-light .tab { margin-right: clamp(4px, 1.8vw, 16px); padding-left: 1px; padding-right: 1px; }
  .project-light .tabs-pdf-link { gap: 0.25em; }
  .project-light .tabs-pdf-link svg { width: 0.8em; height: 0.8em; }
  .project-light .tabs-pdf-link .pdf-l-full { display: none; }
  .project-light .tabs-pdf-link .pdf-l-mid { display: inline; }
}

/* ---- 6) Final Solution: the Project 3 screenshots scale to the width (proportionally, uncropped); the lightbox zooms them ---- */
@media (max-width: 900px) {
  .p3-final-shot { overflow: visible; }
  .p3-final-shot img { min-width: 0; }
}

/* ---- 7) heroes, tablet and phone (up to 1023px): one stacked structure ---- */
@media (max-width: 1023px) {
  /* project-1: the illustration stacks under the text (as it already did up to 900px) and no longer needs the desktop shift */
  .p1-hero { padding: clamp(56px, 9vw, 72px) 0 clamp(40px, 8vw, 68px); }
  .p1-hero-wrap { flex-direction: column; align-items: flex-start; gap: clamp(28px, 5vw, 40px); }
  .p1-hero-text { flex: none; }
  .p1-hero-art { flex: none; width: 100%; max-width: min(100%, 560px); transform: none; }
  .p1-journey { left: 0; }
  .p1-hero { --p1-top-fade: linear-gradient(to bottom, #FFFFFF 13vw, rgba(255, 255, 255, 0.85) calc(13vw + 30px), rgba(255, 255, 255, 0.5) calc(13vw + 75px), rgba(255, 255, 255, 0.18) calc(13vw + 125px), rgba(255, 255, 255, 0) calc(13vw + 180px)); }

}

/* ---- 7b) project-2 hero, up to 1279px (phone, portrait and landscape tablet): the same principle as project-1 ----
   Text on top; the photograph is the hero's own picture, cropped to its interesting right-hand part, sitting under the lower
   part of the text (no separate band) and dissolving into white above and below. */
@media (max-width: 1279px) {
  .p2-hero { display: block; min-height: 0; }
  .p2-hero-inner { padding-top: clamp(56px, 9vw, 72px); padding-bottom: 0; }
  .p2-hero-text { max-width: none; }

  /* project-2: the picture's height is --bh (about 80% of the width on a phone, at most 520px). Its width is at least the hero's
     width and at least 1.964 x --bh (the picture's own ratio), anchored right: on a phone only the right 55-60% (the walkway, the
     skyline in the sun and the glass building) is shown, not the empty haze on its left; on a wide tablet the extra height is cropped
     from the sky. The white fades above and below are on the unfiltered ::before layer (so they are pure white and meet the page
     without a seam); the ::after layer keeps the photo, its soft haze and its colour filter. */
  .p2-hero { --bh: clamp(260px, 80vw, 520px); padding-bottom: calc(var(--bh) * 0.8); }
  .p2-hero::before {
    display: block;
    inset: auto 0 0 0;
    height: var(--bh);
    background:
      linear-gradient(to bottom, #FFFFFF 0%, rgba(255, 255, 255, 0.96) 5%, rgba(255, 255, 255, 0.88) 10%, rgba(255, 255, 255, 0.72) 16%, rgba(255, 255, 255, 0.5) 22%, rgba(255, 255, 255, 0.25) 28%, rgba(255, 255, 255, 0) 34%) 0 0 / 100% 100% no-repeat,
      linear-gradient(to top, #FFFFFF 0%, rgba(255, 255, 255, 0.92) 4%, rgba(255, 255, 255, 0.72) 10%, rgba(255, 255, 255, 0.45) 18%, rgba(255, 255, 255, 0.2) 26%, rgba(255, 255, 255, 0.06) 33%, rgba(255, 255, 255, 0) 38%) 0 0 / 100% 100% no-repeat;
  }
  .p2-hero::after {
    inset: auto 0 2px 0;                 /* 2px inside the faded box on every side: a filtered layer can be rounded out by a pixel, which would show a thin line of photo above the fade */
    height: calc(var(--bh) - 4px);
    background:
      radial-gradient(ellipse 60% 85% at 84% 38%, rgba(244, 246, 249, 0.30) 0%, rgba(244, 246, 249, 0.27) 15%, rgba(244, 246, 249, 0.20) 32%, rgba(244, 246, 249, 0.11) 52%, rgba(244, 246, 249, 0.04) 74%, rgba(244, 246, 249, 0) 100%) 0 0 / 100% 100% no-repeat,
      url("images/entrepreneur-city-hero.webp") right bottom / max(100%, calc(var(--bh) * 1.964)) auto no-repeat;
  }
}

/* ---- 7c) project-3 hero, up to 1365px: text on top, then the bridge picture with the journey graphic on it (one "stage") ----
   The graphic needs about 560px beside the heading to stay readable, so project-3 stacks up to 1365px (so laptops at 1280 and 1366 get
   the large graphic too); from 1366px it is the desktop hero again, with the graphic beside the heading. */
@media (max-width: 1365px) {
  .p3-hero { display: block; min-height: 0; }
  .p3-hero::before { display: none; }
  .p3-hero-inner { padding-top: clamp(56px, 9vw, 72px); padding-bottom: 0; }
  .p3-hero-text { max-width: none; }

  /* project-3: the animated journey graphic and the bridge picture become one "stage" under the text. The hero is a size container
     (so the stage can be sized from its width). --g = the graphic's scale (px per svg unit): the whole graphic, line included, fits
     inside the width, never above 0.85 (so the graphic is not oversized on tablets).
     --P = the same scale for the picture, which is placed so that the graphic's line stays on the bridge exactly as on desktop
     (svg x 0 = picture x 1298, svg y 0 = picture y 246, 1.084 picture px per svg unit). The stage shows the picture from y 215 to y 595. */
  .p3-hero { container-type: inline-size; background: #FFFFFF; }
  .p3-journey {
    position: relative;
    inset: auto;
    container-type: normal;
    --g: min(0.85px, calc((100cqw - 2 * clamp(4px, 1.6vw, 12px)) / 531));      /* the whole graphic (svg width 531) fits in the width, with a small margin */
    --P: calc(var(--g) / 1.084);
    /* the graphic's left edge: centred in the width, but never so far right that the picture's right edge (svg x 874 / 1.084 picture px to the right) would show */
    --sx: max(calc((100cqw - 531 * var(--g)) / 2), calc(100cqw - 806 * var(--g) + 8px));
    height: calc(380 * var(--P));
    margin-top: clamp(4px, 1vw, 12px);
    background:
      linear-gradient(to bottom, #FFFFFF 0, rgba(255, 255, 255, 0.97) calc(14 * var(--P)), rgba(255, 255, 255, 0.9) calc(30 * var(--P)), rgba(255, 255, 255, 0.75) calc(50 * var(--P)), rgba(255, 255, 255, 0.5) calc(70 * var(--P)), rgba(255, 255, 255, 0.25) calc(90 * var(--P)), rgba(255, 255, 255, 0.08) calc(110 * var(--P)), rgba(255, 255, 255, 0) calc(130 * var(--P))) 0 0 / 100% calc(130 * var(--P)) no-repeat,
      linear-gradient(to top, #FFFFFF 0, rgba(255, 255, 255, 0.92) calc(12 * var(--P)), rgba(255, 255, 255, 0.6) calc(32 * var(--P)), rgba(255, 255, 255, 0.24) calc(64 * var(--P)), rgba(255, 255, 255, 0) calc(100 * var(--P))) 0 100% / 100% calc(100 * var(--P)) no-repeat,
      url("images/Hero-Picture 3 new 1.webp") calc(var(--sx) - 1298 * var(--P)) calc(-215 * var(--P)) / calc(2172 * var(--P)) auto no-repeat;
  }
  .p3-journey-svg {
    display: block;
    width: calc(531 * var(--g));
    height: calc(265 * var(--g));
    left: var(--sx);
    top: calc(31 * var(--P));
  }
}

/* project-1 keeps its side-by-side hero from 1024px; between 1024 and ~1200 the heading scales a little so it breaks as
   "Optimizing the / Investing / Experience" instead of four lines (75px from about 1210px up, as on desktop) */
@media (min-width: 1024px) { .project-light .project-head.p1-hero h1 { font-size: min(75px, 6.2vw); } }
/* the four Impact cards are narrow between 1180 and 1280px (about 260-285px): the figure scales a little there so "12-18%" and its arrow always fit (44px from about 1220px up) */
@media (min-width: 1180px) and (max-width: 1279px) { .project-light .impact-card .figure { font-size: clamp(34px, 3.4vw, 44px); } }
/* project-1, 1024-1279px: the illustration's 60px shift to the right (set for large screens) is phased in gradually, so the end of the line
   is never pushed past the window edge at these widths (full 60px from 1280px up, as before) */
@media (min-width: 1024px) and (max-width: 1279px) { .p1-journey { left: clamp(0px, calc((100vw - 1024px) * 0.1953), 50px); } }

/* project-2 is side by side again from 1280px, project-3 from 1366px (text left, picture / graphic right). Below the full desktop width the
   heading scales down a little so it keeps clear of the skyline (project-2) and of the journey graphic (project-3); the full 75px from
   1440px (project-2) / 1400px (project-3) up, exactly as before. */
@media (min-width: 1280px) {
  .project-light .project-head.p2-hero h1 { font-size: min(75px, 5.21vw); }
}
@media (min-width: 1366px) {
  .p3-hero { --p3-h: min(75px, calc(63px + (100vw - 1280px) * 0.1)); }
  .project-light .project-head.p3-hero h1 { font-size: var(--p3-h); }
}

/* project-1, 1024-1179px (landscape tablet): the hero is shorter than the picture's scaled height plus its downward shift, which would leave a
   strip of white above the photo with a hard edge. A white-to-clear fade at the top (strongest at 1024px, gone by 1180px, where the picture fills
   the hero) hides it. */
@media (min-width: 1024px) and (max-width: 1179px) {
  .p1-hero {
    --kl: clamp(0px, calc(1180px - 100vw), 156px);
    --p1-top-fade: linear-gradient(to bottom, #FFFFFF calc(var(--kl) * 0.8), rgba(255, 255, 255, 0.85) calc(var(--kl) * 0.99), rgba(255, 255, 255, 0.5) calc(var(--kl) * 1.3), rgba(255, 255, 255, 0.18) calc(var(--kl) * 1.6), rgba(255, 255, 255, 0) calc(var(--kl) * 1.95));
  }
}

/* ---- one hero grid for all three case studies (project-1 is the reference): same container, same top padding, so the title starts at the
   same place on every page. On project-2 and project-3 the text block used to be centred vertically in the (fixed minimum height) photo hero,
   so their titles sat lower and at different heights; now it starts at the top like project-1 (72px), and the photo hero keeps its height.
   The metadata row gets project-1's spacing too (it was 32px above / 0 below on project-3). ---- */
.p2-hero, .p3-hero { align-items: flex-start; }
.project-green .project-head .tags { margin-top: 36px; margin-bottom: 12px; }

/* Keyboard focus ring for the Final Solution screenshots (they open the lightbox with Enter or Space); shown for keyboard focus only */
#panel-final img[tabindex]:focus-visible { outline: 3px solid #004B5A; outline-offset: 4px; border-radius: 4px; }
.project-green #panel-final img[tabindex]:focus-visible { outline-color: #009639; }
