/* =============================================================
   RIAVI — Fisioterapia & Pilates
   1. Tokens
   ============================================================= */
:root {
  --bg:            #faf9fc;
  --bg-2:          #f2eef8;
  --paper:         #ffffff;
  --ink:           #211a33;
  --ink-soft:      #4b3f66;
  --muted:         #6f6484;
  --line:          rgba(33, 26, 51, 0.10);
  --line-strong:   rgba(33, 26, 51, 0.18);

  --accent:        #5b3f92;
  --accent-hover:  #4a3178;
  --accent-dark:   #241a3d;
  --accent-dark-2: #2f2350;
  --accent-light:  #b6a6d9;
  --accent-soft:   #ece6f7;
  --accent-soft-2: #e2d9f2;
  --cream:         #f4f1fa;

  --glass:         rgba(255, 255, 255, 0.62);
  --glass-border:  rgba(255, 255, 255, 0.55);
  --glass-dark:    rgba(36, 26, 61, 0.55);

  /* Colores del logo */
  --brand-plum:     #301941;
  --brand-lavender: #c2b0d5;

  --success:       #2f8f5b;
  --success-soft:  #e5f4ec;
  --danger:        #b3432f;
  --danger-soft:   #fbeae6;

  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-pill:   1000px;

  --shadow-sm:     0 2px 10px rgba(33, 26, 51, 0.06);
  --shadow-md:     0 12px 32px rgba(33, 26, 51, 0.10);
  --shadow-lg:     0 30px 70px rgba(33, 26, 51, 0.16);

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:       cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --disp:  "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --nav-h: 96px;
  --text-scale: 1;

  /* Malla de 8px: todo espaciado, tamaño y radio es múltiplo de 8 */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;

  /* Espaciados responsivos (saltan por breakpoint, siempre en la malla) */
  --section-y:        48px;
  --section-head-gap: 32px;
  --band-pad:         40px;
  --footer-top:       48px;
  --card-pad:         32px;
  --step-pad:         24px;
  --modal-pad:        32px;
}

@media (min-width: 720px) {
  :root {
    --section-y: 80px; --section-head-gap: 40px; --band-pad: 56px;
    --footer-top: 64px; --card-pad: 40px; --step-pad: 32px; --modal-pad: 40px;
  }
}
@media (min-width: 960px) {
  :root {
    --section-y: 104px; --section-head-gap: 48px; --band-pad: 72px;
    --footer-top: 72px; --card-pad: 48px; --step-pad: 40px;
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  font-size: calc(16px * var(--text-scale));
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--disp);
  color: var(--ink);
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h1 { font-weight: 800; }
::selection { background: var(--accent-light); color: var(--accent-dark); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: fixed; top: -104px; left: 16px; z-index: 9999;
  padding: 16px 16px; background: var(--accent-dark); color: var(--cream);
  border-radius: var(--radius-sm); font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 16px; }
.sr-only {
  position: absolute; width: 0; height: 0; padding: 0; margin: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1248px; margin-inline: auto; padding-inline: 24px; }
.container-narrow { width: 100%; max-width: 784px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: var(--section-y); }
.section-head { max-width: 640px; margin-bottom: var(--section-head-gap); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 700; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 16px; }
.section-sub { font-size: 1.08rem; color: var(--muted); max-width: 56ch; }
.divider { height: 0; background: var(--line); border: 0; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--disp); font-weight: 700; font-size: 1rem;
  padding: 8px 16px; border-radius: var(--radius-pill);
  min-height: 48px; line-height: 1;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .3s var(--ease-out), color .3s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--accent-dark); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-dark:hover { background: #150f24; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-light { background: rgba(244,241,250,0.14); color: var(--cream); border: 1.5px solid rgba(244,241,250,0.34); }
.btn-light:hover { background: rgba(244,241,250,0.24); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; padding: 8px 24px; font-size: 1.12rem; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--accent); position: relative;
}
.btn-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 0; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.btn-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* =============================================================
   5. Navigation
   ============================================================= */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out), height .3s var(--ease-out);
}
.site-nav.is-scrolled {
  background: rgba(250, 249, 252, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
  height: 72px;
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-mark svg { width: 16px; height: 16px; }
.logo-ria { color: var(--ink); }
.logo-vi { color: var(--accent); }

.nav-links { display: none; align-items: center; gap: 32px; }
.nav-links a {
  font-weight: 600; font-size: .98rem; color: var(--ink-soft); position: relative; padding-block: 8px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 0; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.text-size-ctrl {
  display: none; align-items: center; gap: 0; background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); padding: 8px;
}
.text-size-ctrl button {
  width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: .82rem;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.text-size-ctrl button:hover { background: var(--accent-soft); color: var(--accent); }

.nav-account {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem;
  padding: 8px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink);
}
.nav-account:hover { border-color: var(--accent); color: var(--accent); }
.nav-account svg { width: 16px; height: 16px; }

.nav-burger {
  display: inline-flex; width: 48px; height: 48px; border-radius: 50%;
  align-items: center; justify-content: center; background: var(--paper);
  border: 1.5px solid var(--line-strong);
}
.nav-burger svg { width: 24px; height: 24px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 600; background: var(--accent-dark);
  display: flex; flex-direction: column; padding: 24px;
  transform: translateY(-100%); transition: transform .5s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu .logo-ria { color: var(--cream); }
.mobile-menu-close {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(244,241,250,.12);
  display: inline-flex; align-items: center; justify-content: center;
}
.mobile-menu-close svg { width: 24px; height: 24px; color: var(--cream); }
.mobile-menu-links { display: flex; flex-direction: column; gap: 8px; margin-top: 48px; }
.mobile-menu-links a {
  font-family: var(--disp); font-size: 2rem; font-weight: 800; color: var(--cream);
  padding-block: 8px; border-bottom: 1px solid rgba(244,241,250,.14);
}
.mobile-menu-foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.mobile-menu-foot .text-size-ctrl { display: inline-flex; background: rgba(244,241,250,.1); border-color: rgba(244,241,250,.24); }
.mobile-menu-foot .text-size-ctrl button { color: var(--cream); }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 64px;
  overflow: clip;
}
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 640px;
  background: radial-gradient(55% 60% at 30% 20%, rgba(182,166,217,0.45), transparent 70%),
              radial-gradient(45% 50% at 85% 10%, rgba(91,63,146,0.22), transparent 70%);
  filter: blur(10px); pointer-events: none; z-index: -1;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 16px; }
.hero-title { font-size: clamp(2.5rem, 6.4vw, 4rem); margin-bottom: 16px; }
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub { font-size: 1.18rem; color: var(--muted); max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 24px 32px; }
.hero-trust-item { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; color: var(--ink-soft); }
.hero-trust-item svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-photo-card {
  position: relative; border-radius: var(--radius-lg); overflow: clip;
  aspect-ratio: 4/5; box-shadow: var(--shadow-lg);
}
.hero-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,26,61,0) 45%, rgba(36,26,61,0.55) 100%); }
.hero-float-card {
  position: absolute; left: -16px; bottom: 24px; max-width: 240px;
  padding: 16px 24px; border-radius: var(--radius-md);
  background: var(--paper); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}
@supports (backdrop-filter: blur(18px)) {
  .hero-float-card { backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); background: rgba(255,255,255,0.92); }
}
.hero-float-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-float-card-top svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; }
.hero-float-card-top strong { font-family: var(--disp); font-size: 1rem; color: var(--ink); }
.hero-float-card p { font-size: .86rem; color: var(--ink-soft); }

/* =============================================================
   5b. Header flotante (vidrio) — Home
   ============================================================= */
.glass-nav {
  position: fixed; z-index: 500;
  top: 24px; left: 0; right: 0;
  padding-inline: 24px;
  pointer-events: none;
}
.glass-nav-bar {
  pointer-events: auto;
  max-width: 1248px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 64px; padding: 8px 8px 8px 24px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 10px 36px rgba(48, 25, 65, 0.16);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.glass-nav.is-scrolled .glass-nav-bar {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 40px rgba(48, 25, 65, 0.18);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-nav-bar { background: rgba(255, 255, 255, 0.94); }
}
.glass-nav-logo { justify-self: start; display: inline-flex; }
.glass-nav-logo img { height: 32px; width: auto; }

.glass-nav-links { display: none; align-items: center; gap: 8px; }
.glass-nav-links a {
  font-family: var(--disp); font-weight: 700; font-size: .95rem; color: var(--brand-plum);
  padding: 8px 16px; border-radius: var(--radius-pill);
  transition: background-color .3s var(--ease-out);
}
.glass-nav-links a:hover { background: rgba(255, 255, 255, 0.55); }
.glass-nav-links a[aria-current="page"] { background: rgba(194, 176, 213, 0.45); }

.glass-nav-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.glass-nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 700; font-size: .98rem; line-height: 1;
  min-height: 48px; padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--brand-plum); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(48, 25, 65, 0.25);
  transition: transform .35s var(--ease-out), background-color .3s var(--ease-out);
}
.glass-nav-cta:hover { background: #1f0f2c; transform: translateY(-1px); }
.glass-nav-cta svg { width: 24px; height: 24px; flex-shrink: 0; }
.glass-nav-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6); color: var(--brand-plum);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.glass-nav-burger svg { width: 24px; height: 24px; }
.mobile-menu-logo { height: 32px; width: auto; }

/* =============================================================
   6b. Hero carrusel de pantalla completa — Home
   ============================================================= */
.hero-carousel {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; overflow: clip; background: var(--brand-plum); color: #fff;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.2s var(--ease-soft);
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transition: transform 7s linear;
}
.hero-slide.is-active img { transform: scale(1); }
/* Sombra para legibilidad: más densa a la izquierda y abajo, donde va el texto */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 14, 42, 0.78) 0%, rgba(30, 14, 42, 0.52) 38%, rgba(30, 14, 42, 0.08) 68%, rgba(30, 14, 42, 0) 100%),
    linear-gradient(0deg, rgba(30, 14, 42, 0.55) 0%, rgba(30, 14, 42, 0) 40%),
    linear-gradient(180deg, rgba(30, 14, 42, 0.25) 0%, rgba(30, 14, 42, 0) 22%);
}
.hero-carousel-inner {
  position: relative; z-index: 1; width: 100%; max-width: 1248px; margin-inline: auto;
  padding: calc(64px + 24px + 48px) 24px 32px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 32px;
}
.hero-carousel-copy { max-width: 624px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 700; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-lavender);
  margin-bottom: 16px;
}
.hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero-carousel .hero-title {
  color: #fff; font-size: clamp(2.5rem, 6vw, 4.4rem); max-width: 15ch; margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(30, 14, 42, 0.35);
}
.hero-carousel .hero-title em { color: var(--brand-lavender); font-style: normal; }
.hero-carousel .hero-sub {
  color: rgba(255, 255, 255, 0.9); font-size: 1.12rem; max-width: 48ch; margin-bottom: 32px;
  text-shadow: 0 1px 12px rgba(30, 14, 42, 0.4);
}

/* Botón translúcido tipo "liquid glass" */
.btn-glass {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 700; font-size: 1.1rem; line-height: 1;
  min-height: 56px; padding: 8px 24px; border-radius: var(--radius-pill);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.10));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 10px 30px rgba(30, 14, 42, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  transition: transform .35s var(--ease-out), background-color .3s var(--ease-out), box-shadow .35s var(--ease-out);
}
.btn-glass:hover {
  background-color: rgba(255, 255, 255, 0.14); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 14px 36px rgba(30, 14, 42, 0.34);
}
.btn-glass svg { width: 24px; height: 24px; flex-shrink: 0; }

/* Controles flotantes del carrusel */
.hero-controls {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  /* Borde como sombra interior para no sumar 2px: el control mide 56px exactos */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
}
.hero-arrow {
  width: 40px; height: 40px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .25s var(--ease-out);
}
.hero-arrow:hover { background: rgba(255, 255, 255, 0.2); }
.hero-arrow svg { width: 24px; height: 24px; }
/* Malla 8px: pills de 8px (activo 24px) separados 8px; la columna de 40px es el área táctil */
.hero-dots { display: flex; align-items: center; gap: 8px; }
.hero-dot {
  width: 8px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  transition: width .4s var(--ease-out);
}
.hero-dot::before {
  content: ""; width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.5); transition: width .4s var(--ease-out), background-color .3s;
}
.hero-dot.is-active { width: 24px; }
.hero-dot.is-active::before { width: 24px; background: #fff; }
.hero-carousel :focus-visible { outline-color: #fff; }

@media (max-width: 959px) {
  .glass-nav-bar { grid-template-columns: 1fr auto; }
}
@media (max-width: 719px) {
  .glass-nav { padding-inline: 16px; }
  .glass-nav-bar { min-height: 64px; padding-left: 16px; }
  .glass-nav-logo img { height: 32px; }
  .glass-nav-cta { padding: 8px 16px; }
  .glass-nav-burger { width: 48px; height: 48px; }
  .hero-carousel-inner { padding-top: calc(64px + 24px + 32px); }
  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(30, 14, 42, 0.88) 0%, rgba(30, 14, 42, 0.7) 45%, rgba(30, 14, 42, 0.38) 72%, rgba(30, 14, 42, 0.05) 90%),
      linear-gradient(180deg, rgba(30, 14, 42, 0.3) 0%, rgba(30, 14, 42, 0) 22%);
  }
}
@media (max-width: 419px) {
  .glass-nav-cta span { display: none; }
  .glass-nav-cta { width: 48px; padding: 0; justify-content: center; }
}
@media (min-width: 960px) {
  .glass-nav-links { display: flex; }
  .glass-nav-burger { display: none; }
  .hero-carousel-inner {
    padding-bottom: 48px; flex-direction: row; align-items: flex-end; justify-content: space-between;
  }
  .hero-controls { align-self: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide img { transition: none; }
  .hero-slide img { transform: none; }
}

/* =============================================================
   7. Glass / value cards
   ============================================================= */
.card-glass {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.value-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.value-card {
  padding: 32px; border-radius: var(--radius-md); background: var(--paper);
  border: 1px solid var(--line); transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .45s var(--ease-out);
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--accent-light); }
.value-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.value-icon svg { width: 32px; height: 32px; color: var(--accent); }
.value-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.value-card p { font-size: .96rem; color: var(--muted); }
.value-card.is-wide { grid-column: 1 / -1; }
.value-card.is-wide .value-inner { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }

/* =============================================================
   8. Services
   ============================================================= */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.service-card {
  padding: 32px; border-radius: var(--radius-lg); background: var(--paper);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 32px; height: 32px; color: var(--cream); }
.service-card h3 { font-size: 1.3rem; }
.service-card p { color: var(--muted); font-size: .98rem; flex-grow: 1; }
.service-card .btn-link { margin-top: 8px; align-self: flex-start; }
.btn-link svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .35s var(--ease-out); }
.btn-link:hover svg { transform: translateX(3px); }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .78rem; font-weight: 700; padding: 8px 8px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
}

/* =============================================================
   9. Process steps
   ============================================================= */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 24px; counter-reset: step; }
.step-card { position: relative; padding: 32px 32px 32px 32px; border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--line); }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent-dark); color: var(--cream);
  font-family: var(--disp); font-weight: 800; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step-card p { font-size: .94rem; color: var(--muted); }
.step-connector { display: none; }

/* =============================================================
   10. Photo strip
   ============================================================= */
.photo-strip { display: grid; grid-template-columns: 1fr; gap: 16px; }
.photo-strip-item { position: relative; border-radius: var(--radius-lg); overflow: clip; aspect-ratio: 4/5; }
.photo-strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.photo-strip-item:hover img { transform: scale(1.06); }
.photo-strip-caption {
  position: absolute; inset: auto 0 0 0; padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(36,26,61,.86));
  color: var(--cream);
}
.photo-strip-caption strong { font-family: var(--disp); font-size: 1.05rem; display: block; }
.photo-strip-caption span { font-size: .84rem; opacity: .85; }

/* =============================================================
   11. CTA band
   ============================================================= */
.cta-band {
  position: relative; overflow: clip; border-radius: var(--radius-lg);
  background: var(--accent-dark); color: var(--cream);
  padding: var(--band-pad); text-align: center;
  margin-inline: 24px;
}
.cta-band-glow {
  position: absolute; inset: -60% -10% -60% -10%;
  background: radial-gradient(45% 55% at 25% 40%, rgba(182,166,217,0.35), transparent 70%),
              radial-gradient(40% 50% at 80% 60%, rgba(91,63,146,0.5), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.cta-band h2 { color: var(--cream); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 16px; }
.cta-band p { color: rgba(244,241,250,.78); max-width: 46ch; margin-inline: auto; margin-bottom: 32px; font-size: 1.05rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* =============================================================
   12. Footer
   ============================================================= */
.site-footer { background: var(--accent-dark); color: rgba(244,241,250,.72); padding-top: var(--footer-top); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .logo-ria { color: var(--cream); }
.footer-brand .logo-mark { background: rgba(244,241,250,.14); }
.footer-logo { display: inline-flex; }
.footer-logo img { height: 32px; width: auto; }
.footer-brand p { margin-top: 16px; max-width: 32ch; font-size: .94rem; }
.footer-col h4 { color: var(--cream); font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .95rem; transition: color .25s var(--ease-out); }
.footer-col a:hover { color: var(--cream); }
.footer-contact-item { display: flex; align-items: center; gap: 8px; }
.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(244,241,250,.14); padding-block: 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  font-size: .82rem;
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(244,241,250,.2);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: rgba(244,241,250,.12); }
.footer-social svg { width: 16px; height: 16px; }

/* =============================================================
   13. Forms
   ============================================================= */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .94rem; color: var(--ink); }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1.02rem; padding: 16px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink);
  min-height: 56px; transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
  width: 100%;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.field-error { font-size: .84rem; color: var(--danger); font-weight: 600; display: none; }
.field.has-error .field-error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px 16px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; }
.checkbox-row input { width: 24px; height: 24px; margin-top: 0; accent-color: var(--accent); flex-shrink: 0; }
.checkbox-row label { font-size: .92rem; color: var(--ink-soft); font-weight: 500; }

.alert {
  display: flex; align-items: flex-start; gap: 16px; padding: 16px 16px;
  border-radius: var(--radius-sm); font-size: .95rem; font-weight: 500; margin-bottom: 16px;
}
.alert[hidden] { display: none; }
.alert svg { width: 24px; height: 24px; flex-shrink: 0; }
.alert-success { background: var(--success-soft); color: #205c3b; }
.alert-error { background: var(--danger-soft); color: #7a2c1c; }
.alert-info { background: var(--accent-soft); color: var(--accent-dark-2); }

/* =============================================================
   14. Auth (cuenta.html)
   ============================================================= */
.auth-wrap { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 80px; min-height: 100svh; }
.auth-card { max-width: 480px; margin-inline: auto; padding: var(--card-pad); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.auth-tabs { display: flex; gap: 8px; background: var(--bg-2); padding: 8px; border-radius: var(--radius-pill); margin-bottom: 32px; }
.auth-tab { flex: 1; text-align: center; padding: 8px 16px; border-radius: var(--radius-pill); font-weight: 700; color: var(--muted); }
.auth-tab[aria-selected="true"] { background: var(--paper); color: var(--accent); box-shadow: var(--shadow-sm); }
.auth-panel[hidden] { display: none; }
.auth-note { text-align: center; font-size: .84rem; color: var(--muted); margin-top: 16px; }
.auth-local-badge {
  display: flex; align-items: flex-start; gap: 8px; padding: 16px 16px;
  background: var(--accent-soft); border-radius: var(--radius-sm); font-size: .84rem; color: var(--accent-dark-2);
  margin-bottom: 24px;
}
.auth-local-badge svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--accent); }

/* =============================================================
   15. Agenda (booking page)
   ============================================================= */
.agenda-hero { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 16px; }
.agenda-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); }
.agenda-steps { display: grid; grid-template-columns: 1fr; gap: 24px; }
.agenda-step {
  padding: var(--step-pad); border-radius: var(--radius-lg); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.agenda-step-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.agenda-step-head .step-num { margin-bottom: 0; flex-shrink: 0; }
.agenda-step-head h2 { font-size: 1.4rem; }
.agenda-step-body p { color: var(--muted); margin-bottom: 24px; }
.agenda-cal-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px; border-radius: var(--radius-md); background: var(--accent-soft);
}
.agenda-cal-card-info { display: flex; align-items: center; gap: 16px; }
.agenda-cal-card-info .value-icon { background: var(--paper); }
.agenda-cal-card-info strong { font-family: var(--disp); font-size: 1.08rem; color: var(--ink); display: block; }
.agenda-cal-card-info span { font-size: .9rem; color: var(--muted); }
.agenda-alt-contact { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.agenda-alt-contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.agenda-alt-contact svg { width: 24px; height: 24px; }

.confirm-locked {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  padding: 32px 16px;
}
.confirm-locked svg { width: 48px; height: 48px; color: var(--accent-light); }
.confirm-locked-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: clip; background: var(--paper); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; font-family: var(--disp); font-weight: 700; font-size: 1.02rem; color: var(--ink); text-align: left;
}
.faq-q svg { width: 24px; height: 24px; flex-shrink: 0; transition: transform .35s var(--ease-out); color: var(--accent); }
.faq-item[data-open="true"] .faq-q svg { transform: rotate(45deg); }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out), padding .4s var(--ease-out); color: var(--muted); }
.faq-item[data-open="true"] .faq-a { padding: 0 24px 24px; max-height: 400px; }

/* =============================================================
   16. Perfil (profile)
   ============================================================= */
.profile-wrap { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 80px; min-height: 100svh; }
.profile-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 32px; border-radius: var(--radius-lg); background: var(--accent-soft); margin-bottom: 40px;
}
.profile-id { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-dark); color: var(--cream);
  font-family: var(--disp); font-weight: 800; font-size: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-id strong { font-family: var(--disp); font-size: 1.2rem; color: var(--ink); display: block; }
.profile-id span { font-size: .92rem; color: var(--muted); }

.appt-list { display: flex; flex-direction: column; gap: 16px; }
.appt-card {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 24px 24px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--paper);
}
.appt-date {
  display: flex; align-items: center; gap: 16px; min-width: 224px;
}
.appt-date-badge {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--accent-dark); color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.appt-date-badge .d { font-family: var(--disp); font-weight: 800; font-size: 1.2rem; line-height: 1; }
.appt-date-badge .m { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.appt-meta strong { display: block; font-family: var(--disp); font-size: 1.02rem; color: var(--ink); }
.appt-meta span { font-size: .88rem; color: var(--muted); }
.appt-status { font-size: .8rem; font-weight: 700; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--success-soft); color: #205c3b; }
.appt-cancel { font-size: .85rem; font-weight: 700; color: var(--danger); }
.empty-state { text-align: center; padding: 48px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-state svg { width: 56px; height: 56px; color: var(--accent-light); margin-inline: auto; margin-bottom: 16px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }

/* =============================================================
   17. Dialogs / modals
   ============================================================= */
dialog {
  border: 0; border-radius: var(--radius-lg); padding: 0; max-width: 464px; width: calc(100% - 40px);
  box-shadow: var(--shadow-lg); overflow: visible;
  position: fixed; inset: 0; margin: auto;
}
dialog::backdrop { background: rgba(33, 26, 51, 0.5); backdrop-filter: blur(4px); }
.modal-body { padding: var(--modal-pad); text-align: center; }
.modal-icon {
  width: 80px; height: 80px; border-radius: 50%; background: var(--success-soft);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.modal-icon svg { width: 40px; height: 40px; color: var(--success); }
.modal-icon.is-danger { background: var(--danger-soft); }
.modal-icon.is-danger svg { color: var(--danger); }
.modal-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.modal-body p { color: var(--muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.modal-close-x {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center;
}
.modal-close-x svg { width: 16px; height: 16px; }

/* =============================================================
   18. Credits page
   ============================================================= */
.credits-wrap { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 80px; }
.credits-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.credits-list li { padding: 16px 24px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); font-size: .92rem; }
.credits-list a { color: var(--accent); font-weight: 600; }
.footer-credits { font-size: .82rem; margin-top: 8px; }
.footer-credits a { text-decoration: underline; }

/* =============================================================
   19. Page hero (secondary pages)
   ============================================================= */
.page-hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 16px; text-align: center; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); max-width: 20ch; margin-inline: auto; }
.page-hero p { max-width: 56ch; margin-inline: auto; color: var(--muted); font-size: 1.08rem; margin-top: 16px; }

/* =============================================================
   20. Reveal / effects
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

.count-up { font-family: var(--disp); font-weight: 800; }

/* =============================================================
   21. Responsive
   ============================================================= */
/* Prevent CSS Grid blowout: grid items default to a content-based min
   width, so a long nowrap button/line can force the whole grid (and page)
   wider than the viewport. Letting items shrink to 0 keeps everything
   inside the container; wrapping/ellipsis rules below handle the content. */
.hero-grid > *, .value-grid > *, .services-grid > *, .steps-grid > *,
.photo-strip > *, .agenda-steps > *, .footer-grid > *, .field-row > * {
  min-width: 0;
}

@media (max-width: 539px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
}

@media (min-width: 540px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid > .service-card:nth-child(5) { grid-column: 1 / -1; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
  .text-size-ctrl { display: inline-flex; }
  .hero-title { max-width: 16ch; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .value-grid { grid-template-columns: repeat(4, 1fr); }
  .value-card.is-wide { grid-column: 1 / -1; }
  .value-card.is-wide .value-inner { grid-template-columns: 1fr 1.3fr; }
  /* 6 columnas: 3 tarjetas arriba (2 col c/u) + 2 abajo (3 col c/u), sin huecos */
  .services-grid { grid-template-columns: repeat(6, 1fr); }
  .services-grid > .service-card { grid-column: span 2; }
  .services-grid > .service-card:nth-child(4),
  .services-grid > .service-card:nth-child(5) { grid-column: span 3; }
  .agenda-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr .8fr .8fr 1fr; }
  .profile-header { flex-wrap: nowrap; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 32px; }
}

/* =============================================================
   22. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-glow, .cta-band-glow { animation: none; }
  .photo-strip-item img { transition: none; }
}
