/* STEAMCO Studio — shared marketing styles (index, GUIDE, People) */

:root {
  /* Fibonacci spacing */
  --sp-3: 3px;
  --sp-5: 5px;
  --sp-8: 8px;
  --sp-13: 13px;
  --sp-21: 21px;
  --sp-34: 34px;
  --sp-55: 55px;
  --sp-89: 89px;
  --sp-144: 144px;

  /* Oklch — warm off-white (wayofcode/hex.tech feel), greenscale in darks */
  --surface-0: oklch(98.5% 0.015 72);
  --surface-1: oklch(96% 0.018 72);
  --surface-2: oklch(92% 0.018 72);
  --surface-3: oklch(88% 0.02 72);
  /* Work cards: above page bg (surface-0), softer than near-white */
  --surface-card: oklch(99.1% 0.013 72);
  --surface-card-border: oklch(93.5% 0.015 72);

  /* Text — green-tinted blacks, more distinct */
  --text-primary: oklch(18% 0.028 180);
  --text-secondary: oklch(40% 0.022 180);
  --text-tertiary: oklch(55% 0.018 180);

  /* Accent: just darker than midpoint (off-white → dark); same hue as dark */
  --accent: oklch(50% 0.1 180);
  --accent-hover: oklch(42% 0.1 180);
  /* Inline marketing links: a bit more chroma (tealer) than --accent */
  --link-marketing: oklch(44% 0.14 180);
  --link-marketing-hover: oklch(36% 0.14 180);
  /*
   * Brand scale — dark band (middle chips: diluted charcoal, not pure black).
   * Accent on dark: Cursor sidebar filename teal — high L, low C (~0.04), hue ~202° (cyan-teal band).
   */
  --brand-dark-ink: oklch(25% 0.026 185);
  --brand-dark-line: oklch(42% 0.034 185);
  --brand-accent-on-dark: oklch(77% 0.044 202);
  --brand-accent-on-dark-hover: oklch(83% 0.042 202);

  /* Teal on dark menu / footer (uses brand accent-on-dark) */
  --link-marketing-on-dark: var(--brand-accent-on-dark);

  /* Menu overlay — same family as footer: lifted off pure black */
  --menu-bg: oklch(17% 0.026 185);
  --menu-text: oklch(92% 0.01 180);
  --menu-text-secondary: oklch(65% 0.018 180);

  /* Typography */
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Inconsolata", "SF Mono", "Cascadia Code", monospace;

  /* Fluid type — clamp for cal/hex/wayofcode feel */
  --text-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.833rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-md: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  --text-lg: clamp(1.2rem, 1rem + 1vw, 1.44rem);
  --text-xl: clamp(1.4rem, 1.1rem + 1.5vw, 1.728rem);
  --text-2xl: clamp(1.6rem, 1.2rem + 2vw, 2.074rem);
  --text-3xl: clamp(1.8rem, 1.2rem + 3vw, 3rem);

  /* Layout — outer width for .page / .header-inner / full-bleed stacks (steps below) */
  --measure: 65ch;
  --measure-narrow: 45ch;
  --page-max: 100%;
  --page-gutter: clamp(16px, 4vw, 28px);

  /*
   * Responsive breakpoints (canonical). Use these in max-width / min() / clamp().
   * In @media (min-width: …), copy the numeric px — custom properties are not used
   * in media queries for broad browser support. Source: design-system/breakpoints.json
   */
  --bp-sm: 640px; /* large phone / small tablet — exit “phone-only” layouts */
  --bp-md: 768px; /* tablet portrait */
  --bp-lg: 1024px; /* tablet landscape / laptop */
  --bp-xl: 1280px; /* desktop — full-width marketing */
  --bp-2xl: 1536px; /* large desktop — cap width + side margins */
  /* Pull hero bands under sticky header (matches GUIDE grid hero) */
  --site-header-clear: clamp(3.25rem, 8vw, 5rem);
  /* Fixed header + footer reveal (site.js); fallback until measured */
  --site-header-h: 4.75rem;
  --header-hide: 0;

  /* Transition */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Widen content column with viewport; prose stays --measure via .prose / .work-intro / etc. */
@media (min-width: 640px) {
  :root {
    --page-max: min(96vw, 48rem);
    --page-gutter: clamp(20px, 4vw, 40px);
  }
}

@media (min-width: 768px) {
  :root {
    --page-max: min(96vw, 64rem);
  }
}

@media (min-width: 1024px) {
  :root {
    --page-max: min(96vw, 80rem);
  }
}

@media (min-width: 1280px) {
  :root {
    --page-max: min(94vw, 90rem);
  }
}

@media (min-width: 1536px) {
  :root {
    --page-max: min(92vw, 100rem);
  }
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Horizontal bleed from full-bleed sections — clip here, never on body/main (breaks position:fixed parallax footer). */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Page container — full-width band up to --page-max; copy blocks use --measure inside */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  box-sizing: border-box;
}

/* Narrower column when a whole section shouldn’t span the full marketing width */
.page--narrow {
  max-width: min(var(--page-max), 48rem);
}

/* Reading-width helper (use inside a .page or full-bleed section) */
.content-measure {
  max-width: var(--measure);
  margin-inline: auto;
  width: 100%;
}

body.guide-marketing .guide-page {
  margin-top: 0;
  padding-top: 0;
}

/* GUIDE: page background; grid only on first hero (see .guide-hex--triple:first-child::before) */
body.guide-marketing {
  position: relative;
  background: var(--surface-0);
  /* Horizontal overflow clipped on html — body overflow breaks position:fixed footer */
  overflow-x: visible;
}

body.guide-marketing .page {
  position: relative;
  z-index: 1;
}

body.guide-marketing .guide-page > .guide-hex--split,
body.guide-marketing .guide-page > .guide-section {
  background: var(--surface-0);
}

body.guide-marketing .sep {
  position: relative;
  z-index: 1;
  background: var(--surface-0);
}

/* GUIDE marketing: edge-to-edge layout at xl+ (canonical --bp-xl) */
@media (min-width: 1280px) {
  body.guide-marketing .page {
    max-width: none;
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }

  body.guide-marketing .header-inner {
    max-width: none;
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }

  body.guide-marketing .guide-hex__contain {
    max-width: none;
  }
}

/* Home: xl+ matches GUIDE living-loop row width.
   Do not set overflow-x on body — it breaks position:fixed parallax footer (footer scrolls with page). */

@media (min-width: 1280px) {
  body.home-page .page {
    max-width: none;
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }

  body.home-page .header-inner {
    max-width: none;
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }

  body.home-page .ethos-loop__contain {
    max-width: none;
  }
}

/* Services page (shares GUIDE marketing chrome) */
.services-nav {
  padding: 0 0 clamp(var(--sp-34), 5vw, var(--sp-55));
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8) var(--sp-13);
}

/* .services-nav a — see “Marketing site links” block below */

body.services-page .guide-page .services-section[id] {
  scroll-margin-top: clamp(4.5rem, 12vw, 6rem);
}

/* Marketing site links: bold, tealer teal, no underline */
.work-item h3,
.subpage-hero p.lead a,
.subpage-body .prose a,
.contact a.email,
.advisors-section .prose a,
.philosophy-section .prose a,
.services-nav a,
.person-modal__tagline-text a,
.person-modal__links a {
  color: var(--link-marketing);
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
  transition: color 0.2s;
}

.work-item:hover h3,
.work-item:focus-visible h3,
.subpage-hero p.lead a:hover,
.subpage-body .prose a:hover,
.contact a.email:hover,
.advisors-section .prose a:hover,
.philosophy-section .prose a:hover,
.services-nav a:hover,
.person-modal__tagline-text a:hover,
.person-modal__links a:hover {
  color: var(--link-marketing-hover);
}

.contact a.email {
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.person-modal__social-inline:hover {
  color: var(--link-marketing-hover);
}

/*
 * Mailto links: icon + address.
 * Avoid inline-flex + position — flex baseline is tied to the SVG (first item), so the whole link drifts up.
 * Inline SVG + text keeps the address on the normal text baseline; only the icon is optically nudged.
 */
.link-mail {
  display: inline;
  text-decoration: none;
  border-bottom: none;
  line-height: inherit;
}

.link-mail__icon {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.35em;
  vertical-align: -0.14em;
}

.menu-footer .link-mail {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.menu-footer .link-mail__icon {
  vertical-align: -0.1em;
}

/* ---- Header (frosted bar on all marketing pages; canvas/hero shows through) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(98.5% 0.015 72 / 0.58);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  border-bottom: 1px solid oklch(92% 0.018 72 / 0.42);
}

/*
 * Parallax-footer pages: header is fixed and slides up as the fixed footer occupies the viewport
 * (length-based translate — percent × var can fail to apply in some engines).
 */
body.has-parallax-footer {
  padding-top: calc((1 - var(--header-hide, 0)) * var(--site-header-h));
}

body.has-parallax-footer .site-header {
  position: fixed;
  left: 0;
  right: 0;
  transform: translateY(calc(-1 * var(--header-hide, 0) * var(--site-header-h)));
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  body.has-parallax-footer {
    padding-top: 0 !important;
  }

  body.has-parallax-footer .site-header {
    position: sticky !important;
    transform: none !important;
    will-change: auto !important;
  }
}

.header-inner {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-21) var(--page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.mark {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  will-change: transform;
}

.mark-qualifier {
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 0.5em;
}

/* Hamburger button */
.menu-toggle {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  padding: 0;
  position: relative;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.4s var(--ease-out);
}

.menu-toggle span:nth-child(1) { width: 24px; }
.menu-toggle span:nth-child(2) { width: 18px; }

/* Header goes transparent when menu is open; raise above overlay so toggle stays clickable */
body.menu-open .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  z-index: 200;
}

body.menu-open .header-sep {
  background: transparent;
}

body.menu-open .mark,
body.menu-open .mark .mark-qualifier {
  color: var(--menu-text);
}

/* Hamburger → X transform */
.menu-open .menu-toggle span {
  background: var(--menu-text);
}

.menu-open .menu-toggle span:nth-child(1) {
  width: 24px;
  transform: translateY(3.75px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  width: 24px;
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Border on .site-header replaces the hairline */
.header-sep {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: oklch(98.5% 0.015 72 / 0.94);
  }
}

/* ---- Menu: backdrop (desktop mega-menu) ---- */
.menu-backdrop {
  display: none;
}

/* ---- Menu Overlay ---- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--menu-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: clamp(var(--sp-55), 12vh, var(--sp-89)) var(--page-gutter) var(--sp-34);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}

.menu-panel {
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-34);
}

.menu-panel__main {
  flex: 0 0 auto;
}

.menu-nav {
  width: 100%;
  list-style: none;
}

.menu-nav li {
  border-bottom: 1px solid oklch(25% 0.028 180);
}

.menu-nav li:first-child {
  border-top: 1px solid oklch(25% 0.028 180);
}

/* Mobile / narrow: stack label under title — less horizontal crowding */
.menu-nav a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-5);
  padding: var(--sp-13) 0 var(--sp-15, 15px);
  text-decoration: none;
  color: var(--menu-text);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  transition: color 0.2s;
}

.menu-nav a:hover {
  color: var(--link-marketing-on-dark);
}

.menu-nav .menu-label {
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2.8vw, var(--text-sm));
  font-weight: 400;
  color: var(--menu-text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  max-width: 100%;
}

/* ---- Mega menu: blog carousel ---- */
.menu-featured {
  flex: 0 0 auto;
  padding: var(--sp-21);
  border-radius: 8px;
  background: oklch(18% 0.03 180);
  border: 1px solid oklch(26% 0.028 180);
}

.menu-featured__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-13);
  margin-bottom: var(--sp-13);
}

.menu-featured__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--menu-text-secondary);
}

.menu-featured__all {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link-marketing-on-dark);
  text-decoration: none;
  white-space: nowrap;
}

.menu-featured__all:hover {
  text-decoration: underline;
}

.menu-featured__empty {
  font-size: var(--text-sm);
  color: var(--menu-text-secondary);
  margin: 0;
  padding: var(--sp-13) 0;
}

.menu-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-8);
  align-items: center;
}

.menu-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: oklch(40% 0.02 180) transparent;
  -webkit-overflow-scrolling: touch;
}

.menu-carousel__viewport::-webkit-scrollbar {
  height: 4px;
}

.menu-carousel__track {
  display: flex;
  gap: var(--sp-13);
  padding: var(--sp-5) 0 var(--sp-8);
}

.menu-carousel__card {
  flex: 0 0 clamp(140px, 42vw, 180px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  text-decoration: none;
  color: var(--menu-text);
  border-radius: 6px;
  overflow: hidden;
  background: oklch(14% 0.028 180);
  border: 1px solid oklch(28% 0.028 180);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.menu-carousel__card:hover {
  border-color: oklch(42% 0.06 180);
  transform: translateY(-2px);
}

.menu-carousel__thumb {
  aspect-ratio: 16 / 10;
  background: oklch(12% 0.02 180);
  overflow: hidden;
}

.menu-carousel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-carousel__title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  padding: 0 var(--sp-8) var(--sp-8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-carousel__btn {
  appearance: none;
  border: 1px solid oklch(35% 0.04 180);
  background: oklch(20% 0.028 180);
  color: var(--menu-text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.menu-carousel__btn:hover {
  background: oklch(26% 0.03 180);
  border-color: oklch(48% 0.06 180);
}

.menu-carousel__btn:focus-visible {
  outline: 2px solid var(--link-marketing-on-dark);
  outline-offset: 2px;
}

.menu-carousel__btn svg {
  display: block;
}

@media (max-width: 380px) {
  .menu-carousel__btn {
    display: none;
  }
}

/* Desktop + large iPad: mega panel + dimmed backdrop */
@media (min-width: 1024px) {
  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: oklch(10% 0.03 180 / 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
  }

  .menu-open .menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .menu-overlay {
    background: transparent;
    inset: 0;
    padding: clamp(4.5rem, 10vh, 5.5rem) var(--page-gutter) var(--sp-34);
    justify-content: flex-start;
    align-items: center;
  }

  .menu-panel {
    max-width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.15fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "links featured"
      "footer footer";
    column-gap: var(--sp-34);
    row-gap: var(--sp-21);
    align-items: stretch;
    padding: var(--sp-34);
    background: var(--menu-bg);
    border-radius: 14px;
    border: 1px solid oklch(28% 0.03 180);
    box-shadow:
      0 4px 6px oklch(8% 0.02 180 / 0.15),
      0 22px 50px oklch(5% 0.02 180 / 0.45);
    max-height: min(82vh, 640px);
    overflow-y: auto;
  }

  .menu-panel__main {
    grid-area: links;
  }

  .menu-featured {
    grid-area: featured;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .menu-footer {
    grid-area: footer;
    padding-top: var(--sp-21);
    border-top: 1px solid oklch(26% 0.028 180);
    margin: 0;
    max-width: none;
  }

  .menu-nav li {
    border-color: oklch(26% 0.028 180);
  }

  .menu-nav a {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--sp-13) 0;
    font-size: var(--text-md);
    gap: var(--sp-13);
  }

  .menu-nav .menu-label {
    text-transform: none;
    letter-spacing: 0.05em;
    font-size: var(--text-sm);
    text-align: right;
    flex-shrink: 0;
    max-width: 46%;
  }

  .menu-carousel {
    flex: 1;
    min-height: 0;
  }

  .menu-carousel__viewport {
    max-height: 280px;
  }

  .menu-carousel__card {
    flex: 0 0 160px;
  }
}

.menu-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--menu-text-secondary);
}

.menu-tagline {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: var(--menu-text);
  margin-bottom: var(--sp-21);
  max-width: 24ch;
}

.menu-footer a {
  color: var(--menu-text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.menu-footer a:hover {
  color: var(--link-marketing-on-dark);
}

/* ---- Hero ---- */
.hero {
  padding: clamp(55px, 10vw, 144px) 0 clamp(89px, 15vw, 200px);
}

.hero h1,
.hero .hero__title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 28ch;
  margin-bottom: var(--sp-21);
}

.hero p {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-tertiary);
  max-width: 42ch;
}

/* Home: full viewport width; no extra fill — canvas draws lines only, body bg shows through */
.hero--home {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  background: transparent;
  overflow-x: clip;
  min-height: clamp(300px, 42vh, 520px);
}

/* Inner page aligns hero copy with the rest of the site */
.hero--home .hero__inner.page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

/* Canvas fills the hero band; drawing code biases ink to the right */
.hero--home .hero__bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.hero--home .hero__bg .home-hero-viz__canvas {
  display: block;
  pointer-events: none;
}

.hero--home .hero__text {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: min(52ch, 100%);
  padding-right: clamp(0px, 4vw, 24px);
  /* Light edge so type stays readable on the lines */
  text-shadow: 0 1px 0 oklch(98.5% 0.015 72 / 0.75);
}

/* Opening line: sentence case, quieter than the headline (not label/eyebrow) */
.hero--home .hero__kicker {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-secondary);
  margin-bottom: var(--sp-21);
  max-width: 42ch;
  line-height: 1.5;
}

/* Home: smaller headline + body-scale supporting lines */
.hero--home .hero__title {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 40ch;
  margin-bottom: var(--sp-21);
  color: var(--text-primary);
}

.hero__title-continued {
  display: inline;
  font-weight: 600;
}

.hero--home .hero__lede {
  font-size: var(--text-base);
  line-height: 1.62;
  color: var(--text-tertiary);
  max-width: 48ch;
  margin-bottom: 0;
}

/* Hero message carousel — vertical slide + staggered lines; single canvas viz behind */
.hero--home .hero__carousel {
  pointer-events: auto;
}

.hero--home .hero__slides {
  position: relative;
  /* Shared stage: every slide centers in the same vertical band so crossfades stay aligned */
  min-height: clamp(15rem, 36vw, 24rem);
}

.hero--home .hero__slide {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transform: translate3d(0, 1.35rem, 0);
  transition:
    opacity 0.95s var(--ease-out),
    transform 0.95s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}

.hero--home .hero__slide--active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  z-index: 1;
}

/* Each slide: kicker → title → lede scroll up in sequence */
.hero--home .hero__slide .hero__kicker,
.hero--home .hero__slide .hero__title,
.hero--home .hero__slide .hero__lede {
  opacity: 0;
  transform: translate3d(0, 1.1rem, 0);
  transition:
    opacity 0.72s var(--ease-out),
    transform 0.72s var(--ease-out);
}

.hero--home .hero__slide:not(.hero__slide--active) .hero__kicker,
.hero--home .hero__slide:not(.hero__slide--active) .hero__title,
.hero--home .hero__slide:not(.hero__slide--active) .hero__lede {
  transition-delay: 0s;
}

.hero--home .hero__slide--active .hero__kicker {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.06s;
}

.hero--home .hero__slide--active .hero__title {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.18s;
}

.hero--home .hero__slide--active .hero__lede {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.32s;
}

/* Slides 2–3: same title + lede scale as original hero */
.hero--home .hero__slide .hero__title {
  margin-top: 0;
}

/* Per-slide type scale (carousel) */
#hero-panel-0 .hero__kicker {
  font-size: var(--text-md);
  margin-bottom: var(--sp-13);
  max-width: 44ch;
}

#hero-panel-0 .hero__title {
  font-size: clamp(1.52rem, 1.22rem + 1.05vw, 2.08rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
  max-width: 38ch;
}

#hero-panel-0 .hero__lede {
  font-size: var(--text-md);
  line-height: 1.68;
  max-width: 46ch;
}

/* Slide 2: headline + closing line (long title — comfortable measure) */
#hero-panel-1 .hero__title {
  font-size: clamp(1.32rem, 1.02rem + 0.95vw, 1.82rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  max-width: 44ch;
  text-wrap: balance;
}

#hero-panel-1 .hero__lede {
  font-size: var(--text-md);
  line-height: 1.62;
  max-width: 48ch;
  margin-top: var(--sp-34);
  color: var(--text-secondary);
}

/* Slide 2: headline from above, lede from below */
.hero--home #hero-panel-1:not(.hero__slide--active) .hero__title {
  transform: translate3d(0, calc(-1 * clamp(2.25rem, 7vh, 4.5rem)), 0);
}

.hero--home #hero-panel-1:not(.hero__slide--active) .hero__lede {
  transform: translate3d(0, clamp(2.25rem, 7vh, 4.5rem), 0);
}

.hero--home #hero-panel-1.hero__slide--active .hero__title,
.hero--home #hero-panel-1.hero__slide--active .hero__lede {
  transition-duration: 0.9s;
  transition-timing-function: cubic-bezier(0.22, 0.82, 0.24, 1);
  transition-delay: 0.08s;
}

#hero-panel-2 .hero__title {
  font-size: clamp(1.4rem, 1.12rem + 0.82vw, 1.92rem);
  line-height: 1.26;
  letter-spacing: -0.02em;
  max-width: 42ch;
}

#hero-panel-2 .hero__lede {
  font-size: var(--text-md);
  line-height: 1.72;
  max-width: 52ch;
}

.hero--home .hero__tablist {
  display: flex;
  gap: var(--sp-5);
  margin-top: var(--sp-13);
  padding: 0;
  list-style: none;
  align-items: center;
}

/* Unnumbered dot indicators — tiny visible dot, larger hit area */
.hero--home .hero__tab {
  appearance: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero--home .hero__tab::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  border: 1px solid oklch(72% 0.02 72);
  background: transparent;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.25s var(--ease-out);
}

.hero--home .hero__tab:hover::after {
  border-color: var(--text-secondary);
  background: oklch(92% 0.018 72 / 0.65);
}

.hero--home .hero__tab[aria-selected="true"]::after {
  background: var(--text-primary);
  border-color: var(--text-primary);
  transform: scale(1.25);
}

.hero--home .hero__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hero--home .hero__slide {
    transition: opacity 0.45s ease;
    transform: none;
  }

  .hero--home .hero__slide .hero__kicker,
  .hero--home .hero__slide .hero__title,
  .hero--home .hero__slide .hero__lede {
    transform: none;
    transition: opacity 0.4s ease;
    transition-delay: 0s !important;
  }

  .hero--home .hero__slide--active .hero__kicker,
  .hero--home .hero__slide--active .hero__title,
  .hero--home .hero__slide--active .hero__lede {
    opacity: 1;
  }
}

/* Home index: generative canvas runs under frosted header; bottom mask matches GUIDE hero fade */
body.home-page .hero.hero--home {
  display: flex;
  flex-direction: column;
  margin-top: calc(-1 * var(--site-header-clear));
  padding-top: calc(var(--site-header-clear) + clamp(55px, 10vw, 144px));
  padding-bottom: clamp(89px, 15vw, 200px);
  min-height: min(100svh, 1200px);
  /* Pointer handlers sit on the hero; canvas is pointer-events none — clicks were hitting the headline */
  user-select: none;
  -webkit-user-select: none;
}

/* Only these blocks are selectable; empty hero band / “canvas” clicks won’t grab the headline */
.hero--home .hero__kicker,
.hero--home .hero__title,
.hero--home .hero__lede {
  user-select: text;
  -webkit-user-select: text;
}

body.home-page .hero--home .hero__bg {
  /* Soft fade into the page below — avoids a hard “boxed” band at the bottom */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - min(26rem, 54vw)),
    transparent calc(100% - min(5rem, 10vw))
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - min(26rem, 54vw)),
    transparent calc(100% - min(5rem, 10vw))
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Main column pulls up into the fade so the transition is seamless */
body.home-page .hero--home + .page {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem));
  padding-top: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface-0);
}

/* ---- Sections ---- */
section {
  padding: clamp(55px, 8vw, 89px) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-34);
}

.work-intro {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: var(--measure);
  margin-bottom: var(--sp-34);
}

/* What we make: Way-of-code–style canvas behind copy + cards — full viewport width (break out of .page) */
.work-section--viz {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: transparent;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
}

/* Keep label + grid aligned with the rest of the site column */
.work-section__stack {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

/* Fills #work (position relative); must be direct child for reliable height + hit testing */
.work-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.work-section__bg .home-work-viz__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.work-section__content {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* ---- Work grid (aligned with GUIDE / ui-frame: soft radius, border, shadow) ---- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-21);
}

@media (min-width: 640px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.work-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-21);
  padding: var(--sp-34);
  background: var(--surface-card);
  border-radius: 6px;
  border: 1px solid var(--surface-card-border);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.65) inset,
    0 10px 32px oklch(22% 0.03 180 / 0.06);
  opacity: 0;
  transform: translateY(20px);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out);
}

@media (min-width: 560px) {
  .work-item {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-34);
  }
}

.work-item__tap-hint {
  position: absolute;
  top: var(--sp-21);
  right: var(--sp-21);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.26s var(--ease-out),
    transform 0.26s var(--ease-out),
    color 0.2s var(--ease-out);
  pointer-events: none;
}

.work-item:hover .work-item__tap-hint,
.work-item:focus-visible .work-item__tap-hint {
  opacity: 1;
  transform: translateY(0);
  color: var(--link-marketing);
}

.work-item:focus-visible {
  outline: 2px solid var(--link-marketing);
  outline-offset: 3px;
}

.work-item.reveal {
  opacity: 1;
  transform: translateY(0);
}

.work-item:hover {
  border-color: oklch(86% 0.018 180);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.7) inset,
    0 14px 40px oklch(22% 0.04 180 / 0.09);
}

/* Home work grid: glass cards so canvas paint reads through + backdrop softens busy lines */
body.home-page #work .work-item {
  background: oklch(99.1% 0.013 72 / 0.5);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  border-color: oklch(78% 0.02 180 / 0.42);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.38) inset,
    0 10px 36px oklch(22% 0.03 180 / 0.05);
}

body.home-page #work .work-item:hover {
  border-color: oklch(72% 0.022 180 / 0.55);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.45) inset,
    0 14px 44px oklch(22% 0.04 180 / 0.08);
}

.work-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--sp-13);
  letter-spacing: -0.01em;
}

.work-item p {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: var(--measure);
}

/* Mini browser previews in work cards (decorative; links still cover full card) */
.work-item__preview {
  flex: 0 0 auto;
  width: 100%;
  pointer-events: none;
}

@media (min-width: 560px) {
  /* In 2-col grid, % alone can be tiny; cap max width and enforce a floor */
  .work-item__preview {
    flex: 0 0 max(7.5rem, min(42%, 12rem));
    width: max(7.5rem, min(42%, 12rem));
  }
}

.work-item__copy {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 560px) {
  .work-item__copy {
    flex: 1 1 0;
  }
}

.work-item .work-item__frame {
  border-radius: 5px;
  border-color: oklch(82% 0.018 180 / 0.55);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.45) inset,
    0 8px 24px oklch(22% 0.03 180 / 0.06);
  transition: none;
}

.work-item .work-item__frame:hover {
  border-color: oklch(82% 0.018 180 / 0.55);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.45) inset,
    0 8px 24px oklch(22% 0.03 180 / 0.06);
}

.work-item .work-item__frame .ui-frame__chrome {
  height: 26px;
  padding: 0 10px;
  gap: 5px;
}

.work-item .work-item__frame .ui-frame__chrome span {
  width: 7px;
  height: 7px;
}

.work-item .work-item__frame .ui-frame__viewport--simple.work-item__frame-viewport {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3 / 2;
  max-height: clamp(6.5rem, 28vw, 10.25rem);
  min-height: 5.75rem;
  overflow: hidden;
}

.work-item__frame-viewport .work-item__mock {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
}

/* GUIDE: notebook + rail */
.work-item__mock--guide {
  display: flex;
  flex-direction: column;
}

.work-item__mock-guide-toolbar {
  flex: 0 0 22%;
  min-height: 12px;
  background: linear-gradient(180deg, oklch(93% 0.025 180), oklch(97% 0.01 180));
  border-bottom: 1px solid oklch(90% 0.015 180);
}

.work-item__mock-guide-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.work-item__mock-guide-rail {
  flex: 0 0 24%;
  background: oklch(97.5% 0.008 180);
  border-right: 1px solid oklch(91% 0.012 180);
}

.work-item__mock-guide-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8% 9%;
  background: oklch(100% 0 0);
}

.work-item__mock-line {
  height: 3px;
  border-radius: 2px;
  background: oklch(88% 0.012 180);
}

.work-item__mock-line--short {
  width: 58%;
}

/* Custom tools: pipeline */
.work-item__mock--tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 8% 6%;
  background: oklch(99.5% 0.005 180);
}

.work-item__mock-tools-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  place-items: center;
  min-height: 36px;
}

.work-item__mock-tools-flow::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    oklch(78% 0.04 160),
    oklch(82% 0.02 180),
    oklch(78% 0.04 200)
  );
  opacity: 0.55;
  border-radius: 1px;
}

.work-item__mock-node {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: oklch(44% 0.07 165);
  border: 2px solid oklch(96% 0.01 180);
  box-shadow: 0 1px 2px oklch(22% 0.03 180 / 0.12);
}

.work-item__mock-tools-band {
  height: 10px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    oklch(90% 0.01 180) 0,
    oklch(90% 0.01 180) 4px,
    transparent 4px,
    transparent 8px
  );
  opacity: 0.65;
}

/* Brand: marketing page */
.work-item__mock--brand {
  display: flex;
  flex-direction: column;
}

.work-item__mock-brand-hero {
  flex: 0 0 40%;
  min-height: 28px;
  background: linear-gradient(125deg, oklch(40% 0.07 165), oklch(52% 0.04 210));
  opacity: 0.92;
}

.work-item__mock-brand-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8% 9%;
  background: oklch(100% 0 0);
}

/* Rapid prototyping: wireframe → solid */
.work-item__mock--proto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10% 12%;
  background: oklch(99% 0.006 180);
}

.work-item__mock-proto-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 9.5rem;
}

.work-item__mock-proto-card {
  width: 100%;
  height: 20px;
  border-radius: 4px;
  border: 2px dashed oklch(72% 0.02 180);
  background: oklch(98.5% 0.004 180);
}

.work-item__mock-proto-card--accent {
  border-style: solid;
  border-color: oklch(42% 0.07 165);
  background: oklch(94% 0.035 165);
}

.work-item__mock-proto-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid oklch(58% 0.03 180);
  opacity: 0.75;
}

/* ---- Ethos (#ethos): one radial wash from top-left (avoids stacked-layer seams) ---- */
#ethos.ethos-loop {
  /* Lighter, lower-chroma green so the block reads as atmosphere, not a heavy panel */
  --ethos-green: oklch(91.5% 0.024 175);
  position: relative;
  overflow: visible;
  isolation: isolate;
  scroll-margin-top: calc(var(--site-header-clear) + 0.75rem);
  background-color: var(--ethos-green);
  /* Cream at top-left, ethos green toward bottom-right — single layer, no horizontal “band” seam */
  background-image: radial-gradient(
    ellipse 145% 135% at 0% 0%,
    var(--surface-0) 0%,
    color-mix(in oklch, var(--ethos-green) 8%, var(--surface-0)) 22%,
    color-mix(in oklch, var(--ethos-green) 22%, var(--surface-0)) 38%,
    color-mix(in oklch, var(--ethos-green) 48%, var(--surface-0)) 48%,
    color-mix(in oklch, var(--ethos-green) 72%, var(--surface-0)) 62%,
    var(--ethos-green) 82%,
    var(--ethos-green) 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Home: full-viewport row */
body.home-page #ethos.ethos-loop {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  body.home-page #ethos.ethos-loop {
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }
}

body.home-page #work + .sep {
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

/* Last rule before parallax spacer — avoid 1px surface-2 line between ethos green and placeholder */
body.home-page #site-main .page > .sep:last-child {
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

/* Steam canvas: mist strongest over art — faded over copy so text stays clean */
.ethos-loop__steam {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: -clamp(0.75rem, 2.5vw, 1.5rem);
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  opacity: 0.36;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgb(0 0 0 / 0.2) min(32%, 22rem),
    rgb(0 0 0 / 0.75) min(48%, 34rem),
    #000 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgb(0 0 0 / 0.2) min(32%, 22rem),
    rgb(0 0 0 / 0.75) min(48%, 34rem),
    #000 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

body.home-page #ethos.ethos-loop .ethos-loop__steam {
  left: 0;
  right: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ethos-loop__steam {
    display: none;
  }
}

#ethos > .section-label {
  position: relative;
  z-index: 1;
}

.ethos-loop__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 0.65rem + 1.1vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0 0 clamp(var(--sp-21), 3vw, var(--sp-34));
  max-width: min(100%, 52rem);
  text-wrap: balance;
}

.ethos-loop__contain {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0;
}

.ethos-cluster.ethos-loop__row {
  position: relative;
  isolation: isolate;
  display: block;
  /* Same vertical envelope as GUIDE .guide-hex__row--dmta — copy drives height; art is absolute */
  min-height: clamp(26rem, 38vh, 44rem);
  overflow: visible;
}

.ethos-loop__col--copy {
  position: relative;
  z-index: 1;
  max-width: min(100%, 44rem);
  padding-right: clamp(0.5rem, 2vw, 1rem);
}

/* Desktop: same band + scale as .guide-dmta-flow-art (oversized square, soft radial mask) */
@media (min-width: 1024px) {
  .ethos-loop__col--copy {
    padding-right: clamp(1.25rem, 3.5vw, 2.75rem);
  }

  .ethos-loop__art {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    box-sizing: border-box;
    /* Shift art right so wireframe doesn’t sit on top of copy */
    left: calc(44rem + (100% - 44rem) / 2 + min(2rem, 3.5vw) + 1.5rem);
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(148vmin, 155vw);
    height: min(148vmin, 155vw);
    max-width: none;
    aspect-ratio: 1 / 1;
    margin: 0;
    isolation: isolate;
    -webkit-mask-image: radial-gradient(
      ellipse 50% 46% at 62% 50%,
      #000 0%,
      #000 26%,
      rgb(0 0 0 / 0.5) 50%,
      rgb(0 0 0 / 0.1) 76%,
      transparent 100%
    );
    mask-image: radial-gradient(
      ellipse 50% 46% at 62% 50%,
      #000 0%,
      #000 26%,
      rgb(0 0 0 / 0.5) 50%,
      rgb(0 0 0 / 0.1) 76%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

.ethos-cluster {
  display: grid;
  gap: var(--sp-34);
  align-items: start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.ethos-cluster.reveal {
  opacity: 1;
  transform: translateY(0);
}

.ethos {
  max-width: var(--measure);
}

.ethos__viz {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 220px;
  border-radius: 6px;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  isolation: isolate;
}

/* Void Architecture: no rounded “card” frame — avoids ghost box behind WebGL */
.ethos__viz--void-architecture {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}

@media (max-width: 1023px) {
  .ethos-cluster.ethos-loop__row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 0;
  }

  .ethos-loop__col--copy {
    flex: 0 0 auto;
    width: 100%;
    padding-right: 0;
  }

  .ethos-loop__art.ethos__viz--void-architecture {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    height: auto;
    min-height: clamp(280px, 88vw, 520px);
    margin-top: clamp(1.75rem, 5vw, 2.75rem);
    -webkit-mask-image: radial-gradient(
      ellipse 72% 68% at 50% 48%,
      #000 0%,
      #000 18%,
      rgb(0 0 0 / 0.72) 52%,
      rgb(0 0 0 / 0.2) 82%,
      transparent 100%
    );
    mask-image: radial-gradient(
      ellipse 72% 68% at 50% 48%,
      #000 0%,
      #000 18%,
      rgb(0 0 0 / 0.72) 52%,
      rgb(0 0 0 / 0.2) 82%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

@media (min-width: 1024px) {
  .ethos-loop__art.ethos__viz--void-architecture {
    min-height: 0;
  }
}

/* Lightweight stand-in when ethos-brain-viz.mjs is not mounted (home perf) */
.ethos__viz--placeholder {
  background:
    radial-gradient(ellipse 85% 75% at 50% 42%, rgba(42, 152, 148, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 72% 55%, rgba(31, 43, 43, 0.06) 0%, transparent 50%),
    linear-gradient(165deg, rgba(42, 152, 148, 0.04) 0%, transparent 45%);
  border: 1px solid rgba(31, 43, 43, 0.08);
}

.ethos-brain-viz__tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Lite brain: imperceptible drift — no JS animation loop */
@media (prefers-reduced-motion: no-preference) {
  .ethos-brain-viz--lite {
    animation: ethos-brain-lite-drift 48s ease-in-out infinite alternate;
  }
}

@keyframes ethos-brain-lite-drift {
  from {
    transform: rotate(-0.28deg) translateY(0);
  }
  to {
    transform: rotate(0.28deg) translateY(1.5px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ethos-brain-viz__tilt {
    will-change: transform;
  }
}

.ethos-brain-viz__canvas {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: middle;
}

/* Way of Code–style Void Architecture (three.js) — mount: js/ethos-void-architecture.mjs */
.ethos-void-architecture-root {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ethos-void-architecture__tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

@media (prefers-reduced-motion: no-preference) {
  .ethos-void-architecture__tilt {
    animation: ethos-void-architecture-drift 56s ease-in-out infinite alternate;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ethos-void-architecture__tilt {
    animation: none;
  }
}

@keyframes ethos-void-architecture-drift {
  from {
    transform: rotate(-0.32deg) translateY(0);
  }
  to {
    transform: rotate(0.32deg) translateY(1.5px);
  }
}

.ethos-void-architecture__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ethos-void-architecture__canvas {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: middle;
  outline: none;
}

.ethos p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: var(--sp-21);
}

.ethos p:last-child {
  margin-bottom: 0;
}

/* ---- Contact ---- */
.contact {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.contact.reveal {
  opacity: 1;
  transform: translateY(0);
}

.contact .note {
  margin-top: var(--sp-21);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-style: italic;
  max-width: var(--measure);
}

/* “Get in Touch” in parallax footer (column 1 of 3) — not the in-page fade-in */
.site-footer-parallax .contact.contact--footer {
  opacity: 1;
  transform: none;
  transition: none;
}

.site-footer-parallax__col--contact .contact.contact--footer {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.site-footer-parallax .contact.contact--footer .section-label {
  color: var(--footer-parallax-muted);
  margin-top: 0;
  /* Match eyebrow rhythm so column headers line up */
  margin-bottom: var(--sp-13);
  line-height: 1.25;
}

.site-footer-parallax .contact.contact--footer .section-label--with-mail-icon {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
}

.site-footer-parallax .contact.contact--footer .section-label__icon--mail {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  color: currentColor;
  align-self: center;
}

.site-footer-parallax .contact.contact--footer .note {
  color: var(--footer-parallax-muted);
}

.site-footer-parallax .contact.contact--footer a.email {
  color: var(--footer-parallax-accent);
}

.site-footer-parallax .contact.contact--footer a.email:hover {
  color: var(--brand-accent-on-dark-hover);
}

/* ---- Footer ---- */
footer {
  padding: var(--sp-55) 0 var(--sp-34);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-13);
}

footer .copyright {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

footer nav {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  display: flex;
  gap: var(--sp-21);
}

footer nav a,
footer nav span {
  color: var(--text-tertiary);
  text-decoration: none;
}

footer nav a {
  font-weight: 600;
  transition: color 0.2s;
}

footer nav a:hover {
  color: var(--link-marketing-hover);
}

footer nav a[aria-current="page"] {
  color: var(--link-marketing);
}

/* ---- Parallax site footer (Medium / SWLH pattern — Gina Lee) ---- */
/*
  Implements:
  §1 Fixed-height footer: main content and sections use position + z-index; footer is
     position:fixed; bottom:0; a same-height placeholder scrolls in normal flow.
  §2 Variable-height footer: placeholder height updated via JS (resize + ResizeObserver).
  §3 Footer taller than viewport: JS sets footer top from the placeholder’s getBoundingClientRect().top
     so the full footer can scroll into view (fixed+bottom alone would clip the top).

  Z-index: main (2) above fixed footer (1) so tall footers don’t cover the viewport; seam/band is
  handled via placeholder gradient + spacing, not by stacking the footer above all page content.
  One full-bleed .site-main fixes max-width .page not painting the side margins.
*/
body.has-parallax-footer .site-main {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--surface-0);
  min-height: 100vh;
  box-sizing: border-box;
  isolation: isolate;
  overflow-x: visible;
}

body.has-parallax-footer .hero,
body.has-parallax-footer .page {
  position: relative;
  z-index: 1;
  background: var(--surface-0);
}

/*
  Hero was intentionally transparent so the page bg / canvas read as one plane.
  Solid hero bg keeps the canvas (in .hero__bg) visible while blocking the footer.
*/
body.has-parallax-footer .hero--home {
  background: var(--surface-0);
}

body.has-parallax-footer .hero--home .hero__inner.page,
body.has-parallax-footer .hero--home .hero__text {
  background: transparent;
}

body.has-parallax-footer .work-section--viz .work-section__content,
body.has-parallax-footer .work-section--viz .work-section__stack {
  position: relative;
  z-index: 1;
}

/* Full-bleed viz section is otherwise transparent — footer would show through */
body.has-parallax-footer .work-section--viz {
  background: var(--surface-0);
}

.site-parallax-placeholder {
  position: relative;
  z-index: 0;
  width: 100%;
  pointer-events: none;
}

/*
  Bridge ethos → cream → footer dark. Ending in cream only made a hard band where the fixed
  footer met the spacer (read as overlap). Blend the lower third into --brand-dark-ink to match the footer.
*/
body.home-page.has-parallax-footer .site-parallax-placeholder {
  background: linear-gradient(
    180deg,
    oklch(91.5% 0.024 175) 0%,
    color-mix(in oklch, var(--surface-0) 70%, oklch(91.5% 0.024 175)) 14%,
    var(--surface-0) 26%,
    color-mix(in oklch, var(--surface-0) 65%, var(--brand-dark-ink)) 52%,
    color-mix(in oklch, var(--surface-0) 22%, var(--brand-dark-ink)) 72%,
    var(--brand-dark-ink) 100%
  );
}

/* Until site.js sets inline height, reserve rough scroll space (avoids zero-height spacer). */
.site-parallax-placeholder:not([style]) {
  min-height: clamp(280px, 38vh, 720px);
}

.site-footer-parallax {
  /* Dark band: middle of brand scale (charcoal) + shared accent tokens */
  --footer-parallax-bg: var(--brand-dark-ink);
  --footer-parallax-edge: var(--brand-dark-line);
  /* Secondary / eyebrows: lighter muted band for contrast on --brand-dark-ink */
  --footer-parallax-muted: oklch(72% 0.019 185);
  --footer-parallax-text: oklch(94% 0.01 185);
  --footer-parallax-accent: var(--brand-accent-on-dark);
  --site-footer-reveal: 1;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: var(--footer-parallax-bg);
  color: var(--footer-parallax-text);
  /* No top border or outer shadow — both composite over the light spacer and read as a tinted band */
  border-top: none;
  box-shadow: none;
  /*
   * Short-footer scroll reveal: use bottom offset, NOT transform.
   * Ancestor transform breaks WebGL layer compositing in Safari (MapLibre → black / strip only).
   */
  transform: none;
  /* opacity must stay 1: values below 1 break WebGL (MapLibre) compositing → black canvas */
  opacity: 1;
  will-change: auto;
}

/*
  §3 Tall footer: top/bottom set in JS — disable the short-footer reveal transform.
*/
body.has-parallax-footer .site-footer-parallax.site-footer-parallax--tall {
  transform: none;
  bottom: auto;
  opacity: 1;
  --site-footer-reveal: 1;
  will-change: top;
}

.site-footer-parallax__inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  /* Tighter bottom padding so the copyright strip isn’t a tall band */
  padding: clamp(var(--sp-34), 6vw, var(--sp-55)) 0 clamp(var(--sp-8), 2vw, var(--sp-13));
}

/* Full-bleed inside the dark footer — do not use .page here (marketing .page forces light --surface-0). */
.site-footer-parallax__contain {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 var(--page-gutter);
  box-sizing: border-box;
  flex: 0 1 auto;
  min-height: 0;
  background: transparent;
  color: inherit;
}

.site-footer-parallax__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-34);
  margin-bottom: var(--sp-34);
  align-items: start;
}

.site-footer-parallax__col {
  align-self: start;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

/* UA styles can add margin on <section>; keeps “GET IN TOUCH” level with Explore / Locations */
.site-footer-parallax__col--contact > section {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .site-footer-parallax__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-34) var(--sp-55);
    align-items: start;
  }

  .site-footer-parallax__col--map {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  /* Get in Touch | Explore | Locations — left 25% (same as old 1+1+2 split); Explore 12.5%; map ~62.5% */
  .site-footer-parallax__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr) minmax(0, 2.5fr);
    align-items: stretch;
    gap: var(--sp-34) var(--sp-55);
  }

  .site-footer-parallax__col {
    align-self: stretch;
    height: 100%;
  }

  .site-footer-parallax__col--contact {
    max-width: min(100%, 42ch);
    min-width: 0;
  }

  .site-footer-parallax__col--contact > .contact.contact--footer {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .site-footer-parallax__col--map {
    grid-column: auto;
    min-width: 0;
    width: 100%;
    align-items: stretch;
  }

}

.site-footer-parallax__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-parallax-muted);
  margin-top: 0;
  margin-bottom: var(--sp-13);
  line-height: 1.25;
}

.site-footer-parallax__tagline {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  color: var(--footer-parallax-text);
  margin-top: var(--sp-13);
  max-width: 28ch;
  line-height: 1.45;
}

.site-footer-parallax .link-mail {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--footer-parallax-accent);
  text-decoration: none;
}

.site-footer-parallax__col--contact .link-mail {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.site-footer-parallax .link-mail:hover {
  color: var(--brand-accent-on-dark-hover);
}

.site-footer-parallax__col--nav nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-8);
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

.site-footer-parallax__col--nav a {
  color: var(--footer-parallax-text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.site-footer-parallax__col--nav a:hover {
  color: var(--brand-accent-on-dark-hover);
}

.site-footer-parallax__col--nav a[aria-current="page"] {
  color: var(--footer-parallax-accent);
}

.site-footer-parallax__map-note {
  font-size: var(--text-sm);
  color: var(--footer-parallax-muted);
  line-height: 1.55;
  margin-bottom: var(--sp-13);
  max-width: min(100%, 62ch);
}

.site-footer-parallax__map {
  --footer-map-marker-yellow: #ffd60a;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  /* Wide frame shows more Mercator context at the same zoom */
  aspect-ratio: 2 / 1;
  max-height: min(420px, 55vh);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid oklch(38% 0.034 185);
  background: oklch(22% 0.028 185);
}

/* MapLibre GL map + canvas fill the footer map slot */
.site-footer-parallax__map-gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 9px;
}

.site-footer-parallax__map .maplibregl-map {
  font-family: var(--font-sans), system-ui, sans-serif;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.site-footer-parallax__map .maplibregl-canvas-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.site-footer-parallax__map .maplibregl-canvas {
  outline: none;
  /* Do not use CSS filter here — it breaks WebGL drawing in Safari/WebKit */
}

/* Cursor-style bright marker + local time (footer-globe.js) */
.site-footer-map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  text-align: center;
  max-width: 7.5rem;
}

.site-footer-map-marker__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 7px 6px;
  border-radius: 5px;
  background: oklch(16% 0.028 185 / 0.88);
  border: 1px solid oklch(28% 0.03 185 / 0.7);
  box-shadow: 0 1px 4px oklch(6% 0.02 185 / 0.45);
}

.site-footer-map-marker__name {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(97% 0.01 185);
  line-height: 1.2;
}

.site-footer-map-marker__time {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: oklch(95% 0.02 185);
  line-height: 1.2;
}

.site-footer-map-marker__dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--footer-map-marker-yellow);
  box-shadow:
    0 0 0 2px oklch(18% 0.04 185 / 0.85),
    0 0 14px oklch(88% 0.16 95 / 0.55);
}

.site-footer-parallax__map .maplibregl-ctrl-attrib {
  background: oklch(24% 0.03 185 / 0.92);
  color: var(--footer-parallax-muted);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.site-footer-parallax__map .maplibregl-ctrl-attrib a {
  color: var(--footer-parallax-accent);
}

.site-footer-parallax__carousel-block {
  padding-top: var(--sp-21);
  border-top: 1px solid oklch(34% 0.034 185);
  margin-bottom: var(--sp-13);
}

.site-footer-parallax__carousel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-13);
  margin-bottom: var(--sp-13);
}

.site-footer-parallax__carousel-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-parallax-muted);
}

.site-footer-parallax__carousel-all {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--footer-parallax-accent);
  text-decoration: none;
}

.site-footer-parallax__carousel-all:hover {
  text-decoration: underline;
}

.site-footer-parallax__carousel-empty {
  font-size: var(--text-sm);
  color: var(--footer-parallax-muted);
  margin: var(--sp-13) 0 0;
}

.site-footer-parallax .menu-carousel__btn {
  border-color: oklch(40% 0.045 185);
  background: oklch(24% 0.028 185);
  color: var(--footer-parallax-text);
}

.site-footer-parallax .menu-carousel__btn:hover {
  background: oklch(29% 0.03 185);
}

.site-footer-parallax .menu-carousel__viewport {
  scrollbar-color: oklch(48% 0.04 185) transparent;
}

.site-footer-parallax .menu-carousel__card {
  color: var(--footer-parallax-text);
  background: oklch(26% 0.028 185);
  border-color: oklch(36% 0.034 185);
}

.site-footer-parallax .menu-carousel__card:hover {
  border-color: oklch(55% 0.055 202);
}

.site-footer-parallax .menu-carousel__thumb {
  background: oklch(20% 0.025 185);
}

.site-footer-parallax__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8) var(--sp-13);
  padding: var(--sp-13) 0 var(--sp-5);
  border-top: 1px solid oklch(34% 0.034 185);
}

.site-footer-parallax__bottom .copyright {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.25;
  color: var(--footer-parallax-muted);
}

@media (max-width: 380px) {
  .site-footer-parallax .site-footer-parallax__carousel .menu-carousel__btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.has-parallax-footer .site-footer-parallax {
    --site-footer-reveal: 1;
    transform: none;
    opacity: 1;
    transition: none;
    will-change: auto;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1;
    box-shadow: none;
    border-top: 1px solid var(--footer-parallax-edge, var(--brand-dark-line));
  }

  body.has-parallax-footer .site-parallax-placeholder {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }
}

/* ---- Separators ---- */
.sep {
  height: 1px;
  background: var(--surface-2);
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ---- Subpages (GUIDE, People) ---- */
.subpage-hero {
  padding: clamp(34px, 6vw, 89px) 0 var(--sp-34);
}

.subpage-hero .breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-21);
  letter-spacing: 0.04em;
}

.subpage-hero .breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.subpage-hero .breadcrumb a:hover {
  color: var(--link-marketing-hover);
}

.subpage-hero h1 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-21);
  max-width: 24ch;
}

.subpage-hero p.lead {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-tertiary);
  max-width: 42ch;
  margin-bottom: 0;
}

/* GUIDE: compact CTAs (used in guide-grid-hero masthead) */
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  padding: var(--sp-8) var(--sp-13);
  border-radius: 6px;
  border: 1px solid oklch(84% 0.022 72);
  color: var(--text-primary);
  background: var(--surface-0);
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.hero-cta:hover {
  border-color: oklch(72% 0.03 180);
  background: oklch(99.5% 0.01 72);
}

.hero-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero-cta--compact {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: var(--sp-8) var(--sp-13);
}

/* CTA labels: title case in HTML; keep product name GUIDE in all caps (not the common noun “guide”). */

@media (prefers-reduced-motion: reduce) {
  .hero-cta {
    transition: border-color 0.2s, background 0.2s;
  }
}

.subpage-body {
  padding-bottom: clamp(55px, 10vw, 89px);
}

.subpage-body .prose {
  max-width: var(--measure);
}

.subpage-body .prose p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: var(--sp-21);
}

.subpage-body .prose p:last-child {
  margin-bottom: 0;
}

.subpage-body .prose h2 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--sp-34);
  margin-bottom: var(--sp-13);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.subpage-body .prose h2:first-child {
  margin-top: 0;
}

/* ---- GUIDE page: fake browser (chrome + single white pane) ---- */
.guide-page {
  max-width: none;
}

.guide-section {
  margin-bottom: clamp(var(--sp-55), 8vw, var(--sp-89));
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section .prose {
  max-width: var(--measure);
}

.guide-section .prose h2:first-child {
  margin-top: 0;
}

/* BYOS: callout above-left, default ui-frame chrome, empty pane */
.guide-byos__preview {
  width: 100%;
}

.guide-byos-preview__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.guide-byos-preview__stack .guide-byos-preview__callout.guide-window-callout {
  margin-bottom: var(--sp-8);
  max-width: min(100%, 28rem);
}

.guide-byos-preview__callout .guide-byos-preview__title {
  display: inline;
  margin: 0;
  font: inherit;
  color: inherit;
}

.guide-byos__preview .guide-byos__frame {
  width: 100%;
}

.guide-byos__viewport {
  padding: 0;
  margin: 0;
  overflow: hidden;
  text-align: left;
}

.guide-byos-preview__desc {
  font-size: var(--text-sm);
  line-height: 1.62;
  color: oklch(48% 0.055 195);
  margin: var(--sp-13) 0 0;
  max-width: 52ch;
}

.guide-byos-carousel-outer {
  margin-top: clamp(var(--sp-21), 3vw, var(--sp-34));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  overflow: visible;
}

.guide-byos-carousel__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(52% 0.05 195);
  margin: 0 0 var(--sp-13);
}

.guide-byos-carousel-viewport {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.guide-byos-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.guide-byos-carousel--scroller {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-13);
  width: max-content;
  padding: var(--sp-8) 0 clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Mini browser vignettes (must stay span-only inside <button>) */
.guide-byos-carousel__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 9.25rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.22s var(--ease-out),
    opacity 0.22s var(--ease-out);
}

.guide-byos-carousel__item:hover .guide-byos-vignette {
  border-color: oklch(78% 0.02 180);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.5) inset,
    0 10px 28px oklch(22% 0.03 180 / 0.12);
}

.guide-byos-carousel__item.is-active .guide-byos-vignette {
  border-color: oklch(72% 0.04 180);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.55) inset,
    0 14px 36px oklch(22% 0.04 180 / 0.16);
}

.guide-byos-carousel__item.is-active {
  transform: translateY(-2px);
}

.guide-byos-carousel__item:not(.is-active) .guide-byos-carousel__stack {
  opacity: 0.88;
}

.guide-byos-carousel__item:not(.is-active):hover .guide-byos-carousel__stack {
  opacity: 1;
}

.guide-byos-carousel__item:focus-visible {
  outline: none;
}

.guide-byos-carousel__item:focus-visible .guide-byos-vignette {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Label above + left, like guide-window-callout; frame body is empty white */
.guide-byos-carousel__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.guide-byos-carousel .guide-window-callout.guide-byos-carousel__callout {
  align-self: flex-start;
  margin-bottom: var(--sp-5);
  padding: 3px 7px;
  font-size: 0.58rem;
  line-height: 1.3;
  max-width: 12rem;
  color: oklch(46% 0.07 195);
  background: oklch(97.5% 0.022 185 / 0.72);
  border-color: oklch(88% 0.04 185 / 0.55);
}

.guide-byos-vignette {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--surface-3);
  background: var(--surface-1);
  overflow: hidden;
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.45) inset,
    0 8px 22px oklch(22% 0.03 180 / 0.08);
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.guide-byos-vignette__chrome {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 12px;
  padding: 0 4px;
  border-bottom: 1px solid var(--surface-3);
  background: oklch(94% 0.015 72);
}

.guide-byos-vignette__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--surface-3);
  opacity: 0.85;
}

.guide-byos-vignette__dot:nth-child(1) {
  background: oklch(82% 0.05 25);
}

.guide-byos-vignette__dot:nth-child(2) {
  background: oklch(88% 0.06 85);
}

.guide-byos-vignette__dot:nth-child(3) {
  background: oklch(78% 0.05 150);
}

.guide-byos-vignette__viewport {
  display: block;
  padding: 0;
  margin: 0;
  aspect-ratio: 5 / 4;
  min-height: 0;
  background: oklch(100% 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .guide-byos-carousel__item,
  .guide-byos-carousel__item.is-active {
    transition: none;
    transform: none;
  }
}

.ui-frame {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  border: 1px solid var(--surface-3);
  background: var(--surface-1);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.5) inset,
    0 12px 36px oklch(22% 0.03 180 / 0.08);
  overflow: hidden;
  transition:
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out);
}

.ui-frame:hover {
  border-color: oklch(78% 0.02 180);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.55) inset,
    0 16px 44px oklch(22% 0.04 180 / 0.12);
}

.ui-frame__chrome {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--sp-13);
  border-bottom: 1px solid var(--surface-3);
  background: oklch(94% 0.015 72);
}

.ui-frame__chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  opacity: 0.85;
}

.ui-frame__chrome span:nth-child(1) {
  background: oklch(82% 0.05 25);
}

.ui-frame__chrome span:nth-child(2) {
  background: oklch(88% 0.06 85);
}

.ui-frame__chrome span:nth-child(3) {
  background: oklch(78% 0.05 150);
}

/* White page area: 16∶10 (common laptop panel) so height tracks width like a real browser */
.ui-frame__viewport--simple {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  margin: 0;
  background: oklch(100% 0 0);
}

.ui-frame__viewport--simple.ui-frame__viewport--mini {
  aspect-ratio: 5 / 4;
}

/* Slightly shallower back panes in the stack (still readable as browser-sized) */
.ui-frame__viewport--layer-back {
  aspect-ratio: 16 / 9;
}

.ui-frame--layered-front {
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.55) inset,
    0 20px 50px oklch(22% 0.04 180 / 0.14);
}

/* ---- GUIDE: Hex-style marketing blocks (layout parity with hex.tech refs) ---- */
.guide-hex {
  margin-bottom: clamp(var(--sp-55), 8vw, var(--sp-89));
}

/* First block: slightly tighter bottom margin — grid band carries extra fade padding */
.guide-hex--triple {
  margin-bottom: clamp(var(--sp-34), 6vw, var(--sp-55));
}

/* BYOS carousel shadows + marquee should not clip */
.guide-hex--byos {
  overflow: visible;
}

/* Pull the next section up into the fade zone; padding restores headline position */
.guide-hex--triple + .guide-hex--split {
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem));
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

/* GUIDE: no negative overlap — avoids a surface-1 strip between hero grid and Living Loop */
body.guide-marketing .guide-hex--triple + .guide-hex--split {
  margin-top: 0;
  padding-top: clamp(var(--sp-34), 5vw, var(--sp-55));
}

.guide-hex__contain {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0;
}

/* ① Grid background: full viewport width; windows centered below */
.guide-hex__band--grid {
  position: relative;
  z-index: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  box-sizing: border-box;
  padding-top: clamp(var(--sp-34), 5vw, var(--sp-55));
  padding-right: clamp(var(--page-gutter), 4vw, 3rem);
  padding-left: clamp(var(--page-gutter), 4vw, 3rem);
  /* Extra bottom space so the fade reads as a soft handoff into the page (surface-0) */
  padding-bottom: calc(clamp(var(--sp-34), 5vw, var(--sp-55)) + clamp(3rem, 9vw, 6rem));
  background-color: var(--surface-1);
  background-image:
    linear-gradient(oklch(90% 0.016 72 / 0.4) 1px, transparent 1px),
    linear-gradient(90deg, oklch(90% 0.016 72 / 0.4) 1px, transparent 1px);
  background-size: 20px 20px;
  border-top: 1px solid var(--surface-2);
  border-bottom: none;
}

/* GUIDE hero: full-bleed grid only on first section (::before), not fixed to viewport */
body.guide-marketing .guide-page > .guide-hex--triple:first-child {
  position: relative;
  z-index: 0;
  margin-top: 0;
  margin-bottom: 0;
}

body.guide-marketing .guide-page > .guide-hex--triple:first-child::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: calc(-1 * clamp(3.25rem, 8vw, 5rem));
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--surface-1);
  background-image:
    linear-gradient(oklch(90% 0.016 72 / 0.4) 1px, transparent 1px),
    linear-gradient(90deg, oklch(90% 0.016 72 / 0.4) 1px, transparent 1px);
  background-size: 20px 20px;
  /* Fade grid out toward section bottom — body surface-0 shows through (no solid mid-tone band) */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - min(18rem, 42vw)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - min(18rem, 42vw)),
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

body.guide-marketing .guide-page > .guide-hex--triple:first-child .guide-hex__band--grid {
  margin-top: 0;
  padding-top: clamp(var(--sp-34), 5vw, var(--sp-55));
  /* Bottom breathing room; grid fade is handled by section::before mask (no overlay band) */
  padding-bottom: clamp(var(--sp-34), 5vw, var(--sp-55));
  border-top: none;
  background-color: transparent;
  background-image: none;
}

/* Overlay fade would fight the mask + create a flat “stripe”; hero hands off to page bg only via mask */
body.guide-marketing .guide-page > .guide-hex--triple:first-child .guide-hex__band--grid::after {
  display: none;
}

body.guide-marketing .guide-page > .guide-hex--triple:first-child .guide-grid-hero {
  padding-top: 0;
}

/* Fade grid + tint into body background so the next section isn’t a hard edge */
.guide-hex__band--grid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(6rem, 32vw, 14rem);
  background: linear-gradient(
    to bottom,
    oklch(98.5% 0.015 72 / 0),
    oklch(98.5% 0.015 72 / 0.35) 35%,
    var(--surface-0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.guide-hex__band--grid .guide-hex__band-inner {
  position: relative;
  z-index: 1;
  max-width: min(72rem, 100%);
  margin: 0 auto;
}

/* Masthead: intro + lede (left) · vertical CTAs (right, desktop) */
.guide-grid-hero {
  margin: 0 0 clamp(var(--sp-34), 5vw, var(--sp-55));
  text-align: left;
}

.guide-grid-hero__head {
  margin-bottom: clamp(var(--sp-21), 3vw, var(--sp-34));
}

.guide-grid-hero__body {
  display: grid;
  gap: clamp(var(--sp-21), 3vw, var(--sp-34));
  align-items: start;
  max-width: none;
}

.guide-grid-hero__body-copy {
  min-width: 0;
}

.guide-grid-hero__actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: var(--sp-8);
  width: min(15rem, 100%);
}

.guide-grid-hero__title {
  font-family: var(--font-sans);
  font-size: clamp(1.55rem, 1.15rem + 1.65vw, 2.35rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.guide-grid-hero__title .guide-grid-hero__name {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  margin-right: 0.2em;
}

.guide-grid-hero__intro {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-21);
}

.guide-grid-hero__lede {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.guide-grid-hero__body .guide-grid-hero__actions .hero-cta--compact {
  flex: 0 0 auto;
  white-space: normal;
  text-align: center;
}

@media (min-width: 768px) {
  .guide-grid-hero__body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(var(--sp-34), 4vw, var(--sp-55));
  }

  .guide-grid-hero__body-copy {
    max-width: min(48rem, 100%);
  }
}

@media (max-width: 767px) {
  .guide-grid-hero__body {
    grid-template-columns: 1fr;
  }

  .guide-grid-hero__actions {
    width: 100%;
    max-width: none;
  }
}

.guide-window-stack {
  position: relative;
  width: 100%;
  min-height: clamp(24rem, 46vw, 34rem);
  margin: 0 auto;
}

/* Three windows in a row: more horizontal spread, ~35–40% overlap (Hex-like) */
.guide-window-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 42%;
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    opacity 0.25s var(--ease-out);
}

.guide-window-wrap--back-left {
  left: 0;
  top: 10%;
  z-index: 1;
  transform: none;
  opacity: 0.96;
}

.guide-window-wrap--back-right {
  right: 0;
  top: 10%;
  z-index: 2;
  transform: none;
  opacity: 0.96;
}

.guide-window-wrap--front {
  left: 50%;
  top: 0;
  width: 44%;
  z-index: 3;
  transform: translateX(-50%);
}

/* Staggered pane bottoms: center is tallest; sides shorter */
.guide-window-wrap--back-left .ui-frame__viewport--simple {
  aspect-ratio: 16 / 10;
}

.guide-window-wrap--back-right .ui-frame__viewport--simple {
  aspect-ratio: 16 / 9;
}

.guide-window-wrap--front .ui-frame__viewport--simple {
  aspect-ratio: 16 / 12;
}

/* Right back pane is covered by center — keep label on the visible edge */
.guide-window-wrap--back-right .guide-window-callout {
  align-self: flex-end;
  text-align: right;
}

/* Legible over overlapping frames: frosted chip behind label text */
.guide-window-callout {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  position: relative;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  line-height: 1.35;
  padding: var(--sp-8) var(--sp-13);
  border-radius: 4px;
  background: oklch(98.5% 0.012 72 / 0.88);
  border: 1px solid oklch(92% 0.014 72 / 0.65);
  box-shadow: 0 1px 2px oklch(15% 0.02 180 / 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-window-wrap .ui-frame {
  width: 100%;
}

.guide-window-stack:hover .guide-window-wrap--back-left {
  transform: translateY(-2px);
}

.guide-window-stack:hover .guide-window-wrap--back-right {
  transform: translateY(-2px);
}

.guide-window-stack:hover .guide-window-wrap--front {
  transform: translateX(-50%) translateY(-2px);
}

/* Below lg: stack hero windows (canonical max-width = --bp-lg - 1px) */
@media (max-width: 1023px) {
  .guide-grid-hero {
    max-width: 100%;
    margin-bottom: var(--sp-34);
  }

  .guide-window-stack {
    min-height: clamp(24rem, 92vw, 36rem);
  }

  .guide-window-wrap,
  .guide-window-wrap--back-left,
  .guide-window-wrap--back-right {
    width: 88%;
  }

  .guide-window-wrap--back-left {
    left: 0;
    top: 4%;
  }

  .guide-window-wrap--back-right {
    right: 0;
    top: 4%;
  }

  .guide-window-wrap--front {
    width: 92%;
    top: 20%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-frame:hover {
    transform: none;
  }

  .guide-window-wrap {
    transition: none;
  }

  .guide-window-stack:hover .guide-window-wrap--back-left {
    transform: none;
  }

  .guide-window-stack:hover .guide-window-wrap--back-right {
    transform: none;
  }

  .guide-window-stack:hover .guide-window-wrap--front {
    transform: translateX(-50%);
  }
}

/* ②③ Hex-style two-column rows: copy | UI (~40/60) and UI | copy (~60/40) */
.guide-hex--split .guide-hex__row {
  display: grid;
  gap: clamp(var(--sp-34), 4vw, var(--sp-55));
  align-items: center;
}

@media (min-width: 1024px) {
  .guide-hex--split:not(.guide-hex--split-reverse) .guide-hex__row {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    gap: clamp(var(--sp-34), 4vw, var(--sp-55));
  }

  /* BYOS: give the window grid more horizontal room */
  .guide-hex--byos.guide-hex--split:not(.guide-hex--split-reverse) .guide-hex__row {
    grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  }

  .guide-hex--split-reverse .guide-hex__row--reverse {
    grid-template-columns: minmax(0, 0.58fr) minmax(0, 0.42fr);
    gap: clamp(var(--sp-34), 4vw, var(--sp-55));
  }
}

.guide-hex__col--copy {
  min-width: 0;
}

.guide-hex__mark {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--sp-13);
}

/* Title-case phrase (not all-caps) for long eyebrows */
.guide-hex__mark--phrase {
  text-transform: none;
  letter-spacing: 0.14em;
  font-weight: 500;
}

.guide-hex__headline {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 var(--sp-21);
  max-width: 26ch;
}

.guide-hex__headline--wide {
  max-width: 38ch;
}

/* DMTA loop: huge Flow Line layer + copy on top; radial mask (solid center, soft edges) */
.guide-hex--dmta-loop .guide-hex__headline {
  max-width: 100%;
  line-height: 1.22;
}

/* Tighter section: less vertical padding than generic .guide-hex; art is absolute so row height was only “air” */
.guide-hex.guide-hex--split.guide-hex--dmta-loop {
  position: relative;
  isolation: isolate;
  margin-bottom: clamp(var(--sp-34), 5vw, var(--sp-55));
  /* Full-bleed bg layer (.guide-dmta-loop__bg); overflow handled on body.guide-marketing */
}

/* Teal atmosphere — own layer so vertical fade into neighboring sections is tunable */
.guide-dmta-loop__bg {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 90% 58% at 8% 12%, oklch(93% 0.05 175 / 0.5), transparent 58%),
    radial-gradient(ellipse 78% 62% at 92% 88%, oklch(87% 0.06 175 / 0.42), transparent 56%),
    radial-gradient(ellipse 55% 48% at 42% 38%, oklch(95% 0.03 175 / 0.22), transparent 65%),
    radial-gradient(ellipse 40% 35% at 72% 22%, oklch(94% 0.035 165 / 0.18), transparent 70%),
    linear-gradient(
      168deg,
      oklch(99% 0.01 72 / 0.35) 0%,
      transparent 42%,
      oklch(96.5% 0.022 175 / 0.2) 100%
    );
  /* Long soft vertical fade so handoff to hero / BYOS is not a hard line */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgb(0 0 0 / 0.45) 12%,
    #000 26%,
    #000 74%,
    rgb(0 0 0 / 0.45) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgb(0 0 0 / 0.45) 12%,
    #000 26%,
    #000 74%,
    rgb(0 0 0 / 0.45) 88%,
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

@media (min-width: 1024px) {
  /* Extra cushion below copy/art; padding-top stays from .guide-hex--triple + … (higher specificity) */
  .guide-hex.guide-hex--split.guide-hex--dmta-loop {
    padding-bottom: clamp(var(--sp-13), 2vw, var(--sp-34));
  }
}

.guide-hex--dmta-loop .guide-hex__contain {
  position: relative;
  z-index: 1;
}

body.guide-marketing .guide-hex--triple + .guide-hex--split.guide-hex--dmta-loop {
  padding-top: clamp(var(--sp-13), 2.5vw, var(--sp-34));
}

@media (max-width: 1023px) {
  /* Vertical rhythm only: keep sections from visually running together; art is full-bleed via .guide-dmta-flow-art */
  body.guide-marketing .guide-hex--triple + .guide-hex--split.guide-hex--dmta-loop {
    padding-top: clamp(var(--sp-34), 7vw, var(--sp-55));
  }

  .guide-hex.guide-hex--split.guide-hex--dmta-loop {
    padding-bottom: clamp(var(--sp-34), 6vw, var(--sp-55));
    margin-bottom: clamp(var(--sp-55), 12vw, var(--sp-89));
  }
}

.guide-hex--split .guide-hex__row--dmta {
  position: relative;
  isolation: isolate;
  display: block;
  /* Copy column drives height; enough room for knot without 100vh+ of empty band */
  min-height: clamp(26rem, 38vh, 44rem);
  overflow: visible;
}

/* DMTA art: shared; desktop vs mobile differ (two layouts — see media blocks) */
.guide-dmta-flow-art {
  z-index: 0;
  pointer-events: none;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
}

@media (min-width: 1024px) {
  /* Desktop: center in open band right of copy — does not sit over text */
  .guide-dmta-flow-art {
    position: absolute;
    left: calc(44rem + (100% - 44rem) / 2 + min(2rem, 3.5vw));
    top: 50%;
    transform: translate(-50%, -50%);
    margin-left: 0;
    width: min(152vmin, 159vw);
    height: min(152vmin, 159vw);
    max-width: none;
    -webkit-mask-image: radial-gradient(
      ellipse 52% 48% at 58% 50%,
      #000 0%,
      #000 28%,
      rgb(0 0 0 / 0.55) 52%,
      rgb(0 0 0 / 0.12) 78%,
      transparent 100%
    );
    mask-image: radial-gradient(
      ellipse 52% 48% at 58% 50%,
      #000 0%,
      #000 28%,
      rgb(0 0 0 / 0.55) 52%,
      rgb(0 0 0 / 0.12) 78%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

.guide-hex__col--dmta {
  position: relative;
  z-index: 1;
  max-width: min(100%, 44rem);
  padding-right: clamp(0.5rem, 2vw, 1rem);
}

.guide-hex__body {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-21);
  max-width: 40ch;
}

.guide-hex__col--copy .guide-hex__body:last-of-type {
  margin-bottom: 0;
}

/* Hex sections: small inline CTAs after body copy (same treatment as hero) */
.guide-hex__ctas {
  margin: var(--sp-21) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8) var(--sp-13);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.guide-hex__ctas .hero-cta--compact {
  flex: 0 1 auto;
}

.guide-flow-line-root {
  width: 100%;
  /* Taller than 4:3 in a narrow column so the canvas has room to read */
  aspect-ratio: 1 / 1;
  max-height: min(82vh, 52rem);
  min-height: min(20rem, 70vw);
  min-width: 0;
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DMTA: knot fills the oversized art box */
.guide-dmta-flow-art .guide-flow-line-root.guide-flow-line-root--section {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

/* No inner 5% inset — art should use the full square */
.guide-dmta-flow-art .guide-flow-line-viewport {
  width: 100%;
  height: 100%;
}

@media (max-width: 1023px) {
  .guide-hex--split .guide-hex__row--dmta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 0;
  }

  .guide-hex__col--dmta {
    flex: 0 0 auto;
    width: 100%;
  }

  /* Mobile: copy first, then full-bleed torus (different from desktop absolute band). */
  .guide-dmta-flow-art {
    position: relative;
    left: auto;
    top: auto;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    height: auto;
    aspect-ratio: 1 / 1;
    margin-top: clamp(1.75rem, 5vw, 2.75rem);
    margin-bottom: 0;
    transform: none;
    -webkit-mask-image: radial-gradient(
      ellipse 72% 68% at 50% 48%,
      #000 0%,
      #000 18%,
      rgb(0 0 0 / 0.72) 52%,
      rgb(0 0 0 / 0.2) 82%,
      transparent 100%
    );
    mask-image: radial-gradient(
      ellipse 72% 68% at 50% 48%,
      #000 0%,
      #000 18%,
      rgb(0 0 0 / 0.72) 52%,
      rgb(0 0 0 / 0.2) 82%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
}

.guide-flow-line-viewport {
  position: relative;
  width: 95%;
  height: 95%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

/* Canvas drawing buffer can be huge; CSS display size stays inside the box (stops layout runaway) */
.guide-flow-line-viewport canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  vertical-align: top;
}

/* Footer: Flow Line as compact cream wireframe mark (GUIDE page) */
.site-footer-parallax__flow-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 var(--sp-21);
  isolation: isolate;
}

.guide-flow-line-root--footer {
  width: 5.25rem;
  height: 5.25rem;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  max-height: none;
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.guide-flow-line-root--footer .guide-flow-line-viewport {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.guide-hex__cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  text-transform: none;
  padding: var(--sp-13) var(--sp-21);
  border: 1px solid var(--surface-3);
  border-radius: 4px;
  background: oklch(100% 0 0);
  box-shadow: 0 1px 2px oklch(15% 0.02 180 / 0.06);
  margin-bottom: var(--sp-34);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.guide-hex__cta:hover {
  border-color: var(--text-tertiary);
  box-shadow: 0 4px 14px oklch(22% 0.03 180 / 0.1);
}

.guide-hex__testimonial {
  margin: 0;
  padding-top: var(--sp-21);
  border-top: 1px solid var(--surface-2);
}

.guide-hex__testimonial > p {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Two-layer stack (faint back + front + callout) — Hex “Notebook & App builder” block */
.guide-stack-duo {
  position: relative;
  width: 100%;
  min-height: clamp(18rem, 38vw, 28rem);
  margin: 0 auto;
}

.guide-stack-duo--tight {
  min-height: clamp(17rem, 36vw, 26rem);
}

.guide-window-wrap--duo-back {
  position: absolute;
  left: 0;
  top: 0;
  width: 88%;
  z-index: 1;
  transform: translate(-3%, -4%);
  opacity: 0.9;
  pointer-events: none;
}

.guide-window-wrap--duo-front {
  position: relative;
  width: 94%;
  margin-left: auto;
  margin-right: 0;
  margin-top: clamp(2rem, 8vw, 3.5rem);
  z-index: 2;
}

.ui-frame--duo-faint {
  filter: saturate(0.92);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / 0.45) inset,
    0 8px 28px oklch(22% 0.03 180 / 0.08);
}

/* ---- People page: team grid + modal ---- */
.people-section,
.philosophy-section,
.advisors-section {
  padding: clamp(34px, 6vw, 55px) 0 clamp(55px, 8vw, 89px);
}

.section-intro {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: var(--measure);
  margin-bottom: var(--sp-34);
}

.people-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-21);
}

@media (min-width: 640px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.person-card {
  padding: var(--sp-21);
  background: var(--surface-1);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.person-card--soon {
  gap: var(--sp-8);
  border: 1px dashed var(--surface-3);
  background: transparent;
  min-height: 200px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.person-card--soon .person-placeholder-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
}

.person-card--soon .person-placeholder-note {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-style: italic;
}

.person-card--clickable {
  position: relative;
  min-height: clamp(380px, 52vw, 480px);
  padding: 0;
  overflow: hidden;
  transition:
    box-shadow 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out);
}

.person-card--clickable:hover {
  box-shadow: 0 12px 36px oklch(22% 0.04 180 / 0.14);
  transform: translateY(-3px);
}

.person-card__full-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: inherit;
  cursor: pointer;
  background: transparent;
}

.person-card__full-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.person-card__media {
  flex: 1 1 72%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-21);
  background: var(--surface-2);
}

.person-card__media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.person-card__text {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: var(--sp-21);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-13);
}

.person-card__text h3 {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.person-card .person-role {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: calc(-1 * var(--sp-8));
}

.person-card .person-teaser {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: none;
}

/* Author `display` on `<dialog>` overrides UA `display:none` when closed — hide explicitly */
dialog.person-modal:not([open]) {
  display: none;
}

.person-modal[open] {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(60rem, calc(100vw - 2 * var(--page-gutter)));
  max-width: 60rem;
  height: min(90vh, 820px);
  max-height: min(90vh, 820px);
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 13px;
  background: var(--surface-0);
  color: var(--text-primary);
  box-shadow: 0 24px 48px oklch(15% 0.03 180 / 0.2);
  overflow: hidden;
}

.person-modal::backdrop {
  background: oklch(18% 0.03 180 / 0.45);
}

/* Fill dialog height; min-height:0 + overflow on .person-modal__main enables scroll */
.person-modal__layout {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  /* ~30% wider than prior 320px cap */
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}

.person-modal__aside {
  position: relative;
  padding: 0;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  align-self: stretch;
  background: transparent;
  border: none;
}

/* Single img fills entire left column (no inner frame) */
.person-modal__aside .person-modal__photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 20%;
}

.person-modal__main {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-34);
  border-left: 1px solid var(--surface-2);
  -webkit-overflow-scrolling: touch;
}

.person-modal__close {
  position: absolute;
  top: var(--sp-13);
  right: var(--sp-13);
  z-index: 2;
  appearance: none;
  border: none;
  background: oklch(98% 0.015 72 / 0.92);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
  box-shadow: 0 1px 4px oklch(15% 0.03 180 / 0.08);
}

.person-modal__close:hover {
  color: var(--text-primary);
  background: var(--surface-1);
}

.person-modal__main h2 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-13);
  padding-right: var(--sp-34);
}

.person-modal__tagline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-13) var(--sp-21);
  margin-bottom: var(--sp-21);
}

.person-modal__tagline-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.5;
}

.person-modal__tagline-social {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  flex-shrink: 0;
}

.person-modal__social-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  opacity: 0.9;
  transition: color 0.2s, opacity 0.2s;
}

.person-modal__social-inline:hover {
  color: var(--accent);
  opacity: 1;
}

.person-modal__social-icon--inline {
  width: 17px;
  height: 17px;
  display: block;
}

.person-modal__body p {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--sp-21);
}

.person-modal__body p:last-of-type {
  margin-bottom: var(--sp-21);
}

.person-modal__links-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-13);
}

.person-modal__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.person-modal__links a {
  font-size: var(--text-md);
  align-self: flex-start;
}

@media (max-width: 767px) {
  .person-modal[open] {
    width: calc(100vw - 2 * var(--page-gutter));
    height: min(92vh, 900px);
    max-height: min(92vh, 900px);
  }

  .person-modal__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .person-modal__aside {
    min-height: 36vh;
    max-height: 42vh;
    flex-shrink: 0;
    border-bottom: 1px solid var(--surface-2);
  }

  .person-modal__aside .person-modal__photo {
    width: 100%;
    height: 100%;
    min-height: 36vh;
    max-height: 42vh;
    object-fit: cover;
    object-position: center 25%;
  }

  .person-modal__main {
    border-left: none;
  }

  .person-modal__main {
    min-height: 0;
    min-width: 0;
    padding: var(--sp-21) var(--sp-21) var(--sp-34);
  }
}

.advisors-section .prose,
.philosophy-section .prose {
  max-width: var(--measure);
}

.advisors-section .prose p,
.philosophy-section .prose p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: var(--sp-21);
}

/* ---- Licensing page: tighter vertical rhythm ---- */
body.licensing-page .subpage-hero {
  padding-bottom: var(--sp-21);
}

body.licensing-page .services-nav {
  padding: 0 0 var(--sp-13);
}

body.licensing-page .licensing-page__section-rule {
  border: none;
  height: 1px;
  background: var(--surface-2);
  margin: clamp(var(--sp-55), 8vw, var(--sp-89)) 0 clamp(var(--sp-34), 5vw, var(--sp-55));
}

body.licensing-page .page .people-section.licensing-section {
  padding: var(--sp-13) 0 var(--sp-21);
}

body.licensing-page .licensing-section__prose {
  max-width: var(--measure);
  overflow-wrap: break-word;
}

body.licensing-page .licensing-section__prose p {
  margin-bottom: var(--sp-13);
}

body.licensing-page .licensing-section__prose p:last-child {
  margin-bottom: 0;
}

body.licensing-page .licensing-section__cta {
  margin-top: var(--sp-21);
  margin-bottom: 0;
}

body.licensing-page .licensing-block {
  margin-top: clamp(var(--sp-21), 4vw, var(--sp-34));
}

body.licensing-page .licensing-block:first-of-type {
  margin-top: var(--sp-21);
}

body.licensing-page .licensing-block__title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-8);
}

body.licensing-page .licensing-engagement-grid {
  display: grid;
  gap: var(--sp-21);
  margin-top: var(--sp-21);
}

@media (min-width: 768px) {
  body.licensing-page .licensing-engagement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-34);
    align-items: start;
  }
}

body.licensing-page .licensing-engagement .licensing-block__title {
  margin-bottom: var(--sp-13);
}

body.licensing-page .licensing-engagement p {
  margin-bottom: 0;
}

body.licensing-page .licensing-page__footer-sep {
  margin-top: clamp(var(--sp-34), 6vw, var(--sp-55));
}

/* Full-width engagement band (breaks out of .page) */
.licensing-engagements-band {
  position: relative;
  isolation: isolate;
  width: 100%;
  background: var(--surface-1);
  padding: clamp(var(--sp-55), 8vw, var(--sp-89)) 0 clamp(var(--sp-55), 8vw, var(--sp-89));
}

.licensing-engagements-band__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.licensing-engagements-band__bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.licensing-engagements-band__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.licensing-engagements-band__intro {
  max-width: var(--measure);
  margin-bottom: var(--sp-34);
  font-size: var(--text-base);
  line-height: 1.62;
  color: var(--text-secondary);
}

.licensing-engagements-band .licensing-engagement-grid {
  display: grid;
  gap: var(--sp-21);
}

@media (min-width: 768px) {
  .licensing-engagements-band .licensing-engagement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-34);
    align-items: start;
  }
}

.licensing-engagements-band .licensing-engagement {
  background: color-mix(in srgb, var(--surface-0) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  padding: var(--sp-21) var(--sp-21) var(--sp-13);
}

.licensing-engagements-band .licensing-block__title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--sp-8);
  color: var(--accent);
}

.licensing-engagements-band .licensing-engagement p {
  margin-bottom: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.licensing-engagements-band__proof {
  max-width: var(--measure);
  margin-top: var(--sp-34);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.licensing-engagements-band__proof a {
  color: var(--accent);
}

.licensing-engagements-band .licensing-section__cta {
  margin-top: var(--sp-21);
  margin-bottom: 0;
}

body.licensing-page footer {
  padding: clamp(var(--sp-34), 5vw, var(--sp-55)) 0 clamp(var(--sp-89), 12vw, var(--sp-144));
}

/* ---- Case studies (Ramp-style hub: filters + grid, see ramp.com/customers) ---- */
body.case-studies-page--ramp .subpage-hero.case-studies-hero h1 {
  max-width: min(100%, 20ch);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.03em;
}

body.case-studies-page--ramp .subpage-hero.case-studies-hero p.lead {
  max-width: min(100%, 48ch);
}

.case-studies-toolbar {
  margin-bottom: clamp(var(--sp-21), 3vw, var(--sp-34));
  padding-bottom: var(--sp-21);
  border-bottom: 1px solid var(--surface-card-border);
}

.case-studies-toolbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-21) var(--sp-34);
}

.case-studies-filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  min-width: min(100%, 22rem);
}

.case-studies-filter-group__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.case-studies-filter-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
}

.case-filter-chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--surface-card-border);
  background: var(--surface-0);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.2;
  transition:
    background 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out),
    color 0.15s var(--ease-out);
}

.case-filter-chip:hover {
  border-color: rgb(0 0 0 / 0.12);
  background: var(--surface-1);
}

.case-filter-chip.is-active {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--surface-0);
}

.case-filter-chip--industry-life-sciences.is-active {
  border-color: #0f766e;
  background: #0f766e;
  color: #f0fdfa;
}

.case-filter-chip--industry-public-sector.is-active {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #eff6ff;
}

.case-filter-chip--industry-industrial-distribution.is-active {
  border-color: #b45309;
  background: #b45309;
  color: #fffbeb;
}

.case-filter-chip--industry-insurance-financial.is-active {
  border-color: #6d28d9;
  background: #6d28d9;
  color: #f5f3ff;
}

.case-filter-chip--industry-critical-comms.is-active {
  border-color: #be123c;
  background: #be123c;
  color: #fff1f2;
}

.case-filter-chip--kind-retrospective.is-active {
  border-color: #0d9488;
  background: #0d9488;
  color: #f0fdfa;
}

.case-filter-chip--kind-prospective.is-active {
  border-color: #475569;
  background: #475569;
  color: #f8fafc;
}

/* ---- Case studies featurette (sticky hero + spotlight grid) ---- */
.case-studies-featurette {
  margin-bottom: clamp(var(--sp-34), 5vw, var(--sp-55));
}

.case-studies-featurette__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--sp-21), 3vw, var(--sp-34));
  align-items: stretch;
}

/* Match hero height to spotlight column; spotlight scrolls internally when tiles overflow */
.case-studies-featurette__grid:not(.case-studies-featurette__grid--single) {
  --case-featurette-height: min(82vh, 46rem);
  height: var(--case-featurette-height);
  max-height: var(--case-featurette-height);
}

.case-studies-featurette__grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 40rem;
  height: auto;
  max-height: none;
}

.case-studies-featurette__hero {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.case-studies-featurette__spotlight {
  display: flex;
  flex-direction: column;
  gap: var(--sp-13);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.case-studies-spotlight-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.case-studies-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem) clamp(1.125rem, 2.5vw, 1.75rem);
}

.case-studies-jump-all {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  width: 100%;
  padding: var(--sp-13) var(--sp-21);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--surface-card-border);
  border-radius: 8px;
  transition:
    background 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out),
    color 0.15s var(--ease-out);
}

.case-studies-jump-all:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--surface-0);
}

.case-studies-archive {
  margin-top: clamp(var(--sp-34), 6vw, var(--sp-55));
  padding-top: clamp(var(--sp-21), 3vw, var(--sp-34));
  border-top: 1px solid var(--surface-card-border);
  scroll-margin-top: calc(var(--site-header-clear) + 0.75rem);
}

.case-studies-archive__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-8);
  color: var(--text-primary);
}

.case-studies-archive__sub {
  margin: 0 0 var(--sp-21);
  max-width: min(100%, 42ch);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Hero card (left) — fills featurette row height */
.case-feature-hero {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.08);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.case-feature-hero__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  text-decoration: none;
  color: inherit;
}

.case-feature-hero__media {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--surface-2);
}

.case-feature-hero__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.case-feature-hero__img--empty {
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: linear-gradient(165deg, var(--surface-2), var(--surface-1));
}

.case-feature-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-34) var(--sp-21) var(--sp-21);
  background: linear-gradient(
    to top,
    rgb(15 23 42 / 0.92) 0%,
    rgb(15 23 42 / 0.45) 45%,
    transparent 72%
  );
}

.case-feature-hero__meta {
  margin: 0 0 var(--sp-8);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}

.case-feature-hero__title {
  margin: 0 0 var(--sp-13);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 22ch;
}

.case-feature-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.95;
}

.case-feature-hero__link:hover .case-feature-hero__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-feature-hero__cta-arrow {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Spotlight compact cards (meta on image) */
.blog-card--case-compact .blog-card__link {
  border-radius: 10px;
}

.blog-card--case-compact .blog-card__thumb--compact {
  position: relative;
  aspect-ratio: 4 / 3;
  border-bottom: none;
}

.blog-card__thumb-overlay--compact {
  justify-content: flex-end;
  gap: var(--sp-5);
  padding: var(--sp-10) var(--sp-8) var(--sp-10);
  background: linear-gradient(
    to top,
    rgb(15 23 42 / 0.92) 0%,
    rgb(15 23 42 / 0.35) 58%,
    transparent 100%
  );
}

.blog-card__thumb-overlay--compact .blog-card__thumb-meta-line {
  margin-top: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
}

.blog-card__thumb-slash {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #fff;
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.65),
    0 0 10px rgb(0 0 0 / 0.35);
}

.blog-card--case-compact .blog-card__body--compact {
  display: flex;
  flex-direction: column;
  padding: var(--sp-11) var(--sp-13) var(--sp-13);
  gap: var(--sp-8);
}

.blog-card--case-compact .blog-card__title {
  font-size: var(--text-sm);
  line-height: 1.4;
  font-weight: 600;
}

.blog-card--case-compact .blog-card__compact-cta {
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--link-marketing);
}

.blog-card--case-compact .blog-card__link:hover .blog-card__compact-cta {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 960px) {
  .case-studies-featurette__grid:not(.case-studies-featurette__grid--single) {
    height: auto;
    max-height: none;
  }

  .case-studies-featurette__grid {
    grid-template-columns: 1fr;
  }

  .case-studies-featurette__spotlight {
    overflow: visible;
    height: auto;
  }

  .case-studies-spotlight-scroll {
    overflow: visible;
    padding-right: 0;
  }

  .case-feature-hero {
    min-height: 0;
    flex: none;
  }

  .case-feature-hero__link {
    flex: none;
  }

  .case-feature-hero__media {
    flex: none;
    min-height: min(52vh, 28rem);
  }

  .case-feature-hero__img,
  .case-feature-hero__img--empty {
    position: absolute;
    inset: 0;
  }

  .case-studies-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

.case-studies-listing {
  margin-bottom: var(--sp-34);
}

.case-studies-fallback {
  margin-bottom: var(--sp-21);
  font-size: var(--text-md);
  color: var(--text-tertiary);
}

.case-studies-empty {
  margin: 0 0 var(--sp-21);
  font-size: var(--text-md);
  color: var(--text-secondary);
}

.case-studies-sections {
  display: block;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-21);
}

.case-studies-grid--ramp {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
}

@media (max-width: 1100px) {
  .case-studies-grid--ramp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .case-studies-grid,
  .case-studies-grid--ramp {
    grid-template-columns: 1fr;
  }
}

/* Blog cards (embedded from Order / Ops posts.json) */
.blog-card {
  margin: 0;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--surface-card-border);
  background: var(--surface-0);
  border-radius: 6px;
  overflow: hidden;
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

body.case-studies-page--ramp .blog-card--case .blog-card__link {
  border-radius: 10px;
}

.blog-card__link:hover {
  border-color: var(--link-marketing);
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.06);
}

.blog-card__link:hover .blog-card__title {
  color: var(--link-marketing);
}

.blog-card__thumb {
  aspect-ratio: 16 / 10;
  background: var(--surface-1);
  border-bottom: 1px solid var(--surface-card-border);
  overflow: hidden;
}

.blog-card__thumb--empty {
  min-height: 8rem;
}

.blog-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Case study archive: badges + date on image */
.blog-card__thumb--case {
  position: relative;
  aspect-ratio: 18 / 10;
  border-bottom: none;
}

.blog-card__thumb--case.blog-card__thumb--empty {
  min-height: 7rem;
  background: var(--surface-2);
}

.blog-card__thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--sp-8);
  padding: var(--sp-10) var(--sp-10) var(--sp-13);
  background: linear-gradient(
    to bottom,
    rgb(15 23 42 / 0.9) 0%,
    rgb(15 23 42 / 0.42) 48%,
    transparent 82%
  );
  pointer-events: none;
}

.blog-card__thumb-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}

.blog-card__thumb-meta-line {
  margin-top: auto;
  align-self: stretch;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.65),
    0 0 12px rgb(0 0 0 / 0.35);
}

.blog-card__thumb-meta-line time {
  color: inherit;
}

.blog-card__thumb-read {
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

/* On-image chips: small footprint, high contrast (readable on busy art) */
.blog-card__thumb-tags .case-tag--on-thumb {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 0.2rem 0.42rem;
  border: none;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.4);
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-life-sciences {
  background: rgb(13 148 136 / 0.95);
  color: #ecfdf5;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-public-sector {
  background: rgb(37 99 235 / 0.95);
  color: #eff6ff;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-industrial-distribution {
  background: rgb(217 119 6 / 0.95);
  color: #fffbeb;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-insurance-financial {
  background: rgb(109 40 217 / 0.95);
  color: #f5f3ff;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-critical-comms {
  background: rgb(225 29 72 / 0.95);
  color: #fff1f2;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--industry-other {
  background: rgb(30 41 59 / 0.92);
  color: #f8fafc;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--kind-retrospective {
  background: rgb(15 23 42 / 0.92);
  color: #f1f5f9;
}

.blog-card__thumb-tags .case-tag--on-thumb.case-tag--kind-prospective {
  background: rgb(51 65 85 / 0.95);
  color: #f8fafc;
}

body.case-studies-page--ramp .blog-card--case .blog-card__body--case {
  padding: var(--sp-13) var(--sp-16) var(--sp-16);
  gap: var(--sp-8);
}

body.case-studies-page--ramp .blog-card--case:not(.blog-card--case-compact) .blog-card__title {
  font-size: var(--text-md);
}

body.case-studies-page--ramp .blog-card--case:not(.blog-card--case-compact) .blog-card__summary {
  font-size: var(--text-sm);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.case-studies-page--ramp .blog-card--case:not(.blog-card--case-compact) .blog-card__outcome {
  font-size: var(--text-sm);
  margin-top: var(--sp-5);
  padding-left: var(--sp-10);
}

/*
 * Flat card variant (Hex-inspired) — opt-in via cardStyle:"flat" in post frontmatter.
 * Light thumbnail background, no dark overlay, illustration-friendly.
 * Reference: steamco-design-lab/references/hex-flat-card-style.png
 */
.blog-card--case-flat .blog-card__thumb,
.blog-card--case-flat .blog-card__thumb--case {
  background: var(--surface-0);
  border-bottom: 1px solid var(--surface-card-border);
}

.blog-card--case-flat .blog-card__thumb--empty {
  background: color-mix(in srgb, var(--surface-1) 40%, var(--surface-0));
}

.blog-card--case-flat .blog-card__thumb img {
  object-fit: contain;
  padding: var(--sp-16);
}

.blog-card--case-flat .blog-card__thumb-overlay {
  background: none;
}

.blog-card--case-flat .blog-card__thumb-tags {
  position: relative;
  z-index: 1;
}

.blog-card--case-flat .blog-card__thumb-tags .case-tag--on-thumb {
  background: var(--surface-1);
  color: var(--text-secondary);
  border: 1px solid var(--surface-card-border);
}

.blog-card--case-flat .blog-card__thumb-meta-line {
  color: var(--text-tertiary);
}

.blog-card--case-flat .blog-card__link {
  border: 1px solid var(--surface-card-border);
  background: var(--surface-0);
}

.blog-card--case-flat .blog-card__link:hover {
  border-color: var(--accent);
}

.blog-card--case-flat .blog-card__title {
  font-weight: 700;
}

.blog-card__body {
  padding: var(--sp-13) var(--sp-21) var(--sp-21);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-8);
  min-width: 0;
}

/* Case study cards: unified tag size (industry + type), color-coded */
.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8);
}

.case-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  padding: 0.28rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.case-tag--industry-life-sciences {
  background: rgb(45 154 140 / 0.14);
  color: #0f766e;
  border-color: rgb(45 154 140 / 0.35);
}

.case-tag--industry-public-sector {
  background: rgb(59 130 246 / 0.12);
  color: #1d4ed8;
  border-color: rgb(59 130 246 / 0.35);
}

.case-tag--industry-industrial-distribution {
  background: rgb(245 158 11 / 0.14);
  color: #b45309;
  border-color: rgb(245 158 11 / 0.4);
}

.case-tag--industry-insurance-financial {
  background: rgb(139 92 246 / 0.12);
  color: #6d28d9;
  border-color: rgb(139 92 246 / 0.35);
}

.case-tag--industry-critical-comms {
  background: rgb(244 63 94 / 0.1);
  color: #be123c;
  border-color: rgb(244 63 94 / 0.35);
}

.case-tag--industry-other {
  background: var(--surface-1);
  color: var(--text-secondary);
  border-color: var(--surface-card-border);
}

.case-tag--kind-retrospective {
  background: rgb(13 148 136 / 0.12);
  color: #0f766e;
  border-color: rgb(13 148 136 / 0.4);
}

.case-tag--kind-prospective {
  background: rgb(71 85 105 / 0.12);
  color: #334155;
  border-color: rgb(71 85 105 / 0.35);
}

.blog-card__topic {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--link-marketing);
  align-self: flex-start;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-8);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.blog-card__source-hint {
  margin-left: auto;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--surface-card-border);
}

.blog-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
  color: var(--text-primary);
  transition: color 0.2s var(--ease-out);
}

.blog-card__summary {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

.blog-card__outcome {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  border-left: 2px solid var(--link-marketing);
  padding-left: var(--sp-13);
}

.blog-card--case .blog-card__outcome {
  margin-top: var(--sp-5);
}

@media (max-width: 639px) {
  .blog-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-card__source-hint {
    margin-left: 0;
  }
}

