/* ============================================================
   RehaVit — Fisioterapia Avanzada
   Tema cristal oscuro · colores de marca del logo
   ============================================================ */

:root {
  /* Colores de marca (extraídos del logo) */
  --navy: #2c566e;      /* azul marino del wordmark */
  --teal: #3e8fa3;      /* teal medio del corredor */
  --aqua: #5bc6ce;      /* aqua claro del corredor */
  --glow: #8ceef5;      /* brillo derivado */

  /* Superficie oscura */
  --bg0: #04121c;
  --bg1: #072030;
  --ink: #eaf7f9;
  --ink-soft: #a3c4cc;

  /* Cristal */
  --glass-bg: rgba(10, 34, 48, .52);
  --glass-line: rgba(140, 238, 245, .16);
  --glass-highlight: rgba(255, 255, 255, .07);

  --radius: 22px;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

.container { width: min(1180px, 92%); margin-inline: auto; }

.mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; }

/* Texto degradado de marca */
.grad {
  background: linear-gradient(92deg, var(--glow), var(--aqua) 45%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  color: var(--aqua);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

/* ===== Fondo aurora ===== */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(45% 55% at 82% 12%, rgba(62, 143, 163, .28) 0%, transparent 65%),
    radial-gradient(50% 60% at 8% 35%, rgba(91, 198, 206, .16) 0%, transparent 60%),
    radial-gradient(60% 55% at 50% 105%, rgba(44, 86, 110, .40) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, var(--bg0));
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { filter: hue-rotate(0deg) brightness(1); }
  to   { filter: hue-rotate(-14deg) brightness(1.12); }
}

/* ===== Cristal ===== */
.glass {
  background: linear-gradient(160deg, var(--glass-highlight), transparent 38%), var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-line);
  box-shadow:
    0 20px 50px rgba(0, 8, 14, .45),
    inset 0 1px 0 rgba(255, 255, 255, .09);
}

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(10, 34, 48, .5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: .45rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--aqua), var(--teal));
  color: #04222b;
  box-shadow: 0 0 24px rgba(91, 198, 206, .35), 0 8px 24px rgba(0, 10, 16, .5);
}
.btn-primary:hover { box-shadow: 0 0 42px rgba(140, 238, 245, .55), 0 10px 28px rgba(0, 10, 16, .5); }
.btn-ghost {
  border-color: var(--glass-line);
  color: var(--ink);
  background: rgba(10, 34, 48, .35);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--aqua); color: var(--glow); box-shadow: 0 0 20px rgba(91,198,206,.2); }
.btn-block { width: 100%; }
.btn-nav { padding: .6rem 1.4rem; }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, 94%);
  z-index: 100;
  border-radius: 999px;
  transition: box-shadow .3s, top .3s;
}
.navbar.scrolled { box-shadow: 0 14px 40px rgba(0, 8, 14, .6), 0 0 30px rgba(91,198,206,.08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 1.4rem;
  width: 100%;
}

.logo { display: flex; align-items: center; gap: .65rem; }
.logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(91, 198, 206, .45));
}
.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.logo-text small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .55rem;
  letter-spacing: .22em;
  color: var(--aqua);
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a:not(.btn) {
  font-weight: 500;
  font-size: .92rem;
  color: var(--ink-soft);
  transition: color .2s, text-shadow .2s;
}
.nav-links a:not(.btn):hover { color: var(--glow); text-shadow: 0 0 14px rgba(140,238,245,.6); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .3s, opacity .3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 8.5rem 0 4rem;
  overflow: hidden;
}
#hero3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2rem;
  align-items: center;
  pointer-events: none;
}
.hero-content { pointer-events: auto; }

.badge { font-weight: 600; font-size: .8rem; color: var(--aqua); margin-bottom: 1.3rem; }

.hero-content p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 1.3rem 0 2rem;
  max-width: 33rem;
}
.hero-content p strong { color: var(--ink); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats { display: flex; gap: .8rem; margin-top: 2.6rem; flex-wrap: wrap; }
.stat { flex-direction: column; align-items: flex-start; gap: 0; padding: .7rem 1.2rem; border-radius: 18px; }
.stat strong { font-family: var(--font-head); font-size: 1.45rem; color: var(--glow); display: block; line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: .75rem; }

/* HUD flotante sobre el corredor 3D */
.hero-visual { position: relative; min-height: 420px; pointer-events: none; }
.hud {
  position: absolute;
  color: var(--aqua);
  white-space: nowrap;
  animation: hudFloat 6s ease-in-out infinite;
}
.hud strong { color: var(--glow); margin-left: .35rem; font-weight: 500; }
.hud-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow);
  animation: pulse 1.6s ease-in-out infinite;
}
.hud-1 { top: 4%; left: 6%; }
.hud-2 { top: 30%; right: 0; animation-delay: 1.2s; }
.hud-3 { bottom: 28%; left: 0; animation-delay: 2.4s; }
.hud-4 { bottom: 6%; right: 8%; animation-delay: 3.4s; }
@keyframes hudFloat { 50% { transform: translateY(-9px); } }
@keyframes pulse { 50% { opacity: .35; } }

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid var(--glass-line);
  border-radius: 999px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--aqua);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 55% { transform: translateY(16px); opacity: 0; } 56% { transform: none; opacity: 0; } }

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--glass-line);
  background: rgba(7, 28, 40, .5);
  backdrop-filter: blur(8px);
  padding: .8rem 0;
}
.marquee-track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.marquee-track i { color: var(--aqua); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Secciones ===== */
.section { padding: 6rem 0; position: relative; }

.section-head { text-align: center; max-width: 46rem; margin: 0 auto 3.2rem; }
.section-head p { color: var(--ink-soft); margin-top: .8rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  border-radius: var(--radius);
  padding: 1.9rem;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  will-change: transform;
}
.card:hover {
  border-color: rgba(140, 238, 245, .4);
  box-shadow: 0 24px 60px rgba(0, 8, 14, .55), 0 0 34px rgba(91, 198, 206, .16), inset 0 1px 0 rgba(255,255,255,.1);
}
.card p { color: var(--ink-soft); font-size: .93rem; margin-top: .5rem; }
.card h3 { color: var(--ink); }

.card-icon {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  font-size: 1.7rem;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(91,198,206,.22), rgba(44,86,110,.28));
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(91,198,206,.12);
  margin-bottom: 1.1rem;
}

.price-tag {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .32rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 238, 245, .28);
  background: rgba(91, 198, 206, .12);
  color: var(--glow);
  font-weight: 600;
  font-size: .76rem;
}

.section-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: .85rem;
  margin-top: 2.2rem;
}

/* ===== Tecnología ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.tech-panel {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tech-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(140, 238, 245, .4);
  box-shadow: 0 26px 60px rgba(0,8,14,.6), 0 0 40px rgba(91,198,206,.16);
}
.tech-canvas-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(80% 90% at 50% 10%, rgba(44,86,110,.35), rgba(4,16,24,.9));
  border-bottom: 1px solid var(--glass-line);
}
.tech-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.tech-tag {
  position: absolute;
  top: .8rem;
  left: .8rem;
  color: var(--glow);
  background: rgba(4, 18, 28, .65);
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  padding: .3rem .6rem;
  backdrop-filter: blur(6px);
}
.tech-panel-body { padding: 1.5rem 1.7rem 1.8rem; }
.tech-panel-body p { color: var(--ink-soft); font-size: .92rem; margin-top: .5rem; }

/* Panel VR — escena CSS 3D */
.vr-stage {
  display: grid;
  place-items: center;
  perspective: 700px;
  overflow: hidden;
}
.vr-headset {
  font-size: 4.6rem;
  filter: drop-shadow(0 0 26px rgba(140, 238, 245, .75));
  animation: vrFloat 5s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes vrFloat {
  0%, 100% { transform: translateY(6px) rotateY(-16deg) rotateX(6deg); }
  50%      { transform: translateY(-10px) rotateY(16deg) rotateX(-6deg); }
}
.vr-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.vr-rings i {
  position: absolute;
  border: 1px solid rgba(140, 238, 245, .35);
  border-radius: 50%;
  animation: ringSpin 9s linear infinite;
}
.vr-rings i:nth-child(1) { width: 62%; aspect-ratio: 1; transform: rotateX(68deg); }
.vr-rings i:nth-child(2) { width: 80%; aspect-ratio: 1; transform: rotateX(72deg) rotateZ(30deg); animation-duration: 13s; opacity: .6; }
.vr-rings i:nth-child(3) { width: 98%; aspect-ratio: 1; transform: rotateX(76deg) rotateZ(60deg); animation-duration: 18s; opacity: .35; }
@keyframes ringSpin {
  from { transform: rotateX(70deg) rotateZ(0deg); }
  to   { transform: rotateX(70deg) rotateZ(360deg); }
}

/* ===== Split (nosotros / contacto) ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.split-content > p { color: var(--ink-soft); margin: 1rem 0 1.4rem; }
.split-content .subtitle { margin: .4rem 0 0; color: var(--aqua); }

.check-list { list-style: none; margin-bottom: 1.8rem; }
.check-list li {
  padding-left: 2.1rem;
  position: relative;
  margin-bottom: .7rem;
  color: var(--ink-soft);
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: .1rem;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(91, 198, 206, .16);
  border: 1px solid rgba(140, 238, 245, .3);
  color: var(--glow);
  font-weight: 700;
  font-size: .75rem;
  box-shadow: 0 0 12px rgba(91,198,206,.2);
}

/* Tarjeta "nosotros" con logo */
.about-card {
  border-radius: var(--radius);
  padding: 2.2rem;
  display: grid;
  gap: 1.6rem;
}
.logo-chip {
  background: #fff;
  border-radius: 18px;
  padding: 1.6rem 2rem;
  box-shadow: 0 18px 44px rgba(0, 8, 14, .5), 0 0 40px rgba(91, 198, 206, .14);
}
.logo-chip img { width: 100%; height: auto; }
.about-badges { display: flex; flex-wrap: wrap; gap: .6rem; }
.about-badges .glass-chip { color: var(--aqua); }

/* ===== Testimonios ===== */
.testimonial blockquote { color: var(--ink-soft); font-size: .95rem; font-style: italic; margin: .8rem 0 1.2rem; }
.testimonial figcaption strong { display: block; color: var(--ink); }
.testimonial figcaption span { color: var(--ink-soft); font-size: .82rem; }
.stars { color: var(--glow); letter-spacing: .15em; text-shadow: 0 0 12px rgba(140,238,245,.55); }

/* ===== CTA band ===== */
.cta-band { padding: 3rem 0 5rem; }
.cta-inner {
  border-radius: var(--radius);
  padding: 3.6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(91, 198, 206, .25) 82%, transparent 94%);
  animation: ctaSpin 7s linear infinite;
  pointer-events: none;
}
@keyframes ctaSpin { to { transform: rotate(360deg); } }
.cta-inner > * { position: relative; }
.cta-inner p { color: var(--ink-soft); margin: .8rem 0 1.8rem; }

/* ===== Contacto ===== */
.contact-items { display: grid; gap: 1.3rem; margin-top: 1.8rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item > span {
  font-size: 1.25rem;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(91,198,206,.2), rgba(44,86,110,.3));
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  flex-shrink: 0;
}
.contact-item p, .contact-item a { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.contact-item a:hover { color: var(--glow); }
.contact-item strong { color: var(--ink); }

.contact-form { box-shadow: 0 24px 60px rgba(0,8,14,.5); }
.contact-form:hover { transform: none; }
.form-row { margin-bottom: 1.1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  color: var(--ink);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: .4rem;
  padding: .78rem 1rem;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  font-family: inherit;
  font-size: .93rem;
  color: var(--ink);
  background: rgba(4, 18, 28, .55);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(163, 196, 204, .5); }
.contact-form select option { background: var(--bg1); color: var(--ink); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(91, 198, 206, .18), 0 0 18px rgba(91,198,206,.15);
}
.form-status { margin-top: .8rem; font-size: .9rem; font-weight: 600; color: var(--glow); text-align: center; min-height: 1.4em; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--glass-line);
  background: rgba(3, 12, 18, .7);
  backdrop-filter: blur(14px);
  color: var(--ink-soft);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0 2.5rem;
}
.footer-brand p { font-size: .88rem; margin-top: 1rem; max-width: 20rem; }
.footer-col h4 { color: var(--ink); margin-bottom: 1rem; font-size: 1rem; }
.footer-col a, .footer-col p { display: block; font-size: .9rem; margin-bottom: .55rem; transition: color .2s; }
.footer-col a:hover { color: var(--glow); }
.footer-bottom { border-top: 1px solid rgba(140,238,245,.08); padding: 1.2rem 0; font-size: .82rem; opacity: .7; }

/* ===== WhatsApp FAB ===== */
.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 30px rgba(37,211,102,.3);
  transition: transform .2s;
}
.whatsapp-fab:hover { transform: scale(1.1); }

/* ===== Animaciones de aparición ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 7.5rem; }
  .hero-stats { gap: .6rem; }
  .hud-2 { right: auto; left: 40%; }
  .hud-4 { right: 0; }

  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 84px;
    left: 3%;
    right: 3%;
    background: rgba(6, 24, 35, .92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-line);
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.5rem;
    gap: 1.2rem;
    box-shadow: 0 30px 60px rgba(0,8,14,.6);
    transform: translateY(-20px) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}
