/* ==========================================================
   KAVERIS — Estilos generales
   Requiere variables.css
   ========================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a { color: var(--blue-1); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 87, 255, .65);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(0, 87, 255, .75); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--silver-1); }
.btn--sm { padding: 10px 18px; font-size: .95rem; }
.btn--block { width: 100%; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header__logo img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .97rem;
}
.nav a:not(.btn):hover { color: var(--blue-1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Portada ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 112px);
  background:
    radial-gradient(900px 480px at 85% 30%, rgba(0, 200, 255, .10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.hero__title {
  font-size: var(--fs-hero);
  max-width: 14ch;
  background: linear-gradient(180deg, var(--ink) 0%, var(--silver-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__title span {
  display: block;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 22px;
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 52ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__facts {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  color: var(--muted);
  font-size: var(--fs-small);
}
.hero__facts li { padding-left: 18px; position: relative; }
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-blue);
}
.hero__facts strong { color: var(--ink); font-weight: 600; }

/* Maqueta del teléfono */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 540px;
}
.glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(closest-side, rgba(0, 150, 255, .28), transparent);
  filter: blur(10px);
}
.phone {
  position: relative;
  width: 270px;
  height: 540px;
  padding: 12px;
  border-radius: 44px;
  background: linear-gradient(145deg, #E6EAEE 0%, #A9B2BC 40%, #6E7883 100%);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.phone__notch {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 22px;
  border-radius: 12px;
  background: var(--navy);
  z-index: 2;
}
.phone__screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
}

.player { height: 100%; padding: 56px 22px 26px; display: flex; flex-direction: column; color: var(--on-dark); }
.player__top { display: flex; justify-content: space-between; align-items: center; }
.player__live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 200, 255, .14); color: var(--blue-2);
}
.player__live i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-2); animation: pulse 1.6s ease-in-out infinite; }
.player__menu { width: 18px; height: 2px; background: var(--on-dark-muted); box-shadow: 0 5px 0 var(--on-dark-muted), 0 -5px 0 var(--on-dark-muted); }

.player__cover {
  margin: 26px auto 0;
  width: 176px; height: 176px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 200, 255, .35), transparent 60%),
    linear-gradient(145deg, #2A3B55, #101C2E);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.player__node {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--grad-blue);
  box-shadow: 0 0 0 10px rgba(0, 120, 255, .18), 0 0 40px rgba(0, 200, 255, .55);
  position: relative;
}
.player__node::after {
  content: ""; position: absolute; inset: 19px; border-radius: 50%; background: #fff;
}
.player__station { margin-top: 22px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; text-align: center; }
.player__show { font-size: .8rem; color: var(--on-dark-muted); text-align: center; }

.eq { display: flex; justify-content: center; align-items: center; gap: 4px; height: 40px; margin-top: 16px; }
.eq span {
  width: 5px; height: 30%;
  border-radius: 3px;
  background: var(--grad-blue);
  animation: eq 1.1s ease-in-out infinite;
}
.eq span:nth-child(2n)  { animation-delay: -.3s; }
.eq span:nth-child(3n)  { animation-delay: -.6s; }
.eq span:nth-child(4n)  { animation-delay: -.15s; }
.eq span:nth-child(5n)  { animation-delay: -.45s; }

.player__controls { margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 28px; }
.ctrl { display: block; border-radius: 50%; }
.ctrl--sm { width: 30px; height: 30px; background: rgba(255, 255, 255, .08); }
.ctrl--play {
  width: 62px; height: 62px;
  background: var(--grad-silver);
  position: relative;
}
.ctrl--play::before, .ctrl--play::after {
  content: ""; position: absolute; top: 21px; width: 6px; height: 20px; border-radius: 2px; background: var(--navy);
}
.ctrl--play::before { left: 23px; }
.ctrl--play::after  { right: 23px; }

.chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 500;
  box-shadow: 0 12px 30px -12px rgba(13, 24, 40, .3);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip--a { right: calc(50% + 92px); top: 30%; }
.chip--b { left: calc(50% + 92px); bottom: 18%; }

@keyframes eq {
  0%, 100% { height: 25%; }
  50%      { height: 100%; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section__head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__title { font-size: var(--fs-h2); }
.section__lead { margin-top: 16px; font-size: var(--fs-lead); color: var(--muted); }

/* Especialidad */
.specialty__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.checklist { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: .2em;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 87, 255, .1);
}
.checklist li::after {
  content: "";
  position: absolute; left: 7px; top: calc(.2em + 6px);
  width: 8px; height: 5px;
  border-left: 2px solid var(--blue-1);
  border-bottom: 2px solid var(--blue-1);
  transform: rotate(-45deg);
}

.feature {
  position: relative;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--on-dark);
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 200, 255, .35), transparent);
}
.feature__title {
  position: relative;
  font-size: 1.6rem;
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature__text { position: relative; margin-top: 12px; color: var(--on-dark-muted); }
.feature__list { position: relative; margin: 28px 0 0; display: grid; gap: 0; }
.feature__list div { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .09); }
.feature__list dt { font-family: var(--font-display); font-weight: 600; color: #fff; }
.feature__list dd { margin: 4px 0 0; color: var(--on-dark-muted); font-size: .95rem; }

/* Servicios */
.services { background: var(--bg-soft); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  padding: clamp(28px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.service__icon {
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 87, 255, .08);
  fill: none;
  stroke: var(--blue-1);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 20px;
}
.service__title { font-size: var(--fs-h3); margin-bottom: 8px; }
.service p { color: var(--muted); }

.service--cta {
  background: var(--grad-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service--cta p { color: rgba(255, 255, 255, .85); }
.link-arrow {
  margin-top: 18px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, .5);
  align-self: flex-start;
  padding: 8px 0 4px;
}
.link-arrow:hover { border-bottom-color: #fff; }

/* Proceso */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step { position: relative; padding-top: 28px; }
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: -24px;
  height: 2px;
  background: var(--line);
}
.step:last-child::before { right: 0; }
.step__num {
  position: absolute;
  top: -15px; left: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  background: var(--grad-blue);
  box-shadow: 0 0 0 6px var(--bg);
}
.step__title { font-size: var(--fs-h3); margin: 18px 0 8px; }
.step p { color: var(--muted); }

/* Banda */
.band { background: var(--navy); color: var(--on-dark); padding: clamp(64px, 8vw, 104px) 0; }
.band__inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.band__title {
  font-size: var(--fs-h2);
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.band__points { display: grid; gap: 22px; color: var(--on-dark-muted); }
.band__points strong { color: #fff; font-weight: 600; }

/* Contacto */
.contact__inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact__mail { margin-top: 28px; color: var(--muted); }
.contact__mail a { display: inline-block; padding: 8px 0; font-weight: 600; word-break: break-word; }

.form {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 0 30px 60px -40px rgba(13, 24, 40, .35);
  display: grid;
  gap: 18px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .93rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input, .field select { min-height: 50px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A6572' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-1);
  box-shadow: var(--focus);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #D93838; }
.field__error { min-height: 0; font-size: .82rem; color: #C42B2B; }
.form__status { font-size: .95rem; text-align: center; }
.form__status.is-ok { color: #11795A; }
.form__status.is-error { color: #C42B2B; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie de página */
.footer { background: var(--navy); color: var(--on-dark-muted); padding: 56px 0 40px; border-top: 1px solid rgba(255, 255, 255, .06); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.footer__brand img { height: 38px; width: auto; }
.footer__brand p { margin-top: 12px; font-size: .95rem; }
.footer__slogan {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem !important;
  background: var(--grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer__slogan + p { margin-top: 4px !important; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer__nav a { display: inline-block; padding: 10px 0; color: var(--on-dark); text-decoration: none; font-size: .95rem; }
.footer__nav a:hover { color: var(--blue-2); }
.footer__copy {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: var(--fs-small);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
}
.footer__copy a { display: inline-block; padding: 8px 0; color: var(--on-dark); text-decoration: none; }

/* ---------- Responsive ---------- */

/* Dos columnas estrechas: las etiquetas flotantes no tienen espacio */
@media (min-width: 961px) and (max-width: 1100px) {
  .chip { display: none; }
}

/* Tablet horizontal y laptops pequeñas (hasta 1100 px) */
@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; }
  .hero__visual { min-height: 500px; }
  .phone { width: 250px; height: 500px; }
  .player__cover { width: 160px; height: 160px; }
  .chip { font-size: .78rem; padding: 8px 14px; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__info { max-width: 620px; }
}
@media (max-width: 960px) {
  .hero__inner, .specialty__inner, .band__inner, .contact__inner { grid-template-columns: 1fr; }
  .hero__title { max-width: 16ch; }
  .hero__text { max-width: 640px; }
  .hero__visual { min-height: 520px; }
  .chip--a { top: 22%; }
  .chip--b { bottom: 16%; }
  .specialty__intro { max-width: 640px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .step:nth-child(2)::before { right: 0; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(13, 24, 40, .25);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero__visual { min-height: 480px; }
  .phone { width: 240px; height: 480px; }
  .player__cover { width: 150px; height: 150px; }
  .hero__visual { padding-top: 52px; min-height: 540px; }
  .chip--a { right: auto; left: 0; top: 0; }
  .chip--b { left: auto; right: 0; bottom: 6%; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__facts { gap: 10px; flex-direction: column; }
  .section__head { margin-bottom: 32px; }

  .services__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step::before { right: 0; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .header__logo img { height: 34px; }
  .phone { width: 224px; height: 448px; padding: 10px; }
  .player { padding: 50px 18px 22px; }
  .player__cover { width: 130px; height: 130px; }
  .hero__visual { min-height: 510px; }
  .chip { font-size: .74rem; padding: 7px 12px; }
  .feature, .form { border-radius: 20px; }
}

/* Celulares en horizontal: menos altura para la portada */
@media (max-height: 500px) and (orientation: landscape) {
  .hero__visual { min-height: 0; }
  .phone { transform: scale(.85); transform-origin: top center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eq span:nth-child(odd)  { height: 70%; }
  .eq span:nth-child(even) { height: 40%; }
}
