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

/* Paleta y tipografía de SFinance World (Desktop/SFinance/public/world.html). */
:root {
  --bg:          #012624;
  --bg-card:     #011d1c;
  --bg-surface:  #003734;

  --border:      rgba(237,255,254,0.05);
  --border-hov:  rgba(203,255,252,0.2);

  --snow:   #ffffff;
  --text:   #bbc7c6;
  --muted:  #6b8a89;
  --dim:    #2c4947;

  --gold:      #cbfffc;
  --accent:    #00827c;
  --ice:       #edfffe;
  --neg:       #f87171;
  --pos:       #4ade80;

  --grad-aurora: linear-gradient(90deg, #cbfffc 0%, #edfffe 26%, #fffdfa 48%, #fad1ff 89%);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

html { color-scheme: dark; }
body {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(ellipse 70% 50% at 50% 38%, rgba(0,130,124,0.14), transparent 70%);
  color: var(--text);
  font-family: var(--font); font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2 { font-weight: 400; color: var(--snow); line-height: 1.12; }
::selection { background: rgba(0,130,124,.35); color: var(--snow); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ── Cabecera ── */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
}
.brand { font-size: 16px; font-weight: 500; letter-spacing: 0.2px; color: var(--snow); }

/* ── Etiqueta superior ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 2.4px; color: var(--muted);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ── Portada ── */
.hero {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px var(--gutter) 24px;
}
.hero h1 {
  font-size: clamp(38px, 7.2vw, 84px); letter-spacing: -0.03em;
  margin: 22px 0 20px; text-wrap: balance;
}
/* Marca como titular: solo "SFinance", con el punto en el acento (el mismo de .eyebrow-dot). */
.hero h1.marca {
  font-size: clamp(56px, 10vw, 124px); letter-spacing: -0.055em; line-height: 1;
  margin: 20px 0 22px;
}
.hero h1.marca .punto { color: var(--accent); }
.lead { font-size: 16px; line-height: 1.7; color: var(--text); max-width: 560px; margin-bottom: 36px; text-wrap: balance; }
.confianza {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; color: var(--muted);
}
.confianza::before, .confianza::after { content: ''; width: 20px; height: 1px; background: var(--dim); }

/* ── Pilares ── */
.pilares {
  list-style: none; width: 100%; max-width: 980px; margin-top: 52px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(237,255,254,0.08);
  text-align: left;
}
.pilares li { padding: 26px 28px 8px; }
.pilares li + li { border-left: 1px solid rgba(237,255,254,0.08); }
.pilar-num { font-size: 10px; font-weight: 500; letter-spacing: 2px; color: var(--accent); }
.pilares h2 { font-size: 16px; font-weight: 500; letter-spacing: -0.1px; margin: 10px 0 8px; }
.pilares p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 6px; font-family: var(--font);
  font-size: 11px; font-weight: 500; letter-spacing: 0.77px; text-transform: uppercase;
  cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
  line-height: 1.2;
}
.btn-primary { background: var(--bg-surface); border-color: rgba(0,130,124,.35); color: var(--gold); }
.btn-primary:hover { background: rgba(0,130,124,.2); border-color: rgba(0,130,124,.6); }
.hero .btn-primary { padding: 14px 30px; }
.btn-outline {
  color: var(--snow);
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad-aurora) border-box;
  border: 1px solid transparent;
}
.btn-outline:hover { color: var(--gold); }
.btn:disabled { opacity: .5; cursor: default; }

/* ── Gráfico decorativo ── */
/* En el flujo, debajo del contenido: así nunca tapa texto, en ninguna altura de pantalla. */
.chart {
  position: relative; z-index: 0;
  height: 18vh; min-height: 130px; pointer-events: none;
}
.chart svg { display: block; width: 100%; height: 100%; }
.chart-area { fill: url(#g-area); opacity: 0; animation: aparecer 1.6s ease-out 1.2s forwards; }
.chart-line {
  fill: none; stroke: url(#g-line); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: trazar 2.6s cubic-bezier(.45,.05,.25,1) .3s forwards;
}
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes aparecer { to { opacity: 1; } }

/* ── Pie ── */
.foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--muted);
}

/* ── Ventana de contacto ── */
.modal {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  margin: auto; padding: 0;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.modal::backdrop { background: rgba(1,20,19,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: entrar .22s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }

.form, .gracias { position: relative; padding: 36px 32px 30px; }
.modal h2 { font-size: 26px; letter-spacing: -0.4px; margin: 14px 0 8px; }
.form-sub { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.modal-cerrar {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 6px;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-cerrar:hover { color: var(--snow); background: var(--bg-surface); }

.campos { display: flex; flex-direction: column; gap: 16px; margin: 26px 0 8px; }
.campo { display: flex; flex-direction: column; gap: 7px; }
.campo span { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 1.44px; color: var(--muted); }
.campo input, .campo textarea {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border);
  padding: 11px 13px; border-radius: 6px; color: var(--snow);
  font-family: var(--font); font-size: 15px; outline: none;
  transition: border-color .15s;
}
.campo textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.campo input:focus, .campo textarea:focus { border-color: rgba(0,130,124,.55); }
.campo [aria-invalid="true"] { border-color: rgba(248,113,113,.6); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-estado { min-height: 20px; margin: 6px 0 12px; font-size: 12.5px; color: var(--neg); }
.btn-enviar { width: 100%; padding: 14px 20px; }
.form-aviso { margin-top: 14px; font-size: 11px; line-height: 1.5; color: var(--muted); text-align: center; }
.gracias .btn { margin-top: 26px; }

@media (max-width: 560px) {
  .top { height: 56px; }
  .hero { padding-top: 48px; }
  .form, .gracias { padding: 32px 20px 24px; }
  .foot { flex-direction: column; gap: 6px; align-items: center; }
  .hero > .eyebrow { display: block; line-height: 1.8; letter-spacing: 2px; text-wrap: balance; }
  .hero > .eyebrow .eyebrow-dot { display: none; }
  .confianza { letter-spacing: 1.6px; line-height: 1.8; text-wrap: balance; }
  .confianza::before, .confianza::after { display: none; }
}
@media (max-width: 780px) {
  .pilares { grid-template-columns: 1fr; margin-top: 56px; }
  .pilares li { padding: 22px 4px 18px; }
  .pilares li + li { border-left: 0; border-top: 1px solid rgba(237,255,254,0.08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chart-line { stroke-dashoffset: 0; }
  .chart-area { opacity: 1; }
}
