/* ==========================================================================
   Propuesta de crecimiento — Dra. Carolina Guillén
   Design system + layout. Dark canvas, lime accent, editorial serif display.
   ========================================================================== */

:root {
  --bg: #070a08;
  --bg-2: #090e0b;
  --panel: #0b1210;
  --panel-2: #0e1613;
  --line: rgba(190, 230, 130, 0.1);
  --line-strong: rgba(190, 230, 130, 0.24);
  --lime: #c9f24c;
  --lime-soft: rgba(201, 242, 76, 0.12);
  --bone: #edeaE0;
  --muted: #8b9587;
  --muted-2: #5f6b5c;
  --warm: #e6b17e;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--lime);
  color: #0a0d08;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

p {
  margin: 0;
}

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

em {
  font-style: italic;
}

strong {
  font-weight: 600;
  color: var(--bone);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--lime);
  color: #0a0d08;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* solid translucent bar: a backdrop-filter here paints transparent children
   with the wrong backdrop in Chromium, so the blur is not worth the risk */
.topbar.is-stuck {
  /* solid: at 94% the huge cream headline still ghosts through the bar */
  background: #070a08;
  border-bottom-color: var(--line);
}

.topbar__mark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--bone);
  white-space: nowrap;
}

.topbar__mark em {
  font-style: normal;
  color: var(--muted-2);
}

.topbar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 242, 76, 0.14);
}

.topbar__nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.topbar__nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}

.topbar__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.topbar__nav a:hover {
  color: var(--bone);
}

.topbar__nav a:hover::after,
.topbar__nav a.is-active::after {
  transform: scaleX(1);
}

.topbar__nav a.is-active {
  color: var(--bone);
}

/* document progress: a hairline that fills with the scroll */
.topbar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: transparent;
}

.topbar__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.12s linear;
  opacity: 0.75;
}

/* compact index for narrow screens */
.index {
  display: none;
  position: relative;
  margin-left: auto;
}

.index__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--bone);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.index__button::-webkit-details-marker {
  display: none;
}

.index__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--lime);
}

.index[open] .index__button {
  border-color: var(--lime);
  color: var(--lime);
}

.index__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  display: grid;
  padding: 8px;
  gap: 2px;
  background: #0b1210;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 60px -30px #000;
  z-index: 60;
}

.index__menu a {
  display: flex;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
}

.index__menu a b {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--muted-2);
}

.index__menu a:hover,
.index__menu a.is-active {
  background: rgba(201, 242, 76, 0.08);
  color: var(--bone);
}

.index__menu a.is-active b {
  color: var(--lime);
}

.topbar__cta {
  padding: 9px 16px;
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .topbar__nav {
    display: none;
  }
  .index {
    display: block;
  }
  .topbar__cta {
    display: none;
  }
}

/* ---------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--solid {
  background: var(--lime);
  color: #0a0d08;
  font-weight: 600;
}

.btn--solid:hover {
  box-shadow: 0 10px 30px -12px rgba(201, 242, 76, 0.6);
}

.btn--line {
  border-color: var(--line-strong);
  color: var(--bone);
}

.btn--line:hover,
.btn--ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--bone);
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(620px, 92vh, 900px);
  padding: 120px 0 72px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(190, 230, 130, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(190, 230, 130, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -18%;
  width: min(1000px, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201, 242, 76, 0.11), transparent 62%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow__line {
  width: 34px;
  height: 1px;
  background: var(--lime);
  opacity: 0.7;
}

.eyebrow__num {
  color: var(--lime);
  font-size: 11px;
}

.hero__title {
  margin-top: 26px;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero__title em {
  display: block;
  color: var(--lime);
  font-style: italic;
}

.hero__lede {
  margin-top: 28px;
  max-width: 56ch;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  color: #b9c2b4;
}

.hero__lede strong {
  color: var(--bone);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(18px, 3vw, 40px);
  margin: 64px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  background: none;
}

.hero__facts > div {
  padding: 0;
  background: none;
}

.hero__facts dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero__facts dd {
  margin: 7px 0 0;
  font-size: 14.5px;
  color: var(--bone);
}

@media (max-width: 760px) {
  .hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------------- sections -- */

.section {
  position: relative;
  padding: clamp(72px, 9vw, 132px) 0;
  border-top: 1px solid var(--line);
}

.section--tight {
  padding-block: clamp(64px, 7vw, 104px);
}

.section__head {
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* numeral beside the title: the document gesture the references taught */
.sec-head {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 12px clamp(24px, 4vw, 56px);
  align-items: start;
}

.sec-head__rail {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.sec-head__num {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 5.4vw, 4.6rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: var(--lime);
  opacity: 0.82;
}

.sec-head__label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.sec-head__body {
  max-width: 700px;
}

.sec-head__body .section__title {
  margin-top: 0;
}

@media (max-width: 780px) {
  .sec-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .sec-head__rail {
    grid-auto-flow: column;
    align-items: baseline;
    justify-content: start;
    gap: 14px;
    padding-top: 0;
  }
  .sec-head__num {
    font-size: 2.1rem;
  }
}

.section__title {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
}

.section__lede {
  margin-top: 20px;
  font-size: 1.04rem;
  line-height: 1.68;
  color: #a9b3a4;
  max-width: 56ch;
}

/* ------------------------------------------------------------- cards grid -- */

/* rules instead of boxes: only the map shell and the investment stay boxed */
.cards {
  display: grid;
  gap: 0 clamp(24px, 3vw, 44px);
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.cards--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
  transition: border-color 0.3s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px auto auto 0;
  width: 0;
  height: 1px;
  background: var(--lime);
  transition: width 0.4s var(--ease);
}

.card:hover {
  border-top-color: transparent;
}

.card:hover::before {
  width: 100%;
}

.card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.85;
}

.card h3 {
  margin-top: 14px;
  font-size: 1.09rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.card p {
  margin-top: 12px;
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.62;
}

@media (max-width: 1000px) {
  .cards--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .cards--four {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- phases -- */

.phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.phase::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.phase__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.phase h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.phase p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.phase__meta {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.8;
}

@media (max-width: 900px) {
  .phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .phases {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- map shell -- */

.section--map {
  background: linear-gradient(180deg, var(--bg) 0%, #060907 40%, var(--bg) 100%);
}

/* the diagram needs more room than body text */
.section--map .wrap {
  max-width: 1380px;
}

.map-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #080d0a 0%, #060907 100%);
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot--patient {
  background: var(--bone);
  opacity: 0.65;
}

.dot--ai {
  background: var(--lime);
}

.dot--human {
  background: #7fa88a;
}

.dot--auto {
  background: transparent;
  border: 1px dashed var(--muted);
}

.map-tour {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.map-tour:hover,
.map-tour.is-playing {
  border-color: var(--lime);
  color: var(--lime);
}

.map-tour.is-playing {
  background: rgba(201, 242, 76, 0.08);
}

.map-tour__glyph {
  font-size: 8px;
  line-height: 1;
}

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

.map-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.map-hint kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- map -- */

.map {
  position: relative;
  overflow: hidden;
}

.map__viewport {
  overflow: hidden;
}

.map__canvas {
  position: relative;
  width: 1180px;
  height: 846px;
  transform-origin: top left;
}

.map__viewport.is-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.map__stages {
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stage {
  position: relative;
  padding: 34px 0 0 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.stage::before {
  content: "";
  position: absolute;
  top: 46px;
  left: 0;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 92%);
}

.stage.is-active {
  color: var(--lime);
}

.map__lanes {
  position: absolute;
  inset: 0;
}

.lane {
  position: absolute;
  left: 0;
  right: 0;
  height: 142px;
  border-top: 1px solid rgba(190, 230, 130, 0.06);
  transition: opacity 0.3s var(--ease);
}

.lane__label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  width: 168px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  line-height: 1.45;
}

.lane__label i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--muted-2);
}

.lane.is-active .lane__label {
  color: var(--lime);
}

.lane.is-active .lane__label i {
  border-color: var(--lime);
  background: var(--lime);
}

/* nodes */

.map__nodes {
  position: absolute;
  inset: 0;
}

.node-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 11px 13px 12px;
  text-align: left;
  font-family: var(--font-body);
  color: var(--bone);
  background: rgba(12, 19, 16, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease),
    filter 0.3s var(--ease);
}

.node__title {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.005em;
}

.node__sub {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.32;
  color: var(--muted);
}

.node__plus {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--lime);
  color: #0a0d08;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.node--patient {
  border-color: rgba(237, 234, 224, 0.16);
  background: rgba(237, 234, 224, 0.035);
  color: #d9d5c9;
}

.node--ai {
  border-color: rgba(201, 242, 76, 0.42);
  background: linear-gradient(180deg, rgba(201, 242, 76, 0.1), rgba(201, 242, 76, 0.03));
  box-shadow: 0 0 0 1px rgba(201, 242, 76, 0.06), 0 14px 34px -22px rgba(201, 242, 76, 0.7);
}

.node--ai .node__title {
  color: #e9ffb8;
}

.node--human {
  border-color: rgba(127, 168, 138, 0.38);
  background: rgba(20, 33, 26, 0.9);
}

.node--auto {
  border-style: dashed;
  border-color: rgba(150, 165, 148, 0.3);
  background: rgba(10, 15, 12, 0.72);
}

.node--auto .node__title {
  font-weight: 500;
  color: #cfd6ca;
}

.node--wide {
  width: 100%;
}

.node:hover {
  border-color: var(--lime);
  transform: translateY(-1px);
}

.node:hover .node__plus,
.node.is-active .node__plus {
  opacity: 1;
}

.node.is-active {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime), 0 18px 40px -24px rgba(201, 242, 76, 0.9);
  background: linear-gradient(180deg, rgba(201, 242, 76, 0.16), rgba(201, 242, 76, 0.05));
}

.node.is-active .node__title {
  color: #f2ffd0;
}

/* edges */

.map__edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--lime);
  pointer-events: none;
}

.edge {
  fill: none;
  stroke: rgba(201, 242, 76, 0.34);
  stroke-width: 1.25;
  transition: opacity 0.3s var(--ease), stroke 0.3s var(--ease), stroke-width 0.3s var(--ease);
}

.edge--dashed {
  stroke-dasharray: 4 4;
  stroke: rgba(150, 165, 148, 0.34);
}

.edge-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  fill: var(--muted);
  transition: opacity 0.3s var(--ease), fill 0.3s var(--ease);
}

.edge.is-active {
  stroke: var(--lime);
  stroke-width: 1.7;
}

.edge-label.is-active {
  fill: var(--lime);
}

/* focus: everything not on the selected path dims */

.map[data-focus] .node,
.map[data-focus] .edge,
.map[data-focus] .edge-label,
.map[data-focus] .lane,
.map[data-focus] .stage {
  opacity: 0.14;
  filter: saturate(0.35);
}

.map[data-focus] .node.is-active,
.map[data-focus] .edge.is-active,
.map[data-focus] .edge-label.is-active,
.map[data-focus] .lane.is-active,
.map[data-focus] .stage.is-active {
  opacity: 1;
  filter: none;
}

.map[data-focus] .node.is-related {
  opacity: 0.46;
  filter: saturate(0.7);
}

/* detail panel */

.map-detail {
  display: grid;
  gap: 8px;
  padding: 22px 24px 26px;
  border-top: 1px solid var(--line);
  background: rgba(9, 14, 11, 0.72);
}

.map-detail__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}

.map-detail__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
}

.map-detail__body {
  max-width: 78ch;
  font-size: 0.94rem;
  color: #a9b3a4;
}

.map-detail__next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.map-detail__next li {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 11px;
}

/* mobile list: below 860px the swimlane canvas is replaced by this list */

.map-mobile {
  display: none;
}

@media (max-width: 860px) {
  .map,
  .map-detail {
    display: none;
  }

  /* the keyboard hint belongs to the diagram, not to the list */
  .map-hint {
    display: none;
  }

  .map-toolbar {
    padding: 14px 18px 16px;
  }

  .map-mobile {
    display: block;
  }

  .map-mobile__stage {
    border-top: 1px solid var(--line);
  }

  .map-mobile__stage:first-child {
    border-top: 0;
  }

  .map-mobile__label {
    padding: 18px 18px 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-2);
  }

  .map-mobile__item {
    border-top: 1px solid var(--line);
  }

  .map-mobile__toggle {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 18px 14px;
    text-align: left;
    font-family: var(--font-body);
    color: var(--bone);
    background: none;
    border: 0;
    border-left: 2px solid transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  }

  .map-mobile__item--ai .map-mobile__toggle {
    border-left-color: var(--lime);
  }

  .map-mobile__item--auto .map-mobile__toggle {
    border-left: 1px dashed var(--line-strong);
  }

  .map-mobile__item.is-open .map-mobile__toggle {
    border-left-color: var(--lime);
    background: var(--lime-soft);
  }

  .map-mobile__head {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .map-mobile__head .dot {
    flex: none;
  }

  .map-mobile__title {
    flex: 1;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  .map-mobile__item.is-open .map-mobile__title {
    color: var(--lime);
  }

  /* open/closed affordance: the glyph is swapped in CSS, so no JS text churn */
  .map-mobile__sign {
    flex: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    color: var(--muted);
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
      color 0.25s var(--ease);
  }

  .map-mobile__sign::before {
    content: "+";
  }

  .map-mobile__item.is-open .map-mobile__sign {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--bg);
  }

  .map-mobile__item.is-open .map-mobile__sign::before {
    content: "−";
  }

  .map-mobile__sub {
    display: block;
    margin: 4px 0 0 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--muted);
  }

  .map-mobile__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s var(--ease);
  }

  .map-mobile__item.is-open .map-mobile__body {
    grid-template-rows: 1fr;
  }

  .map-mobile__inner {
    overflow: hidden;
  }

  .map-mobile__desc {
    margin: 0;
    padding: 4px 18px 12px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--muted);
  }

  .map-mobile__next {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0 18px 14px;
    list-style: none;
  }

  .map-mobile__next li {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 5px 10px;
  }
}

.map__fallback {
  padding: 20px 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- funnel -- */

.funnel {
  display: grid;
  gap: 0;
  border: 0;
  background: transparent;
}

.funnel__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 24px;
  padding: 24px 0 26px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
}

/* the proportion is a rule under the label, not a filled block behind the
   text: a background bar reads as a cropped table at the container edges */
.funnel__bar {
  grid-column: 1 / 2;
  grid-row: 2;
  width: var(--w);
  height: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, rgba(201, 242, 76, 0.62), rgba(201, 242, 76, 0.18));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s var(--ease), opacity 0.4s var(--ease);
}

.funnel__row.is-visible .funnel__bar {
  transform: scaleX(1);
}

.funnel__bar--win {
  background: linear-gradient(90deg, var(--lime), rgba(201, 242, 76, 0.35));
}

.funnel__label {
  grid-column: 1 / 2;
  grid-row: 1;
  position: relative;
  font-size: 0.98rem;
  color: var(--bone);
}

.funnel__label em {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.85;
}

.funnel__value {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  justify-self: end;
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.2vw, 2.8rem);
  line-height: 1;
  color: var(--bone);
}

.funnel__note {
  grid-column: 1 / 2;
  grid-row: 3;
  position: relative;
  font-size: 0.845rem;
  color: var(--muted);
}

.disclaimer {
  margin-top: 18px;
  max-width: 62ch;
  font-size: 0.85rem;
  color: var(--muted-2);
  border-left: 1px solid var(--line-strong);
  padding-left: 16px;
}

@media (max-width: 620px) {
  .funnel__value {
    font-size: 1.9rem;
  }
  .funnel__row {
    padding: 18px 18px;
  }
}

/* ----------------------------------------------------------------- scope -- */

.scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 44px);
  border: 0;
  background: transparent;
}

.scope__item {
  display: flex;
  gap: 16px;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
  transition: border-color 0.3s var(--ease);
}

.scope__item:hover {
  border-top-color: var(--lime);
}

.scope__idx {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--lime);
  padding-top: 5px;
}

.scope__item h3 {
  font-size: 1.05rem;
  font-weight: 500;
}

.scope__item p {
  margin-top: 9px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 780px) {
  .scope {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- timeline -- */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(20px, 2.4vw, 34px);
  border-block: 0;
  background: transparent;
}

.tl {
  position: relative;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
  transition: border-color 0.3s var(--ease);
}

.tl::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), transparent);
  opacity: 0.35;
  transition: opacity 0.3s var(--ease);
}

.tl:hover {
  border-top-color: var(--lime);
}

.tl:hover::before {
  opacity: 1;
}

.tl__weeks {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.tl__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.tl__list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.tl__list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.tl__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

@media (max-width: 900px) {
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* --------------------------------------------------------------- invest -- */

.section--invest {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 242, 76, 0.06), transparent 70%),
    var(--bg);
}

.invest {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}

.invest__card {
  position: relative;
  padding: 34px 30px 36px;
  border: 1px solid rgba(201, 242, 76, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(201, 242, 76, 0.07), rgba(10, 15, 12, 0.6));
  overflow: hidden;
}

.invest__card--muted {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(237, 234, 224, 0.03), rgba(10, 15, 12, 0.5));
}

.invest__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.invest__amount {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--lime);
}

.invest__amount--sm {
  font-size: clamp(2.2rem, 4.2vw, 3.1rem);
  color: var(--bone);
}

.invest__period {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.invest__list {
  margin: 24px 0 0;
  padding: 20px 0 0;
  list-style: none;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.invest__list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: #b3bcae;
}

.invest__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--lime);
  opacity: 0.75;
}

.invest__foot {
  margin-top: 22px;
}

.invest__foot p {
  max-width: 74ch;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 820px) {
  .invest {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------- steps -- */

.section--next {
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
  background: transparent;
}

.step {
  padding: 22px 0 26px;
  border-top: 1px solid var(--line-strong);
  background: transparent;
}

.step__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lime);
}

.step h3 {
  margin-top: 16px;
  font-size: 1.05rem;
  font-weight: 500;
}

.step p {
  margin-top: 9px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.closing {
  display: grid;
  gap: 32px;
  margin-top: clamp(48px, 6vw, 76px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.closing__note {
  max-width: 60ch;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.22;
  color: var(--bone);
}

.closing__sign {
  display: grid;
  gap: 4px;
}

.closing__sign span {
  font-size: 1.05rem;
  color: var(--bone);
}

.closing__sign em {
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* --------------------------------------------------------------- reveal -- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .node,
  .edge,
  .edge-label,
  .map-mobile__toggle,
  .map-mobile__sign,
  .map-mobile__body {
    transition: none;
  }
  .btn:hover,
  .node:hover {
    transform: none;
  }
}

/* ---------------------------------------------------------------- print -- */

@media print {
  body {
    background: #fff;
    color: #111;
  }
  .topbar,
  .hero__grid,
  .hero::after,
  .map-hint,
  .skip-link {
    display: none;
  }
  .section,
  .hero,
  .map-shell,
  .cards,
  .funnel,
  .scope,
  .invest {
    border-color: #ddd;
    background: #fff;
  }
  .node,
  .map__canvas,
  .map-detail,
  .card,
  .scope__item,
  .step,
  .tl {
    background: #fafafa;
    color: #111;
  }
  .section__lede,
  .card p,
  .scope__item p,
  .step p,
  .invest__foot p {
    color: #444;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
