/* =================================================================
   IVP INVEST — LANDING
   Campo verde (el verde de las ganancias en la app) y el teléfono
   como protagonista.
   ================================================================ */

.ivp-invest-page { --accent: #078a4c; color: var(--ink); }
.ivp-invest-page ::selection { background: var(--green); color: var(--green-ink); }
.ivp-invest-page :focus-visible { outline-color: var(--green-ink); }
.ivp-invest-page .faqs summary:hover { color: var(--accent); }
.ivp-invest-page .faqs details[open] summary i { background: var(--green); color: var(--green-ink); }

.inv-wrap { max-width: calc(var(--container) - 2 * var(--gutter)); margin: 0 auto; }

.ivp-invest-page h1, .ivp-invest-page h2 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: .98; }
.ivp-invest-page h2 em { color: var(--accent); }

/* ---------- Botones ---------- */
.inv-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 14px 28px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font: 700 15.5px var(--body);
    white-space: nowrap;
    cursor: pointer;
    transition: transform .25s var(--ease), background .2s ease, border-color .2s ease, color .2s ease;
}
.inv-btn i { transition: transform .25s var(--ease); }
.inv-btn:hover { transform: translateY(-2px); }
.inv-btn:hover i { transform: translateX(4px); }
.inv-btn--primary { background: var(--green-ink); color: #fff; }
.inv-btn--primary:hover { background: #000; }
.inv-btn--ghost { border-color: rgba(3, 50, 29, .35); color: var(--green-ink); }
.inv-btn--ghost:hover { border-color: var(--green-ink); background: var(--green-ink); color: #fff; }

/* ---------- Hero ---------- */
.inv-hero { position: relative; background: var(--green); color: var(--green-ink); padding: clamp(20px, 2.4vw, 36px) var(--gutter) 0; }
.inv-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: center; }
.inv-hero__copy > * { animation: hero-in .8s var(--ease) both; }
.inv-hero__copy > :nth-child(2) { animation-delay: .08s; }
.inv-hero__copy > :nth-child(3) { animation-delay: .14s; }
.inv-hero__copy > :nth-child(4) { animation-delay: .2s; }

.ivp-invest-page h1 { font-size: clamp(46px, 6.2vw, 96px); line-height: .95; }
.ivp-invest-page h1 em { position: relative; display: inline-block; color: inherit; white-space: nowrap; }
.ivp-invest-page h1 em svg { position: absolute; left: 0; bottom: -.17em; width: 100%; height: .26em; overflow: visible; }
.ivp-invest-page h1 em path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; animation: inv-draw 1.5s .5s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes inv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.inv-lede { max-width: 490px; margin: clamp(28px, 3vw, 40px) 0 30px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }
.inv-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 26px 0 0; padding: 0; font-size: 15px; font-weight: 600; }
.inv-trust li::before { content: "✓"; margin-right: 8px; font-weight: 800; }

/* Tres teléfonos en abanico */
.inv-phones {
    --mx: 0; --my: 0;
    --pw: clamp(250px, 22vw, 308px);
    position: relative;
    z-index: 2;
    height: calc(var(--pw) * 2.2);
    margin-bottom: 30px;
    perspective: 1700px;
}
.inv-phones .iphone { position: absolute; left: 50%; top: 0; --w: var(--pw); transition: transform .5s var(--ease); }
.inv-phones__l, .inv-phones__r { --w: calc(var(--pw) * .84) !important; }
.inv-phones__l { transform: translate3d(calc(-110% + var(--mx) * -14px), calc(60px + var(--my) * -8px), -60px) rotateZ(-9deg) rotateY(12deg); }
.inv-phones__r { transform: translate3d(calc(10% + var(--mx) * -14px), calc(60px + var(--my) * -8px), -60px) rotateZ(9deg) rotateY(-12deg); }
.inv-phones__c { z-index: 3; transform: translate3d(calc(-50% + var(--mx) * 12px), calc(var(--my) * 8px), 0) rotateY(calc(var(--mx) * 7deg)) rotateX(calc(var(--my) * -4deg)); }
.inv-phones .iphone__frame { animation: stage-up 1s .1s var(--ease) both; }
.inv-phones__l .iphone__frame, .inv-phones__r .iphone__frame { animation-delay: .3s; }
.inv-phones .iphone__key { animation: hero-in .3s 1s both; }
.inv-phones__hint {
    position: absolute;
    left: 50%;
    bottom: -14px;
    z-index: 4;
    width: max-content;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border-radius: 999px;
    background: #fff;
    color: var(--green-ink);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
    box-shadow: 0 16px 34px -14px rgba(3, 50, 29, .6);
    pointer-events: none;
}
.inv-phones__hint svg { flex: none; width: 18px; height: 18px; animation: inv-tap 2.2s ease-in-out infinite; }
@keyframes inv-tap { 0%, 60%, 100% { transform: none; } 75% { transform: translateY(3px) scale(.9); } }

.inv-tape { display: flex; overflow: hidden; margin: 0 calc(var(--gutter) * -1); padding: 18px 0; background: var(--green-ink); color: var(--green); }
.inv-tape__list { display: flex; flex-shrink: 0; animation: marquee 44s linear infinite; }
.inv-tape span { padding: 0 clamp(18px, 2vw, 30px); font: 600 clamp(17px, 1.5vw, 22px)/1.2 var(--display); white-space: nowrap; }

/* ---------- Secciones ---------- */
.inv-section { padding: var(--section-y) var(--gutter); }
.inv-section--soft { background: var(--soft); }
.inv-section--top { padding-top: 0; }
.inv-intro { max-width: 900px; }
.inv-intro h2 { font-size: var(--h2); }
.inv-intro > p { margin: 22px 0 0; max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.65; }

/* ---------- Recorrido con teléfono fijo ---------- */
.story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 100px); margin-top: clamp(20px, 4vw, 48px); }
.story__stage {
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    height: calc(100svh - 48px);
    min-height: 560px;
    max-height: 860px;
    display: grid;
    place-items: center;
    border-radius: 36px;
    background: var(--c);
    transition: background .7s ease;
    overflow: hidden;
    clip-path: inset(0 round 36px);
}
.story__stage .iphone { --w: min(330px, calc((100svh - 130px) / 2.09)); }
.story__step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; opacity: .22; transition: opacity .45s ease; }
.story__step:first-child { min-height: 88vh; }
.story__step.is-active { opacity: 1; }
.story__step h3 { margin: 0 0 16px; font-size: clamp(34px, 3.6vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.story__step p { margin: 0; max-width: 440px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.story__inline { display: none; }

/* ---------- Y además ---------- */
.inv-more { background: var(--green-ink); color: #fff; overflow: hidden; }
.inv-more.inv-section { padding-bottom: 0; }
.inv-more h2 em { color: var(--green); }
.inv-more__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 100px); align-items: end; }
.inv-more__grid > div:last-child { padding-bottom: var(--section-y); }
.inv-more__phone { --s: .5; display: grid; justify-items: center; height: 640px; align-self: end; }
.inv-more__phone .iphone { --w: 340px; transform: translateY(calc((.5 - var(--s)) * 120px)) rotate(-3deg); }
.is-menu .app-sheet { opacity: 1; visibility: visible; }
.is-menu .app-sheet__panel { transform: none; }
.inv-more__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 48px; margin: clamp(36px, 4vw, 56px) 0 0; }
.inv-more__list dt { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; color: var(--green); }
.inv-more__list dd { margin: 8px 0 0; color: #c3d9cd; line-height: 1.55; }
.inv-more__note { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .16); max-width: 600px; font-weight: 600; }

/* ---------- Pasos ---------- */
.inv-steps { list-style: none; margin: clamp(36px, 5vw, 60px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.inv-steps small { display: block; font: 700 clamp(90px, 11vw, 170px)/.8 var(--display); letter-spacing: -.06em; color: var(--green); }
.inv-steps h3 { margin: 26px 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.inv-steps p { margin: 0; color: var(--muted); }

/* ---------- Para quién ---------- */
.inv-audience { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px 80px; align-items: start; }
.inv-audience__list div { padding: 26px 0; border-top: 1px solid #d2d8e4; }
.inv-audience__list div:last-child { border-bottom: 1px solid #d2d8e4; }
.inv-audience__list h3 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.inv-audience__list p { margin: 0; color: var(--muted); }

/* ---------- Planes ---------- */
.inv-plans { margin-top: clamp(36px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; }
.inv-plan { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 3.6vw, 52px); border-radius: 32px; background: var(--soft); }
.inv-plan--featured { background: var(--green); color: var(--green-ink); }
.inv-plan__badge { position: absolute; top: clamp(24px, 3vw, 44px); right: clamp(24px, 3vw, 44px); padding: 7px 16px; border-radius: 999px; background: var(--green-ink); color: #fff; font-size: 14px; font-weight: 700; }
.inv-plan h3 { margin: 0 0 12px; font-size: clamp(38px, 4.4vw, 66px); font-weight: 700; letter-spacing: -.045em; line-height: .95; }
.inv-plan > p { margin: 0; max-width: 400px; font-size: 17px; }
.inv-plan ul { flex: 1; list-style: none; margin: 28px 0 36px; padding: 0; display: grid; gap: 12px; align-content: start; font-weight: 600; }
.inv-plan li::before { content: "✓"; margin-right: 10px; font-weight: 800; }
.inv-plan .inv-btn { align-self: flex-start; }

/* ---------- FAQ ---------- */
.inv-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px 80px; align-items: start; }

/* ---------- CTA final ---------- */
.inv-cta { background: var(--green); color: var(--green-ink); padding: 0 var(--gutter); overflow: hidden; }
.inv-cta__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.inv-cta__copy { padding: var(--section-y) 0; }
.inv-cta h2 { font-size: clamp(44px, 5.6vw, 86px); line-height: .95; }
.inv-cta p { max-width: 460px; margin: 24px 0 32px; font-size: 18px; }
.inv-disclaimer { display: block; max-width: 500px; margin-top: 34px; font-size: 13px; line-height: 1.6; }
.inv-cta__phones { --s: .5; position: relative; align-self: stretch; min-height: 560px; }
.inv-cta__phones .iphone { --w: clamp(220px, 19vw, 270px); position: absolute; left: 50%; top: 90px; transition: transform .3s linear; }
.inv-cta__phones .iphone:nth-child(1) { transform: translate(-112%, calc(110px + (.5 - var(--s)) * 160px)) rotate(-8deg); }
.inv-cta__phones .iphone:nth-child(2) { z-index: 2; transform: translate(-50%, calc((.5 - var(--s)) * -80px)); }
.inv-cta__phones .iphone:nth-child(3) { transform: translate(12%, calc(110px + (.5 - var(--s)) * 160px)) rotate(8deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .inv-phones__l { transform: translate3d(calc(-96% + var(--mx) * -14px), 60px, -60px) rotateZ(-9deg); }
    .inv-phones__r { transform: translate3d(calc(-4% + var(--mx) * -14px), 60px, -60px) rotateZ(9deg); }
}

@media (max-width: 900px) {
    .inv-hero__grid, .inv-audience, .inv-faq, .inv-cta__grid, .inv-more__grid, .story__grid { grid-template-columns: minmax(0, 1fr); }
    .inv-phones { margin-top: 30px; }
    .inv-more__phone { order: 2; height: 460px; }
    .inv-more__grid > div:last-child { padding-bottom: 20px; }
    .inv-steps { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .inv-cta__copy { padding-bottom: 0; }
    .inv-cta__phones { min-height: 420px; }
    .inv-cta__phones .iphone { top: 40px; }

    /* Sin teléfono fijo: cada paso lleva el suyo */
    .story__stage { display: none; }
    .story__steps { display: grid; gap: 64px; }
    .story__step, .story__step:first-child { min-height: 0; opacity: 1; }
    .story__step p { max-width: 560px; }
    .story__inline { display: grid; justify-items: center; height: 470px; margin-top: 26px; padding-top: 38px; border-radius: 30px; background: var(--c); overflow: hidden; clip-path: inset(0 round 30px); }
    .story__inline .iphone { --w: 270px; }
}

@media (max-width: 700px) {
    .inv-phones { --pw: 256px; }
    .inv-plans, .inv-more__list { grid-template-columns: minmax(0, 1fr); }
    .inv-plans .inv-plan--featured { order: -1; }
    .inv-more__list { gap: 26px; }
    .inv-plan .inv-btn { align-self: stretch; }
}

@media (max-width: 420px) {
    .inv-actions .inv-btn { width: 100%; }
}
