/* ============================================
   CARTHAGO HOLDINGS
   Alpha-style layout: snap scroll, fixed images,
   grid overlap, scroll dots
   ============================================ */

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

:root {
  --black:      #111114;
  --black-mid:  #1A1A1F;
  --black-soft:  #222228;
  --accent:     #A0A0A8;
  --accent-bright: #C8C8D0;
  --accent-dim: rgba(160,160,168,0.12);
  --white:      #EDEDF0;
  --off-white:  #F0F0F2;
  --cool-gray:  #D8D8DC;
  --gray-300:   #B0B0B8;
  --gray-400:   #88888F;
  --gray-500:   #68686F;
  --gray-600:   #48484F;
  --gray-800:   #2A2A30;
  --text:       #18181B;

  --ff-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ff-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --container: 1400px;
  --page-margin: clamp(var(--sp-lg), 5vw, var(--sp-2xl));
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:  cubic-bezier(0.33, 1, 0.68, 1);

  /* Golden ratio scale (φ = 1.618) */
  --phi:       1.618;
  --sp-xs:     6px;    /* 10 / φ */
  --sp-sm:     10px;   /* 16 / φ */
  --sp-md:     16px;   /* base */
  --sp-lg:     26px;   /* 16 × φ */
  --sp-xl:     42px;   /* 26 × φ */
  --sp-2xl:    68px;   /* 42 × φ */
  --sp-3xl:    110px;  /* 68 × φ */
  --sp-4xl:    178px;  /* 110 × φ */

  --fs-xs:     10px;
  --fs-sm:     13px;   /* 10 × φ^0.5 */
  --fs-md:     16px;   /* base */
  --fs-lg:     26px;   /* 16 × φ */
  --fs-xl:     42px;   /* 26 × φ */
  --fs-2xl:    68px;   /* 42 × φ */
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-sans);
  color: var(--text);
  background: var(--black);
  line-height: var(--phi);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--black); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

em {
  font-family: var(--ff-sans);
  font-style: normal;
  color: var(--accent-bright);
  font-weight: 300;
}

/* ══════════════════════════════════════
   LOADING SCREEN
   ══════════════════════════════════════ */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--black);
  pointer-events: none;
  transition: opacity 2s var(--ease);
  will-change: opacity;
}

.loader-overlay.fade-out {
  opacity: 0;
}

.loader-overlay.done {
  display: none;
}

/* Nav logo — starts centered and big, animates to corner */
.nav-logo-link {
  position: relative;
  z-index: 10001;
  overflow: visible;
}

.nav-inner {
  overflow: visible;
}

.nav-logo-mark {
  height: var(--sp-2xl);  /* 68px = nav height / φ */
  width: auto;
  visibility: hidden;  /* Hidden until loader positions it */
}

.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--accent); color: var(--white);
  padding: var(--sp-sm) var(--sp-lg); font-size: var(--fs-sm); font-weight: 500; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

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

.label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.label::before {
  content: '';
  width: var(--sp-xl);
  height: 1.5px;
  background: var(--accent);
}

/* ══════════════════════════════════════
   SITE CONTAINER — Desktop snap scroll
   ══════════════════════════════════════ */
.site {
  opacity: 0;
  transition: opacity 0.5s;
}
.site.loaded { opacity: 1; }

@media (min-width: 1024px) {
  html.snap-scroll .site {
    height: 100vh;
    overflow-y: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  /* Sub-page snap scroll (only pages without #page wrapper) */
  html.snap-scroll.sub-snap #main {
    height: 100vh;
    overflow-y: scroll;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html.snap-scroll.sub-snap #main::-webkit-scrollbar { display: none; }

  /* Force every sub-page section to exactly 100vh in snap mode */
  html.snap-scroll.sub-snap .sub-hero,
  html.snap-scroll.sub-snap .sub-section {
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Middle section: clip content, transparent bg so hero canvas shows through */
  html.snap-scroll.sub-snap .sub-section--bordered {
    overflow: hidden;
    background: transparent;
    border-top: none;
  }

  /* Hero + Closing: overflow visible so canvases bleed across sections */
  html.snap-scroll.sub-snap .sub-hero,
  html.snap-scroll.sub-snap .page-part--closing {
    overflow: visible;
  }

  /* Hero canvas spans 2 full sections — mask bleeds into section 2 */
  html.snap-scroll.sub-snap .hero-canvas {
    height: 200vh;
    -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 32%, white 22%, transparent 72%);
    mask-image: radial-gradient(ellipse 90% 65% at 50% 32%, white 22%, transparent 72%);
  }

  /* Ensure section-2 content sits above the canvas bleeding from section-1 */
  html.snap-scroll.sub-snap .sub-section-inner {
    position: relative;
    z-index: 2;
  }

  /* Closing section: drop heavy padding, let closing-inner handle layout */
  html.snap-scroll.sub-snap .page-part--closing {
    padding: 0;
  }

  html.snap-scroll.sub-snap .closing-inner {
    min-height: 0;
    height: 100%;
    padding-top: var(--sp-xl);
    padding-bottom: var(--sp-lg);
  }

  html.snap-scroll.sub-snap [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ══════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  transition: transform 0.6s var(--ease), background 0.4s;
  overflow: visible;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sp-3xl);
  padding: 0 var(--page-margin);
}

/* ══════════════════════════════════════
   SITE LOGO — Fixed, aligned with dots
   ══════════════════════════════════════ */
.site-logo {
  display: none;
}

/* 9-dot menu grid — top left
   Button = sp-xl (42px) wide so grid center aligns
   with logo center on opposite side */
.nav-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: var(--sp-xl);
  height: var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  opacity: 0;  /* Hidden during loader, revealed by JS */
}
.nav-menu-btn:hover { opacity: 0.7; }

.dot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xs);  /* 6px */
  width: var(--sp-lg);  /* 26px */
  height: var(--sp-lg);
}

.dot-grid span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transition: background 0.3s;
}

.nav-menu-btn:hover .dot-grid span {
  background: var(--accent-bright);
}

/* ─── Fullscreen menu ─── */
.nav-menu {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  visibility: hidden;
  overflow-y: auto;
}

.nav-menu.open {
  pointer-events: auto;
  visibility: visible;
}

.nav-menu-bg {
  position: fixed;
  inset: 0;
  background: var(--black);
  opacity: 0;
}

.nav-menu-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  overflow-y: auto;
  padding: var(--sp-3xl) var(--page-margin);
  padding-left: calc(var(--page-margin) + var(--sp-2xl));
  max-width: 780px;
}

.nav-menu-links {
  display: flex;
  flex-direction: column;
}

.nav-menu-link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-lg);
  padding: var(--sp-sm) 0;
  text-decoration: none;
  position: relative;
  opacity: 0;
  transform: translateY(var(--sp-lg));
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.nav-menu-link .nml-num {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--gray-600);
  min-width: var(--sp-lg);
  transition: color 0.3s;
}

.nav-menu-link .nml-text {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 3.5vw, var(--fs-xl));
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--gray-400);
  transition: color 0.3s;
}

.nav-menu-link:hover .nml-text {
  color: var(--accent-bright);
}

.nav-menu-link:hover .nml-num {
  color: var(--accent);
}

/* Hover line */
.nav-menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: calc(var(--sp-lg) + var(--sp-lg));
  right: 0;
  height: 1px;
  background: var(--gray-800);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav-menu-link:hover::after {
  transform: scaleX(1);
}

.nav-menu-divider {
  width: var(--sp-4xl);
  height: 1px;
  background: var(--gray-800);
  margin: var(--sp-xl) 0;
  margin-left: calc(var(--sp-lg) + var(--sp-lg));
  opacity: 0;
}

.nav-menu-group-label {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-md);
  margin-left: calc(var(--sp-lg) + var(--sp-lg));
  opacity: 0;
}

.nav-menu-footer {
  display: flex;
  gap: var(--sp-xl);
  margin-top: var(--sp-3xl);
  margin-left: calc(var(--sp-lg) + var(--sp-lg));
  opacity: 0;
}

.nav-menu-footer a {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-menu-footer a:hover {
  color: var(--accent-bright);
}

/* Dots → X morph */
.nav-menu-btn.active .dot-grid {
  transform: rotate(45deg);
}

.nav-menu-btn.active .dot-grid span {
  opacity: 0;
  transition: opacity 0.2s, background 0.3s;
}

.nav-menu-btn.active .dot-grid span:nth-child(2),
.nav-menu-btn.active .dot-grid span:nth-child(4),
.nav-menu-btn.active .dot-grid span:nth-child(5),
.nav-menu-btn.active .dot-grid span:nth-child(6),
.nav-menu-btn.active .dot-grid span:nth-child(8) {
  opacity: 1;
}

/* Logo mark — top right */
.nav-logo-link {
  transition: opacity 0.3s;
}
.nav-logo-link:hover { opacity: 0.7; }

/* Wordmark (used in tree etc.) */
.wm-name {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--accent-bright);
  letter-spacing: 0.35em;
  line-height: 1.2;
}

.wm-sub {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.6em;
  line-height: 1.4;
}


/* ══════════════════════════════════════
   SCROLL DOTS — Fixed right side
   ══════════════════════════════════════ */
.scroll-dots {
  position: fixed;
  right: var(--page-margin);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--sp-xl);  /* 42px — matches logo width */
  gap: var(--sp-md);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.scroll-dots.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-dots .dot {
  width: var(--sp-md);
  height: var(--sp-lg);
  border-radius: 0;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.scroll-dots .dot::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: rgba(237,237,240,0.4);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: width 200ms ease-out, height 200ms ease-out, background 200ms ease-out;
}
.scroll-dots .dot:hover::before {
  width: var(--sp-xs);
  height: var(--sp-xs);
  background: rgba(237,237,240,0.7);
}
.scroll-dots .dot.current::before {
  background: var(--accent-bright);
  width: var(--sp-xs);
  height: var(--sp-xs);
}

@media (max-width: 1023px) {
  .scroll-dots { display: none; }
}

/* ══════════════════════════════════════
   PAGE PARTS — Base
   ══════════════════════════════════════ */
.page-part {
  margin: 0;
  min-height: 100vh;
  position: relative;
}

/* ══════════════════════════════════════
   HERO — Eagle image
   ══════════════════════════════════════ */
.page-part--hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

.page-part--hero .atlas-img-wrap {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 61.8%;    /* φ / (1 + φ) — golden ratio split */
  right: 38.2%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to left, transparent 0%, white 20%, white 60%, transparent 100%),
                      linear-gradient(to bottom, white 60%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image: linear-gradient(to left, transparent 0%, white 20%, white 60%, transparent 100%),
              linear-gradient(to bottom, white 60%, transparent 100%);
  mask-composite: intersect;
}

.page-part--hero .atlas-img {
  height: 130vh;
  width: auto;
  object-fit: contain;
  position: absolute;
  top: -10vh;
  left: 50%;
  transform: translateX(-50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-margin);
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.hero-title {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 4.5vw, var(--fs-2xl));
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.hero-wordmark {
  font-size: clamp(var(--fs-xl), 5vw, var(--fs-2xl));
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--accent-bright);
  line-height: 1.3;
}

.hero-wordmark .line:last-child {
  font-size: 0.48em;
  font-weight: 400;
  letter-spacing: 0.55em;
  color: var(--gray-400);
}

.line { display: block; overflow: hidden; }
.line-inner { display: block; }

.hero-sub {
  font-size: clamp(var(--fs-md), 1.4vw, var(--fs-lg));
  font-weight: 300;
  line-height: var(--phi);
  color: rgba(237,237,240,0.5);
  max-width: 544px;  /* sp-2xl × 8 */
  margin-top: var(--sp-xl);
  margin-left: auto;
}

.hero-bottom {
  position: absolute;
  bottom: clamp(var(--sp-lg), 5vh, var(--sp-2xl));
  right: var(--page-margin);
  z-index: 3;
}

.scroll-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  color: rgba(237,237,240,0.25);
  transition: color 0.3s;
}
.scroll-cta:hover { color: rgba(237,237,240,0.5); }

.scroll-cta span {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scroll-bar {
  width: var(--sp-2xl);
  height: 1px;
  background: rgba(237,237,240,0.1);
  position: relative;
  overflow: hidden;
}

.scroll-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scrollSlide 2.5s ease-in-out infinite;
}

@keyframes scrollSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  50.01% { transform: translateX(-100%); }
  100% { transform: translateX(-100%); }
}

@media (max-width: 1023px) {
  .page-part--hero .atlas-img-wrap { display: none; }
  .hero-content {
    align-items: center;
    text-align: center;
  }
  .hero-wordmark {
    letter-spacing: 0.2em;
  }
  .hero-wordmark .line:last-child {
    letter-spacing: 0.35em;
  }
  .hero-sub {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 600px) {
  .page-part--hero { min-height: 90vh; }
  .hero-wordmark {
    letter-spacing: 0.12em;
  }
  .hero-wordmark .line:last-child {
    letter-spacing: 0.25em;
  }
}

/* ══════════════════════════════════════
   IMAGE-SIDE PANELS — Alpha-style
   Grid: 54% image | 6% overlap | auto content
   ══════════════════════════════════════ */
.page-part--side {
  background: var(--black);
  display: flex;
  align-items: center;
}

.page-part--side .part-inner {
  width: 100%;
}

/* ── Mobile: stacked layout ── */
@media (max-width: 1023px) {
  .page-part--side .part-inner {
    display: flex;
    flex-direction: column;
  }

  .page-part--side .part-image {
    order: 1;
    width: 100%;
    min-height: 50vh;
    overflow: hidden;
    background: var(--black-mid);
  }

  .page-part--side .part-content {
    order: 2;
    padding: var(--sp-2xl) var(--sp-lg) var(--sp-2xl);
  }
}

@media (max-width: 600px) {
  .page-part--side .part-image { min-height: 40vh; }
}

/* ── Desktop: Alpha grid layout ── */
@media (min-width: 1024px) {
  .page-part--side .part-inner {
    min-height: 100vh;
    margin-left: var(--page-margin);
    margin-right: var(--page-margin);
    display: grid;
    align-items: center;
  }

  /* Image-left: image cols 1-2, content cols 2-3 (overlap in col 2) */
  .page-part--img-left .part-inner {
    grid-template-columns: 54% 6% auto;
    grid-template-rows: clamp(var(--sp-2xl), 12vh, var(--sp-4xl)) auto clamp(var(--sp-2xl), 12vh, var(--sp-4xl));
  }

  .page-part--img-left .part-image {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    align-self: flex-start;
  }

  .page-part--img-left .part-content {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    z-index: 10;
  }

  /* Image-right: content cols 1-2, image cols 2-3 */
  .page-part--img-right .part-inner {
    grid-template-columns: auto 6% 54%;
    grid-template-rows: clamp(var(--sp-2xl), 12vh, var(--sp-4xl)) auto clamp(var(--sp-2xl), 12vh, var(--sp-4xl));
  }

  .page-part--img-right .part-image {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    align-self: flex-start;
  }

  .page-part--img-right .part-content {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    z-index: 10;
    justify-self: end;
  }


  /* Image area sizing — Alpha exact pattern (placeholder for now) */
  .page-part--side .part-image {
    width: 100%;
    height: 76vh;
    min-height: calc(100vh - var(--sp-4xl) - var(--sp-3xl));
    max-height: calc(100vh - var(--sp-3xl));
    overflow: hidden;
    position: relative;
    background: var(--black-mid);
  }
}


/* Content text styling */
.part-content-inner {
  max-width: 476px;  /* sp-2xl × 7 */
}

.page-part--img-right .part-content-inner {
  margin-left: auto;
}

.part-heading {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 3.5vw, var(--fs-xl));
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.part-body {
  font-size: clamp(var(--fs-sm), 1.1vw, var(--fs-md));
  line-height: var(--phi);
  color: rgba(237,237,240,0.4);
  margin-bottom: var(--sp-sm);
}

/* ══════════════════════════════════════
   VERTICALS — Hierarchy Tree
   ══════════════════════════════════════ */
.page-part--verticals {
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3xl) 0;
  position: relative;
  overflow: visible;
}

.page-part--verticals .container {
  position: relative;
  z-index: 2;
}

.verticals-header {
  margin-bottom: var(--sp-3xl);  /* φ³ = 110px — golden ratio spacing */
  text-align: center;
}

.verticals-statement {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 2.5vw, var(--fs-xl));
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: var(--phi);
}

.page-part--verticals .hierarchy {
  max-width: 100%;
  margin: 0 auto;
}

/* Hierarchy tree */
.hierarchy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 var(--sp-lg);
}

.h-parent { display: flex; justify-content: center; }

.h-parent-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: var(--sp-lg);
}

.h-parent-wordmark .wm-name {
  font-size: var(--fs-lg);
}

.h-parent-wordmark .wm-sub {
  font-size: var(--fs-xs);
}

.h-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.h-trunk {
  width: 1px;
  height: var(--sp-3xl);
  background: var(--accent);
}

.h-branches {
  width: calc(75% + var(--sp-2xl) * 0.75);
  height: 1px;
  background: var(--accent);
}

.h-children {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2xl);
  width: 100%;
}

.h-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.h-child-stem {
  width: 1px;
  height: var(--sp-3xl);
  background: var(--accent);
  flex-shrink: 0;
}

.h-child-card {
  width: 100%;
  padding-top: var(--sp-lg);
  text-align: center;
}

.h-child-card h3 {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 1.8vw, var(--fs-lg));
  font-weight: 400;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.06em;
}

/* Verticals: card grid below 1400px — tree connectors only work 4-across */
@media (max-width: 1400px) {
  .h-trunk, .h-branches, .h-child-stem { display: none; }
  .h-parent-wordmark { padding-bottom: var(--sp-2xl); }
  .h-children {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
  }
  .h-child-card {
    padding: var(--sp-lg);
    border: 1px solid var(--gray-800);
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
  }
  .h-child-card:hover {
    border-color: var(--gray-600);
    background: var(--black-mid);
  }
  .h-child-card h3 { font-size: var(--fs-md); }
}

@media (max-width: 600px) {
  .h-children { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   WHY CARTHAGO
   ══════════════════════════════════════ */
.page-part--why {
  padding: clamp(var(--sp-3xl), 14vw, var(--sp-4xl)) 0;
  background: var(--black);
}

.why-header {
  margin-bottom: var(--sp-2xl);
}

.why-heading {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 3.5vw, var(--fs-xl));
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-800);
  border-left: 1px solid var(--gray-800);
}

.why-item {
  padding: clamp(var(--sp-lg), 3.5vw, var(--sp-2xl));
  border-bottom: 1px solid var(--gray-800);
  border-right: 1px solid var(--gray-800);
  transition: background 0.5s;
}

.why-item:hover { background: var(--black-mid); }

.why-num {
  font-family: var(--ff-sans);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: rgba(160,160,168,0.2);
  display: block;
  margin-bottom: var(--sp-lg);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: color 0.5s;
}

.why-item:hover .why-num { color: rgba(160,160,168,0.5); }

.why-item h3 {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 2vw, var(--fs-lg));
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.01em;
}

.why-item p {
  font-size: var(--fs-sm);
  line-height: var(--phi);
  color: var(--gray-500);
}

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   STATEMENT
   ══════════════════════════════════════ */
.page-part--statement {
  position: relative;
  padding: clamp(var(--sp-3xl), 18vw, calc(var(--sp-3xl) + var(--sp-4xl))) 0;
  overflow: hidden;
  text-align: center;
  background: var(--black);
}

.statement-text {
  position: relative;
  z-index: 2;
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 5vw, var(--fs-2xl));
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.25em;
}

.st-word {
  display: inline-block;
  opacity: 0.08;
  transition: opacity 0.8s var(--ease);
}
.st-word.active { opacity: 1; }

/* ══════════════════════════════════════
   CLOSING
   ══════════════════════════════════════ */
.page-part--closing {
  position: relative;
  background: var(--black);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.closing-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-margin);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 3;
}

/* ── Pendulum canvas — inside closing, overflows up into verticals ── */
.pendulum-canvas {
  position: absolute;
  top: -20vh;
  left: 0;
  width: 100%;
  height: calc(100% + 20vh);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  -webkit-mask-image: radial-gradient(ellipse 70% 45% at 50% 45%, white 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 45% at 50% 45%, white 40%, transparent 100%);
}

.page-part--closing {
  overflow: visible;
}

@media (max-width: 1023px) {
  .pendulum-canvas { display: none; }
}

/* ── Upper: split layout ── */
.closing-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: end;
  padding-bottom: var(--sp-4xl);
  flex: 1;
  align-content: end;
}

.closing-heading {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 2.5vw, var(--fs-xl));
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.closing-right {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-xs);
}

.closing-contact-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.closing-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.closing-email {
  font-size: clamp(var(--fs-sm), 1.3vw, var(--fs-md));
  font-weight: 400;
  color: var(--white);
  transition: color 0.3s;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.closing-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.closing-email:hover {
  color: var(--accent-bright);
}
.closing-email:hover::after {
  transform: scaleX(1);
}

.closing-address {
  font-size: clamp(var(--fs-sm), 1.1vw, var(--fs-md));
  line-height: var(--phi);
  color: var(--gray-500);
}

/* ── Lower: minimal footer ── */
.closing-footer {
  border-top: 1px solid var(--gray-800);
  padding: var(--sp-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.closing-footer-links {
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.closing-footer-links a {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  transition: color 0.3s;
  position: relative;
}
.closing-footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.closing-footer-links a:hover {
  color: var(--accent-bright);
}
.closing-footer-links a:hover::after {
  transform: scaleX(1);
}

.closing-copyright {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .closing-main {
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
  }
  .closing-footer {
    flex-direction: column;
    gap: var(--sp-md);
    align-items: flex-start;
  }
}

/* ══════════════════════════════════════
   SUB-PAGES — Shared layout system
   ══════════════════════════════════════ */

.sub-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--black);
  padding: var(--sp-4xl) var(--page-margin) var(--sp-3xl);
  overflow: hidden;
}

.sub-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  width: 100%;
}

/* Hero animation canvas */
.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 38%, white 30%, transparent 88%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 38%, white 30%, transparent 88%);
}

@media (max-width: 1023px) {
  .hero-canvas { display: none; }
}

.sub-hero-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-xl);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.sub-hero-label::before {
  content: '';
  width: var(--sp-xl);
  height: 1.5px;
  background: var(--accent);
}

.sub-hero-title {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 5vw, var(--fs-2xl));
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: var(--sp-xl);
}

.sub-hero-lead {
  font-size: clamp(var(--fs-sm), 1.3vw, var(--fs-md));
  font-weight: 300;
  line-height: var(--phi);
  color: var(--gray-400);
  max-width: 600px;
}

/* ── Hero stagger entrance — animated by sub-animations.js ── */
.sub-hero-label,
.sub-hero-title,
.sub-hero-lead {
  opacity: 0;
  transform: translateY(24px);
}

/* ─── Sub-page content sections ─── */
.sub-section {
  background: var(--black);
  padding: clamp(var(--sp-2xl), 8vw, var(--sp-4xl)) 0;
}

.sub-section--bordered {
  border-top: none;
}

.sub-section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

.sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: start;
}

/* Reversed grid: label right, content left */
.sub-grid--reverse {
  direction: rtl;
}
.sub-grid--reverse > * {
  direction: ltr;
}
.sub-grid--reverse .sub-section-label {
  text-align: right;
}

@media (max-width: 768px) {
  .sub-grid { grid-template-columns: 1fr; gap: var(--sp-2xl); }
  .sub-grid--reverse { direction: ltr; }
  .sub-grid--reverse .sub-section-label { text-align: left; }
}

/* ─── Two-column content layout (Option A) ─── */
.sub-content {
  background: var(--black);
  padding: clamp(var(--sp-2xl), 8vw, var(--sp-4xl)) 0;
}

.sub-content-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

.sub-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  column-gap: var(--sp-4xl);
  row-gap: 0;
}

.sub-content-grid > [data-reveal] {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
}

@media (max-width: 1023px) {
  .sub-content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: var(--sp-3xl);
  }
  .sub-content-grid > [data-reveal] {
    display: block;
    grid-row: auto;
  }
}

.sub-section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-lg);
}

.sub-heading {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 2.5vw, var(--fs-lg));
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.sub-body {
  font-size: clamp(var(--fs-sm), 1.1vw, var(--fs-md));
  line-height: var(--phi);
  color: var(--gray-500);
  margin-bottom: var(--sp-lg);
}

.sub-body:last-child { margin-bottom: 0; }

/* ─── Metrics grid (golden-ratio proportioned data display) ─── */
.sub-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg) var(--sp-2xl);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-xl);
  position: relative;
}

.sub-metrics::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-800);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.sub-metrics.line-revealed::before {
  transform: scaleX(1);
}

.sub-metric {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.sub-metric-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.sub-metric-value {
  font-size: clamp(var(--fs-sm), 1.1vw, var(--fs-md));
  font-weight: 300;
  line-height: var(--phi);
  color: var(--white);
}

@media (max-width: 600px) {
  .sub-metrics { grid-template-columns: 1fr; }
}

/* ── Metric stagger: initial hidden state ── */
.sub-metric[data-metric] {
  opacity: 0;
  transform: translateY(var(--sp-md));
}


/* ─── Pillar grid ─── */
.sub-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-800);
  border-left: 1px solid var(--gray-800);
}

.sub-pillar {
  padding: clamp(var(--sp-lg), 3.5vw, var(--sp-2xl));
  border-bottom: 1px solid var(--gray-800);
  border-right: 1px solid var(--gray-800);
  transition: background 0.5s;
}

.sub-pillar:hover { background: var(--black-mid); }

.sub-pillar-num {
  font-family: var(--ff-sans);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: rgba(160,160,168,0.15);
  display: block;
  margin-bottom: var(--sp-lg);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: color 0.5s;
}

.sub-pillar:hover .sub-pillar-num { color: rgba(160,160,168,0.4); }

.sub-pillar h3 {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 1.8vw, var(--fs-lg));
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.01em;
}

.sub-pillar p {
  font-size: var(--fs-sm);
  line-height: var(--phi);
  color: var(--gray-500);
}

@media (max-width: 900px) {
  .sub-pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .sub-pillars { grid-template-columns: 1fr; }
}

/* ─── CTA block (Careers) ─── */
.sub-cta-block {
  border: 1px solid var(--gray-800);
  padding: clamp(var(--sp-lg), 4vw, var(--sp-2xl));
  transition: border-color 0.5s;
}

.sub-cta-block:hover { border-color: var(--gray-600); }

/* ─── Legal pages ─── */
.sub-legal {
  max-width: 720px;
}

.sub-legal h2 {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 1.8vw, var(--fs-lg));
  font-weight: 400;
  color: var(--white);
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
  letter-spacing: -0.01em;
}

.sub-legal h2:first-of-type { margin-top: 0; }

.sub-legal p,
.sub-legal li {
  font-size: var(--fs-sm);
  line-height: var(--phi);
  color: var(--gray-500);
  margin-bottom: var(--sp-md);
}

.sub-legal ul {
  list-style: none;
  padding-left: var(--sp-lg);
}

.sub-legal ul li::before {
  content: '\2014';
  color: var(--gray-800);
  margin-right: var(--sp-sm);
}

.sub-legal a {
  color: var(--accent-bright);
  transition: color 0.3s;
}

.sub-legal a:hover { color: var(--white); }


/* ══════════════════════════════════════
   LEGAL PAGE — Combined disclosures
   ══════════════════════════════════════ */
.legal-page {
  background: var(--black);
  min-height: 100vh;
  padding: var(--sp-4xl) var(--page-margin) var(--sp-3xl);
}

.legal-page-inner {
  max-width: var(--container);
  margin: 0 auto;
}

/* ── Header ── */
.legal-header {
  margin-bottom: var(--sp-3xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid var(--gray-800);
}

.legal-header-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-xl);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.legal-header-label::before {
  content: '';
  width: var(--sp-xl);
  height: 1.5px;
  background: var(--accent);
}

.legal-header-title {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-lg), 4vw, var(--fs-2xl));
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.legal-header-date {
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

/* ── Two-column layout ── */
.legal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: start;
}

@media (max-width: 900px) {
  .legal-columns {
    grid-template-columns: 1fr;
    gap: var(--sp-3xl);
  }
}

.legal-col {
  /* nothing extra needed */
}

.legal-section-title {
  font-family: var(--ff-sans);
  font-size: clamp(var(--fs-md), 1.8vw, var(--fs-lg));
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--gray-800);
}

.legal-col h3 {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-sm);
}

.legal-col h3:first-of-type {
  margin-top: 0;
}

.legal-col p {
  font-size: var(--fs-sm);
  line-height: var(--phi);
  color: var(--gray-500);
  margin-bottom: var(--sp-md);
}

.legal-col a {
  color: var(--accent-bright);
  transition: color 0.3s;
  text-decoration: none;
}

.legal-col a:hover {
  color: var(--white);
}

/* ── Legal page footer ── */
.legal-footer {
  margin-top: var(--sp-3xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .legal-footer {
    flex-direction: column;
    gap: var(--sp-md);
    align-items: flex-start;
  }
}


/* ══════════════════════════════════════
   ANIMATIONS & REDUCED MOTION
   ══════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--sp-2xl));
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .sub-metric[data-metric] { opacity: 1; transform: none; }
  .scroll-fill { animation: none; }
  .st-word { opacity: 1; }
  .hero-img { transform: none !important; }
  .site { opacity: 1 !important; }
  .sub-hero-label, .sub-hero-title, .sub-hero-lead { opacity: 1; transform: none; }
  .sub-metrics::before { transform: scaleX(1); }
}
