/* ==========================================================================
   Clínica Veterinaria PLuMa — "Pluma editorial"
   ========================================================================== */

:root {
  /* Paleta de marca (extraída de su Instagram) */
  --cream: #FBF5F0;
  --paper: #FFFDFB;
  --blush: #F4D3DB;
  --blush-soft: #F9E7EB;
  --mauve: #9B4560;
  --mauve-deep: #7E3349;
  --plum: #3A1C29;
  --plum-soft: #6A4352;
  --line: #E9D9DC;
  --line-strong: #D9BCC4;
  --gold: #C48A2C;
  --sage: #4E7A63;
  --danger: #B3261E;

  /* Tipografía */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Escala */
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.6vw, 2.9rem);
  --step-4: clamp(2.55rem, 1.9rem + 3.2vw, 4.9rem);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 1px 2px rgb(58 28 41 / 0.04), 0 12px 32px -12px rgb(58 28 41 / 0.16);
  --shadow-lift: 0 2px 4px rgb(58 28 41 / 0.05), 0 24px 48px -18px rgb(58 28 41 / 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 450; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; font-variation-settings: 'opsz' 144; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 500; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mauve); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blush); color: var(--plum); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--plum); color: var(--cream); padding: 10px 16px; border-radius: var(--radius-sm); transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
@media (min-width: 768px) { .container { width: min(1200px, 100% - 64px); } }
.muted { color: var(--plum-soft); }
.small { font-size: var(--step--1); }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mauve); margin-bottom: 1.1em;
}
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--plum-soft); max-width: 36ch; }

/* ---------- Botones ---------- */
.btn {
  --bg: transparent; --fg: var(--plum); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 46px; padding: 0.7em 1.35em;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  border-radius: 999px; font-weight: 600; font-size: 0.98rem; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { --bg: var(--mauve); --fg: #fff; box-shadow: 0 8px 20px -10px rgb(155 69 96 / 0.7); }
.btn-primary:hover { --bg: var(--mauve-deep); }
.btn-ghost { --bd: var(--line-strong); --bg: transparent; }
.btn-ghost:hover { --bd: var(--mauve); --fg: var(--mauve-deep); --bg: var(--paper); }
.btn-text { --fg: var(--plum-soft); padding-inline: 0.6em; }
.btn-text:hover { --fg: var(--mauve-deep); transform: none; }
.btn-lg { min-height: 54px; padding-inline: 1.6em; font-size: 1.02rem; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; transform: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}
.icon-btn.small { width: 38px; height: 38px; border-color: var(--line-strong); color: var(--plum); }
.icon-btn:hover { background: rgb(155 69 96 / 0.1); }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 600; color: var(--mauve-deep); text-decoration: none; }
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(251 245 240 / 0.86);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--plum-soft); margin-top: 4px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a { text-decoration: none; font-weight: 500; position: relative; padding: 6px 0; }
.main-nav ul a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--mauve); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.main-nav ul a:hover::after, .main-nav ul a[aria-current='true']::after { transform: scaleX(1); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-grid; place-items: center; width: 46px; height: 46px;
    border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--paper); cursor: pointer;
  }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 16px 16px 24px; background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: 14px 4px; font-family: var(--font-display); font-size: 1.4rem; border-bottom: 1px solid var(--line); }
  .main-nav ul a::after { display: none; }
  .nav-cta { margin-top: 12px; min-height: 52px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } }
.hero h1 { font-size: var(--step-4); font-weight: 400; margin-bottom: 0.38em; max-width: 13ch; }
.hero h1 em { font-style: italic; color: var(--mauve); font-weight: 400; }
.hero .lead { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2rem; }
.open-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.open-dot.is-open { background: var(--sage); box-shadow: 0 0 0 4px rgb(78 122 99 / 0.18); }

.rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; text-decoration: none; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); transition: border-color 0.2s; }
.rating:hover { border-color: var(--line-strong); }
.rating-score { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; background: var(--blush-soft); padding: 4px 10px; border-radius: 999px; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); margin: 0; }
.stars .icon { width: 16px; height: 16px; }
.rating-text { font-size: 0.92rem; color: var(--plum-soft); }

.hero-visual { position: relative; justify-self: center; width: min(400px, 100%); padding: 0 0 40px 40px; }
.arch {
  margin: 0; aspect-ratio: 1 / 1.12; border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  overflow: hidden; background: var(--blush); box-shadow: var(--shadow-lift); position: relative; z-index: 1;
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 40%; }
.bubble {
  position: absolute; z-index: 2; margin: 0; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--cream); box-shadow: var(--shadow-soft);
}
.bubble img { width: 100%; height: 100%; object-fit: cover; }
.bubble-cat { width: clamp(120px, 34%, 168px); aspect-ratio: 1; left: 0; bottom: 0; }
.bubble-cat img { object-position: 45% 50%; }
.hero-tag {
  position: absolute; z-index: 3; right: -6px; top: 16%;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-soft); font-size: 0.9rem;
}
.hero-tag .icon { width: 12px; height: 32px; color: var(--mauve); }
.hero-feather { position: absolute; z-index: 0; width: 120px; height: 340px; right: -46px; bottom: -22px; color: var(--mauve); opacity: 0.32; transform: rotate(28deg); }
@media (max-width: 520px) { .hero-tag { right: 0; top: 8%; } .hero-feather { right: -20px; } }

/* ---------- Franja ---------- */
.ribbon { background: var(--plum); color: var(--blush); overflow: hidden; padding: 18px 0; }
.ribbon-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: ribbon 38s linear infinite; }
.ribbon span { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; white-space: nowrap; }
.ribbon svg { width: 10px; height: 28px; color: var(--mauve); fill: none; flex: none; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-blush { background: var(--blush-soft); }
.section-plum { background: var(--plum); color: var(--cream); }
.section-plum .eyebrow { color: var(--blush); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 24px; max-width: none; }
.section-head h2 { margin: 0; }

/* Servicios */
.services-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .services-grid { grid-template-columns: 5fr 7fr; gap: 72px; }
  .services-intro { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
}
.services-intro p:not(.eyebrow) { color: var(--plum-soft); max-width: 40ch; }
.services-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.service { border-bottom: 1px solid var(--line-strong); }
.service a {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center;
  padding: 22px 12px; text-decoration: none; border-radius: var(--radius-sm);
  transition: background-color 0.3s var(--ease);
}
.service-num { font-family: var(--font-display); font-style: italic; color: var(--mauve); font-size: 1.05rem; }
.service-body { display: flex; flex-direction: column; gap: 4px; }
.service-name { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.01em; }
.service-desc { color: var(--plum-soft); font-size: 0.97rem; }
.service-go { width: 22px; height: 22px; color: var(--mauve); opacity: 0.45; transition: transform 0.3s var(--ease), opacity 0.3s; }
.service a:hover { background: var(--paper); }
.service a:hover .service-go { opacity: 1; transform: translateX(4px); }

/* La clínica */
.about-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.9fr 1.1fr; gap: 80px; } }
.about-photo { margin: 0; position: relative; }
.about-photo img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 40%; border-radius: 240px 240px var(--radius) var(--radius); box-shadow: var(--shadow-lift); }
.about-photo figcaption { margin-top: 14px; font-size: var(--step--1); color: var(--plum-soft); font-style: italic; font-family: var(--font-display); }
.values { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 22px; }
.values li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.values .icon { width: 14px; height: 40px; color: var(--mauve); margin-top: 2px; }
.values h3 { margin-bottom: 0.2em; }
.values p { margin: 0; color: var(--plum-soft); }

/* Pacientes */
.patients { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 36px); margin-bottom: 96px; }
.patient { margin: 0; }
.patient img { border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform 0.4s var(--ease); }
.patient:hover img { transform: translateY(-4px) rotate(-0.6deg); }
.patient:nth-child(2) { transform: translateY(48px); }
.patient figcaption { font-family: var(--font-display); font-style: italic; color: var(--plum-soft); margin-top: 10px; text-align: center; }
@media (max-width: 720px) {
  .patients { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .patients::-webkit-scrollbar { display: none; }
  .patient { scroll-snap-align: center; }
  .patient:nth-child(2) { transform: none; }
}

/* Consejos */
.carousel-controls { display: flex; gap: 10px; color: var(--blush); }
.tips {
  list-style: none; margin: 0 -16px; padding: 4px 16px 12px; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.tips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .tips { grid-auto-columns: calc((100% - 3 * 20px) / 4); margin: 0; padding-inline: 0; } }
.tip { scroll-snap-align: start; }
.tip a { display: block; text-decoration: none; color: var(--cream); }
.tip img { border-radius: var(--radius); transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.tip a:hover img { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.6); }
.tip-title { display: block; margin-top: 14px; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; }

/* ---------- Reserva ---------- */
.booking-grid { display: grid; gap: 40px; }
@media (min-width: 980px) { .booking-grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; } .booking-intro { position: sticky; top: calc(var(--header-h) + 40px); } }
.booking-intro > p:not(.eyebrow) { color: var(--plum-soft); }
.urgent { margin: 28px 0 24px; padding: 22px; border-radius: var(--radius); background: var(--blush-soft); border: 1px solid var(--line); }
.urgent strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.urgent p { color: var(--plum-soft); margin: 4px 0 14px; }

.booking-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow-soft); min-width: 0;
}
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 28px; counter-reset: s; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 500; color: var(--plum-soft); padding-bottom: 12px; border-bottom: 2px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.steps li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 0.8rem; flex: none; transition: all 0.3s; }
.steps li.is-current { color: var(--plum); border-color: var(--mauve); }
.steps li.is-current span { background: var(--mauve); border-color: var(--mauve); color: #fff; }
.steps li.is-done { color: var(--plum); border-color: var(--mauve); }
.steps li.is-done span { background: var(--blush); border-color: var(--blush); color: var(--mauve-deep); }
@media (max-width: 460px) { .steps li { font-size: 0; gap: 0; justify-content: center; } .steps li span { font-size: 0.8rem; } }

.step { border: 0; margin: 0; padding: 0; min-width: 0; animation: stepIn 0.35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } }
.step-title { font-family: var(--font-display); font-size: var(--step-2); font-weight: 450; margin-bottom: 20px; padding: 0; }
.step-title:focus { outline: none; }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.service-options { display: grid; gap: 10px; }
@media (min-width: 560px) { .service-options { grid-template-columns: 1fr 1fr; } }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option-box { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.option-name { font-weight: 600; line-height: 1.3; }
.option-meta { font-size: 0.85rem; color: var(--plum-soft); }
.option:hover .option-box { border-color: var(--line-strong); }
.option input:checked + .option-box { border-color: var(--mauve); background: var(--blush-soft); box-shadow: inset 0 0 0 1px var(--mauve); }
.option input:focus-visible + .option-box { outline: 3px solid var(--mauve); outline-offset: 2px; }

.days-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-bottom: 20px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 64px; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 4px 2px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--cream); cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.day-wd { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--plum-soft); }
.day-num { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.day-mo { font-size: 0.72rem; color: var(--plum-soft); }
.day:hover:not([disabled]) { border-color: var(--line-strong); }
.day[aria-pressed='true'] { border-color: var(--mauve); background: var(--mauve); color: #fff; }
.day[aria-pressed='true'] .day-wd, .day[aria-pressed='true'] .day-mo { color: rgb(255 255 255 / 0.85); }
.day[disabled] { opacity: 0.4; cursor: not-allowed; background: transparent; text-decoration: line-through; text-decoration-color: var(--line-strong); }
.day-few::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin-top: 2px; }

.slots { min-height: 120px; }
.slot-group + .slot-group { margin-top: 18px; }
.slot-group h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--plum-soft); margin: 0 0 10px; font-weight: 600; }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--cream); cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; transition: all 0.2s; }
.slot:hover { border-color: var(--mauve); }
.slot[aria-pressed='true'] { background: var(--mauve); border-color: var(--mauve); color: #fff; }
.slots-empty { padding: 24px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--plum-soft); }
.skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.skeleton span { height: 44px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--blush-soft), var(--cream), var(--blush-soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.summary { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--blush-soft); font-size: 0.93rem; margin-bottom: 22px; }
.summary strong { font-weight: 600; }
.fields { display: grid; gap: 18px 16px; }
@media (min-width: 560px) { .fields { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: 0.93rem; }
.optional { font-weight: 400; color: var(--plum-soft); }
.field input[type='text'], .field input[type='tel'], .field input[type='email'], .field input[type='date'], .field input[type='time'], .field input[type='password'], .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--cream); transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--mauve); box-shadow: 0 0 0 3px rgb(155 69 96 / 0.18); }
.field.has-error input, .field.has-error textarea, .field.has-error .segmented { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.85rem; margin: 0; min-height: 0; }
.field-error:empty { display: none; }
.form-error { color: var(--danger); font-weight: 500; margin: 16px 0 0; }
.form-error:empty { display: none; }
.segmented { display: flex; gap: 6px; padding: 4px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--cream); }
.segmented label { flex: 1; position: relative; display: grid; place-items: center; min-height: 38px; border-radius: 7px; cursor: pointer; font-weight: 500; font-size: 0.95rem; transition: background-color 0.2s, color 0.2s; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--mauve); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--mauve); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.92rem !important; color: var(--plum-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--mauve); flex: none; }
.check a { color: var(--mauve-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid rgb(255 255 255 / 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.booking-success { text-align: center; padding: 16px 0; animation: stepIn 0.4s var(--ease); }
.booking-success:focus { outline: none; }
.success-mark { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); color: var(--mauve-deep); }
.success-mark .icon { width: 34px; height: 34px; }
.booking-success h3 { font-size: var(--step-3); font-weight: 400; }
.code-box { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--blush-soft); border: 1px dashed var(--mauve); }
.code-box strong { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 0.08em; color: var(--mauve-deep); }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Reseñas ---------- */
.reviews { background: var(--blush); padding: clamp(56px, 8vw, 88px) 0; overflow: hidden; }
.reviews-inner { display: grid; gap: 24px; align-items: center; position: relative; }
@media (min-width: 760px) { .reviews-inner { grid-template-columns: auto 1fr; gap: 56px; } }
.reviews-score { font-family: var(--font-display); font-size: clamp(5rem, 12vw, 9rem); line-height: 0.9; margin: 0; font-weight: 400; letter-spacing: -0.04em; color: var(--mauve-deep); }
.stars-lg .icon { width: 24px; height: 24px; }
.reviews-quote { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; max-width: 26ch; margin-bottom: 0.7em; }
.reviews-feather { position: absolute; right: 0; top: 50%; width: 110px; height: 320px; transform: translateY(-50%) rotate(-24deg); color: var(--mauve); opacity: 0.25; pointer-events: none; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.2fr 0.8fr; gap: 80px; align-items: start; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; font-size: 1.05rem; }
.contact-list .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--blush-soft); color: var(--mauve); }
.contact-list a { text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.contact-list a:hover { color: var(--mauve-deep); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hours-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-soft); }
.hours-card h3 { display: flex; align-items: center; gap: 10px; }
.hours-card h3 .icon { color: var(--mauve); }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.hours th, .hours td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today { background: var(--blush-soft); }
.hours tr.is-today th { font-weight: 600; }
.hours tr.is-today th::after { content: ' · hoy'; color: var(--mauve); font-weight: 500; font-size: 0.85rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum); color: rgb(251 245 240 / 0.82); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1fr auto auto; gap: 48px; } }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand img { border-radius: 50%; width: 56px; height: 56px; }
.footer-brand p { margin: 0; }
.footer-brand strong { color: var(--cream); font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--cream); text-decoration: underline; }
.footer-copy { margin: 0; font-size: var(--step--1); }

/* CTA móvil */
.mobile-cta { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); min-height: 54px; transform: translateY(140%); transition: transform 0.35s var(--ease); }
.mobile-cta.is-visible { transform: none; }
@media (min-width: 861px) { .mobile-cta { display: none; } }

/* Diálogo */
.dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(460px, calc(100% - 32px)); background: var(--paper); color: var(--plum); box-shadow: var(--shadow-lift); }
.dialog::backdrop { background: rgb(58 28 41 / 0.45); backdrop-filter: blur(3px); }
.dialog-body { padding: 28px; display: grid; gap: 14px; position: relative; }
.dialog-body h3 { font-size: var(--step-2); margin: 0; font-weight: 450; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-color: var(--line-strong); }
.dialog .form-success { color: var(--sage); font-weight: 500; }

/* ---------- Páginas legales ---------- */
.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: var(--step-3); }
.legal h2 { font-size: var(--step-2); margin-top: 1.6em; }
.legal p, .legal li { color: var(--plum-soft); }
.legal .placeholder { background: var(--blush); color: var(--plum); padding: 0 4px; border-radius: 4px; }

/* ---------- Animación de aparición ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .patient.reveal:nth-child(2) { transform: translateY(66px); }
.js .patient.reveal.is-visible:nth-child(2) { transform: translateY(48px); }
@media (max-width: 720px) { .js .patient.reveal:nth-child(2), .js .patient.reveal.is-visible:nth-child(2) { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ribbon-track { animation: none; }
}

.booking-success p, .lead, h1, h2 { text-wrap: balance; }
@media (max-width: 720px) { .patients { margin-bottom: 32px; } }
@media (max-width: 480px) {
  .rating { flex-wrap: nowrap; gap: 8px; padding-right: 14px; }
  .rating-text { font-size: 0.84rem; white-space: nowrap; }
  .stars .icon { width: 13px; height: 13px; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (max-width: 560px) { .hero-visual { width: min(330px, 100%); padding: 0 0 28px 28px; } }
@media (max-width: 480px) { .days-wrap { grid-template-columns: 1fr; } .days-wrap > .icon-btn { display: none; } .days { grid-auto-columns: 58px; } }
