:root {
  --bg: #0A0A0A;
  --text: #F5F5F0;
  --text-muted: #8A8A85;
  --line: #2A2A28;
  --card-bg: #0A0A0A;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 0.7s;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Keep anchored sections clear of the fixed nav on jump */
html { scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 20px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 16px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  /* Horizontal only (longhand) — a `padding` shorthand here would reset the
     vertical padding of elements that are also .wrap, e.g. .hero and footer */
  padding-left: 32px;
  padding-right: 32px;
}

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- NAV ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9), rgba(10,10,10,0));
  backdrop-filter: blur(4px);
}

.nav-name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  transition: color 0.25s var(--ease-out);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--line);
  padding: 13px 20px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out);
}
.nav-toggle:hover { border-color: var(--text); }

/* ---------- HERO ENTRANCE ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-text {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  /* clip, not hidden: overflow:hidden creates a scroll container, which
     breaks the img's view() scroll-driven animation timeline */
  overflow: hidden;
  overflow: clip;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
}

.frame .corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.frame .corner.tl { top: 12px; left: 14px; }
.frame .corner.br { bottom: 12px; right: 14px; text-align: right; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) forwards 0.05s;
}

/* Terminal-style typed eyebrow (JS replaces the fade with typing) */
.hero-eyebrow.typing {
  opacity: 1;
  animation: none;
}
.type-cursor {
  display: inline-block;
  animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin-top: 32px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) forwards 0.3s;
}

.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) forwards 0.42s;
}

/* ---------- BUTTONS ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 14px 24px;
  border: 1px solid var(--line);
  transition: background 0.25s var(--ease-out),
              color 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out),
              transform 0.15s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-solid:hover { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--text); }

/* ---------- SECTION SHARED ---------- */
section { padding: 120px 0; border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* Hidden state only applies when JS is running (html.js),
   so content stays visible if the script fails to load. */
.js .reveal,
.js .reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--reveal-duration) var(--ease-out),
              transform var(--reveal-duration) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.in-view,
.js .reveal-group.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- MASKED LINE REVEALS ---------- */
/* Headings are hidden until JS wraps their lines in masks; each line
   then slides up out of its mask with a per-line stagger. */
.js .split-lines { visibility: hidden; }
.js .split-lines.split,
.js .split-lines.lines-done { visibility: visible; }

.split-lines .line {
  display: block;
  overflow: hidden;
}
.split-lines .line-inner {
  display: block;
  transform: translateY(112%);
  transition: transform 0.8s var(--ease-out);
}
.split-lines.lines-in .line-inner { transform: none; }

/* ---------- LABEL WIPE ---------- */
/* A solid bar sweeps across eyebrow labels, revealing the text as it passes. */
.js .wipe { opacity: 1; transform: none; }

.wipe-box {
  position: relative;
  display: inline-block;
}
.wipe-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
}
.js .wipe .wipe-text { opacity: 0; }
.js .wipe.in-view .wipe-box::after {
  animation: wipeBar 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.js .wipe.in-view .wipe-text {
  animation: wipeText 0.9s linear forwards;
}

@keyframes wipeBar {
  0%   { transform: scaleX(0); transform-origin: left; }
  45%  { transform: scaleX(1); transform-origin: left; }
  55%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
@keyframes wipeText {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

/* ---------- SCROLL-LINKED IMAGE SETTLE ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .frame img {
      animation: frameZoomSettle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 55%;
    }
    /* The pinned About animation drives the frame itself; the inner
       settle would compound with it. */
    .pin-on #about .frame img { animation: none; }
    @keyframes frameZoomSettle {
      from { transform: scale(1.1); }
      to { transform: scale(1); }
    }
  }
}

/* ---------- ABOUT ---------- */
/* Base layout: statement | portrait | name + bio. The pinned scroll
   animation (JS adds .pin-on to <html>) scales the portrait down from a
   fullscreen cover state and slides the side texts in. */
#about { padding-top: 0; }

.about-sticky {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px) 1fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.about-statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.about-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.about-right .about-body { font-size: 0.95rem; }

.about-body {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
}
.about-body p { margin-bottom: 20px; }
.about-body strong { color: var(--text); font-weight: 500; }

/* Pinned scroll state (desktop, motion allowed, JS on) */
.pin-on .about-stage { height: 230vh; }
.pin-on .about-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0;
}
.pin-on .about-center {
  position: relative;
  z-index: 2;
}
.pin-on .about-center .frame {
  transform-origin: center;
  will-change: transform;
}
.pin-on .about-center .corner {
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.pin-on .about-stage.docked .about-center .corner { opacity: 1; }

.pin-on .about-left,
.pin-on .about-right {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  opacity: 0;
}
.pin-on .about-left { transform: translateX(-24px); }
.pin-on .about-right { transform: translateX(24px); }
.pin-on .about-stage.texts-in .about-left,
.pin-on .about-stage.texts-in .about-right {
  opacity: 1;
  transform: none;
}

/* The scaled-up frame reaches beyond the viewport during the pin */
body { overflow-x: clip; }

/* ---------- TIMELINE ---------- */
.timeline-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 64px 0 28px;
}

.timeline {
  position: relative;
  padding-left: 28px;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--text-muted);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  padding-top: 1px;
}

.timeline-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 48ch;
}

.cert-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 32px;
}

.cert-note {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.cert-note a { color: var(--text); }
.cert-note a .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.cert-note a:hover .arrow,
.cert-note a:focus-visible .arrow { transform: translateX(4px); }

/* ---------- JOURNEY DETAIL PANEL ---------- */
.journey-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  /* Stretch (not start) so the panel column matches the timeline
     list's full height, rather than a fixed fraction of the viewport. */
  align-items: stretch;
}

.timeline-panel {
  position: sticky;
  top: 140px;
  /* Cap how tall the sticky box can get so it still releases and
     scrolls with the page on very long lists — comfortably taller
     than the current 6-item timeline without being unbounded. */
  max-height: calc(100vh - 180px);
}
/* A card that spans the full timeline-list height (not a fixed
   fraction of the viewport) so every hovered item reads at the same
   size — the long entries (e.g. Favour Capital's bullets + company
   chips) scroll internally rather than stretching the panel far down,
   while short entries no longer collapse to a tiny box. */
.timeline-panel.is-active {
  border: 1px solid var(--line);
  padding: 32px;
  height: 100%;
  overflow-y: auto;
}

.timeline-trigger {
  position: relative;
  display: block;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.timeline-trigger::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.timeline-item.has-detail:hover .timeline-trigger::after,
.timeline-trigger:focus-visible::after { transform: scaleX(1); }

/* Collapsible detail — open by default (no-JS/pre-JS), collapsed once JS
   runs, matching the Services accordion pattern. Forced open when the
   node has been relocated into the sticky panel on desktop. */
.timeline-detail { display: grid; grid-template-rows: 1fr; margin-top: 16px; }
.timeline-detail-inner { overflow: hidden; min-height: 0; }
.js .timeline-detail {
  grid-template-rows: 0fr;
  margin-top: 0;
  transition: grid-template-rows 0.45s var(--ease-out), margin-top 0.45s var(--ease-out);
}
.js .timeline-item.open .timeline-detail { grid-template-rows: 1fr; margin-top: 16px; }
.js .timeline-panel .timeline-detail { grid-template-rows: 1fr; margin-top: 0; }

.timeline-detail-content { padding-top: 4px; }

.timeline-detail-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 48ch;
}

.timeline-detail-list {
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 48ch;
}
.detail-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}

.detail-sublabel {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 24px 0 12px;
}

/* Logo marquee — a continuously scrolling wall of client logos on light
   tiles so each logo stays legible on the dark panel. Two identical
   .logo-set groups (the second aria-hidden) let the track translate a
   clean -50% for a seamless loop; the trailing padding on each set makes
   the seam gap match the internal gap. Edges fade via a mask. */
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track {
  display: flex;
  width: max-content;
  animation: logo-marquee 24s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-set {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}
@keyframes logo-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.logo-tile {
  flex: none;
  width: 124px;
  height: 60px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
}
.logo-tile img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
  .logo-marquee { overflow-x: auto; }
}

/* Static logo row — for a small, fixed set of logos (e.g. the insurers
   whose agents use InsurAktif) where a scrolling marquee would be
   pointless. Reuses .logo-tile. */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* A documentation photo inside a timeline detail (e.g. the Envision
   team at a summit) — full-width within the panel, natural aspect. */
.detail-photo {
  margin-top: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  max-width: 200px;
}
.detail-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- VENTURES ---------- */
.venture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.content-grid { grid-template-columns: repeat(3, 1fr); }

.ig-cta {
  margin-top: 1px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: none;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.ig-handle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}
.ig-handle span { color: var(--text-muted); font-weight: 500; }

.venture-card {
  position: relative;
  background: var(--card-bg);
  padding: 48px 40px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.venture-card:hover,
.venture-card:focus-within {
  background: var(--text);
  color: var(--bg);
}

.venture-card:hover .venture-tag,
.venture-card:hover .venture-desc,
.venture-card:hover .venture-link,
.venture-card:focus-within .venture-tag,
.venture-card:focus-within .venture-desc,
.venture-card:focus-within .venture-link {
  color: var(--bg);
  opacity: 0.7;
}

.venture-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s var(--ease-out);
}

.venture-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 20px 0 12px;
}

.venture-link {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color 0.3s var(--ease-out);
}
/* Stretch the card's link over the whole card */
.venture-link::before {
  content: '';
  position: absolute;
  inset: 0;
}
.venture-link:focus-visible { outline: none; }
.venture-link .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.venture-card:hover .arrow,
.venture-card:focus-within .arrow { transform: translateX(4px); }

.venture-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 40ch;
  transition: color 0.3s var(--ease-out);
}

/* ---------- SERVICES ACCORDION ---------- */
.service-list {
  list-style: none;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.service-row { border-bottom: 1px solid var(--line); }

.service-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(16px, 2.1vw, 26px) 8px;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  transition: background 0.3s var(--ease-out),
              color 0.3s var(--ease-out),
              padding-left 0.3s var(--ease-out);
}
.service-head:hover,
.service-row.open .service-head {
  background: var(--text);
  color: var(--bg);
  padding-left: 24px;
}
.service-head:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -4px;
}

.service-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  align-self: center;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.service-head:hover .service-index,
.service-row.open .service-head .service-index {
  color: var(--bg);
  opacity: 0.55;
}

.service-name {
  flex: 1;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.service-toggle {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: 8px;
}
.service-toggle::before,
.service-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.service-toggle::before { width: 16px; height: 1.5px; }
.service-toggle::after {
  width: 1.5px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
}
.service-row.open .service-toggle::after {
  transform: translate(-50%, -50%) scaleY(0);
}

/* Collapsible panel — open by default (no-JS/pre-JS), collapsed once JS runs */
.service-panel { display: grid; grid-template-rows: 1fr; }
.service-panel-inner { overflow: hidden; min-height: 0; }
.js .service-panel {
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.js .service-row.open .service-panel { grid-template-rows: 1fr; }

.service-panel-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 6px 8px 40px;
}
.service-panel-content.has-work {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.service-desc {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
}

.service-lede {
  display: grid;
  gap: 28px;
  align-content: start;
}

.service-highlights-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.service-highlight-list {
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 560px;
}
.service-highlight {
  background: var(--card-bg);
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
/* A row with a documentation photo. Scoped to .has-thumb (rather than
   changing .service-highlight itself) so the other highlight rows
   across the site, which have no thumb and rely on the plain
   space-between layout above, are unaffected. */
.service-highlight.has-thumb {
  align-items: center;
}
.service-highlight-thumb {
  flex: none;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card-bg);
}
.service-highlight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Multiple photos for one client (e.g. several training-session shots) —
   a small contact-sheet strip instead of picking just one. Wider than
   the single-photo thumb rather than cramming three slices into 72px,
   so each photo stays legible; that row's text starts a bit later than
   its neighbours, which reads fine in a list this compact. */
.service-highlight-thumb.thumb-trio {
  width: 152px;
  display: flex;
  gap: 4px;
}
.service-highlight-thumb.thumb-trio .thumb-third {
  flex: 1;
  height: 100%;
  overflow: hidden;
}
.service-highlight-thumb.thumb-trio .thumb-third img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Two photos for one client — same idea as .thumb-trio, one narrower
   step down. */
.service-highlight-thumb.thumb-pair {
  width: 112px;
  display: flex;
  gap: 4px;
}
.service-highlight-thumb.thumb-pair .thumb-half {
  flex: 1;
  height: 100%;
  overflow: hidden;
}
.service-highlight-thumb.thumb-pair .thumb-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Groups name+meta as one flex item next to the thumb (rather than three
   siblings spread across the row by .service-highlight's own
   space-between) — only needed on has-thumb rows. */
.service-highlight-text {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.service-highlight-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
}
.service-highlight-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* A highlight row that links out (e.g. an ongoing client). The <li> keeps
   its card background/padding; the anchor re-creates the name/meta
   space-between layout and carries the hover affordance. */
.service-highlight-link {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: inherit;
}
.service-highlight-link .service-highlight-meta {
  transition: color 0.25s var(--ease-out);
}
.service-highlight-link:hover .service-highlight-meta,
.service-highlight-link:focus-visible .service-highlight-meta {
  color: var(--text);
}
.hl-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}
.service-highlight-link:hover .hl-arrow,
.service-highlight-link:focus-visible .hl-arrow {
  transform: translateX(3px);
}

/* On narrow screens the meta can be a longer descriptor than the compact
   "12 pax" case, so stack name over meta instead of forcing a nowrap row
   that would overflow. */
@media (max-width: 600px) {
  /* has-thumb rows keep the thumb inline (row) rather than stacking it
     above the text — only the name/meta pair inside stacks. */
  .service-highlight:not(.has-thumb),
  .service-highlight-link,
  .service-highlight-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .service-highlight-meta { white-space: normal; }
}

.service-work-card {
  border: 1px solid var(--line);
  background: var(--card-bg);
  max-width: 460px;
}
.service-work-card .case-body { padding: 24px 28px 28px; }

@media (max-width: 720px) {
  .service-panel-content.has-work { grid-template-columns: 1fr; }
  .service-work-card { max-width: none; }
}

/* ---------- WORK / CASE STUDIES ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

/* Invert via background/color swap, not filter: invert(1), so real
   photographs in .case-image don't turn into negatives on hover */
.case-card {
  background: var(--card-bg);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.case-card:hover {
  background: var(--text);
  color: var(--bg);
}
.case-card:hover .case-venture,
.case-card:hover .case-desc {
  color: var(--bg);
  opacity: 0.7;
}
.case-card:hover .case-tag {
  color: var(--bg);
  border-color: rgba(10, 10, 10, 0.35);
}

.case-image {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    45deg,
    #151513,
    #151513 10px,
    #0A0A0A 10px,
    #0A0A0A 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-image span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 12px;
  border: 1px solid var(--line);
}

.case-body { padding: 32px 36px 36px; }

.case-venture {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  transition: color 0.3s var(--ease-out);
}

.case-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 12px;
}

.case-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 20px;
  transition: color 0.3s var(--ease-out);
}

.case-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
}

.content-intro {
  max-width: 56ch;
  margin-bottom: 48px;
}

/* ---------- PRODUCTS ---------- */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---------- SPEAKING & APPEARANCES ---------- */
.appearances {
  list-style: none;
  border-top: 1px solid var(--line);
}

.appearance-item {
  display: grid;
  grid-template-columns: 84px 132px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
/* A row with no photo yet (each .appearance-item is its own grid, so this
   can be overridden per-row) — collapses the thumb track instead of
   leaving an empty placeholder box. */
.appearance-item.no-thumb {
  grid-template-columns: 84px 1fr auto;
}

.appearance-thumb {
  width: 132px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card-bg);
}
.appearance-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Two photos for one row (e.g. a team slide + a group shot) — split the
   same thumb footprint into a side-by-side pair instead of widening the
   column, so title alignment across rows is unaffected. */
.appearance-thumb.thumb-pair {
  display: flex;
  gap: 2px;
}
.thumb-half {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.appearance-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.appearance-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}

.appearance-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.appearance-type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
}

@media (max-width: 560px) {
  .appearance-item,
  .appearance-item.no-thumb {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .appearance-thumb { width: 100%; }
  .appearance-type { justify-self: start; }
}

/* ---------- MENTORING CTA ---------- */
.mentor-cta .section-title { margin-bottom: 0; }

.cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.mentor-cta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 40px;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.footer-meta a {
  position: relative;
  align-self: flex-end;
  transition: color 0.25s var(--ease-out);
}
.footer-meta a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.footer-meta a:hover,
.footer-meta a:focus-visible { color: var(--text); }
.footer-meta a:hover::after,
.footer-meta a:focus-visible::after { transform: scaleX(1); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 132px;
  }
  .about-sticky { min-height: auto; padding: 80px 0 0; }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
  }
  .about-center { max-width: 340px; }

  .journey-layout { grid-template-columns: 1fr; }
  .timeline-panel { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  nav { padding: 20px 24px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }
  nav:has(.nav-links.open) {
    background: var(--bg);
    backdrop-filter: none;
  }
  .venture-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .venture-card { padding: 40px 28px; min-height: 0; }
  .case-body { padding: 28px 24px 32px; }
  .ig-cta { flex-direction: column; align-items: flex-start; }
  .ig-cta .btn { width: 100%; text-align: center; }
  section { padding: 80px 0; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; gap: 2px; }
  .footer-meta a {
    align-self: flex-start;
    padding: 9px 0;
  }

  /* Full-width, evenly-sized buttons + larger touch targets */
  .hero-cta,
  .cta-group { width: 100%; gap: 12px; }
  .hero-cta .btn,
  .cta-group .btn {
    flex: 1 1 100%;
    text-align: center;
    padding: 16px 24px;
  }
  .mentor-cta { gap: 28px; }
}

@media (max-width: 560px) {
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- SERVICE HIGHLIGHT PHOTO LIGHTBOX ---------- */
/* Click any Services-section thumbnail (single, pair, or trio) to open a
   larger scrollable carousel of that row's photos, docked to the right
   rather than a centered modal. Backdrop dims the page and closes on
   click-away; `inert` (toggled in JS) swaps which side of the page is
   reachable by keyboard/AT instead of a manual focus trap. */
.service-highlight-thumb {
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out);
}
.service-highlight-thumb:hover,
.service-highlight-thumb:focus-visible {
  border-color: var(--text);
  outline: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox-panel {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: min(420px, calc(100vw - 80px));
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.photo-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
  transition: border-color 0.25s var(--ease-out);
}
.photo-lightbox-close:hover,
.photo-lightbox-close:focus-visible { border-color: var(--text); }

.photo-lightbox-track {
  height: min(55vh, 480px);
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.photo-lightbox-track::-webkit-scrollbar { display: none; }

.photo-lightbox-slide {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
}
.photo-lightbox-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.photo-lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.photo-lightbox-prev,
.photo-lightbox-next {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: border-color 0.25s var(--ease-out);
}
.photo-lightbox-prev:hover,
.photo-lightbox-prev:focus-visible,
.photo-lightbox-next:hover,
.photo-lightbox-next:focus-visible { border-color: var(--text); }
.photo-lightbox-prev:disabled,
.photo-lightbox-next:disabled { opacity: 0.3; cursor: default; }
.photo-lightbox-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .photo-lightbox-panel {
    right: 16px;
    left: 16px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .reveal,
  .js .reveal-group > * { opacity: 1; transform: none; }
  .hero-eyebrow, .hero-sub, .hero-cta { opacity: 1; }
  .js .split-lines { visibility: visible; }
  .js .wipe .wipe-text { opacity: 1; }
  .wipe-box::after { display: none; }
  .scroll-progress { display: none; }
}
