/* ============================================================
   HOPE DESIGN SYSTEM — layout.css
   v1.4 · May 2026
   Requires: tokens.css, reset.css, components.css (loaded first)
   ============================================================ */

/* ----------------------------------------------------------
   CONTAINER
   Capped content width with an enforced minimum gutter. The
   parent section stays full width (its own background/border
   is never capped here), and this element only centres and
   sizes the INNER content.

   Desktop: width is min(--content-max-width, 100% - 2 * 80px),
   so the gutter is exactly --space-20 (80px) on each side for
   any viewport up to the point the cap takes over, then the
   leftover space becomes extra margin beyond that 80px floor.
   It never shrinks below 80px on a desktop width.
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (min-width: 768px) {
  .container {
    width: min(var(--content-max-width), calc(100% - 2 * var(--space-20)));
    max-width: none;
    padding: 0;
  }
}

/* ----------------------------------------------------------
   SCROLL OFFSET — compensates for fixed floating header
   ---------------------------------------------------------- */
html {
  scroll-padding-top: var(--space-24);
}

/* ----------------------------------------------------------
   HEADER / NAV — full-bleed glass bar, inner content capped at
   --content-max-width (same shared cap as every section .container)
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: var(--z-overlay);

  /* Glassmorphism — light mode. Bg/border on the unified Material recipe. */
  background: var(--color-material-bg);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--color-material-border);
  box-shadow: 0 1px 1.5px rgba(13, 13, 15, 0.06);

  transition:
    background   var(--duration-slower) var(--ease-out),
    border-color var(--duration-slower) var(--ease-out),
    box-shadow   var(--duration-slower) var(--ease-out);
}

/* Glassmorphism — dark mode */
[data-theme="dark"] .site-header {
  background: var(--color-material-bg);
  border-color: var(--color-material-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}
/* Without this, .nav (a flex item of .site-header with no explicit
   width) shrinks to fit its own content and the margin: 0 auto above
   then centers that shrunk box in the header, instead of the logo and
   controls spreading to the header's true left/right edges. width:
   100% forces it to fill the header so its own justify-content:
   space-between actually reaches both edges. Desktop already gets an
   explicit width from the media query below, so it is unaffected. */
@media (max-width: 767px) {
  .nav {
    width: 100%;
    margin: 0;
  }
}
@media (min-width: 768px) {
  /* Same capped-width-plus-minimum-gutter formula as .container, so the
     header's inner content lines up with every section's content edge. */
  .nav {
    width: min(var(--content-max-width), calc(100% - 2 * var(--space-20)));
    max-width: none;
    padding-inline: 0;
  }
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.nav__logo:hover { opacity: 0.7; }
.nav__logo img {
  height: 28px !important;
  width: auto !important;
}

/* Logo visibility — light/dark swap */
.nav__logo-light { display: block !important; }
.nav__logo-dark  { display: none  !important; }
[data-theme="dark"] .nav__logo-light { display: none  !important; }
[data-theme="dark"] .nav__logo-dark  { display: block !important; }

/* Right-side controls wrapper */
.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

/* Nav links — desktop only */
.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-5);
  margin-right: var(--space-2);
}
@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--color-text-2);
  padding: var(--space-1) 0;
  transition: color var(--duration-normal) var(--ease-out);
}
.nav__link:hover   { color: var(--color-text-1); }
.nav__link--active { color: var(--color-text-1); font-weight: 600; }

/* Theme toggle — all breakpoints */
.nav__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--color-text-2);
  transition:
    color            var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}
/* Dark mode paused — hide the live toggle only (id-scoped so the
   design-system.html component showcase, which has no #themeToggle,
   still documents what the control looks like). Underlying dark-mode
   CSS is untouched. */
#themeToggle {
  display: none;
}
.nav__theme-toggle:hover {
  color: var(--color-text-1);
  background-color: rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .nav__theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.10);
}
.nav__theme-toggle svg { width: 17px; height: 17px; }

/* Hamburger — mobile only */
.nav__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--color-text-2);
  transition:
    color            var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}
.nav__hamburger:hover {
  color: var(--color-text-1);
  background-color: rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .nav__hamburger:hover {
  background-color: rgba(255, 255, 255, 0.10);
}
.nav__hamburger svg { width: 20px; height: 20px; }
@media (min-width: 768px) {
  .nav__hamburger { display: none; }
}

/* LinkedIn icon button — circular, desktop only. On mobile it is
   replaced by a "LinkedIn" text link inside the hamburger menu (see
   .nav__mobile-menu), so it does not compete with the hamburger for
   space in the mobile header bar. */
.nav__linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--color-text-2);
  transition:
    color            var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}
.nav__linkedin:hover {
  color: var(--color-text-1);
  background-color: rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .nav__linkedin:hover {
  background-color: rgba(255, 255, 255, 0.10);
}
.nav__linkedin svg { width: 17px; height: 17px; }
@media (max-width: 767px) {
  .nav__linkedin { display: none; }
}

/* Mobile menu — absolute glass panel below the pill */
.nav__mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  position: absolute;
  top: calc(100% + var(--space-2));
  left: var(--space-4);
  right: var(--space-4);

  /* Own compositor layer — bypasses parent backdrop-filter stacking
     restriction on iOS Safari / Chrome mobile. */
  isolation: isolate;
  transform: translate3d(0, 0, 0);

  /* Glass panel — milkier tint keeps text readable while blur settles */
  background: var(--color-cloud);
  -webkit-backdrop-filter: blur(50px) saturate(1.6);
          backdrop-filter: blur(50px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);

  transition:
    background   var(--duration-slower) var(--ease-out),
    border-color var(--duration-slower) var(--ease-out);
}
[data-theme="dark"] .nav__mobile-menu {
  background: var(--color-abyss);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
          backdrop-filter: blur(20px) saturate(1.6);
  border-color: rgba(74, 74, 96, 0.35);
}
.nav__mobile-menu.is-open { display: flex; }
@media (min-width: 768px) {
  .nav__mobile-menu { display: none !important; }
}

.nav__mobile-link {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--color-text-2);
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  border-radius: var(--radius-sm);
  transition:
    color            var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}
.nav__mobile-link:hover {
  color: var(--color-text-1);
  background-color: rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .nav__mobile-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
}
.nav__mobile-link--active {
  color: var(--color-text-1);
  font-weight: 600;
}

/* ----------------------------------------------------------
   SECTIONS
   ---------------------------------------------------------- */
.section {
  padding: var(--space-20) 0;
}
.section + .section {
  border-top: var(--border-thin);
}

.section__header {
  margin-bottom: var(--space-12);
}

/* #work carries its top breathing room on .section__header itself (see
   below) instead of on the section wrapper. */
#work {
  padding-top: 0;
}

/* CASE STUDIES / Featured Projects — top breathing room.
   --space-12 (48px), reduced by user decision from the Figma frame's own
   --space-20 (80px), one step further down the Hope DS scale than the
   prior --space-16 (64px) pass. Kept on the header itself (not on #work)
   for consistency with the rest of this section's spacing. */
#work .section__header {
  padding-top: var(--space-12);

  /* Single source of the gap to the first case card below, --space-20
     (80px). Overrides the base .section__header's margin-bottom
     (--space-12, 48px): that base value was combining with the first
     case card's own header-clearance padding-top (see .cases-grid >
     .case-card:first-child below), producing a much larger, viewport-
     height-dependent gap instead of one clear, fixed value. */
  margin-bottom: var(--space-20);
}

/* ── Featured Projects — sub-header (desktop only) ─────────────────────
   Sticky positioning was tried here (pinning the heading while cards
   scrolled past beneath it) and rolled back along with the scroll-snap
   and internal-scroll experiments for this section. The heading now
   scrolls in normal document flow with the rest of the page, like any
   other section heading.

   position: relative is kept, not removed, so the full-bleed background
   band below (::before) still anchors to this element instead of
   escalating to a further, unpositioned ancestor. It no longer carries
   any sticky-specific offset or stacking order.

   The background itself is still full-bleed. Breaks out of the capped
   .container the same way .cs-figure--full-bleed does: the pseudo spans
   100vw regardless of how narrow or wide the header's own box is, so it
   always touches both browser edges. --color-bg matches the page
   background (same token body uses), not a hardcoded white. */
@media (min-width: 1024px) {
  #work .section__header {
    position: relative;
    padding-bottom: var(--space-4);
  }

  #work .section__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    margin-left: -50vw;
    background: var(--color-bg);
    z-index: -1;
  }
}
.section__overline {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: var(--space-3);
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-1);
}

/* ----------------------------------------------------------
   HERO
   The centered headline/paragraph/buttons group and the logo carousel
   both live inside this one full-viewport block now, instead of the
   carousel being a separate section further down the page. .hero itself
   no longer centers its content directly, .hero > .container does that
   job internally so the centered group and the bottom-anchored carousel
   can be positioned independently within the same viewport height.
   ---------------------------------------------------------- */
.hero {
  padding: var(--space-20) 0;
  padding-top: calc(var(--space-20) + var(--space-16));

  display: flex;
  flex-direction: column;
  text-align: left;

  position: relative;
  width: 100%;

  /* dvh avoids clipping by the mobile browser toolbar. min-height, not
     height: if the centered group plus the logo carousel ever need more
     room than one viewport at a given height (a short browser window,
     landscape phone), the section grows past 100dvh instead of clipping
     or cramming content. */
  min-height: 100dvh;

  background: var(--color-bg);

  /* Hairline divider between the Hero block and the section that
     follows (Case Studies). This used to come from the general
     .section + .section rule below, which only fires when a .section
     is immediately preceded by another .section: #work got it for
     free because #companies (a .section) used to sit right before it.
     Now that the logo carousel lives inside .hero (no longer its own
     #companies section), #work has nothing before it, so that rule
     stopped matching and the divider disappeared. Setting it directly
     here, after the logo carousel since it is the last thing in this
     block, does not depend on what section happens to follow. Same
     token the rule below already used, --border-thin, not a new value. */
  border-bottom: var(--border-thin);
}

.hero > .container {
  position: relative;
  z-index: var(--z-raised);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* The existing headline/paragraph/buttons group. flex:1 makes it fill
   whatever vertical space is left after the logo carousel below takes
   its own natural height, and centers its own content within that
   space, the same visual centering .hero used to do directly.
   Scoped to .hero--home only: About's .hero__layout also carries the
   reveal-group class (for the same scroll-reveal animation hook), and
   this rule's display:flex was overriding .hero__layout's own
   display:grid, collapsing the About page's two-column layout into a
   single centered column. */
.hero--home .reveal-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
}

/* Logo carousel, anchored to the bottom of the Hero block. flex: 0 0
   auto keeps it at its own natural height instead of stretching, and
   margin-top gives it breathing room from the centered group above
   without being part of that group's own vertical centering. */
.hero .logo-strip {
  flex: 0 0 auto;
  margin-top: var(--space-16);
}

.hero__overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-2);
  margin-bottom: var(--space-5);
}

/* ── Headline row — avatar and headline merged into one centered row,
   per the simplified Figma Hero (node 43:3914). Replaces the separate
   floating greeting bubble and the standalone headline block. ───────── */
.hero__headline-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
/* Mobile: avatar stacks above the headline as two centered rows,
   instead of sitting inline to its left. Desktop keeps the row
   layout untouched. */
@media (max-width: 767px) {
  .hero__headline-row {
    flex-direction: column;
  }
}

/* Avatar — fixed 115x115, per Figma */
.hero__avatar {
  width:         115px;
  height:        115px;
  border-radius: 50%;
  object-fit:    cover;
  display:       block;
  flex-shrink:   0;
}

/* The line break is a hard <br> in the markup (matches the pattern
   already used for the About headline and Hero body), not a natural
   wrap. Without it, the browser's own wrap point sizes this box using
   its single-line preferred width clamped to max-width, which can be
   much wider than either actual rendered line, leaving slack on the
   right of a left-aligned line. That slack pulled the avatar + headline
   visual mass off the center axis shared with the paragraph and buttons
   below. With a hard break, the box hugs the wider of the two actual
   lines, and text-align: center keeps the shorter line centered under
   it, so the visible glyphs stay symmetric around the box's own center. */
.hero__headline {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-1);
  max-width: 800px;
}
/* Scoped to Home: this class is shared with About's headline, which
   must stay left-aligned per its own Figma spec. */
.hero--home .hero__headline {
  text-align: center;
}
.hero__headline mark {
  background: none;
  color: var(--color-accent);
}

/* Mobile: the hard <br> above forces "who" and "absorbs" onto separate
   lines on any width, desktop included. That is the intended two-line
   split on desktop, but combined with mobile's much narrower column it
   adds a third forced break on top of the natural wrap, splitting
   "who" and "absorbs" apart in a spot that reads awkwardly. Hiding the
   break here lets the whole headline wrap naturally on mobile, and
   .hero__nowrap-pair (below) keeps "who" and "absorbs" specifically
   from ever landing on separate lines once that natural wrap takes
   over. Desktop keeps the existing hard break, untouched. */
@media (max-width: 767px) {
  .hero__headline-break {
    display: none;
  }
  .hero__nowrap-pair {
    white-space: nowrap;
  }
}

/* Two separate lines by design (Figma node 43:3914), not a natural text
   wrap: "...across Brazil and the US." and "I turn ambiguous briefs..."
   are two <p> tags in the markup so the break holds at any width instead
   of depending on where the browser happens to wrap the text.
   No text-align here: left is the base .hero default, and About's body
   paragraphs should stay left-aligned too. Home centers its own copy
   via .hero--home .hero__body below. */
.hero__body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--color-text-1);
  max-width: 560px;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.hero__body-group {
  margin-bottom: var(--space-10);
}
/* Mobile: the two sentences are separate <p> tags so the line break
   between them holds at desktop widths, but on mobile that same forced
   break plus the narrow column produces an awkward three-line wrap with
   an orphaned word. display: inline joins them into one flowing block
   of text (the whitespace between the tags in the markup still gives a
   normal space between sentences), wrapping naturally at this width.
   Scoped to Home only, About's three-paragraph body is untouched. */
@media (max-width: 767px) {
  .hero--home .hero__body-group .hero__body {
    display: inline;
  }
}

/* ── Home hero — centered layout, no background image ────────────────
   Scoped modifier so .hero--about (which stays left-aligned, two-column)
   is untouched. */
.hero--home {
  text-align: center;
}
.hero--home .hero__body {
  text-align: center;
}
.hero--home .hero__actions {
  justify-content: center;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    /* The buttons' own width: 100% (below, and in components.css) only
       stretches them to fill this element's own box. That box was
       itself shrink-wrapped to the buttons' combined content width by
       align-items: center on the ancestor .reveal-group (the same
       shrink-wrap behavior that also affects the headline row and body
       group, fine for those, but not what we want here), so the
       buttons never actually reached the container's full width.
       width: 100% here breaks it out of that shrink-wrap. */
    width: 100%;
    gap: var(--space-3);
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* About page — text + portrait side by side */
.hero--about {
  padding: var(--space-20) 0;
  align-items: stretch;
}

/* Same gap as the description-to-buttons spacing below (--space-10),
   applied above the description too so both gaps match. */
.hero--about .hero__headline {
  margin-bottom: var(--space-10);
}

/* Vertically centers the hero__layout row within the full viewport
   height .hero already provides (min-height: 100dvh, on the shared
   base .hero rule above). Same full-viewport-fill technique the Home
   hero uses, just centered directly on this container instead of on an
   inner flex:1 group, since About has no logo carousel anchored below
   it that needs separate positioning. Horizontal alignment (left) is
   untouched, this only affects the vertical axis. */
.hero--about > .container {
  justify-content: center;
}

/* Overrides the base .hero__body max-width (560px, a readable line
   length meant for Home's narrower centered column). About's content
   column is fluid width, filling the space up to the portrait, so the
   paragraphs should reflow to that same width instead of staying
   capped at the old fixed-column reading width. */
.hero--about .hero__body {
  margin-bottom: 0;
  max-width: none;
}

/* Paragraph break between the first and second body paragraphs only,
   per the updated Figma. --space-6 (24px) is close to one line's worth
   of height at this text's line-height, reading as an empty line. The
   second and third paragraphs stay flush, as before. */
.hero--about .hero__body:first-of-type {
  margin-bottom: var(--space-6);
}

/* Restore vertical breathing room between body text and action buttons */
.hero--about .hero__actions {
  margin-top: var(--space-10);
}

.hero__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
  width: 100%;
}

/* Fluid content column, fixed 340px portrait column, per the updated
   Figma (node 152:1139, Hero About). The content column (1fr) grows to
   fill whatever space is left after the fixed portrait and the 48px
   gap, instead of staying locked at a fixed width itself. */
@media (min-width: 1200px) {
  .hero__layout {
    grid-template-columns: 1fr 340px;
    gap: var(--space-12);
  }
}

.hero__content {
  min-width: 0;
}

.hero__portrait {
  margin: 0;
  width: 100%;
  max-width: 340px;
  justify-self: center;
}

@media (min-width: 1200px) {
  .hero__portrait {
    justify-self: end;
  }
}

/* aspect-ratio 340/318 (not a square 1:1) matches the Figma portrait's
   fixed 340x318 box. Kept as a ratio rather than a hardcoded height so
   it still scales correctly on mobile, where the column is fluid. */
.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 340 / 318;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: var(--border-normal);
  box-shadow: var(--shadow-lg);
}

/* ----------------------------------------------------------
   LOGO STRIP — Section-specific spacing overrides
   Base component styles live in components.css. The logo carousel now
   lives inside the Hero (see .hero .logo-strip above); #companies,
   .companies__row and .companies__label were the wrapper for its old
   standalone section and are no longer used anywhere.
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   CONTENT GRIDS
   ---------------------------------------------------------- */

/* Generic layout wrappers — column count only, no padding, no max-width */
.layout-1col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: stretch;
  width: 100%;
}

.layout-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: stretch;
  width: 100%;
}

.layout-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
  align-items: stretch;
  width: 100%;
}

@media (max-width: 767px) {
  .layout-2col,
  .layout-3col {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .layout-3col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cases — always 1 column; horizontal card layout handles visual/content split.
   gap is --space-32 (128px) per the Figma spec, the vertical distance
   between consecutive case cards. */
.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-32);
}


/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px)  { .skills-grid { grid-template-columns: repeat(2, 1fr); } }

/* Challenges */
.challenges-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .challenges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

/* Testimonials — infinite horizontal ticker */
.testimonials-ticker {
  display: flex;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.testimonials-track {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-6);
  padding-right: var(--space-6);
  animation: testimonials-scroll 80s linear infinite;
}

.testimonials-ticker:hover .testimonials-track {
  animation-play-state: running;
}

.testimonials-ticker .testimonial-card {
  width: 380px;
  flex-shrink: 0;
  margin-bottom: 0;
  align-self: flex-start;
}

@keyframes testimonials-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}

.card__title {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* ----------------------------------------------------------
   ABOUT SNIPPET
   ---------------------------------------------------------- */
.about-snippet {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 768px) {
  .about-snippet {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}
.about-snippet__blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.about-block__label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: var(--space-2);
}
.about-block__text {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--color-text-2);
}

/* ----------------------------------------------------------
   FOOTER
   Always Background/Brand/Strong — connect CTA + bottom bar
   ---------------------------------------------------------- */
.site-footer {
  background-color: var(--color-bg-brand-strong);
  color: var(--color-text-on-brand-strong);
  padding: var(--space-20) 0 var(--space-10);
  margin-top: var(--space-20);
  border-top: 3px solid var(--color-border-accent-strong);
}

.footer__connect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 40rem;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-cloud);
}

.footer__lede {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 42ch;
}

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Secondary button on dark footer */
.site-footer .btn--footer {
  color: var(--color-cloud);
  border-color: rgba(255, 255, 255, 0.35);
  background-color: transparent;
}
.site-footer .btn--footer:hover {
  color: var(--color-cloud);
  border-color: rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.08);
}

/* Bottom bar */
.footer__bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
  }
}

.footer__motto {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35em;
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.footer__heart {
  display: inline-flex;
  align-items: center;
  color: var(--color-celebrate);
}

.footer__heart .icon {
  width: 1.1em;
  height: 1.1em;
}

.footer__copy {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

/* ----------------------------------------------------------
   ABOUT BRIDGE
   ---------------------------------------------------------- */
#references {
  padding-bottom: var(--space-12);
}

.about-bridge {
  padding: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}

.about-bridge::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--color-text-1) 0px,
      var(--color-text-1) 1px,
      transparent 1px,
      transparent 40px
    ),
    repeating-linear-gradient(
      90deg,
      var(--color-text-1) 0px,
      var(--color-text-1) 1px,
      transparent 1px,
      transparent 40px
    );
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  opacity: 0.04;
  pointer-events: none;
  z-index: var(--z-base);
}

.about-bridge__inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  position: relative;
  z-index: var(--z-raised);
}

.about-bridge__eyebrow {
  margin-bottom: 0;
}

.about-bridge__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-border);
  display: block;
}

.about-bridge__headline {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-1);
}

.about-bridge__body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text-2);
  line-height: 1.75;
  max-width: 500px;
}

.about-bridge__cta {
  margin-top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.about-bridge__cta .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-out);
}

.about-bridge__cta:hover .icon {
  transform: translateX(4px);
}

/* ----------------------------------------------------------
   CASE STUDY — Hero
   Solid surface, floating header clearance at top, showcase
   image anchors the bottom of the text block.
   ---------------------------------------------------------- */
.case-hero {
  background: var(--color-bg);
  color: var(--color-text-1);
  padding-top: calc(var(--space-24) + var(--space-8));
  padding-bottom: var(--space-12);
}

.case-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
  min-width: 0; /* prevents flex children from overflowing their track */
}

/* Showcase image — spans full container width below the text block */
.case-hero__showcase-media {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.case-hero__showcase-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.case-hero__overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: var(--space-4);
}

.case-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-1);
  margin-bottom: var(--space-4);
}

.case-hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--color-text-2);
  margin-bottom: var(--space-8);
}

.case-hero__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.case-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-5);
  padding-top: var(--space-6);
  border-top: var(--border-thin);
}

.case-hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0;
  border: none;
}

.case-hero__meta dt {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-3);
}

.case-hero__meta dd {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-text-2);
}

.case-hero__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-thin);
  background-color: var(--color-bg-alt);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------
   CASE STUDY — Body layout
   ---------------------------------------------------------- */
.case-body {
  padding: var(--space-16) 0 var(--space-20);
}

.case-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
  width: 100%;
}

@media (min-width: 1024px) {
  /* 2-column: stable 240px sidebar · content fills remaining 1fr.
     max-width caps the grid at sidebar + gap + content-max so the
     margin-inline: auto centres the whole sidebar+content block inside
     the container, giving equal left and right gutters. */
  .case-layout {
    grid-template-columns: 240px 1fr;
    column-gap: var(--space-12);
    /*max-width: calc(240px + var(--space-12) + 68ch);*/
    margin-inline: auto;
    width: 100%;
  }
}

/* ----------------------------------------------------------
   CASE STUDY — Editorial Phase Break
   Thin structural separator between narrative phases.
   ---------------------------------------------------------- */
.case-phase-break {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-16) 0 var(--space-2);
  margin-bottom: var(--space-2);
}

.case-phase-break__label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.case-phase-break__rule {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ----------------------------------------------------------
   CASE STUDY — Editorial Callout Quote
   Full-width accent quote for key insight moments.
   ---------------------------------------------------------- */
.case-callout {
  padding: var(--space-10) 0;
  margin: var(--space-8) 0;
}

.case-callout__text {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-accent);
  max-width: 820px;
}

.case-callout__attribution {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-3);
}

/* ----------------------------------------------------------
   CASE STUDY — Sidebar TOC
   Floats directly over the page background — no card box.
   Active capsule pill provides the only surface treatment.
   ---------------------------------------------------------- */
.case-toc {
  display: none;
}

@media (min-width: 1024px) {
  .case-sidebar {
    position: sticky;
    top: var(--space-24); /* clears the floating glass nav */
  }

  .case-toc {
    display: block;
  }
}

/* "INDEX" group header — mono label, same as DS sidebar group labels */
.case-toc__label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-3);
  padding: 0 var(--space-3);
  margin-bottom: var(--space-4);
}

.case-toc__list {
  list-style: none;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.case-toc__item {
  counter-increment: toc-counter;
}

/* Link row — flex, centered, matching DS sidebar link geometry */
.case-toc__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-2);
  transition:
    color            var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}

/* Sequential number — same size as link text, muted mono weight */
.case-toc__link::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--color-text-3);
  flex-shrink: 0;
  transition: color var(--duration-normal) var(--ease-out);
}

/* Hover — text shifts to full contrast, no border indicators */
.case-toc__link:hover {
  color: var(--color-text-1);
  background-color: rgba(28, 95, 168, 0.05);
}
.case-toc__link:hover::before {
  color: var(--color-accent);
}

[data-theme="dark"] .case-toc__link:hover {
  background-color: rgba(245, 200, 66, 0.07);
}

/* Active — capsule pill tint, high-contrast text, no left bar */
.case-toc__link.is-active {
  color: var(--color-text-1);
  font-weight: 600;
  background-color: rgba(28, 95, 168, 0.08);
}
/* Uses --color-accent (Anchor light / Solar dark). Dark mode is currently
   hidden from users (toggle removed), so this isn't a live contradiction
   of the portfolio's black=action/blue=highlight/Solar=logo-only rule —
   but if dark mode is ever re-enabled, this would show Solar on a
   non-logo element. Revisit this token choice before re-enabling, don't
   let it slide back in unreviewed. */
.case-toc__link.is-active::before {
  color: var(--color-accent);
  font-weight: 700;
}

[data-theme="dark"] .case-toc__link.is-active {
  background-color: rgba(245, 200, 66, 0.10);
}

/* ----------------------------------------------------------
   CASE STUDY — Content column
   ---------------------------------------------------------- */
.case-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 68ch;
  margin-inline: auto;
  width: 100%;
}

/* ----------------------------------------------------------
   CASE STUDY — Involved teams component
   ---------------------------------------------------------- */
.team-section {
  margin-top: var(--space-6);
}

/* Scoped to out-rank .case-section__body p (0,1,1), which would force body size and color */
.case-section__body .team-section__title {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-3);
  margin-bottom: var(--space-6);
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: var(--space-10);
  align-items: center;
  align-content: center;
  width: 100%;
}



.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  min-width: 72px;
  width: fit-content;
}

.team-card svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-2);
  flex-shrink: 0;
  transition: color var(--duration-normal) var(--ease-out);
}

.team-card__name {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-text-2);
  line-height: 1.35;
}

/* "My squad" emphasis — icon + label in brand accent */
.team-card--mine svg {
  color: var(--color-accent);
}

.team-card--mine .team-card__name {
  color: var(--color-text-1);
  font-weight: 600;
}

/* ----------------------------------------------------------
   CASE STUDY — Full-bleed figure breakout
   Snaps the figure to 100vw regardless of parent column width.
   Use for service blueprints, large process maps, hero mockups.

   Uses negative margin-left rather than position/left/transform so the
   breakout math stays correct even inside the sidebar+content grid.
   The "left: 50% + translateX(-50%)" trick centres relative to the
   content COLUMN, not the viewport — when a sidebar is present the
   column centre is right-of-viewport-centre, causing rightward overflow.

   Mobile  (<768px)  : undo the 24 px (--space-6) container padding.
   Tablet  (768–1023): case-content is centred via margin-inline:auto, so
                       content left = 50vw − 34ch.  margin-left = 34ch − 50vw.
   Desktop (≥1024px) : .container now uses a capped-width-plus-minimum-
                       gutter formula (see .container), so its left edge
                       sits at a constant 80px from the viewport for any
                       width up to the 1280px cap (1440px viewport), not
                       a fixed pixel box. Working through the chain
                       (container edge 80, sidebar 240, gap 48, then the
                       68ch case-content re-centring inside the remaining
                       1fr track) the viewport-width terms cancel out and
                       the constant lands back at 128:
                       content left = 50vw − 128px.
                       So margin-left = 128px − 50vw (always negative ≥ 1024px).
   ---------------------------------------------------------- */
.cs-figure--full-bleed {
  width: 100vw;
  margin-left: calc(-1 * var(--space-6));
  border-left: none;
  border-right: none;
  border-radius: 0;
  max-width: none;
}
@media (min-width: 768px) {
  .cs-figure--full-bleed {
    /* case-content has margin-inline:auto, so it is centred inside the grid
       track at any viewport where 68ch < (viewport - 2×padding).
       Content left edge from viewport = 50vw − 34ch (half-viewport minus
       half the content column).  margin-left = 34ch − 50vw puts the figure
       flush with the viewport left edge on any width in this range. */
    margin-left: calc(34ch - 50vw);
  }
}
@media (min-width: 1024px) {
  .cs-figure--full-bleed {
    margin-left: calc(128px - 50vw);
  }
}

/* ----------------------------------------------------------
   ABOUT — Split layout: stacked narrative blocks (no page uses it today)
   ---------------------------------------------------------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 768px) {
  .about-split {
    grid-template-columns: 2fr 3fr;
    gap: var(--space-16);
    align-items: center;
  }
}

/* Stacked narrative blocks — right column */
.about-split__blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-split__block {
  background-color: var(--color-bg-alt);
  border: var(--border-normal);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  transition:
    background-color var(--duration-slower) var(--ease-out),
    border-color     var(--duration-slower) var(--ease-out);
}

/* ----------------------------------------------------------
   ABOUT — Experience pipeline list
   ---------------------------------------------------------- */
.experience-list {
  display: flex;
  flex-direction: column;
}

.experience-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: var(--border-thin);
}

.experience-item:first-child {
  border-top: var(--border-thin);
}

/* Logo box */
.experience-item__logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-alt);
  overflow: hidden;
  transition:
    background-color var(--duration-slower) var(--ease-out),
    border-color     var(--duration-slower) var(--ease-out);
}

.experience-item__logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
}

[data-theme="dark"] .experience-item__logo img {
  filter: brightness(0) invert(1);
  opacity: 0.45;
}

/* Light/dark image pairs (used in dotz case study) */
.img--light { display: block; }
.img--dark  { display: none !important; }
[data-theme="dark"] .img--light { display: none  !important; }
[data-theme="dark"] .img--dark  { display: block !important; }

/* Text monogram fallback for companies without a logo file */
.experience-item__logo-mono {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-3);
  user-select: none;
}

/* Company + role info */
.experience-item__info {
  flex: 1;
  min-width: 0;
}

.experience-item__company {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--color-text-1);
  line-height: 1.3;
}

.experience-item__role {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-text-2);
  margin-top: var(--space-1);
}

.experience-item__highlight {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-text-3);
  line-height: 1.45;
  margin-top: var(--space-1);
}

/* Date range — far right, monospaced */
.experience-item__dates {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--color-text-3);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
