/* =========================================================
   WaveFlow — Landing · Dirección "Marea de Precisión"
   Paleta: #0A0F14 #13202B #1E7A7A #33F0D1 #ECF1F0
   Tipografía: Playfair Display (títulos) + Sora (texto)
   ========================================================= */

:root {
  --bg:        #0A0F14;
  --bg-2:      #0c141b;
  --panel:     #11202b;
  --panel-2:   #13202B;
  --line:      rgba(120, 170, 175, 0.16);
  --line-soft: rgba(120, 170, 175, 0.10);

  --teal:      #1E7A7A;
  --aqua:      #33F0D1;
  --aqua-soft: #9bfbe9;

  --text:      #ECF1F0;
  --muted:     #9fb2b6;
  --muted-2:   #6f858b;

  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Sora", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --r:    16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.accent {
  color: var(--aqua);
}

.arrow { display: inline-block; transition: transform .25s ease; }
a:hover .arrow { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 500; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: .85em 1.5em;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .2s ease;
}
.btn--primary {
  background: linear-gradient(180deg, var(--aqua-soft), var(--aqua));
  color: #06231f;
  box-shadow: 0 8px 30px rgba(51, 240, 209, 0.22), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(51, 240, 209, 0.34); }
.btn--ghost {
  border: 1px solid var(--line); color: var(--text); background: transparent;
}
.btn--ghost:hover { border-color: var(--aqua); color: var(--aqua); }
.btn--text { color: var(--text); padding-left: .4em; padding-right: .4em; }
.btn--text:hover { color: var(--aqua); }
.btn--lg { font-size: 1.05rem; padding: 1em 1.9em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 15, 20, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { display: flex; align-items: center; gap: 28px; height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand__mark { display: grid; place-items: center; }
.brand__mark img, .cta__mark img, .brand--sm img { display: block; object-fit: contain; }
.brand__text strong { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; letter-spacing: .2px; }
.brand__text small {
  display: block; color: var(--muted-2); font-size: .62rem; line-height: 1.25;
  letter-spacing: .12em; text-transform: uppercase; margin-top: 1px;
}
.nav__links { display: flex; gap: 30px; margin-left: 18px; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 400;
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--text); }

.nav__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.02);
}
.lang-switch button {
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: .76rem; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); padding: 6px 11px; transition: color .2s ease, background .2s ease;
}
.lang-switch button:not(.is-active):hover { color: var(--text); }
.lang-switch button.is-active {
  color: #06231f; background: linear-gradient(180deg, var(--aqua-soft), var(--aqua));
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 112px 0 96px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(58% 110% at 82% 24%, rgba(30,122,122,.22), transparent 62%),
    radial-gradient(46% 80% at 100% 62%, rgba(51,240,209,.10), transparent 72%);
}
.hero__bg .wave-svg, .hero__bg .wave-particles { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(10,15,20,.86) 30%, rgba(10,15,20,.34) 60%, rgba(10,15,20,0) 86%),
    linear-gradient(0deg, var(--bg) 1%, rgba(10,15,20,0) 32%);
}
.hero__inner { position: relative; z-index: 1; max-width: 660px; }

.hero h1 {
  font-family: var(--serif); font-weight: 600; line-height: 1.04;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  letter-spacing: -0.5px;
}
.hero .lead {
  color: var(--muted); max-width: 30em; margin: 26px 0 32px;
  font-size: 1.05rem;
}
.hero__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.hero__feats {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-top: 52px; max-width: 560px;
}
.hero__feats li { display: flex; gap: 12px; align-items: flex-start; }
.feat__ic {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--aqua);
  background: radial-gradient(circle at 50% 0%, rgba(51,240,209,.10), transparent 70%);
}
.hero__feats strong { display: block; font-family: var(--sans); font-weight: 500; font-size: .92rem; }
.hero__feats div span { display: block; color: var(--muted-2); font-size: .8rem; line-height: 1.45; }

/* ---------- Iconos (Lucide) ---------- */
.feat__ic svg { width: 22px; height: 22px; }
.card__ic svg { width: 26px; height: 26px; }
.step__ic svg { width: 24px; height: 24px; }
.metric__ic { color: var(--aqua); line-height: 0; margin-bottom: 12px; }
.metric__ic svg { width: 19px; height: 19px; }
[data-lucide] { display: inline-block; width: 24px; height: 24px; } /* placeholder pre-hidratación */

/* Hero — ola de luz full-bleed */
.wline { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 3.4s ease forwards; }
.w5 { animation-delay: .05s; }
.w3 { animation-delay: .3s; }
.w1 { animation-delay: .5s; }
.w2 { animation-delay: .8s; }
.w4 { animation-delay: 1.05s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wave-lines { animation: floaty 8s ease-in-out infinite alternate; transform-origin: 72% 40%; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-14px); } }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section__title {
  font-family: var(--serif); font-weight: 600; text-align: center;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 8px;
}
.section__title::after {
  content: ""; display: block; width: 54px; height: 2px; margin: 18px auto 0;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  border-radius: 2px;
}

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 54px; }
.card {
  background: linear-gradient(180deg, rgba(19,32,43,.85), rgba(11,20,27,.75));
  border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 34px 30px 30px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,.4);
}
.card__ic {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: var(--aqua);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 0%, rgba(51,240,209,.12), transparent 70%);
  margin-bottom: 22px;
}
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.15; margin-bottom: 14px; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 22px; }
.card__link { color: var(--aqua); text-decoration: none; font-weight: 500; font-size: .92rem; }

/* ---------- Steps ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 56px; position: relative;
}
.steps::before {
  content: ""; position: absolute; top: 36px; left: 16%; right: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.step { text-align: center; padding: 0 10px; position: relative; }
.step__node {
  width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%;
  display: grid; place-items: center; color: var(--aqua);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 30%, rgba(30,122,122,.30), var(--bg) 72%);
  position: relative; box-shadow: 0 0 0 6px rgba(10,15,20,1);
}
.step__num {
  position: absolute; top: -10px; right: -6px;
  font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted-2);
}
.step h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .92rem; max-width: 26em; margin: 0 auto; }

/* ---------- Caso real ---------- */
.section--case { background: linear-gradient(180deg, transparent, rgba(19,32,43,.35), transparent); }
.case { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--teal);
}
.case__head {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.22; margin-top: 18px;
}
.case__panel { display: grid; gap: 30px; }
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  padding-bottom: 28px; border-bottom: 1px solid var(--line-soft);
}
.metric strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--aqua); }
.metric--big strong { font-size: 2.4rem; line-height: 1; }
.metric--big small { font-size: .8rem; color: var(--muted); font-family: var(--sans); display: block; }
.metric > span:not(.metric__ic) { color: var(--muted-2); font-size: .78rem; line-height: 1.4; display: block; margin-top: 6px; }

.quote p { font-size: 1.02rem; color: var(--text); line-height: 1.6; }
.quote footer { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote__avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .82rem; font-weight: 600; color: #06231f;
  background: linear-gradient(180deg, var(--aqua-soft), var(--teal));
}
.quote footer strong { display: block; font-weight: 500; font-size: .92rem; }
.quote footer small { color: var(--muted-2); font-size: .8rem; }

/* ---------- CTA final ---------- */
.cta { position: relative; padding: 110px 0 120px; text-align: center; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 50% 120%, rgba(30,122,122,.30), transparent 60%);
  pointer-events: none;
}
.cta__inner { position: relative; }
.cta__mark { display: inline-grid; place-items: center; margin-bottom: 24px; }
.cta__title { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.1; margin-bottom: 36px; }
.cta__sub { color: var(--muted-2); font-size: .92rem; margin-top: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 34px 0; }
.footer__inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand--sm .brand__text strong { font-size: 1.05rem; }
.footer__copy { color: var(--muted-2); font-size: .85rem; }
.footer__top { margin-left: auto; color: var(--muted); text-decoration: none; font-size: .85rem; }
.footer__top:hover { color: var(--aqua); }

/* ---------- Micro-interacciones (hover) ---------- */
/* nav: subrayado animado */
.nav__links a { position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease; border-radius: 2px;
}
.nav__links a:hover::after { transform: scaleX(1); }

/* cards: el ícono reacciona al hover de la tarjeta */
.card__ic { transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease, color .28s ease; }
.card:hover .card__ic {
  border-color: var(--aqua); transform: translateY(-2px) scale(1.06);
  box-shadow: 0 0 0 4px rgba(51,240,209,.05), 0 10px 24px rgba(51,240,209,.14);
}
.card__link .arrow { transition: transform .25s ease; }
.card:hover .card__link .arrow { transform: translateX(4px); }

/* steps: el nodo se ilumina al pasar por encima */
.step__node { transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.step:hover .step__node {
  border-color: var(--aqua); transform: translateY(-3px);
  box-shadow: 0 0 0 6px rgba(10,15,20,1), 0 8px 26px rgba(51,240,209,.16);
}
.step__ic { transition: transform .3s ease; }
.step:hover .step__ic { transform: scale(1.08); }

/* metric: realce sutil del bloque */
.metric { transition: transform .25s ease; }
.metric:hover { transform: translateY(-2px); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.count { font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero { padding: 84px 0 72px; }
  .hero__inner { max-width: none; }
  .hero__bg::after {
    background:
      linear-gradient(90deg, var(--bg) 0%, rgba(10,15,20,.72) 45%, rgba(10,15,20,.42) 100%),
      linear-gradient(0deg, var(--bg) 1%, rgba(10,15,20,0) 40%);
  }
  .cards, .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .case { grid-template-columns: 1fr; gap: 32px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
}
@media (max-width: 540px) {
  .hero__feats { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .brand__text small { display: none; }
  .nav__right { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wline, .wave-lines { animation: none; stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
