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

/* ----------------------------------------------------------
   CONTAINER
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-10); }
}

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

/* ----------------------------------------------------------
   HEADER / NAV — floating glass pill
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  will-change: transform;
  width: calc(100% - var(--space-8));
  max-width: 1200px;
  z-index: var(--z-overlay);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-6);

  /* Glassmorphism — light mode */
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--color-superficie);
  box-shadow: var(--shadow-sm);

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

.site-header--hidden {
  transform: translate3d(-50%, calc(-100% - var(--space-4)), 0);
}

/* Glassmorphism — dark mode */
[data-theme="dark"] .site-header {
  background: rgba(26, 26, 46, 0.4);
  border-color: rgba(74, 74, 96, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* 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);
}
.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; }
}

/* 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: 0;
  right: 0;

  /* 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-nuvem);
  -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-abismo);
  -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);
}
.section__overline {
  font-family: var(--font-mono);
  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
   ---------------------------------------------------------- */
.hero {
  padding: var(--space-20) 0;
  padding-top: calc(var(--space-20) + var(--space-16));

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;

  /* stacking context for absolute-positioned background elements */
  position: relative;
  width: 100%;

  /* dvh avoids clipping by the mobile browser toolbar */
  min-height: 100dvh;

  /* Light-mode background — always loaded, never swapped */
  background-image: url('../images/Desktop\ light/golden_morning_v3_desktop.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* ── Dark-image cross-fade layer ─────────────────────────
   ::after holds ALL dark-mode backgrounds. It starts fully
   transparent and fades in when data-theme="dark" is set.
   Because only opacity changes (a compositor-only property)
   the browser avoids repainting the background-image entirely,
   eliminating the white-flash on theme swap.
   ---------------------------------------------------------- */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-base);

  background-image: url('../images/Desktop\ dark/desktop_bg_4.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  opacity: 0;
  /* transition is set via the .hero::after !important rule in animations.css */
  pointer-events: none;
}

/* Fade in the dark layer — no background-image swap, no flicker */
[data-theme="dark"] .hero::after {
  opacity: 1;
}

/* Lift content above the ::after overlay layer */
.hero > .container {
  position: relative;
  z-index: var(--z-raised);
}

@media (max-width: 767px) {
  .hero {
    background-image: url('../images/Mobile\ light/mobile_dedicated_v4.png');
  }

  /* Swap the ::after source for the mobile dark image */
  .hero::after {
    background-image: url('../images/Mobile\ dark/mobile_bg_final_brand.png');
  }
}

.hero__overline {
  display: inline-block;
  font-family: var(--font-mono);
  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);
}

.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;
  margin-bottom: var(--space-6);
}
.hero__headline mark {
  background: none;
  color: var(--color-ancora);
}

[data-theme="dark"] .hero__headline mark { 
  color: var(--color-solar);
}

.hero__body {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  color: var(--color-text-1);
  max-width: 560px;
  margin-bottom: var(--space-10);
}

/* ── Greeting pill — avatar + name anchor above the headline ─────────── */
.hero__greeting {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  /* Pill padding: 4px all round, then extra right to balance the avatar flush */
  padding: var(--space-1) var(--space-5) var(--space-1) var(--space-1);
  border-radius: var(--radius-pill);
  /* Glass recipe — same as site nav pill */
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
          backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: 0 2px 8px rgba(13, 13, 15, 0.06);
  /* Space below before the headline */
  margin-bottom: var(--space-6);
}
[data-theme="dark"] .hero__greeting {
  background: rgba(26, 26, 46, 0.50);
  border-color: rgba(74, 74, 96, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20);
}

/* Avatar — fixed 32×32, flush inside the pill's left edge */
.hero__greeting-avatar {
  width:         32px;
  height:        32px;
  border-radius: 50%;
  object-fit:    cover;
  display:       block;
  flex-shrink:   0;
}

/* Label text */
.hero__greeting-text {
  font-family: var(--font-body);
  font-size:   var(--fs-body-sm);
  font-weight: 500;
  color:       var(--color-text-2);
  white-space: nowrap;
}

.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;
    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;
}

.hero--about .hero__body {
  margin-bottom: 0;
}

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

/* Hero glass buttons — frosted over the background illustration */
.hero .btn--secondary {
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-color: color-mix(in srgb, currentColor 35%, transparent);
}
.hero .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: color-mix(in srgb, currentColor 55%, transparent);
}

[data-theme="dark"] .hero .btn--secondary {
  background: rgba(0, 0, 0, 0.20);
}
[data-theme="dark"] .hero .btn--secondary:hover {
  background: rgba(0, 0, 0, 0.36);
}

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

@media (min-width: 768px) {
  .hero__layout {
    grid-template-columns: 1fr minmax(240px, 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: 768px) {
  .hero__portrait {
    justify-self: end;
  }
}

.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  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
   ---------------------------------------------------------- */

/* Social proof strip — between Work and Testimonials */
#companies {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.companies__row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.companies__label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-3);
  line-height: 1.55;
  flex: 0 0 auto;
  width: clamp(120px, 18%, 180px);
}

.companies__row .logo-strip {
  flex: 1;
  min-width: 0;
  padding: 0;
}

@media (max-width: 767px) {
  .companies__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .companies__label {
    width: auto;
  }

  .companies__row .logo-strip {
    width: 100%;
  }
}

/* ----------------------------------------------------------
   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 */
.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}


/* 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-mono);
  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 Abismo — connect CTA + bottom bar
   ---------------------------------------------------------- */
.site-footer {
  background-color: var(--color-abismo);
  color: var(--color-nuvem);
  padding: var(--space-20) 0 var(--space-10);
  margin-top: var(--space-20);
  border-top: 3px solid var(--color-solar);
}

.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.15;
  letter-spacing: -0.02em;
  color: var(--color-nuvem);
}

.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-nuvem);
  border-color: rgba(255, 255, 255, 0.35);
  background-color: transparent;
}
.site-footer .btn--footer:hover {
  color: var(--color-nuvem);
  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-mono);
  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: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  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-mono);
  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.02em;
  color: var(--color-text-1);
  margin-bottom: var(--space-4);
}

.case-hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  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-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  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-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  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.25;
  letter-spacing: -0.02em;
  color: var(--color-abismo);
  max-width: 820px;
}
[data-theme="dark"] .case-callout__text {
  color: var(--color-solar);
}

.case-callout__attribution {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  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-mono);
  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-mono);
  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-ancora);
}

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

/* 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);
}
.case-toc__link.is-active::before {
  color: var(--color-ancora);
  font-weight: 700;
}

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

/* ----------------------------------------------------------
   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);
}

.team-section__title {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  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-ancora);
}

[data-theme="dark"] .team-card--mine svg {
  color: var(--color-solar);
}

.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) : with the layout CENTRED inside the container, the
                       content column's left edge from the viewport is
                       exactly (50vw − 128px) at every desktop width.
                       128 = 1120/2 − (padding 40 + grid-centering 104 +
                             sidebar 240 + gap 48) = 560 − 432
                       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 — Asymmetrical split: quote left / blocks right
   ---------------------------------------------------------- */
.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;
  }
}

/* Decorative opening quotation mark using brand accent */
.about-split__quote::before {
  content: '\201C';
  display: block;
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 0.75;
  color: var(--color-ancora);
  margin-bottom: var(--space-3);
}
[data-theme="dark"] .about-split__quote::before {
  color: var(--color-solar);
}

.about-split__quote-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-1);
}

.about-split__attribution {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-3);
}

/* 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-mono);
  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-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--color-text-3);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
