/* ============================================================
   APLOMO · nelsongranja.com — site-specific components
   Builds on styles.css (tokens + base vocabulary).
   Editorial direction: photography gives depth, type does the work,
   the plumb is the vertical anchor, coral with an eyedropper.
   ============================================================ */

/* ---------- byline in the wordmark lockup ---------- */
.byline {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.86rem;
  color: var(--ink-mute);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.byline .sep { opacity: 0.5; margin: 0 2px; }
.on-navy .byline, .on-navy-deep .byline, .footer .byline { color: var(--mist-soft); }

/* ============================================================
   IMAGE PLACEHOLDERS
   Swap each .img-ph for a real <img> when assets land.
   The Gemini prompt for each lives in an HTML comment beside it.
   ============================================================ */
.img-ph {
  position: relative;
  border-radius: var(--radius, 16px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--cream-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 48px);
  color: var(--ink-mute);
}
.img-ph.r-3-2 { aspect-ratio: 3 / 2; }
.img-ph.r-4-5 { aspect-ratio: 4 / 5; }

/* faint vertical reference — the plumb axis, inside the frame */
.img-ph::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(var(--cream-2), color-mix(in srgb, var(--sage) 38%, transparent));
  opacity: 0.7;
}
.img-ph > * { position: relative; }
.img-ph .ph-mark { width: 26px; height: auto; opacity: 0.9; }
.img-ph .ph-eyebrow {
  font-family: var(--body); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-700);
}
.img-ph .ph-note {
  font-size: 0.96rem; line-height: 1.45; color: var(--ink-soft);
  max-width: 30ch;
}
.img-ph .ph-meta {
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 10px;
}
.img-ph .ph-meta .pipe { width: 1px; height: 11px; background: var(--cream-2); }
.img-ph .ph-real {
  position: absolute; top: 16px; left: 16px;
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral-700); font-weight: 700;
  background: color-mix(in srgb, var(--coral) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--coral) 30%, transparent);
  padding: 5px 9px; border-radius: 999px;
}

/* real image landed: the <img> fills the framed figure, placeholder chrome off */
.img-ph.has-img { padding: 0; border-color: transparent; background: var(--navy-900); }
.img-ph.has-img::before { display: none; }
.img-ph.has-img > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ============================================================
   HERO (cream, editorial)
   ============================================================ */
.hero-ed { background: var(--cream); color: var(--ink); overflow: hidden; }
.hero-ed .hero-grid {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 116px);
  min-height: min(82vh, 820px);
}
.hero-ed .eyebrow { color: var(--sage-700); margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.hero-ed .eyebrow .tick { width: 22px; height: 1px; background: var(--sage); }
.hero-ed h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.04; letter-spacing: -0.022em; text-wrap: balance;
  color: var(--ink);
}
.hero-ed h1 .accent { color: var(--sage-700); }
.hero-ed .hero-sub { color: var(--ink-soft); max-width: 44ch; margin-top: 28px; }
.hero-ed .hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-ed .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* hero portrait stage with the thin plumb rule alongside */
.hero-visual { position: relative; }
.hero-visual .hero-rule {
  position: absolute; top: -8%; bottom: -8%; left: -26px; width: 1px;
  background: linear-gradient(var(--cream-2), color-mix(in srgb, var(--sage) 50%, transparent));
}
.hero-visual .hero-rule::after {
  content: ''; position: absolute; left: -3.5px; bottom: 0;
  width: 8px; height: 8px; border-radius: 50%; background: var(--coral);
}

/* ============================================================
   EL PROBLEMA — pure type, the 95% is the visual
   ============================================================ */
.stat-block {
  margin-top: clamp(48px, 7vw, 96px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: clamp(18px, 3vw, 34px);
}
.stat-figure {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(4.5rem, 14vw, 11rem); line-height: 0.86;
  letter-spacing: -0.04em; color: var(--sage-700);
}
.stat-figure .u { font-size: 0.42em; color: var(--ink-mute); }
.stat-caption {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.18;
  letter-spacing: -0.015em; color: var(--ink); text-wrap: pretty;
  max-width: 34ch;
}
.stat-caption em { color: var(--sage-700); font-style: normal; }

/* ============================================================
   EL HORIZONTE — the three-rung ladder (navy)
   ============================================================ */
.ladder { margin-top: clamp(44px, 6vw, 80px); position: relative; }
.rung {
  display: grid; grid-template-columns: clamp(64px, 9vw, 132px) 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid color-mix(in srgb, var(--cream) 16%, transparent);
  align-items: baseline;
}
.rung:last-child { border-bottom: 1px solid color-mix(in srgb, var(--cream) 16%, transparent); }
/* ascending stagger — each rung steps further right */
.rung:nth-child(2) { margin-left: clamp(0px, 5vw, 96px); }
.rung:nth-child(3) { margin-left: clamp(0px, 10vw, 192px); }
.rung .r-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 0.9;
  letter-spacing: -0.03em; color: var(--sage-300);
  position: relative;
}
.rung:last-child .r-num { color: var(--coral-300); }
.rung .r-body h3 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.08;
  letter-spacing: -0.018em; color: var(--cream); text-wrap: balance;
  max-width: 24ch;
}
.rung .r-body p { color: var(--mist); margin-top: 12px; max-width: 56ch; }
.rung .r-body strong { color: var(--cream); font-weight: 600; }
.ladder-foot { margin-top: clamp(36px, 5vw, 56px); color: var(--mist); max-width: 60ch; }
.ladder-foot strong { color: var(--sage-300); font-weight: 600; }

/* ============================================================
   EL MÉTODO — wide image band + three numbered steps
   ============================================================ */
.method-band { margin-top: clamp(44px, 6vw, 72px); }
.method-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; margin-top: clamp(44px, 6vw, 72px);
}
.m-step {
  padding: 34px 30px 8px 0;
  border-top: 2px solid var(--ink);
}
.m-step + .m-step { padding-left: 30px; border-left: 1px solid var(--cream-2); }
.m-step .ms-num {
  font-family: var(--display); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.04em; color: var(--coral); font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.m-step h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.4rem; line-height: 1.08; letter-spacing: -0.015em;
  margin-bottom: 12px; text-wrap: balance;
}
.m-step p { color: var(--ink-soft); font-size: 1.02rem; }

/* ============================================================
   EL MODELO — proportion graphic + three columns
   ============================================================ */
.ratio-graphic {
  margin-top: clamp(40px, 5vw, 64px);
  display: flex; flex-direction: column; gap: 18px;
  max-width: 760px;
}
.rg-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center; }
.rg-label { font-size: 0.96rem; color: var(--ink-soft); }
.rg-track { height: 14px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.rg-bar { height: 100%; border-radius: 999px; }
.rg-bar.tech { width: 33.3%; background: var(--sage-100); }
.rg-bar.people { width: 66.6%; background: var(--sage); position: relative; }
.rg-bar.people::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 18%, transparent);
}
.rg-val { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.rg-note { margin-top: 22px; color: var(--ink-mute); font-size: 0.96rem; max-width: 56ch; }

.model-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--cream-2);
  border: 1px solid var(--cream-2); border-radius: 16px; overflow: hidden;
  margin-top: clamp(44px, 6vw, 72px);
}
.model-col { background: var(--paper); padding: 32px 30px; }
.model-col .mc-h {
  font-family: var(--display); font-weight: 600; font-size: 1.3rem;
  letter-spacing: -0.01em; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.model-col .mc-h .d { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }
.model-col:last-child .mc-h .d { background: var(--coral); }
.model-col p { color: var(--ink-soft); font-size: 1.02rem; }

/* ============================================================
   PARA QUIÉN / SOBRE NELSON — portrait + text two-col
   ============================================================ */
.split {
  display: grid; grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(32px, 6vw, 80px); align-items: center;
  margin-top: clamp(44px, 6vw, 72px);
}
.split.flip { grid-template-columns: 1.18fr 0.82fr; }
.split .body-stack p + p { margin-top: 1.2em; }

/* credential strip on the Nelson bio */
.creds {
  margin-top: 30px; padding-top: 24px;
  border-top: 1px solid var(--cream-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
}
.creds .creds-label {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}
.creds .creds-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.creds .creds-list span { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--sage-700); }

/* ============================================================
   CIERRE / CTA — large hanging plumb over the button (navy)
   ============================================================ */
.closer { text-align: center; }
.closer .closer-plumb {
  width: clamp(40px, 6vw, 62px); height: auto; margin: 0 auto clamp(28px, 4vw, 44px);
  overflow: visible;
}
.closer .closer-plumb .plumb-pivot { transform-origin: 50% 4%; }
.closer h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.04;
  letter-spacing: -0.022em; text-wrap: balance;
  max-width: 22ch; margin: 0 auto; color: var(--cream);
}
.closer h2 em { color: var(--sage-300); font-style: normal; }
.closer .sub { color: var(--mist); margin: 22px auto 38px; max-width: 46ch; }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-ed .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual .hero-rule { display: none; }
  .stat-block { gap: 22px; }
  .rung { grid-template-columns: 1fr; gap: 8px; }
  .rung:nth-child(2), .rung:nth-child(3) { margin-left: 0; }
  .method-steps { grid-template-columns: 1fr; }
  .m-step + .m-step { padding-left: 0; border-left: none; }
  .m-step { border-top: 2px solid var(--ink); padding-bottom: 18px; }
  .model-cols { grid-template-columns: 1fr; }
  .rg-row { grid-template-columns: 130px 1fr auto; gap: 12px; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split .img-ph { max-width: 440px; }
}
