/* =======================================================
   waves.css · Olas SVG y elementos decorativos
   ======================================================= */

/* Wrapper de olas absolutas en una sección */
.waves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.waves > svg {
  position: absolute;
  display: block;
  will-change: transform;
}

/* ===== Hero waves (parte inferior) ===== */
.waves.hero-waves {
  bottom: 0;
  height: clamp(180px, 28vh, 280px);
  inset: auto 0 0 0;
}

/* Wrapper de cada capa: drift horizontal */
.waves.hero-waves .wave-layer {
  position: absolute;
  bottom: 0; left: 0;
  width: 200%;          /* path duplicado para tile seamless */
  will-change: transform;
}
/* SVG dentro: bob vertical, así ambas animaciones son independientes */
.waves.hero-waves .wave-layer svg {
  display: block;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.waves.hero-waves .wave-1 {
  height: 65%;
  opacity: 0.55;
  animation: waveDrift 28s linear infinite;
}
.waves.hero-waves .wave-1 svg {
  animation: waveBob 7s ease-in-out infinite;
}

.waves.hero-waves .wave-2 {
  height: 80%;
  opacity: 0.78;
  animation: waveDrift 22s linear infinite reverse;
}
.waves.hero-waves .wave-2 svg {
  animation: waveBob 5.5s ease-in-out infinite;
  animation-delay: -1.8s;
}

.waves.hero-waves .wave-3 {
  height: 95%;
  opacity: 1;
  animation: waveDrift 16s linear infinite;
}
.waves.hero-waves .wave-3 svg {
  animation: waveBob 4s ease-in-out infinite;
  animation-delay: -1s;
}

@keyframes waveDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes waveBob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -8px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .waves.hero-waves .wave-layer,
  .waves.hero-waves .wave-layer svg { animation: none; }
}

/* ===== Panel waves (en cada panel del horizontal scroll) ===== */
.panel-waves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.panel-waves svg {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Olas como background ondulante (para CTA y otros) ===== */
.bg-wave {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      var(--grad-wave-3) 0%,
      var(--grad-wave-2) 50%,
      var(--grad-wave-4) 100%);
  z-index: 0;
}
.bg-wave svg { position: absolute; bottom: 0; left: 0; width: 100%; }

/* ===== Decoración: blob de fondo ===== */
.deco-blob {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 65%);
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ===== Path SVG con stroke draw (animado en JS) ===== */
.wave-stroke {
  stroke: var(--color-accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

/* ===== Mockup de celular (recreación blue wave) ===== */
.phone {
  --pw: 280px;
  --ph: 580px;
  width: var(--pw); height: var(--ph);
  border-radius: 38px;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  padding: 13px;
  position: relative;
  box-shadow:
    0 30px 80px -20px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  width: 100px; height: 22px;
  background: #0f172a;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
  z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at top, #1e293b 0%, #0f172a 70%);
  overflow: hidden;
  padding: 44px 14px 14px;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
}
.phone-screen::before {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%; right: -10%;
  height: 70%;
  background: radial-gradient(ellipse at center top, var(--color-brand) 0%, transparent 60%);
  opacity: 0.45;
  pointer-events: none;
}
.phone-screen > * { position: relative; z-index: 1; }

.phone-greet { padding: 0 4px; }
.phone-greet .hi { font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.phone-greet .name { font-size: 17px; font-weight: var(--fw-bold); color: #fff; margin-top: 2px; }

.phone-card {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-brand) 100%);
  border-radius: 18px;
  padding: 14px;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.45);
}
.phone-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% -10%, rgba(255,255,255,.35), transparent 50%);
}
.phone-card .lab { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.phone-card .bal { font-size: 22px; font-weight: var(--fw-bold); margin-top: 4px; letter-spacing: -.02em; }
.phone-card .met { display: flex; justify-content: space-between; margin-top: 14px; font-size: 10px; opacity: .9; }

.phone-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.phone-acts .pa {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.75);
}
.phone-acts .pa .pi {
  width: 26px; height: 26px;
  background: var(--grad-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #001a30; font-weight: var(--fw-bold); font-size: 12px;
}

.phone-list { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow: hidden; padding-top: 4px; }
.phone-list .item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 10px;
  color: #fff;
}
.phone-list .item .ico {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  color: var(--color-accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: var(--fw-bold); flex-shrink: 0;
}
.phone-list .item .info { flex: 1; min-width: 0; }
.phone-list .item .ti { font-weight: var(--fw-semi); }
.phone-list .item .da { color: rgba(255,255,255,.55); font-size: 9px; margin-top: 1px; }
.phone-list .item .am { font-weight: var(--fw-semi); }
.phone-list .item .am.pos { color: #4ade80; }
.phone-list .item .am.neg { color: #f87171; }
