/* ============================================================
   MEDIVIA — Landing de presentación
   Paleta de marca: navy #0D2B4E · teal #0B7B8A · gold #C9A84C
   ============================================================ */

:root {
  --navy: #0D2B4E;
  --navy-deep: #081d36;
  --navy-soft: #15375f;
  --teal: #0B7B8A;
  --teal-light: #13a0b2;
  --gold: #C9A84C;
  --gold-light: #ddc079;
  --ink: #1c2b3a;
  --muted: #5b6b7b;
  --paper: #f7f9fb;
  --paper-alt: #eef3f7;
  --white: #ffffff;
  --line: rgba(13, 43, 78, 0.10);

  --font-display: 'Jost', 'Futura', system-ui, sans-serif;
  --font-serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(13, 43, 78, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container--narrow { max-width: 820px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 43, 78, 0);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .3s var(--ease);
  padding: 18px 0;
}
.nav.is-stuck {
  background: rgba(8, 29, 54, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,.5);
  padding: 12px 0;
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__cross { fill: var(--gold); }
.brand__path { stroke: var(--teal-light); stroke-width: 2.4; }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: .18em; color: #fff; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 500; letter-spacing: .01em; transition: color .2s; }
.nav__links a:hover { color: #fff; }
.nav__cta {
  border: 1px solid var(--gold);
  color: var(--gold-light) !important;
  padding: 8px 18px; border-radius: 50px;
  transition: background .25s, color .25s !important;
}
.nav__cta:hover { background: var(--gold); color: var(--navy-deep) !important; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 26px; height: 2px; background: #fff; transition: transform .3s var(--ease), opacity .3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  color: #fff; overflow: hidden; padding: 120px 24px 80px;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 600px at 78% 10%, rgba(11,123,138,.45), transparent 60%),
    radial-gradient(900px 500px at 12% 88%, rgba(201,168,76,.18), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}
.hero__inner { position: relative; z-index: 1; max-width: 880px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .32em; font-size: .76rem; color: var(--gold-light); margin-bottom: 26px; font-weight: 500; }
.hero__title { font-size: clamp(2.7rem, 7vw, 5.2rem); font-weight: 700; letter-spacing: -0.02em; }
.hero__lead {
  font-family: var(--font-serif); font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: rgba(255,255,255,.86); max-width: 660px; margin: 28px auto 38px; line-height: 1.6;
}
.hero__lead strong { color: var(--gold-light); font-weight: 500; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__tagline { margin-top: 40px; font-style: italic; font-family: var(--font-serif); color: rgba(255,255,255,.55); letter-spacing: .02em; }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1;
  color: rgba(255,255,255,.6); font-size: 1.4rem; animation: bob 2s infinite ease-in-out;
}
@keyframes bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 50px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, color .25s;
  cursor: pointer; border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 14px 30px -12px rgba(201,168,76,.7); }
.btn--gold:hover { background: var(--gold-light); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--ghost-dark { border-color: var(--navy); color: var(--navy); }
.btn--ghost-dark:hover { background: rgba(13,43,78,.06); }

/* ---------- STATS ---------- */
.stats { background: var(--navy-deep); color: #fff; padding: 0; }
.stats__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 48px 28px; text-align: center; border-right: 1px solid rgba(255,255,255,.08); }
.stat:last-child { border-right: 0; }
.stat__num { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; color: var(--gold-light); margin-bottom: 8px; }
.stat__label { font-size: .9rem; color: rgba(255,255,255,.7); line-height: 1.45; }

/* ---------- SECTIONS ---------- */
.section { padding: 100px 0; position: relative; }
.section--light { background: var(--white); color: var(--ink); }
.section--light.alt { background: var(--paper); }
.section--navy { background: var(--navy); color: #fff; }
.section--gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); color: var(--navy-deep); }

.kicker { text-transform: uppercase; letter-spacing: .26em; font-size: .78rem; font-weight: 600; color: var(--teal); margin-bottom: 16px; }
.kicker--gold { color: var(--gold-light); }
.kicker--navy { color: var(--navy); }

.section__title { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 760px; margin-bottom: 22px; }
.section__title--navy { color: var(--navy-deep); }
.section__intro { font-family: var(--font-serif); font-size: 1.22rem; color: var(--muted); max-width: 720px; line-height: 1.6; margin-bottom: 48px; }
.section__intro--light { color: rgba(255,255,255,.78); }
.section--navy .section__intro strong, .section__intro strong { color: var(--teal); font-weight: 600; }
.section--navy .section__intro--light strong { color: var(--gold-light); }

/* ---------- COMPARE TABLE ---------- */
.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 56px; box-shadow: var(--shadow); }
.compare__row { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; align-items: center; padding: 18px 26px; border-top: 1px solid var(--line); font-size: 1.02rem; }
.compare__row:first-child { border-top: 0; }
.compare__row--head { background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.compare__hi { color: #c2493f; font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(194,73,63,.4); }
.compare__lo { color: var(--teal); font-weight: 700; }

/* ---------- CARDS ---------- */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__stat { display: block; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.card p { color: var(--muted); }
.card--accent { background: var(--white); border-top: 3px solid var(--gold); }
.card--accent .card__stat { color: var(--teal); }

/* ---------- FEATURES ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 34px 30px; transition: transform .3s var(--ease), background .3s, border-color .3s; }
.feature:hover { transform: translateY(-5px); background: rgba(255,255,255,.08); border-color: rgba(201,168,76,.4); }
.feature__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 20px; color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.feature h3 { font-size: 1.2rem; margin-bottom: 10px; color: #fff; }
.feature p { color: rgba(255,255,255,.72); font-size: .96rem; }

/* ---------- JOURNEY ---------- */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: j; }
.journey__step { padding: 34px 26px 34px 0; border-top: 2px solid var(--teal); margin-right: 24px; position: relative; }
.journey__step::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(11,123,138,.15); }
.journey__num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--paper-alt); -webkit-text-stroke: 1px var(--teal); display: block; margin-bottom: 12px; }
.journey__step h3 { font-size: 1.12rem; margin-bottom: 8px; color: var(--navy); }
.journey__step p { color: var(--muted); font-size: .94rem; }

/* ---------- FUNNEL (TAM/SAM/SOM) ---------- */
.funnel { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 56px; }
.funnel__tier { width: 100%; max-width: 760px; padding: 22px 30px; border-radius: 12px; color: #fff; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; box-shadow: var(--shadow); }
.funnel__tier--tam { background: var(--navy); max-width: 760px; }
.funnel__tier--sam { background: var(--navy-soft); max-width: 640px; }
.funnel__tier--sam2 { background: var(--teal); max-width: 520px; }
.funnel__tier--som { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy-deep); max-width: 400px; }
.funnel__val { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.funnel__lbl { font-size: .86rem; opacity: .9; }

.why { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.why__title { color: var(--navy); font-size: 1.4rem; margin-bottom: 22px; }
.why__list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 30px; }
.why__list li { position: relative; padding-left: 28px; color: var(--muted); }
.why__list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.why__list strong { color: var(--ink); }

/* ---------- REVENUE ---------- */
.revenue { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.revenue__item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 20px; }
.revenue__bar { grid-column: 1 / 2; grid-row: 1 / 3; height: 100%; min-height: 56px; background: rgba(255,255,255,.07); border-radius: 8px; overflow: hidden; position: relative; }
.revenue__bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-light)); border-radius: 8px; transition: width 1.2s var(--ease); }
.revenue__item.is-visible .revenue__bar span { width: var(--w); }
.revenue__meta { display: flex; flex-direction: column; padding-left: 18px; }
.revenue__meta strong { color: #fff; font-size: 1.05rem; }
.revenue__meta span { color: rgba(255,255,255,.6); font-size: .9rem; }
.revenue__pct { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold-light); padding-left: 18px; }

/* ---------- PROJECTIONS TABLE ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 44px; }
.ptable { width: 100%; border-collapse: collapse; min-width: 560px; background: #fff; }
.ptable th, .ptable td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--line); }
.ptable thead th { background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 500; letter-spacing: .03em; }
.ptable thead th:not(:first-child), .ptable td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ptable tbody tr:nth-child(even) { background: var(--paper); }
.ptable tbody td:first-child { color: var(--muted); }
.ptable tbody td:not(:first-child) { font-weight: 600; color: var(--navy); }
.ptable tbody tr:last-child td { border-bottom: 0; }

/* ---------- ROADMAP ---------- */
.roadmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.roadmap__phase { padding: 30px 20px 0 0; border-top: 2px solid var(--line); margin-right: 18px; position: relative; }
.roadmap__phase::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.roadmap__when { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); font-weight: 600; }
.roadmap__phase h3 { font-size: 1.05rem; margin: 8px 0; color: var(--navy); }
.roadmap__phase p { font-size: .9rem; color: var(--muted); }

/* ---------- INVEST ---------- */
.invest { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 48px; }
.invest__box { background: rgba(13,43,78,.06); border: 1px solid rgba(13,43,78,.12); border-radius: 12px; padding: 26px 24px; }
.invest__label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--navy-soft); margin-bottom: 8px; }
.invest__val { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy-deep); }
.invest__use { max-width: 760px; margin-bottom: 44px; }
.invest__use h3 { color: var(--navy-deep); margin-bottom: 20px; font-size: 1.3rem; }
.usebars { display: flex; flex-direction: column; gap: 14px; }
.usebar { position: relative; background: rgba(13,43,78,.1); border-radius: 8px; height: 44px; overflow: hidden; }
.usebar__fill { position: absolute; inset: 0; width: 0; background: var(--navy); border-radius: 8px; transition: width 1.2s var(--ease); }
.usebar.is-visible .usebar__fill { width: var(--w); }
.usebar__txt { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 600; font-size: .92rem; z-index: 1; }
.invest__quote { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: var(--navy-deep); border-left: 4px solid var(--navy); padding-left: 26px; max-width: 820px; line-height: 1.5; }

/* ---------- MANIFESTO ---------- */
.manifesto { text-align: center; }
.manifesto__lines { display: flex; flex-direction: column; gap: 20px; margin: 30px 0 40px; }
.manifesto__lines p { font-family: var(--font-serif); font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: rgba(255,255,255,.9); line-height: 1.5; }
.manifesto__sign { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--gold-light); letter-spacing: .02em; }

/* ---------- CONTACT ---------- */
.contact { text-align: center; }
.contact .section__title { margin-left: auto; margin-right: auto; }
.contact__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 40px; box-shadow: var(--shadow); max-width: 620px; margin: 20px auto 0; }
.contact__name { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--navy); }
.contact__role { color: var(--muted); margin-bottom: 28px; }
.contact__links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.contact__loc { font-size: .88rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- FOOTER ---------- */
.footer { background: var(--navy-deep); color: #fff; padding: 56px 0 40px; text-align: center; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.brand--footer .brand__word { font-size: 1.4rem; }
.footer__tag { font-family: var(--font-serif); font-style: italic; color: var(--gold-light); }
.footer__legal { font-size: .82rem; color: rgba(255,255,255,.5); max-width: 560px; }

/* ---------- REVEAL ANIMATION ---------- */
.section .container > *, .stat, .feature, .card, .journey__step, .roadmap__phase, .invest__box, .funnel__tier { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible, .is-visible.stat, .is-visible.feature, .is-visible.card, .is-visible.journey__step, .is-visible.roadmap__phase, .is-visible.invest__box, .is-visible.funnel__tier { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .section .container > *, .stat, .feature, .card, .journey__step, .roadmap__phase, .invest__box, .funnel__tier { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .cards--3, .features { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: repeat(2, 1fr); gap: 30px 0; }
  .roadmap { grid-template-columns: repeat(2, 1fr); gap: 30px 0; }
  .invest { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--navy-deep); flex-direction: column; align-items: flex-start;
    padding: 100px 36px; gap: 26px; transform: translateX(100%); transition: transform .4s var(--ease);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,.6);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__burger { display: flex; z-index: 110; }
  .section { padding: 72px 0; }
  .cards--3, .features, .why__list, .invest { grid-template-columns: 1fr; }
  .journey, .roadmap { grid-template-columns: 1fr; }
  .journey__step, .roadmap__phase { margin-right: 0; }
  .compare__row { grid-template-columns: 1.4fr 1fr 1fr; padding: 14px 18px; font-size: .9rem; }
  .hero { padding-top: 100px; }
}
