/* ============================================================
   Control Financiero — landing
   Sepia editorial / kraft, inspirada en las referencias.
   ============================================================ */

:root {
  --bg: #ece3cf;
  --kraft: #ddcdaa;
  --kraft-2: #d3c097;
  --surface: #faf6ec;
  --surface-2: #f2ebda;
  --ink: #2b2620;
  --ink-soft: #4a4136;
  --muted: #897c66;
  --line: #d8c9a9;
  --line-soft: #e4d9bf;
  --terra: #b2572f;
  --terra-dark: #984022;
  --sage: #5a7a4e;
  --forest: #384328;
  --forest-2: #2f3922;
  --seal: #b2443a;

  --serif: "Fraunces", "Hoefler Text", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1140px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--terra); }

/* grano de papel */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

main, .nav-wrap, .footer, .promise { position: relative; z-index: 1; }

.ink { color: var(--ink); }

/* ---------- tipografía ---------- */

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 8.5vw, 5.2rem);
  line-height: 0.97;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.display-2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--terra) 32%, transparent);
  border-radius: 999px;
  margin: 0 0 22px;
}

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 0 32px;
}

/* ---------- botones (isla + botón-en-botón) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 10px 8px 26px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s, border-color 0.3s;
}
.btn > span:first-child { white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-ico {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  flex: 0 0 auto;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.btn-ico svg { width: 18px; height: 18px; }

.btn-primary { background: var(--terra); color: #faf6ec; }
.btn-primary .btn-ico { background: rgba(255,255,255,0.18); }
.btn-primary:hover { background: var(--terra-dark); }
.btn-primary:hover .btn-ico { transform: translate(3px, 0); }

.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink .btn-ico { background: rgba(255,255,255,0.14); }
.btn-ink:hover { background: #41392e; }
.btn-ink:hover .btn-ico { transform: translate(2px, -2px); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line); padding: 8px 26px;
}
.btn-ghost:hover { background: var(--surface); }

.btn-sm { min-height: 44px; padding: 6px 8px 6px 18px; gap: 8px; }
.btn-sm .btn-ico { width: 30px; height: 30px; }
.btn-sm .btn-ico svg { width: 15px; height: 15px; }

/* ---------- nav (isla flotante) ---------- */

.nav-wrap { position: sticky; top: 0; z-index: 50; display: flex; justify-content: center; padding: 14px clamp(14px, 3vw, 24px); }
.nav {
  width: min(var(--maxw), 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(74,57,32,0.5);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.seal { display: inline-block; line-height: 0; }
.seal-sm svg { border-radius: 9px; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { font-size: 0.96rem; font-weight: 500; color: var(--ink); }
.nav-links a:not(.btn):hover { color: var(--terra); }
.nav-links .btn-ink { color: var(--bg); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: var(--ink); border: 0; border-radius: 999px; cursor: pointer;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--bg); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- secciones ---------- */

.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(68px, 11vw, 140px) clamp(18px, 4vw, 40px); }
.section-head { max-width: 46ch; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head-center { max-width: none; text-align: center; }
.section-sub { color: var(--muted); font-size: 1.1rem; margin: 18px 0 0; }

/* ---------- hero ---------- */

.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) clamp(18px, 4vw, 40px) clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px); align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 46px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(22px, 5vw, 46px);
  list-style: none; margin: 0; padding: 28px 0 0; border-top: 1px solid var(--line);
}
.hero-stats strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1; letter-spacing: -0.02em; }
.hero-stats span { font-size: 0.84rem; color: var(--muted); }
.hero-poster { display: flex; justify-content: center; }

/* ---------- póster enmarcado (doble bisel) ---------- */

.poster {
  position: relative;
  background: var(--kraft);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 30px;
  padding: 20px;
  box-shadow: 0 2px 3px rgba(74,57,32,0.14), 0 40px 70px -28px rgba(74,57,32,0.5);
}
.poster::before {
  content: ""; position: absolute; inset: 9px;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 21px; pointer-events: none;
}
.poster-vlabel {
  position: absolute; left: -11px; top: 50%;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--kraft); padding: 10px 2px;
}
.poster-sprig { position: absolute; top: -18px; right: 14px; width: 112px; height: 112px; color: var(--ink); z-index: 3; }
.poster-stamp {
  position: absolute; bottom: -14px; left: -14px; z-index: 4;
  width: 76px; height: 76px; border-radius: 16px;
  background: var(--seal); color: #faf6ec;
  display: grid; place-items: center; text-align: center;
  transform: rotate(-9deg);
  box-shadow: 0 10px 20px -8px rgba(120,40,30,0.6);
  border: 1.5px solid color-mix(in srgb, #faf6ec 40%, var(--seal));
}
.poster-stamp-txt { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1; }
.poster-stamp-txt small { font-weight: 500; font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- maqueta de teléfono ---------- */

.phone {
  width: 230px; max-width: 62vw; aspect-ratio: 375 / 812;
  background: #1c1813; border-radius: 38px; padding: 9px; position: relative;
  box-shadow: 0 2px 4px rgba(74,57,32,0.18), 0 26px 50px -20px rgba(74,57,32,0.5);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 7px; border-radius: 999px; background: rgba(255,255,255,0.22); z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; }
.phone-lg { width: 262px; position: relative; z-index: 2; }

/* ---------- marquee ---------- */

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--kraft); padding: 15px 0; }
.marquee-track { display: inline-flex; align-items: center; gap: 26px; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.marquee-track i { color: var(--terra); font-style: normal; font-size: 0.7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- features (bento kraft) ---------- */

.features-sec { max-width: var(--maxw); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--line-soft); border-radius: 16px; pointer-events: none;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -26px rgba(74,57,32,0.45); }
.tile-ico {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  color: var(--ink); background: var(--kraft); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  margin-bottom: 18px;
}
.tile-ico svg { width: 26px; height: 26px; }
.tile h3 { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; margin: 0 0 2px; letter-spacing: -0.015em; }
.tile-cap { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terra); margin: 0 0 12px; }
.tile p:not(.tile-cap) { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- versiones ---------- */

.versions { display: grid; gap: 26px; }
.version {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 0.82fr; gap: clamp(24px, 4vw, 52px); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px;
  padding: clamp(28px, 4vw, 52px);
}
.version::before {
  content: ""; position: absolute; inset: 9px; border: 1px solid var(--line-soft);
  border-radius: 21px; pointer-events: none;
}
.version-pro { background: var(--ink); border-color: #3b342a; color: #ece3d3; }
.version-pro::before { border-color: rgba(255,255,255,0.08); }
.version-pro .version-desc { color: #c8bca6; }
.version-pro .version-for { color: #a99b83; }
.version-pro .ticks li { color: #ece3d3; }
.version-sprig { position: absolute; top: -14px; right: -6px; width: 120px; height: 120px; color: rgba(236,227,211,0.14); z-index: 1; }

.tag { display: inline-flex; align-items: baseline; gap: 10px; margin: 0 0 20px; }
.tag b { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); border: 1px solid color-mix(in srgb, var(--terra) 40%, transparent); border-radius: 999px; padding: 5px 13px; }
.tag span { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); }
.tag-pro b { color: #e4a06f; border-color: color-mix(in srgb, #e4a06f 45%, transparent); }
.tag-pro span { color: #a99b83; }

.version-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 14px; }
.version-desc { color: var(--muted); margin: 0 0 24px; font-size: 1.05rem; }
.ticks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; font-size: 1rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: color-mix(in srgb, var(--sage) 20%, transparent); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg); }
.version-pro .ticks li::before { background: rgba(159,197,143,0.22); }
.version-pro .ticks li::after { border-color: #9fc58f; }
.version-for { font-size: 0.92rem; color: var(--muted); margin: 0; }
.version-info { position: relative; z-index: 2; }
.version-shot { position: relative; z-index: 2; display: flex; justify-content: center; }
.version-shot-duo { min-height: 380px; align-items: center; }
.version-shot-duo .phone { position: absolute; }
.phone-back { transform: translateX(28%) rotate(5deg) scale(0.9); filter: brightness(0.96); }
.phone-front { transform: translateX(-16%) rotate(-3deg); z-index: 2; }

/* ---------- cómo funciona (medallones) ---------- */

.how-sec { text-align: center; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; top: 44px; left: 16%; right: 16%; height: 0;
  border-top: 2px dashed var(--line); z-index: 0;
}
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.medallion {
  display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 2px 2px rgba(74,57,32,0.08), inset 0 0 0 7px var(--surface), inset 0 0 0 8px var(--line-soft);
  margin-bottom: 22px;
}
.medallion-num { font-family: var(--serif); font-weight: 600; font-size: 1.8rem; color: var(--terra); letter-spacing: -0.02em; }
.step h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 0 0 2px; }
.step-cap { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terra); margin: 0 0 10px; }
.step p:not(.step-cap) { margin: 0; color: var(--muted); max-width: 32ch; }

/* ---------- promesa (banda verde oliva) ---------- */

.promise { position: relative; overflow: hidden; background: var(--forest); color: #ece3d3; margin-top: clamp(20px, 4vw, 44px); }
.promise-sprig { position: absolute; width: 190px; height: 190px; color: rgba(236,227,211,0.12); z-index: 0; }
.promise-sprig-l { top: -30px; left: -30px; }
.promise-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(68px, 10vw, 128px) clamp(18px, 4vw, 40px); text-align: center; }
.promise-seal { margin: 0 auto 26px; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3)); }
.promise-inner .display-2 { max-width: 20ch; margin: 0 auto 18px; }
.promise-inner > p { color: #c3b79f; max-width: 52ch; margin: 0 auto 48px; font-size: 1.1rem; }
.promise-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(28px, 6vw, 76px); list-style: none; margin: 0; padding: 0; }
.promise-stats strong { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1; color: #e4a06f; letter-spacing: -0.02em; }
.promise-stats span { font-size: 0.9rem; color: #a99b83; }

/* ---------- faq ---------- */

.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px 4px; font-family: var(--serif); font-weight: 500; font-size: clamp(1.15rem, 2.5vw, 1.45rem); letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--terra); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.faq-plus::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq-plus::after { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.faq details[open] .faq-plus::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.faq-body { padding: 0 4px 26px; }
.faq-body p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 62ch; }

/* ---------- footer ---------- */

.footer { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 7vw, 84px) clamp(18px, 4vw, 40px); border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--terra); }
.footer-fine { margin: 4px 0; color: var(--ink); font-size: 0.92rem; }
.footer-fine.muted { color: var(--muted); }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(20px); filter: blur(6px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-poster { order: -1; }
  .version, .version-pro { grid-template-columns: 1fr; }
  .version-shot { order: -1; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 14px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 20px 40px -20px rgba(74,57,32,0.5);
  }
  .nav-links.open a:not(.btn) { padding: 12px; border-radius: 12px; }
  .nav-links.open a:not(.btn):hover { background: var(--surface-2); }
  .nav-links.open .btn-sm { margin-top: 6px; justify-content: center; padding-left: 18px; }
  .nav-toggle { display: flex; }
  .features { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .version-shot-duo { min-height: 330px; }
  .poster-vlabel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}
