/* ==========================================================================
   FinFlex — sitio institucional
   Paleta tomada del logo oficial (navy + arco lima) y alineada con
   El Método FinFlex (metodofinflex.kuantia.cl) y FinFly (teal).
   ========================================================================== */

:root {
  --navy: #001F49;
  --navy-deep: #00132E;
  --navy-soft: #12305E;
  --lime: #93E900;
  --lime-dark: #7AC200;
  --lime-text: #3F6B00;
  --teal: #00BDC4;
  --teal-text: #007C82;

  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --surface-alt: #F2EFE7;
  --text: #0B1437;
  --muted: #5A6180;
  --inverse: #FFFFFF;
  --inverse-muted: #A9B4DA;
  --border: #E4E0D6;
  --border-inverse: rgba(255, 255, 255, .14);
  --error: #B42318;

  --font-display: "Newsreader", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(0, 31, 73, .06), 0 8px 24px rgba(0, 31, 73, .08);
  --shadow-lg: 0 20px 50px rgba(0, 31, 73, .16);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--teal-text); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .hero :focus-visible, .footer :focus-visible { outline-color: var(--lime); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lime-text); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--lime); }
.eyebrow--light { color: var(--lime); }

.title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); letter-spacing: -.01em; color: var(--navy);
}
.title--light { color: var(--inverse); }
.lead { font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); color: var(--muted); margin-top: 18px; }
.lead--light { color: var(--inverse-muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--lime); color: var(--navy); box-shadow: 0 6px 20px rgba(147, 233, 0, .28); }
.btn--accent:hover { background: var(--lime-dark); }
.btn--primary { background: var(--navy); color: var(--inverse); }
.btn--primary:hover { background: var(--navy-soft); }
.btn--ghost { border-color: rgba(255, 255, 255, .5); color: var(--inverse); }
.btn--ghost:hover { border-color: var(--inverse); background: rgba(255, 255, 255, .08); }
.btn--sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn__icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm .btn__icon { width: 18px; height: 18px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  font-weight: 700; color: var(--navy); text-decoration: none;
  border-bottom: 2px solid var(--lime); padding-bottom: 2px;
}
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s, box-shadow .3s, height .3s;
}
.header.is-solid { background: rgba(255, 255, 255, .96); box-shadow: 0 1px 0 var(--border); backdrop-filter: saturate(1.4) blur(10px); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: block; flex-shrink: 0; color: var(--inverse); transition: color .3s; line-height: 0; }
.brand__logo { height: 54px; width: auto; }
.header.is-solid .brand, .header.is-open .brand { color: var(--navy); }
@media (max-width: 560px) { .brand__logo { height: 46px; } }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  color: var(--inverse); text-decoration: none; font-weight: 600; font-size: .9375rem; position: relative;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.header.is-solid .nav a:not(.btn) { color: var(--navy); }

.menu-toggle {
  display: none; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: 10px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--inverse); border-radius: 2px; transition: transform .25s, opacity .2s, background-color .3s; }
.header.is-solid .menu-toggle span, .header.is-open .menu-toggle span { background: var(--navy); }
.header.is-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.is-open .menu-toggle span:nth-child(2) { opacity: 0; }
.header.is-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 24px;
    box-shadow: var(--shadow-lg); transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .25s var(--ease), opacity .2s, visibility .2s;
  }
  .header.is-open { background: var(--surface); }
  .header.is-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { color: var(--navy); padding: 16px 4px; border-bottom: 1px solid var(--border); font-size: 1.0625rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 18px; min-height: 50px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  color: var(--inverse); overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 85% 10%, var(--navy-soft) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  padding: calc(var(--header-h) + 48px) 0 56px;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(0, 19, 46, .94) 0%, rgba(0, 31, 73, .82) 45%, rgba(0, 31, 73, .45) 100%),
    linear-gradient(0deg, rgba(0, 19, 46, .6), transparent 40%);
}
/* arco lima del logo como gesto gráfico */
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 1100px; height: 1100px; right: -520px; top: -420px; border-radius: 50%;
  border: 5px solid transparent; border-left-color: var(--lime); border-bottom-color: var(--lime);
  opacity: .55; transform: rotate(-20deg);
}
.hero__content { max-width: 1200px; }
.hero__title {
  font-family: var(--font-display); font-weight: 600; max-width: 15ch;
  font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); line-height: 1.05; letter-spacing: -.015em;
}
.hero__title em { font-style: italic; color: var(--lime); }
.hero__lead { max-width: 56ch; margin-top: 22px; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: #D5DCF0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 56px 0 0; max-width: 440px;
  border-top: 1px solid var(--border-inverse);
}
.stats__item { padding: 20px 16px 0 0; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats__item + .stats__item { padding-left: 20px; border-left: 1px solid var(--border-inverse); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 600; color: var(--lime); line-height: 1; }
.stats dt { margin-top: 8px; font-size: .875rem; color: var(--inverse-muted); }

@media (max-width: 560px) {
  .hero__actions .btn { width: 100%; }
  .stats__item + .stats__item { padding-left: 12px; }
  .stats dt { font-size: .78rem; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--navy); color: var(--inverse); position: relative; overflow: hidden; }
.section__head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head--wide { max-width: 760px; }

/* ---------- Nosotros ---------- */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.1fr; gap: 72px; } }
.split__media img { width: 100%; max-width: 560px; margin: 0 auto; }
.mv { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 600px) { .mv { grid-template-columns: 1fr 1fr; } }
.mv__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; border-top: 4px solid var(--lime); }
.mv__item h3 { font-size: 1.0625rem; color: var(--navy); margin-bottom: 8px; }
.mv__item p { font-size: .9375rem; color: var(--muted); }

/* ---------- Servicios ---------- */
.cards { display: grid; gap: 24px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__img { width: 100%; aspect-ratio: 350 / 220; object-fit: cover; }
.card__body { padding: 26px 26px 30px; }
.card__num { display: inline-block; font-weight: 800; font-size: .8125rem; color: var(--lime-text); letter-spacing: .1em; margin-bottom: 10px; }
.card h3 { font-size: 1.1875rem; color: var(--navy); margin-bottom: 12px; }
.card p { color: var(--muted); font-size: .9688rem; }

/* ---------- Por qué ---------- */
.section--dark::before {
  content: ""; position: absolute; width: 900px; height: 900px; left: -480px; bottom: -560px; border-radius: 50%;
  border: 4px solid transparent; border-top-color: var(--lime); border-right-color: var(--lime); opacity: .25; pointer-events: none;
}
.why { position: relative; display: grid; gap: 48px; }
.why__intro { max-width: 640px; }
.why__grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .why__grid { grid-template-columns: repeat(3, 1fr); } }
.why__item { padding: 28px 24px; border: 1px solid var(--border-inverse); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .03); }
.why__item svg { width: 40px; height: 40px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.why__item h3 { font-size: 1.125rem; margin-bottom: 10px; }
.why__item p { color: var(--inverse-muted); font-size: .9375rem; }

/* ---------- Plan de trabajo ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: s; position: relative; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 2px; background: linear-gradient(90deg, var(--lime), var(--teal)); opacity: .5; }
}
.step { position: relative; }
.step__n {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: var(--lime); font: 600 1.5rem/1 var(--font-display);
  margin-bottom: 20px; position: relative; box-shadow: 0 0 0 8px var(--bg);
}
.step h3 { font-size: 1.125rem; color: var(--navy); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .9375rem; }

/* ---------- Ecosistema ---------- */
.eco { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .eco { grid-template-columns: 1fr 1fr; }
  .eco__card--book { grid-column: 1 / -1; grid-row: 1; }
}
.eco__card {
  background: var(--surface); border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 40px);
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--border);
}
.eco__card h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); color: var(--navy); margin: 22px 0 12px; }
.eco__card > p, .eco__bookbody > p { color: var(--muted); }
.eco__card .btn, .eco__card .link-arrow { margin-top: auto; }
.eco__card .btn { margin-top: 28px; }
.eco__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; flex-wrap: wrap; }
.eco__logo { height: 56px; width: auto; }
.eco__logo--wide { height: 40px; }
.eco__card--finfly { border-top: 4px solid var(--teal); }
.eco__card--kuantia { border-top: 4px solid #1D6FD1; }

.tag {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; background: var(--surface-alt); color: var(--navy);
}
.tag--accent { background: var(--lime); color: var(--navy); }

.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; font-size: .9375rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.eco__card--book {
  background: var(--navy); color: var(--inverse); border: 0; display: grid; gap: 32px; align-items: center; overflow: hidden; position: relative;
}
@media (min-width: 760px) { .eco__card--book { grid-template-columns: minmax(0, 300px) 1fr; gap: 56px; } }
/* Mockup 3D del workbook (portado de metodofinflex.kuantia.cl) */
.book3d { --book-width: min(280px, 72vw); --book-depth: 5px; position: relative; display: grid; place-items: center; padding: 12px 0 24px; }
.book3d__book { width: var(--book-width); perspective: 1800px; }
.book3d__body { position: relative; aspect-ratio: 400 / 530; transform-style: preserve-3d; transform: rotateY(-24deg) rotateX(6deg); transition: transform .6s var(--ease); }
@media (hover: hover) { .book3d__book:hover .book3d__body { transform: rotateY(-12deg) rotateX(3deg); } }
.book3d__cover {
  position: absolute; inset: 0; overflow: hidden; border-radius: 2px 4px 4px 2px; transform: translateZ(var(--book-depth));
  box-shadow: 0 40px 60px -20px rgba(0, 0, 0, .6), 0 18px 24px -12px rgba(0, 0, 0, .45);
}
.book3d__cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, rgba(0, 0, 0, .07), transparent 28%, rgba(255, 255, 255, .1) 58%, transparent 75%); }
.book3d__svg { width: 100%; height: 100%; }
.book3d__spiral { position: absolute; top: 0; bottom: 0; left: -3.4%; width: 6%; height: 100%; overflow: visible; transform: translateZ(calc(var(--book-depth) + 1px)); }
.book3d__pages { position: absolute; top: 2%; bottom: 2%; right: 0; width: calc(var(--book-depth) * 2); transform: translateX(var(--book-depth)) rotateY(90deg); transform-origin: right; background: repeating-linear-gradient(90deg, #fbfaf6 0 1px, #e4e0d6 1px 2px); }
.book3d__back { position: absolute; inset: 0; background: #E4E1DA; border-radius: 2px 4px 4px 2px; transform: translateZ(calc(var(--book-depth) * -1)); }
.book3d__shadow { position: absolute; bottom: 0; width: calc(var(--book-width) * .9); height: 28px; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(8px); }
@media (prefers-reduced-motion: reduce) { .book3d__body { transition: none; } }

.eco__card--book h3 { color: var(--inverse); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); margin-top: 16px; }
.eco__card--book .eco__bookbody > p { color: var(--inverse-muted); }
.eco__quote { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--lime) !important; margin-bottom: 12px; }
.price-list { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--border-inverse); max-width: 460px; }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-inverse); font-size: .9375rem; }
.price-list strong { color: var(--lime); white-space: nowrap; }
.eco__card--book .btn--primary { background: var(--lime); color: var(--navy); }
.eco__card--book .btn--primary:hover { background: var(--lime-dark); }

/* ---------- Contacto ---------- */
.contact__inner { position: relative; display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) { .contact__inner { grid-template-columns: 1fr 1.15fr; gap: 72px; } }
.contact__channels { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.contact__channels a { display: inline-flex; align-items: center; gap: 12px; color: var(--inverse); text-decoration: none; font-weight: 600; }
.contact__channels a:hover { color: var(--lime); }
.contact__channels svg { width: 22px; height: 22px; fill: var(--lime); }

.form { background: var(--surface); color: var(--text); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-lg); }
.form__grid { display: grid; gap: 16px; }
@media (min-width: 600px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: .875rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-text); box-shadow: 0 0 0 4px rgba(0, 189, 196, .18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); }
.form__error { color: var(--error); font-size: .875rem; margin: 14px 0 0; }
.form .btn { margin-top: 20px; }
.form__note { margin-top: 12px; font-size: .8125rem; color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: var(--inverse-muted); padding: 64px 0 28px; font-size: .9375rem; }
.footer__inner { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; } }
.footer__logo { width: 190px; height: auto; color: var(--inverse); margin-bottom: 16px; }
.footer__brand p { max-width: 30ch; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { color: var(--inverse); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.footer__col a { color: var(--inverse-muted); text-decoration: none; }
.footer__col a:hover { color: var(--lime); }
.footer__share { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--lime) !important; font-weight: 700; }
.footer__share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-inverse); font-size: .8125rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__video { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
