/* ============================================================
   CJP — "Invertir / Invest" page
   Ported from the approved design (cjp-invertir/inv.css).
   Consumes tokens already defined in main.css :root.
   Loaded only by invertir.html.
   ============================================================ */

/* ---- Header chrome over the dark hero (mirrors body.home/body.ab-page/body.dev-page) ---- */
/* The hero is a full-bleed dark photo, so the header starts transparent with the
   white logo + light nav, then flips to the solid/dark treatment on scroll. Without
   these, both logo variants render at once (the doubled wordmark). */
body.inv-page .brand-logo--on-light{display:none}
body.inv-page .hd.solid .brand-logo--on-dark{display:none}
body.inv-page .hd.solid .brand-logo--on-light{display:block}
body.inv-page .hd.menu-open .brand-logo--on-light{display:none}
body.inv-page .hd.menu-open .brand-logo--on-dark{display:block}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-link{color:rgba(250,247,242,.82)}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-link:hover{background:var(--cjp-gold);color:#fff}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-link.on{color:#fff}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-lang-trigger{border-color:rgba(250,247,242,.42)}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-lang-trigger{color:rgba(250,247,242,.85)}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-lang-btn.on{background:var(--cjp-gold);color:#fff}
body.inv-page .hd:not(.solid):not(.menu-open) .hd-burger span{background:var(--cjp-offwhite)}

/* ---- Hero (full-bleed dark photo) ----------------------------------- */
.iv-hero{position:relative;min-height:78svh;display:flex;align-items:flex-end;overflow:hidden;color:var(--cjp-offwhite)}
.iv-hero-bg{position:absolute;inset:-10% 0}
.iv-hero-photo{position:absolute;inset:0}
.iv-hero-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(15,14,12,.34) 0%,rgba(15,14,12,.26) 42%,rgba(15,14,12,.78) 100%)}
.iv-hero-inner{position:relative;max-width:var(--maxw);margin:0 auto;width:100%;padding:0 var(--pad) clamp(56px,7vw,96px)}
.iv-hero-eyebrow{font-size:11.5px;font-weight:400;letter-spacing:var(--track-eyebrow);text-transform:uppercase;color:var(--cjp-gold-light);margin:0 0 22px}
.iv-hero-title{font-family:var(--font-display);font-weight:400;font-size:clamp(44px,5.4vw,84px);line-height:1.0;letter-spacing:-.02em;color:#fff;margin:0;max-width:17ch;text-wrap:balance}
.iv-hero-lede{font-weight:300;font-size:clamp(15px,1.4vw,18px);line-height:1.7;color:rgba(250,247,242,.84);max-width:64ch;margin:26px 0 0}

/* ---- What we offer (two-column intro) ------------------------------- */
.iv-offer{padding:var(--sec) 0}
.iv-offer-grid{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad);display:grid;grid-template-columns:1.2fr 1fr;gap:clamp(40px,6vw,100px);align-items:start}
.iv-statement{font-family:var(--font-display);font-weight:400;font-size:clamp(30px,3.4vw,50px);line-height:1.14;letter-spacing:-.005em;color:var(--cjp-charcoal);margin:0;text-wrap:balance}
.iv-offer-body{display:flex;flex-direction:column;gap:18px}
.iv-offer-body p{font-family:var(--font-sans);font-weight:300;font-size:15.5px;line-height:1.78;color:var(--fg-muted);margin:0}
.iv-creds{margin-top:26px;display:flex;flex-direction:column}
.iv-cred{display:flex;align-items:center;gap:16px;font-size:12.5px;font-weight:400;letter-spacing:.02em;color:var(--cjp-ink);
  border-top:1px solid var(--line);padding:13px 0}
.iv-cred:last-child{border-bottom:1px solid var(--line)}
.iv-cred-rule{flex:0 0 24px;height:1px;background:var(--cjp-gold)}

/* ---- Sourcing opportunities (light, 3 columns) ---------------------- */
.iv-src{padding:0 0 var(--sec)}
.iv-src-head{max-width:var(--maxw);margin:0 auto clamp(40px,5vw,64px);padding:0 var(--pad)}
.iv-src-lede{font-family:var(--font-display);font-style:italic;font-weight:400;font-size:clamp(18px,1.7vw,23px);line-height:1.4;color:var(--fg-muted);max-width:54ch;margin:20px 0 0}
.iv-src-grid{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad);display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--line-strong)}
.iv-src-card{padding:34px clamp(22px,2.4vw,40px) 6px 0;border-right:1px solid var(--line)}
.iv-src-card:last-child{border-right:0;padding-right:0}
.iv-src-num{font-family:var(--font-display);font-style:italic;font-weight:500;font-size:19px;color:var(--cjp-gold);display:block;margin-bottom:14px}
.iv-src-line{display:block;width:30px;height:1px;background:var(--cjp-gold-soft);margin-bottom:16px}
.iv-src-t{font-family:var(--font-display);font-weight:400;font-size:clamp(23px,2.1vw,30px);line-height:1.08;color:var(--cjp-charcoal);margin:0 0 12px}
.iv-src-d{font-weight:300;font-size:14px;line-height:1.7;color:var(--fg-muted);margin:0;max-width:40ch}

/* ---- Investment strategies (dark espresso band) --------------------- */
.iv-strat{background:var(--cjp-espresso);color:var(--cjp-offwhite);padding:var(--sec) 0}
.iv-strat-head{max-width:var(--maxw);margin:0 auto clamp(40px,5vw,64px);padding:0 var(--pad)}
.iv-strat-lede{font-family:var(--font-display);font-style:italic;font-weight:400;font-size:clamp(18px,1.7vw,23px);line-height:1.4;color:rgba(250,247,242,.7);max-width:52ch;margin:20px 0 0}

/* risk/return axis bar */
.iv-axis{max-width:var(--maxw);margin:0 auto clamp(34px,3.5vw,46px);padding:0 var(--pad)}
.iv-axis-label{display:flex;align-items:center;gap:12px;font-size:10px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:rgba(250,247,242,.5);margin:0 0 14px}
.iv-axis-label .iv-axis-dot{width:6px;height:6px;border-radius:50%;background:var(--cjp-gold)}
.iv-axis-bar{height:3px;border-radius:999px;background:linear-gradient(90deg,var(--cjp-gold-soft),var(--cjp-gold) 55%,var(--cjp-gold-deep))}
.iv-axis-ends{display:flex;justify-content:space-between;margin-top:12px;font-size:11px;font-weight:300;letter-spacing:.02em;color:rgba(250,247,242,.62)}

.iv-strat-grid{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad);display:grid;grid-template-columns:repeat(4,1fr);gap:0;border-top:1px solid rgba(250,247,242,.18)}
.iv-case{padding:30px clamp(20px,2vw,34px) 12px 0;border-right:1px solid rgba(250,247,242,.14);display:flex;flex-direction:column}
.iv-case:last-child{border-right:0;padding-right:0}
.iv-case-k{font-family:var(--font-display);font-weight:500;font-size:clamp(26px,2.4vw,34px);line-height:1;color:#fff;margin:0 0 6px}
.iv-case-tag{font-size:10px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--cjp-gold-light);margin:0 0 20px}
.iv-meter{display:flex;gap:6px;margin:0 0 18px}
.iv-meter-pip{width:100%;height:4px;border-radius:999px;background:rgba(250,247,242,.16)}
.iv-meter-pip.on{background-image:linear-gradient(90deg,var(--cjp-gold-soft),var(--cjp-gold) 55%,var(--cjp-gold-deep));background-size:400% 100%;background-repeat:no-repeat}
.iv-meter-pip:nth-child(1).on{background-position:0% 0}
.iv-meter-pip:nth-child(2).on{background-position:33.333% 0}
.iv-meter-pip:nth-child(3).on{background-position:66.667% 0}
.iv-meter-pip:nth-child(4).on{background-position:100% 0}
.iv-case-d{font-weight:300;font-size:13.5px;line-height:1.72;color:rgba(250,247,242,.74);margin:0}

/* ---- Cesión (light, signature feature) ------------------------------ */
.iv-ces{padding:var(--sec) 0;background:var(--cjp-sand)}
.iv-ces-head{max-width:var(--maxw);margin:0 auto clamp(44px,5vw,68px);padding:0 var(--pad);display:grid;grid-template-columns:1.15fr 1fr;gap:clamp(40px,6vw,100px);align-items:start}
.iv-ces-title{font-family:var(--font-display);font-weight:400;font-size:clamp(32px,3.8vw,54px);line-height:1.08;letter-spacing:-.01em;color:var(--cjp-charcoal);margin:0;text-wrap:balance}
.iv-ces-lede{font-weight:300;font-size:15.5px;line-height:1.78;color:var(--fg-muted);margin:0}
.iv-ces-note{display:flex;gap:16px;align-items:flex-start;margin:22px 0 0;padding:18px 22px;background:var(--cjp-white);border:1px solid var(--line);border-left:2px solid var(--cjp-gold);border-radius:var(--radius-md)}
.iv-ces-note p{font-family:var(--font-display);font-style:italic;font-weight:500;font-size:16px;line-height:1.5;color:var(--cjp-charcoal);margin:0}
.iv-ces-note .ic{color:var(--cjp-gold-deep);flex:0 0 auto}

/* value-rising chart + numbered steps */
.iv-ces-chart{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad)}
.iv-ces-graph{position:relative;height:clamp(120px,14vw,180px);border-bottom:1px solid var(--line-strong);border-left:1px solid var(--line-strong);margin-bottom:8px}
.iv-ces-graph svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.iv-ces-vlabel{position:absolute;top:0;left:8px;font-size:9.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--fg-subtle)}
.iv-ces-tlabel{position:absolute;bottom:8px;right:0;font-size:9.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--fg-subtle)}
.iv-ces-rise{stroke:var(--cjp-gold);stroke-width:2;fill:none;stroke-dasharray:1;stroke-dashoffset:1;
  transition:stroke-dashoffset 1.6s var(--ease)}
.iv-ces-chart.in .iv-ces-rise{stroke-dashoffset:0}
.iv-ces-fill{fill:url(#ivGrad);opacity:0;transition:opacity 1.2s var(--ease) .4s}
.iv-ces-chart.in .iv-ces-fill{opacity:1}
.iv-ces-node{fill:var(--cjp-white);stroke:var(--cjp-gold);stroke-width:2;opacity:0;transition:opacity .4s var(--ease)}
.iv-ces-chart.in .iv-ces-node{opacity:1}

.iv-ces-steps{max-width:var(--maxw);margin:0 auto;padding:0 var(--pad);display:grid;grid-template-columns:repeat(4,1fr);gap:0;border-top:1px solid var(--line-strong)}
.iv-ces-step{position:relative;padding:26px clamp(18px,2vw,30px) 6px 0;border-right:1px solid var(--line)}
.iv-ces-step:last-child{border-right:0;padding-right:0}
.iv-ces-num{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;
  border:1px solid var(--cjp-gold);color:var(--cjp-gold-deep);font-family:var(--font-display);font-weight:500;font-size:16px;margin-bottom:16px}
.iv-ces-st{font-family:var(--font-display);font-weight:500;font-size:clamp(20px,1.8vw,25px);line-height:1.1;color:var(--cjp-charcoal);margin:0 0 10px}
.iv-ces-sd{font-weight:300;font-size:13.5px;line-height:1.68;color:var(--fg-muted);margin:0}

/* ---- Closing CTA (dark) --------------------------------------------- */
.iv-cta{background:var(--cjp-charcoal);color:var(--cjp-offwhite);padding:var(--sec) var(--pad)}
.iv-cta-inner{max-width:760px;margin:0 auto;text-align:center}
.iv-cta-eyebrow{text-align:center;color:var(--cjp-gold-light)}
.iv-cta-title{font-family:var(--font-display);font-weight:400;font-size:clamp(32px,3.8vw,52px);line-height:1.1;color:#fff;margin:0;text-wrap:balance}
.iv-cta-lede{font-weight:300;font-size:16px;line-height:1.7;color:rgba(250,247,242,.78);max-width:50ch;margin:22px auto 0}

/* closing CTA: mail + WhatsApp buttons (this page uses buttons, not a form) */
.iv-cta-actions{display:flex;gap:12px;justify-content:center;margin-top:36px;flex-wrap:wrap}
/* WhatsApp button (self-contained — copied from css/dev.css → main.css token) */
.cjp-btn-wa{background:#25D366;color:#fff}
.cjp-btn-wa:hover{background:#1ebe5a}

/* legacy form rules (harmless — page renders buttons, kept for completeness) */
.iv-cta-form{display:flex;gap:12px;justify-content:center;margin-top:36px;flex-wrap:wrap}
.iv-cta-sent{font-family:var(--font-display);font-size:22px;color:var(--cjp-gold-light);margin-top:36px}

/* Desktop: space on BOTH sides of the column dividers (text not glued to the line) */
@media(min-width:1025px){
  .iv-src-card{padding-left:clamp(22px,2.4vw,40px)}
  .iv-src-card:first-child{padding-left:0}
  .iv-case{padding-left:clamp(20px,2vw,34px)}
  .iv-case:first-child{padding-left:0}
  .iv-ces-step{padding-left:clamp(18px,2vw,30px)}
  .iv-ces-step:first-child{padding-left:0}
}

/* ---- responsive ----------------------------------------------------- */
@media(max-width:1024px){
  .iv-offer-grid{grid-template-columns:1fr;gap:36px}
  .iv-src-grid{grid-template-columns:1fr 1fr}
  .iv-src-card:nth-child(2n){border-right:0;padding-right:0}
  .iv-src-card:nth-child(1),.iv-src-card:nth-child(2){border-bottom:1px solid var(--line)}
  .iv-strat-grid{grid-template-columns:1fr 1fr;border-top:0}
  .iv-case{border-right:0;border-top:1px solid rgba(250,247,242,.14);padding:26px 0 14px}
  .iv-case:nth-child(odd){padding-right:clamp(20px,3vw,40px)}
  .iv-ces-head{grid-template-columns:1fr;gap:28px}
  .iv-ces-steps{grid-template-columns:1fr 1fr}
  .iv-ces-step:nth-child(2n){border-right:0;padding-right:0}
  .iv-ces-step:nth-child(1),.iv-ces-step:nth-child(2){border-bottom:1px solid var(--line)}
}
@media(max-width:680px){
  .iv-hero-title{font-size:clamp(38px,9vw,54px)}
  .iv-src-grid{grid-template-columns:1fr}
  .iv-src-card{border-right:0;padding-right:0;border-bottom:1px solid var(--line)}
  .iv-strat-grid{grid-template-columns:1fr}
  .iv-case{padding:24px 0 12px}
  .iv-ces-steps{grid-template-columns:1fr}
  .iv-ces-step,.iv-ces-step:nth-child(2n){border-right:0;padding-right:0;border-bottom:1px solid var(--line)}
  .iv-ces-step:last-child{border-bottom:0}
  .iv-cta-actions{flex-direction:column}
  .iv-cta-form{flex-direction:column}
  .iv-cta-form .cjp-field{min-width:0}
}
