/* =========================================================
   Alexander Meyer — UX Design Leadership Portfolio
   Brand palette: Pantone exploration —
     Cloud Dancer #F0EFEB · Veiled Vista #C7E4CA · Baltic Sea #79B6D8
     Golden Mist #D6CD95 · Quiet Violet #A793AC · Cloud Cover #9A9393
     Hematite #756F6A · Blue Fusion #4A6275
   All text/background pairings below are calculated to meet
   WCAG 2.1 AAA contrast (7:1 normal text / 4.5:1 large+bold text).

   TYPE SYSTEM — one family (Plus Jakarta Sans), three weights,
   six sizes total. Every rule in this file pulls from these tokens
   rather than declaring one-off sizes/weights, so the whole site
   stays inside this fixed scale:
     --text-display  hero headline / big contact CTA
     --text-h2       section titles, stat numbers, pull quotes
     --text-h3       card & timeline headings, project titles
     --text-body     all paragraph copy
     --text-small    nav, buttons, captions, list items
     --text-eyebrow  labels, tags, dates, overlines (uppercase)
     --w-regular/--w-medium/--w-bold  400 / 600 / 700
   ========================================================= */

:root{
  /* --- base --- */
  --bg: #F0EFEB;              /* Cloud Dancer */
  --surface: #FFFFFF;
  --surface-2: #E7E2D6;
  --ink: #14181A;              /* primary text — 15.5:1 on bg, 16.7:1 on white */
  --ink-soft: #454545;         /* secondary text — 7.4:1 on bg / 8.5:1 on white (AAA) */
  --line: rgba(20,24,26,.16);
  --line-strong: rgba(20,24,26,.34);

  /* --- deep accents: text-safe, AAA 7:1+ on bg & white --- */
  --baltic: #375262;           /* Deep Baltic Sea — primary accent (7.17:1 on bg, 8.25:1 on white) */
  --gold: #534F3A;             /* Deep Golden Mist (7.16:1 / 8.24:1) */
  --sage: #475148;             /* Deep Veiled Vista (7.19:1 / 8.27:1) */
  --violet: #564B58;           /* Deep Quiet Violet (7.18:1 / 8.26:1) */

  /* --- vivid accents: backgrounds paired with --ink text (7:1+) --- */
  --baltic-vivid: #79B6D8;
  --gold-vivid: #D6CD95;
  --sage-vivid: #C7E4CA;
  --violet-vivid: #A793AC;     /* large/bold text or decorative only (6.3:1) */

  /* --- fixed deep accents: identical in both themes, NEVER overridden
     below. --baltic/--sage/--gold/--violet flip (dark in light mode,
     light in dark mode) so they stay readable on the page's own
     flipping background — but that means they're WRONG wherever they'd
     sit on a fixed vivid background that never flips (e.g. the sage-vivid
     testimonials section, or the vivid-tinted work-card badges). Use
     these fixed tokens in those spots instead. --- */
  --deep-baltic: #375262;
  --deep-gold: #534F3A;
  --deep-sage: #475148;
  --deep-tokn: #33475A;
  --deep-violet: #564B58;

  /* --- bold dark panels: safe with white/cream text at ANY size (7:1+) --- */
  --navy-deep: #445B6D;        /* darkened Blue Fusion */
  --umber-deep: #5D5854;       /* darkened Hematite */
  --ink-panel: #14181A;

  /* --- 5th project accent, drawn from Blue Fusion (previously reserved
     for dark panels only) — used for the ToknLens / AI-build case study
     so it reads distinct from Baltic Sea while staying inside the same
     named palette. Same deep/vivid flip pattern as baltic/gold/sage/violet. --- */
  --tokn: #33475A;             /* deep Blue Fusion — text-safe on bg & white */
  --tokn-vivid: #9DB6C4;       /* lightened Blue Fusion — background-chip use */

  --on-dark: #FFFFFF;
  --on-dark-soft: #B9C0C3;     /* AAA 7:1+ on --ink-panel only */

  --shadow: 0 1px 2px rgba(20,24,26,.05), 0 12px 28px -12px rgba(20,24,26,.18);
  --shadow-lg: 0 24px 60px -20px rgba(20,24,26,.3);
  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 28px;

  /* --- type: one family, three weights, six sizes --- */
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --w-regular: 400;
  --w-medium: 600;
  --w-bold: 700;
  --text-display: clamp(2.75rem, 6vw, 4.5rem);
  --text-h2: clamp(1.75rem, 3.2vw, 2.4rem);
  --text-h3: clamp(1.2rem, 1.8vw, 1.5rem);
  --text-body: 1rem;
  --text-small: .875rem;
  --text-eyebrow: .75rem;

  --ease: cubic-bezier(.22,.9,.3,1);
  --header-h: 84px;
  --focus-ring: 0 0 0 2px #fff, 0 0 0 4.5px var(--ink);
  color-scheme: light;
}

[data-theme="dark"]{
  --bg: #14181A;
  --surface: #1B2023;
  --surface-2: #21272A;
  --ink: #F4F2ED;
  --ink-soft: #B9C0C3;         /* AAA 7:1+ on #14181A / #1B2023 */
  --line: rgba(244,242,237,.16);
  --line-strong: rgba(244,242,237,.34);

  --baltic: #79B6D8;           /* vivid works directly on dark bg (8.1:1) */
  --gold: #D6CD95;             /* 11.1:1 */
  --sage: #C7E4CA;             /* 13.1:1 */
  --violet: #AE9CB3;           /* lightened for 7:1 on dark */

  --baltic-vivid: #79B6D8;
  --gold-vivid: #D6CD95;
  --sage-vivid: #C7E4CA;
  --violet-vivid: #AE9CB3;

  --tokn: #9DB6C4;             /* vivid works directly on dark bg, same as baltic above */
  --tokn-vivid: #9DB6C4;

  /* --on-dark / --on-dark-soft intentionally NOT overridden here: they're
     only used on the always-dark --ink-panel component (story quote,
     featured pillar, contact), which stays dark regardless of site theme. */

  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 20px 40px -16px rgba(0,0,0,.55);
  --shadow-lg: 0 30px 70px -24px rgba(0,0,0,.65);
  --focus-ring: 0 0 0 2px #14181A, 0 0 0 4.5px #fff;
  color-scheme: dark;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: var(--w-regular);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p{ margin: 0; }
svg{ display: block; }

.wrap{
  width: min(1180px, 92%);
  margin: 0 auto;
}

.skip-link{
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--bg); padding: .8em 1.4em; border-radius: 0 0 10px 0;
}
.skip-link:focus{ left: 0; }

.ink-accent{ color: var(--case-accent, var(--baltic)); font-weight: var(--w-bold); }

/* ---------- accessible focus states (visible on light & dark) ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}
.btn:focus-visible{ border-radius: 100px; }

/* ---------- grain + cursor ---------- */
.grain{
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .grain{ opacity: .06; mix-blend-mode: overlay; }

.cursor-dot{
  position: fixed; top:0; left:0; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--baltic); pointer-events: none; z-index: 999;
  transform: translate(-50%,-50%); transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease), opacity .3s, border-color .25s;
  mix-blend-mode: multiply; opacity: 0;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .cursor-dot{ mix-blend-mode: normal; }
.cursor-dot.is-visible{ opacity: 1; }
.cursor-dot.is-active{ width: 46px; height: 46px; background: rgba(56,84,99,.14); }
@media (hover: none){ .cursor-dot{ display: none; } }

/* Fixed dark/vivid sections (contact, approach, testimonials, case-quote
   panels, etc.) don't flip with the theme toggle, so the default multiply
   blend + baltic border can all but vanish against them. Force a plain
   white, non-blending ring instead whenever the pointer is over one. */
.cursor-dot.is-on-dark{ border-color: #fff; mix-blend-mode: normal; }
.cursor-dot.is-on-dark.is-active{ background: rgba(255,255,255,.22); }

/* Idle state: after 5s of no mouse movement the dot grows into a small
   playful speech-bubble; any movement snaps it back to the plain circle
   immediately (handled by removing this class in JS on mousemove). */
.cursor-bubble-text{ display: none; }
.cursor-dot.is-idle{
  width: auto; height: auto; max-width: 240px; padding: .85em 1.4em; border-radius: 100px;
  background: var(--ink-panel); border-color: transparent; mix-blend-mode: normal;
  box-shadow: var(--shadow-lg);
}
.cursor-dot.is-idle.is-active{ background: var(--ink-panel); }
.cursor-dot.is-idle .cursor-bubble-text{
  display: block; color: #fff; font-family: var(--font-ui); font-weight: var(--w-medium);
  font-size: var(--text-small); white-space: nowrap; line-height: 1;
}

/* Hide the native OS pointer everywhere on mouse-driven devices so only
   the custom dot shows — !important is needed here because .btn and a
   few other elements set their own `cursor: pointer`, which otherwise
   wins on specificity. Touch/stylus devices are untouched, since there's
   no hover to drive the dot there anyway. */
@media (hover: hover) and (pointer: fine){
  *{ cursor: none !important; }
}

/* While the lightbox is open, the custom dot sits underneath its opaque
   backdrop (and wouldn't read against it regardless) — bring back the
   normal OS pointer for the whole overlay instead of leaving the circle
   invisible. Higher specificity than the universal rule above, so it
   wins regardless of source order. */
html.lightbox-open,
html.lightbox-open *{ cursor: pointer !important; }
html.lightbox-open .cursor-dot{ opacity: 0 !important; }

/* ---------- reveal on scroll ---------- */
.reveal{
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: none; }
.reveal.center{ text-align: center; }

/* =========================================================
   BUTTONS — always solid & opaque, never bare outline
   ========================================================= */
.btn{
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font-family: var(--font-ui); font-weight: var(--w-bold); font-size: var(--text-body);
  padding: .95em 1.7em; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn svg{ transition: transform .3s var(--ease); }
.btn:hover svg{ transform: translateX(3px); }

/* Primary — bold Baltic Sea chip, AAA-safe with ink text, pops on any bg */
.btn-primary{ background: var(--baltic-vivid); color: var(--ink-panel); box-shadow: 0 10px 24px -10px rgba(56,84,99,.55); }
.btn-primary:hover{ background: #8FC2DE; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(56,84,99,.6); }

/* Secondary — solid ink pill, page-bg-colored text (theme-aware: this
   flips light/dark together with the toggle, so it never blends into
   a same-toned page background the way a fixed dark-on-dark pill would
   in dark mode) */
.btn-ghost{ background: var(--ink); color: var(--bg); }
.btn-ghost:hover{ box-shadow: 0 10px 24px -10px rgba(20,24,26,.4); transform: translateY(-2px); }

/* Tertiary — solid surface pill with theme-aware ink border+text
   (uses --ink, not --ink-panel, so it stays legible when the site
   theme is toggled to dark — --surface goes dark too in that case) */
.btn-line{ background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-line:hover{ background: var(--baltic-vivid); color: var(--ink-panel); border-color: var(--baltic-vivid); transform: translateY(-2px); }

.btn-small{ padding: .6em 1.2em; font-size: var(--text-small); }

/* On dark sections: secondary/tertiary buttons flip to solid light pills so they never disappear */
.contact .btn-ghost,
.contact .btn-line{ background: #fff; color: var(--ink-panel); border-color: #fff; }
.contact .btn-ghost:hover,
.contact .btn-line:hover{ background: var(--baltic-vivid); border-color: var(--baltic-vivid); color: var(--ink-panel); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background .4s, height .3s var(--ease);
}
.site-header.is-scrolled{ border-color: var(--line); height: 68px; }

/* justify-content is intentionally NOT space-between: on pages/breakpoints
   where .main-nav is taken out of flow (its mobile state is position:fixed)
   or simply absent (homepage header has no logo mark), space-between would
   collapse to a single remaining flex item and that item — the toggle +
   theme-switch cluster — would sit flush at the LEFT edge instead of the
   right. Pinning .header-actions to the right with its own auto margin
   below is robust regardless of how many other items are present/in-flow. */
.header-inner{ display: flex; align-items: center; justify-content: flex-start; gap: 1rem; }

.logo{ display: flex; align-items: center; gap: .6rem; font-weight: var(--w-bold); font-size: var(--text-small); flex-shrink: 0; }
.logo-mark svg{ overflow: visible; }
.logo-ring{ stroke: var(--baltic-vivid); transition: stroke-dashoffset .6s var(--ease); }
.logo-letters{ stroke: var(--ink); }
.logo:hover .logo-mark svg{ animation: spin-slow 1.4s var(--ease); }
@keyframes spin-slow{ to{ transform: rotate(360deg); } }

.main-nav{ display: flex; align-items: center; gap: 1.6rem; }
.main-nav a{
  position: relative; font-size: var(--text-small); font-weight: var(--w-medium); color: var(--ink-soft);
  padding: .3rem 0; transition: color .3s;
}
.main-nav a::after{
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--baltic);
  transition: right .35s var(--ease);
}
.main-nav a:hover, .main-nav a.is-active{ color: var(--ink); }
.main-nav a:hover::after, .main-nav a.is-active::after{ right: 0; }
.nav-resume-mobile{ display: none; }

.header-actions{ display: flex; align-items: center; gap: .7rem; flex-shrink: 0; margin-left: auto; }

.theme-toggle{
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); position: relative; overflow: hidden; flex-shrink: 0; padding: 0;
}
.theme-toggle svg{
  position: absolute; top: 50%; left: 50%; fill: none; stroke: currentColor; stroke-width: 1.6;
  transform: translate(-50%,-50%); transition: transform .5s var(--ease), opacity .4s;
}
.theme-toggle .icon-sun circle{ fill: currentColor; stroke: none; }
.theme-toggle .icon-sun{ opacity: 1; }
.theme-toggle .icon-moon{ fill: currentColor; stroke: none; opacity: 0; transform: translate(-50%,-50%) rotate(-90deg) scale(.4); }
[data-theme="dark"] .theme-toggle .icon-sun{ opacity: 0; transform: translate(-50%,-50%) rotate(90deg) scale(.4); }
[data-theme="dark"] .theme-toggle .icon-moon{ opacity: 1; transform: translate(-50%,-50%) rotate(0) scale(1); }

.nav-toggle{ display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 38px; height: 38px; background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.nav-toggle span{ width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .3s; }
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero{ position: relative; padding: calc(var(--header-h) + 3.5rem) 0 0; overflow: hidden; }

.hero-scene{ position: absolute; inset: 0; z-index: 0; pointer-events: none; will-change: transform; }
.blob{
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: float 16s ease-in-out infinite;
  will-change: transform;
}
.blob-a{ width: 480px; height: 480px; background: var(--baltic-vivid); top: -160px; right: -120px; opacity: .32; animation-duration: 18s; }
.blob-b{ width: 380px; height: 380px; background: var(--sage-vivid); bottom: -140px; left: -100px; opacity: .4; animation-duration: 22s; animation-delay: -6s; }
.blob-c{ width: 260px; height: 260px; background: var(--gold-vivid); top: 30%; left: 55%; opacity: .3; animation-duration: 14s; animation-delay: -3s; }
[data-theme="dark"] .blob{ filter: blur(90px); opacity: .28 !important; }
@keyframes float{
  0%,100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(30px,-20px) scale(1.06); }
  66%{ transform: translate(-24px,18px) scale(.96); }
}
.hero-lines{ position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.hero-lines path{ fill: none; stroke: var(--line); stroke-width: 1; }

.hero-inner{
  position: relative; z-index: 1; text-align: left;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center;
}
.hero-copy{ max-width: 620px; }

/* Source photo is a fairly low-resolution 400x400 square. Framing it at
   1:1 (its native ratio) instead of a taller crop avoids an extra,
   unnecessary upscale from object-fit:cover — and capping the display
   size closer to that native 400px keeps it from being stretched far
   beyond its real pixel data, which is what was reading as fuzzy. */
.hero-photo{ position: relative; display: flex; justify-content: center; }
.hero-photo img{
  position: relative; z-index: 1; width: 100%; max-width: 340px; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: top center; border-radius: var(--radius-lg);
  border: 6px solid var(--surface); box-shadow: var(--shadow-lg);
  image-rendering: -webkit-optimize-contrast;
}
.hero-photo-blob{
  position: absolute; width: 88%; max-width: 340px; aspect-ratio: 1 / 1; z-index: 0;
  background: var(--gold-vivid); border-radius: var(--radius-lg); opacity: .8;
  transform: translate(16px, 16px) rotate(3deg); animation: float 18s ease-in-out infinite;
}
[data-theme="dark"] .hero-photo-blob{ opacity: .45; }

.eyebrow{
  font-size: var(--text-eyebrow); font-weight: var(--w-bold); letter-spacing: .14em; text-transform: uppercase; color: var(--case-accent, var(--baltic));
  margin-bottom: 1rem;
}
.hero-title{
  font-weight: var(--w-bold); letter-spacing: -.02em;
  font-size: var(--text-display); line-height: 1.05; margin-bottom: .6rem; color: var(--ink);
}
.hero-role{
  font-weight: var(--w-medium);
  font-size: var(--text-h3); color: var(--ink-soft); margin-bottom: 1.6rem;
}
/* Fixed width (not min-width) so the box never resizes as words of
   different lengths rotate through — "outcomes." is the longest word,
   so the box is sized to fit it and shorter words stay left-aligned
   inside it. This keeps the rest of the sentence from shifting/
   recentering on every rotation.

   Height is exactly 1 line (1em) rather than an arbitrary multiple,
   because per the CSS spec an inline-block with any `overflow` other
   than `visible` uses its bottom margin edge as its baseline — the
   real text baseline inside is ignored. With height:1em the box's
   bottom edge lines up with where the surrounding text's baseline
   already sits, so the word reads on the same line instead of
   floating above/below it. */
.word-rotate{ position: relative; display: inline-flex; align-items: baseline; height: 1em; line-height: 1; overflow: hidden; vertical-align: baseline; width: 10ch; text-align: left; }
.word-rotate .w{
  position: absolute; left: 0; top: 0; color: var(--baltic); white-space: nowrap;
  opacity: 0; transform: translateY(100%); transition: transform .55s var(--ease), opacity .5s var(--ease);
}
.word-rotate .w.is-active{ opacity: 1; transform: translateY(0); position: relative; }
.word-rotate .w.is-leaving{ opacity: 0; transform: translateY(-100%); }

.hero-lede{ font-size: var(--text-body); color: var(--ink-soft); margin: 0 0 2.2rem; }
.hero-cta{ display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-meta{ font-size: var(--text-small); color: var(--ink-soft); margin-bottom: 3rem; }

.stat-band{ position: relative; z-index: 1; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 65%, transparent); backdrop-filter: blur(6px); }
.stat-grid{ display: grid; grid-template-columns: repeat(4,1fr); }
.stat{ text-align: center; padding: 2.2rem 1rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-height: 118px; }
.stat:last-child{ border-right: none; }
.stat-num{ display: block; font-size: var(--text-h2); font-weight: var(--w-bold); color: var(--case-accent, var(--baltic)); }
.stat-label{ display: block; font-size: var(--text-eyebrow); font-weight: var(--w-regular); color: var(--ink-soft); margin-top: .3rem; letter-spacing: .01em; }

.scroll-cue{
  position: relative; z-index: 1; display: flex; justify-content: center; padding: 1.4rem 0 2rem;
}
.scroll-cue span{ width: 22px; height: 36px; border: 1.5px solid var(--line-strong); border-radius: 20px; position: relative; display: block; }
.scroll-cue span::before{
  content: ''; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; border-radius: 3px;
  background: var(--baltic); transform: translateX(-50%); animation: scrolldown 1.8s ease-in-out infinite;
}
@keyframes scrolldown{ 0%{ opacity: 1; top: 6px; } 70%{ opacity: 0; top: 18px; } 100%{ opacity: 0; top: 6px; } }

/* =========================================================
   SECTION GENERICS
   ========================================================= */
section{ padding: 6.5rem 0; position: relative; }
.section-title{
  font-weight: var(--w-bold); letter-spacing: -.01em;
  font-size: var(--text-h2); max-width: 780px; margin: 0 auto 1rem; color: var(--ink);
}
.section-lede{ color: var(--ink-soft); max-width: 620px; margin: 0 auto 3.2rem; font-size: var(--text-body); }

/* =========================================================
   STORY
   ========================================================= */
.story{ background: var(--surface); }
.story-grid{ display: grid; grid-template-columns: .85fr 1.15fr; gap: 4.5rem; align-items: start; }
.story-quote{
  position: sticky; top: calc(var(--header-h) + 2rem);
  background: var(--ink-panel); color: #fff; border-radius: var(--radius-lg);
  padding: 3rem 2.4rem; box-shadow: var(--shadow-lg);
  overflow: hidden; min-height: 360px; display: flex; flex-direction: column; justify-content: center;
}
.quote-mark{ fill: var(--case-accent-vivid, var(--baltic-vivid)); margin-bottom: 1.2rem; }
.story-quote p{
  font-weight: var(--w-medium); color: #fff;
  font-size: var(--text-h2); line-height: 1.3;
}
.story-quote-cite{ display: block; margin-top: 1.6rem; font-size: var(--text-eyebrow); font-weight: var(--w-medium); color: var(--on-dark-soft); text-transform: uppercase; letter-spacing: .08em; }

.story-copy h2{ margin-bottom: 1.4rem; }
.story-copy p{ color: var(--ink-soft); margin-bottom: 1.2rem; font-size: var(--text-body); }

.apart-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.apart-card{
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.apart-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.apart-icon{
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: color-mix(in srgb, var(--case-accent-vivid, var(--baltic-vivid)) 30%, var(--surface)); color: var(--case-accent, var(--baltic)); margin-bottom: .9rem;
}
.apart-card h3{ font-size: var(--text-body); font-weight: var(--w-bold); margin-bottom: .4rem; color: var(--ink); }
.apart-card p{ font-size: var(--text-small); color: var(--ink-soft); margin: 0; }

/* =========================================================
   APPROACH — bold color-block bento
   ========================================================= */
.approach{ background: var(--baltic-vivid); color: var(--ink-panel); }
.approach .eyebrow{ color: var(--ink-panel); }
.approach .section-title{ color: var(--ink-panel); }
.approach .section-lede{ color: var(--ink-panel); font-weight: var(--w-medium); }

.pillar-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.pillar{
  background: var(--surface); border: 1px solid rgba(20,24,26,.08); border-radius: var(--radius);
  padding: 1.8rem 1.5rem; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.pillar:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pillar-num{ font-weight: var(--w-bold); color: var(--case-accent, var(--baltic)); font-size: var(--text-h3); }
.pillar h3{ font-size: var(--text-body); margin: .8rem 0 .5rem; font-weight: var(--w-bold); color: var(--ink); }
.pillar p{ font-size: var(--text-small); color: var(--ink-soft); }

/* Featured first pillar spans the full row as a bold statement card */
.pillar:first-child{
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center;
  background: var(--ink-panel); padding: 2.2rem 2.4rem;
}
.pillar:first-child .pillar-num{ font-size: var(--text-display); color: var(--case-accent-vivid, var(--baltic-vivid)); }
.pillar:first-child h3{ font-size: var(--text-h2); color: #fff; margin: 0 0 .4rem; grid-row: 1; }
.pillar:first-child p{ color: var(--on-dark-soft); font-size: var(--text-body); grid-column: 2; }
.pillar:first-child .pillar-num{ grid-row: 1 / 3; grid-column: 1; }

/* =========================================================
   EXPERIENCE / TIMELINE
   ========================================================= */
.experience{ background: var(--surface); }
.timeline{ position: relative; margin-top: 3.5rem; padding-left: 2.6rem; }
.timeline-line{ position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-progress{ position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: var(--baltic-vivid); transition: height .1s linear; }

.tl-item{ position: relative; padding-bottom: 3rem; }
.tl-item:last-child{ padding-bottom: 0; }
.tl-dot{
  position: absolute; left: -2.6rem; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); transition: background .4s, border-color .4s, transform .4s;
}
.tl-item.is-visible .tl-dot{ background: var(--case-accent-vivid, var(--baltic-vivid)); border-color: var(--case-accent-vivid, var(--baltic-vivid)); transform: scale(1.15); }
.tl-date{ font-size: var(--text-eyebrow); font-weight: var(--w-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--case-accent, var(--baltic)); margin-bottom: .6rem; }
.tl-card{
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 2rem; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tl-card:hover{ transform: translateX(6px); box-shadow: var(--shadow); }
.tl-card h3{ font-size: var(--text-h3); font-weight: var(--w-bold); margin-bottom: .25rem; color: var(--ink); }
.tl-company{ color: var(--sage); font-weight: var(--w-bold); font-size: var(--text-small); margin-bottom: .9rem; }
.tl-card ul{ display: grid; gap: .5rem; }
.tl-card li{ position: relative; padding-left: 1.1rem; font-size: var(--text-small); color: var(--ink-soft); }
.tl-card li::before{ content: ''; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--case-accent, var(--baltic)); }

/* =========================================================
   WORK
   ========================================================= */
.work{ background: var(--bg); }
.work-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.work-card{
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.work-card:hover{ transform: translateY(-8px); box-shadow: var(--shadow-lg); }

/* Whole-card click target ("block link" pattern): sits under the card's
   real content but above the background, so clicking anywhere on the
   card opens the case study. It's aria-hidden + untabbable because the
   visible "View Case Study" link below already provides the accessible,
   keyboard-reachable route to the same destination — this overlay exists
   purely for mouse/touch convenience and must never be a second stop in
   the tab order or a duplicate announcement for screen readers. */
.work-card-link{ position: absolute; inset: 0; z-index: 1; }
.work-card .btn{ position: relative; z-index: 2; }
.work-art{ height: 170px; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }

/* These tiles mix a FIXED vivid color with a literal light neutral
   (not --surface-2, which goes dark in dark mode) so the tile always
   stays a light "badge" regardless of the site theme — paired below
   with the fixed --deep-* text tokens rather than the flipping
   --baltic/--sage/--gold/--violet, which would go pale-on-pale here
   the same way the testimonials section did. */
.work-card[data-tint="baltic"] .work-art{ background: color-mix(in srgb, var(--baltic-vivid) 45%, #F0EFEB); }
.work-card[data-tint="sage"] .work-art{ background: color-mix(in srgb, var(--sage-vivid) 55%, #F0EFEB); }
.work-card[data-tint="violet"] .work-art{ background: color-mix(in srgb, var(--violet-vivid) 45%, #F0EFEB); }
.work-card[data-tint="gold"] .work-art{ background: color-mix(in srgb, var(--gold-vivid) 50%, #F0EFEB); }
.work-card[data-tint="tokn"] .work-art{ background: color-mix(in srgb, var(--tokn-vivid) 50%, #F0EFEB); }
.work-card:hover .work-art .wordmark{ transform: scale(1.05); transition: transform .5s var(--ease); }

/* Company wordmarks — clean typographic identity marks in place of
   employer logos (kept as original typography rather than reproduced
   trademarked artwork). All four share the same size token; only
   color, case and a couple of decorative treatments differ. */
.wordmark{
  font-family: var(--font-ui); font-weight: var(--w-bold); font-size: var(--text-h2);
  transition: transform .5s var(--ease); text-align: center; line-height: 1;
}

.wordmark-logitech{ text-transform: lowercase; letter-spacing: -.01em; color: var(--deep-baltic); }

.wordmark-ibm{
  text-transform: uppercase; letter-spacing: .04em; color: var(--deep-sage);
  font-weight: var(--w-bold); position: relative; padding-bottom: .7rem;
}
/* Nod to IBM's classic banded lettering as a decorative bar UNDER the
   wordmark rather than a background-clip stripe THROUGH it — the previous
   clip-through-text treatment read as a line striking out the letters and
   hurt legibility. The text itself now stays a plain, solid, fully legible
   "IBM". */
.wordmark-ibm::after{
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 64%; height: 7px;
  background-image: repeating-linear-gradient(0deg, var(--deep-sage) 0px, var(--deep-sage) 2px, transparent 2px, transparent 4px);
}

.wordmark-breakwater{
  display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--deep-violet);
}
.wordmark-breakwater em{
  font-style: normal; font-weight: var(--w-bold);
  font-size: var(--text-eyebrow); letter-spacing: .22em; text-transform: uppercase; color: var(--deep-violet);
}

.wordmark-eaton{
  text-transform: uppercase; letter-spacing: .1em; color: var(--deep-gold);
  padding-bottom: .5rem; border-bottom: 3px solid var(--deep-gold);
}

.wordmark-toknlens{
  display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--deep-tokn);
  letter-spacing: -.01em;
}
.wordmark-toknlens em{
  font-style: normal; font-weight: var(--w-bold); font-size: var(--text-eyebrow);
  letter-spacing: .2em; text-transform: uppercase; color: var(--deep-tokn); opacity: .7;
}

.work-body{ padding: 1.8rem 2rem 2.2rem; }
.work-tag{ font-size: var(--text-eyebrow); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: .07em; color: var(--baltic); }
.work-body h3{ font-size: var(--text-h3); font-weight: var(--w-bold); margin: .5rem 0 .8rem; color: var(--ink); }
.work-body p{ color: var(--ink-soft); font-size: var(--text-body); margin-bottom: 1.2rem; }
.work-metrics{ display: flex; flex-wrap: wrap; gap: .5rem; }
.work-metrics span{
  font-size: var(--text-eyebrow); font-weight: var(--w-bold); padding: .4em .9em; border-radius: 100px;
  background: var(--surface-2); color: var(--ink);
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
/* This whole section sits on a FIXED sage-vivid background that never
   changes with the theme toggle — so every child below intentionally
   uses fixed, non-flipping colors (--ink-panel or the tuned #3D463E),
   never --ink/--ink-soft/--sage, which would go light in dark mode and
   turn into pale text on this same pale-green background. */
.testimonials{ background: var(--sage-vivid); }
.testimonials .eyebrow{ color: #3D463E; } /* darkened for 7.17:1 AAA against the sage-vivid bg */
.testimonials .section-title{ color: var(--ink-panel); }
.quote-carousel{ max-width: 760px; margin: 0 auto; text-align: center; position: relative; min-height: 280px; }
.quote-track{ position: relative; }
.quote-slide{
  position: absolute; inset: 0; opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.quote-slide.is-active{ position: relative; opacity: 1; transform: none; pointer-events: auto; }
.quote-mark.small{ fill: #3D463E; margin: 0 auto 1rem; }
.quote-slide p{ font-weight: var(--w-medium); font-size: var(--text-h3); line-height: 1.5; margin-bottom: 1.4rem; color: var(--ink-panel); }
.quote-slide footer{ font-size: var(--text-small); color: #3D463E; font-weight: var(--w-medium); }
.quote-slide footer strong{ color: var(--ink-panel); }
.quote-slide footer strong a{ border-bottom: 1.5px solid rgba(20,24,26,.34); transition: border-color .3s, color .3s; }
.quote-slide footer strong a:hover{ color: var(--deep-baltic); border-color: var(--deep-baltic); }

.quote-dots{ display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.quote-dots button{
  width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(20,24,26,.28); cursor: pointer;
  transition: background .3s, transform .3s; padding: 0;
}
.quote-dots button.is-active{ background: var(--ink-panel); transform: scale(1.3); }

/* =========================================================
   SKILLS / MARQUEE
   ========================================================= */
.skills{ background: var(--bg); padding-bottom: 5rem; }
.marquee{ overflow: hidden; padding: .5rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track{ display: flex; width: max-content; gap: 1rem; animation: scroll-left 34s linear infinite; }
.marquee-track.marquee-left{ animation-name: scroll-left; }
.marquee-track.marquee-right{ animation-name: scroll-right; }
.marquee:hover .marquee-track{ animation-play-state: paused; }
.marquee-track span{
  font-weight: var(--w-medium); font-size: var(--text-h3); color: var(--ink-soft);
  padding: .3em 1.2em; border: 1.5px solid var(--line); border-radius: 100px; white-space: nowrap;
}
@keyframes scroll-left{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@keyframes scroll-right{ from{ transform: translateX(-50%); } to{ transform: translateX(0); } }

.tools-wrap{ margin-top: 3.5rem; }
.tools-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.tools-col h4{ font-size: var(--text-eyebrow); text-transform: uppercase; letter-spacing: .08em; color: var(--case-accent, var(--baltic)); margin-bottom: .6rem; font-weight: var(--w-bold); }
.tools-col p{ font-size: var(--text-small); color: var(--ink-soft); }
.cert-row{ display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2.5rem; }
.cert-row span{ font-size: var(--text-small); color: var(--ink); font-weight: var(--w-medium); background: var(--surface); border: 1.5px solid var(--line); padding: .5em 1em; border-radius: 100px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact{ background: var(--ink-panel); color: #fff; overflow: hidden; }
.contact-inner{ position: relative; text-align: center; max-width: 720px; z-index: 1; }
.contact .eyebrow{ color: var(--baltic-vivid); }
.contact-blob{
  position: absolute; width: 500px; height: 500px; background: var(--baltic-vivid); opacity: .22; filter: blur(100px);
  border-radius: 50%; top: -220px; left: 50%; margin-left: -250px; animation: float 20s ease-in-out infinite; z-index: -1;
}
.contact-title{ font-weight: var(--w-bold); font-size: var(--text-display); line-height: 1.1; margin-bottom: 1.4rem; color: #fff; }
.contact-title .ink-accent{ color: var(--baltic-vivid); }
.contact-lede{ color: var(--on-dark-soft); font-size: var(--text-body); margin-bottom: 2.4rem; }
.contact-cta{ display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{ background: var(--bg); border-top: 1px solid var(--line); padding: 2.4rem 0; }
.footer-inner{ display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.logo-footer{ font-size: var(--text-small); }
.footer-note, .footer-copy{ font-size: var(--text-small); color: var(--ink-soft); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Mid breakpoint: shrink nav before it ever collides with the header actions */
@media (max-width: 1180px){
  .wrap{ width: 94%; }
  .main-nav{ gap: 1.1rem; }
  .logo-text{ display: none; }
  .header-actions{ gap: .5rem; }
}

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; text-align: center; gap: 2.2rem; }
  .hero-copy{ max-width: 100%; margin: 0 auto; }
  .hero-photo{ order: -1; }
  .hero-photo img, .hero-photo-blob{ max-width: 300px; }
  .hero-lede{ margin-left: auto; margin-right: auto; max-width: 520px; }
  .hero-cta{ justify-content: center; }
  .story-grid{ grid-template-columns: 1fr; }
  .story-quote{ position: relative; top: 0; }
  .pillar-grid{ grid-template-columns: repeat(2,1fr); }
  .pillar:first-child{ grid-template-columns: auto 1fr; }
  .work-grid{ grid-template-columns: 1fr; }
  .tools-grid{ grid-template-columns: repeat(2,1fr); }
  .apart-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px){
  .main-nav{
    position: fixed; inset: 68px 0 0 0; height: calc(100vh - 68px); background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease);
  }
  .main-nav.is-open{ opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a{ font-size: var(--text-h3); }
  .nav-resume-mobile{
    /* uses --baltic-vivid/--ink-panel (both theme-fixed) rather than
       --ink, because the mobile nav panel itself sits on --bg, which
       flips dark in dark mode — a fixed vivid chip stays visible either way */
    display: inline-flex; margin-top: 1rem; background: var(--baltic-vivid); color: var(--ink-panel) !important;
    padding: .9em 1.8em; border-radius: 100px; font-weight: var(--w-bold); font-size: var(--text-body) !important;
  }
  .nav-resume-mobile::after{ display: none; }
  .nav-toggle{ display: flex; }
  .header-actions .btn-small{ display: none; }
  .logo-text{ display: inline; }
}

@media (max-width: 760px){
  .stat-grid{ grid-template-columns: repeat(2,1fr); }
  .stat{ border-right: none; border-bottom: 1px solid var(--line); }
  .stat:nth-last-child(-n+2){ border-bottom: none; }
  .pillar-grid{ grid-template-columns: 1fr; }
  .pillar:first-child{ grid-template-columns: 1fr; text-align: left; }
  .pillar:first-child .pillar-num{ grid-row: auto; grid-column: auto; }
  .pillar:first-child p{ grid-column: auto; }
  .apart-grid{ grid-template-columns: 1fr; }
  .tools-grid{ grid-template-columns: 1fr 1fr; }
  section{ padding: 4.5rem 0; }
  .timeline{ padding-left: 2rem; }
  .tl-dot{ left: -2rem; }
  .tl-card{ padding: 1.4rem 1.4rem; }
}

/* =========================================================
   CASE STUDY PAGES
   Reuses every token & component above (pillar, tl-card, apart-card,
   stat-band, reveal, story-quote, blobs, marquee). --case-accent /
   --case-accent-vivid are set once via inline style on <body> per
   project (baltic=Logitech, violet=Breakwater, gold=Eaton) and every
   accent-bearing rule above already falls back to Baltic when unset,
   so the homepage is completely untouched by this section.
   ========================================================= */

/* ---------- breadcrumb / back link ---------- */
.case-back{
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5em;
  font-size: var(--text-small); font-weight: var(--w-bold); color: var(--ink-soft);
  margin-top: calc(var(--header-h) + 2.2rem); transition: color .3s, gap .3s;
}
.case-back svg{ transition: transform .3s var(--ease); }
.case-back:hover{ color: var(--case-accent, var(--baltic)); gap: .75em; }
.case-back:hover svg{ transform: translateX(-3px); }

/* ---------- case hero ---------- */
.case-hero{ position: relative; padding: 1.6rem 0 0; overflow: hidden; }
.case-hero-inner{ position: relative; z-index: 1; max-width: 820px; }
.case-hero-badge{
  display: inline-flex; align-items: center; gap: .6rem; padding: .5em 1.1em .5em .7em;
  border-radius: 100px; background: var(--surface); border: 1px solid var(--line);
  font-size: var(--text-small); font-weight: var(--w-bold); color: var(--ink-soft); margin-bottom: 1.6rem;
}
.case-hero-badge .dot{ width: 9px; height: 9px; border-radius: 50%; background: var(--case-accent-vivid, var(--baltic-vivid)); flex-shrink: 0; }
.case-title{
  font-weight: var(--w-bold); letter-spacing: -.02em; font-size: var(--text-display);
  line-height: 1.06; margin-bottom: 1rem; color: var(--ink);
}
.case-meta-row{ display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-bottom: 1.6rem; }
.case-meta-row span{ font-size: var(--text-small); font-weight: var(--w-medium); color: var(--ink-soft); display: inline-flex; align-items: center; gap: .5em; }
.case-meta-row strong{ color: var(--ink); font-weight: var(--w-bold); }
.case-lede{ font-size: var(--text-h3); font-weight: var(--w-medium); color: var(--ink-soft); max-width: 720px; margin-bottom: 2.4rem; line-height: 1.5; }

/* ---------- generic sub-eyebrow label used inline (not centered section eyebrow) ---------- */
.tag-row{ display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.tag-row span{
  font-size: var(--text-eyebrow); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: .06em;
  padding: .45em 1em; border-radius: 100px; background: var(--surface-2); color: var(--ink);
}

/* ---------- two-column copy block (context / problem statements etc.) ---------- */
.case-split{ display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
.case-split h2{ margin-bottom: 1.2rem; }
.case-split .case-split-copy p{ color: var(--ink-soft); margin-bottom: 1.1rem; font-size: var(--text-body); }
.case-split-copy p:last-child{ margin-bottom: 0; }

/* ---------- static pull-quote (non-carousel variant of .story-quote) ---------- */
.case-quote{
  background: var(--ink-panel); color: #fff; border-radius: var(--radius-lg);
  padding: 2.6rem 2.4rem; box-shadow: var(--shadow-lg);
}
.case-quote p{ font-weight: var(--w-medium); color: #fff; font-size: var(--text-h3); line-height: 1.4; }
.case-quote .story-quote-cite{ color: var(--on-dark-soft); }

/* ---------- number-badged process/phase cards (reuses pillar look, own class to avoid colliding with homepage .pillar-grid layout rules) ---------- */
.phase-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; counter-reset: phase; }
.phase-card{
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.phase-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.phase-num{ font-weight: var(--w-bold); color: var(--case-accent, var(--baltic)); font-size: var(--text-h3); display: block; margin-bottom: .8rem; }
.phase-card h3{ font-size: var(--text-body); font-weight: var(--w-bold); margin-bottom: .5rem; color: var(--ink); }
.phase-card p{ font-size: var(--text-small); color: var(--ink-soft); margin: 0; }
.phase-arrow{ display: flex; align-items: center; justify-content: center; color: var(--line-strong); }
.phase-track{ display: grid; grid-template-columns: repeat(auto-fit, minmax(0,1fr)); gap: .6rem; align-items: stretch; }

/* ---------- before / after comparison table ---------- */
.compare-wrap{ overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.compare-table{ width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td{ text-align: left; padding: 1rem 1.4rem; font-size: var(--text-small); vertical-align: top; }
.compare-table thead th{
  font-size: var(--text-eyebrow); text-transform: uppercase; letter-spacing: .06em; font-weight: var(--w-bold);
  color: var(--case-accent, var(--baltic)); border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.compare-table tbody tr{ border-bottom: 1px solid var(--line); transition: background .3s; }
.compare-table tbody tr:last-child{ border-bottom: none; }
.compare-table tbody tr:hover{ background: var(--bg); }
.compare-table td:first-child{ font-weight: var(--w-bold); color: var(--ink); white-space: nowrap; }
.compare-table td{ color: var(--ink-soft); }

/* ---------- role / user-persona grid (reuses .apart-card visuals via shared class) ---------- */
.role-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.role-card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.role-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow); }
.role-card .role-emoji{ font-size: 1.5rem; display: block; margin-bottom: .8rem; }
.role-card h3{ font-size: var(--text-body); font-weight: var(--w-bold); margin-bottom: .4rem; color: var(--ink); }
.role-card p{ font-size: var(--text-small); color: var(--ink-soft); margin: 0; }

/* ---------- feedback callouts (two-up new/existing user quotes etc.) ---------- */
.feedback-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.4rem; }
.feedback-card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; position: relative; overflow: hidden;
}
.feedback-card::before{
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: var(--case-accent-vivid, var(--baltic-vivid));
}
.feedback-card h3{ font-size: var(--text-eyebrow); text-transform: uppercase; letter-spacing: .06em; font-weight: var(--w-bold); color: var(--case-accent, var(--baltic)); margin-bottom: .8rem; }
.feedback-card p{ font-size: var(--text-body); color: var(--ink-soft); margin: 0; }

/* ---------- section variants ---------- */
.section-tint{ background: var(--surface); }
.section-dark{ background: var(--ink-panel); color: #fff; }
.section-dark .eyebrow{ color: var(--case-accent-vivid, var(--baltic-vivid)); }
.section-dark .section-title{ color: #fff; }
.section-dark .section-lede{ color: var(--on-dark-soft); }

/* ---------- opportunity / takeaway list ---------- */
.takeaway-list{ display: grid; gap: .9rem; max-width: 760px; margin: 0 auto; }
.takeaway-list li{
  position: relative; padding-left: 1.8rem; font-size: var(--text-body); color: var(--ink-soft); text-align: left;
}
.takeaway-list li::before{
  content: ''; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--case-accent-vivid, var(--baltic-vivid));
}

/* ---------- case switcher / closing CTA between the three studies ---------- */
.case-switcher{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.case-switch-card{
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.6rem; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.case-switch-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.case-switch-card span{ font-size: var(--text-eyebrow); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); display: block; margin-bottom: .3rem; }
.case-switch-card strong{ font-size: var(--text-body); color: var(--ink); font-weight: var(--w-bold); }
.case-switch-card svg{ flex-shrink: 0; color: var(--ink-soft); transition: transform .3s var(--ease); }
.case-switch-card:hover svg{ transform: translateX(4px); color: var(--case-accent, var(--baltic)); }

@media (max-width: 900px){
  .case-split{ grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 760px){
  .case-back{ margin-top: calc(var(--header-h) + 1.4rem); }
  .phase-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   CASE STUDY FIGURES — real artifacts pulled from project
   decks (screenshots, diagrams, workshop photos). Framed like a
   browser/app window so raw slide crops read as intentional
   product artifacts rather than pasted-in slides.
   ========================================================= */
.case-figure{
  margin: 2.6rem 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.case-figure:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.case-figure-chrome{
  display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.case-figure-chrome span{ width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.case-figure img{ display: block; width: 100%; height: auto; }
.case-figure figcaption{
  padding: 1rem 1.4rem 1.2rem; font-size: var(--text-small); color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.case-figure figcaption strong{ color: var(--ink); font-weight: var(--w-bold); }

/* full-bleed hero figure directly under a section title, no chrome bar,
   slightly larger radius+shadow so it reads as the section's lead visual */
.case-figure--lead{ margin: 2.2rem 0 0; }
.case-figure--lead img{ border-radius: var(--radius-lg); }

/* side-by-side pair of figures */
.case-gallery{ display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.4rem; margin: 2.6rem 0; }
.case-gallery .case-figure{ margin: 0; }

@media (max-width: 760px){
  .case-figure{ border-radius: var(--radius); }
}

/* =========================================================
   TOKNLENS PRODUCT PREVIEW — a coded recreation of the live
   Executive Overview screen (no screenshot file was available to
   embed directly). Deliberately fixed-dark regardless of site theme,
   since it's meant to read as "a window onto the real app," not a
   theme-aware site component.
   ========================================================= */
.tokn-demo{
  display: grid; grid-template-columns: 220px 1fr; min-height: 480px;
  background: #0b0d10; color: #e5e7eb; font-size: 12.5px; line-height: 1.4;
}
.tokn-demo-side{ background: #101317; border-right: 1px solid #1f242b; padding: 1.2rem 1rem; }
.tokn-demo-brand{ display: flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; }
.tokn-demo-logo{ width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg,#5b8def,#8a63d2); flex-shrink: 0; }
.tokn-demo-brand strong{ display: block; font-size: 13px; color: #fff; }
.tokn-demo-brand small{ display: block; color: #7d8590; font-size: 10.5px; }
.tokn-demo-group{ margin: 1rem 0 .4rem; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #4b535e; }
.tokn-demo-item{ padding: .45em .6em; border-radius: 7px; color: #9aa4b2; margin-bottom: .2rem; display: flex; justify-content: space-between; }
.tokn-demo-item.is-active{ background: #1b2027; color: #fff; }
.tokn-demo-pill{ background: #e2574c; color: #fff; border-radius: 100px; padding: 0 6px; font-size: 10px; }
.tokn-demo-user{ display: flex; align-items: center; gap: .6rem; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid #1f242b; }
.tokn-demo-avatar{ width: 24px; height: 24px; border-radius: 50%; background: #5b8def; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.tokn-demo-user strong{ display: block; font-size: 11.5px; color: #fff; }
.tokn-demo-user small{ display: block; color: #7d8590; font-size: 10px; }

.tokn-demo-main{ padding: 1.2rem 1.4rem; overflow-x: auto; }
.tokn-demo-topbar{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tokn-demo-topbar strong{ color: #fff; font-size: 14px; }
.tokn-demo-tabs{ display: flex; align-items: center; gap: .4rem; }
.tokn-demo-tabs span{ padding: .4em .8em; border-radius: 7px; background: #171b21; color: #9aa4b2; font-size: 11px; }
.tokn-demo-tabs span.is-active{ background: #262c35; color: #fff; }
.tokn-demo-btn-ghost{ background: #171b21 !important; }
.tokn-demo-btn-primary{ background: #5b8def !important; color: #fff !important; font-weight: 700; }
.tokn-demo-alert{
  background: #1c1712; border: 1px solid #3a2c14; color: #e8c477; border-left: 3px solid #e2b93b;
  border-radius: 8px; padding: .7em 1em; font-size: 11.5px; margin-bottom: 1rem;
}
.tokn-demo-alert u{ color: #8ab4f8; text-decoration: none; }
.tokn-demo-stats{ display: grid; grid-template-columns: repeat(4,1fr); gap: .8rem; margin-bottom: 1rem; }
.tokn-demo-stat{ background: #12151a; border-top: 2.5px solid var(--tokn-bar,#5b8def); border-radius: 8px; padding: .8em 1em; }
.tokn-demo-stat span{ display: block; font-size: 9.5px; letter-spacing: .05em; color: #7d8590; margin-bottom: .3rem; }
.tokn-demo-stat strong{ display: block; font-size: 17px; color: #fff; }
.tokn-demo-stat small{ display: block; margin-top: .2rem; color: #7d8590; font-size: 10.5px; }
.tokn-demo-stat small.down{ color: #e2574c; }
.tokn-demo-stat small.up, .tokn-demo-stat strong.up{ color: #3cb873; }
.tokn-demo-grid{ display: grid; grid-template-columns: 1.6fr 1fr; gap: .9rem; }
.tokn-demo-panel{ background: #12151a; border-radius: 8px; padding: .9em 1em; }
.tokn-demo-panel strong{ display: block; color: #fff; font-size: 11.5px; margin-bottom: .6rem; }
.tokn-demo-table table{ width: 100%; border-collapse: collapse; }
.tokn-demo-table th{ text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: #4b535e; padding-bottom: .5em; font-weight: 600; }
.tokn-demo-table td{ padding: .5em 0; border-top: 1px solid #1f242b; color: #cbd2d9; font-size: 11.5px; }
.tokn-demo-dot{ display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .5em; }
.tokn-demo-tag{ display: inline-block; padding: .1em .6em; border-radius: 100px; font-size: 10px; font-weight: 700; }
.tokn-demo-tag.is-bad{ background: rgba(226,87,76,.18); color: #f18077; }
.tokn-demo-tag.is-warn{ background: rgba(226,185,59,.18); color: #e8c477; }
.tokn-demo-tag.is-good{ background: rgba(60,184,115,.18); color: #6fd39c; }
.tokn-demo-vendor{ display: flex; justify-content: space-between; padding: .4em 0; border-top: 1px solid #1f242b; color: #cbd2d9; font-size: 11px; }
.tokn-demo-vendor:first-of-type{ border-top: none; }
.tokn-demo-vendor em{ font-style: normal; color: #7d8590; }

@media (max-width: 760px){
  .tokn-demo{ grid-template-columns: 1fr; }
  .tokn-demo-side{ display: none; }
  .tokn-demo-stats{ grid-template-columns: repeat(2,1fr); }
  .tokn-demo-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   LIGHTBOX — click any case-figure image for a larger view.
   Overlay + zoom-hint icon are both injected by main.js only on
   pages that actually contain .case-figure img elements.
   ========================================================= */
.case-figure img{ cursor: pointer; }
.case-figure-zoom-hint{
  position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(20,24,26,.6); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s var(--ease); pointer-events: none;
}
.case-figure:hover .case-figure-zoom-hint{ opacity: 1; transform: scale(1); }

.lightbox{
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(10,12,14,.9); backdrop-filter: blur(8px); padding: 5vh 5vw;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s;
}
.lightbox.is-open{ opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.lightbox img{
  max-width: 100%; max-height: 90vh; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  transform: scale(.96); transition: transform .35s var(--ease);
}
.lightbox.is-open img{ transform: scale(1); }
.lightbox-close{
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .3s, transform .35s var(--ease);
}
.lightbox-close:hover{ background: rgba(255,255,255,.22); transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce){
  .lightbox-close:hover{ transform: none; }
}
