/* Magnolia Health Center — estilos */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2-variations"),
       url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --brand: #7c7371;
  --brand-strong: #5f5755;
  --brand-soft: #f0ebe8;
  --accent: #b88a74;          /* toque cálido (magnolia) */
  --bg: #faf8f6;
  --surface: #ffffff;
  --surface-2: #f6f2ef;
  --text: #2f2928;
  --muted: #7d7471;
  --border: rgba(95, 87, 85, .13);
  --on-brand: #ffffff;
  --star: #f2a900;
  --ok: #1f7a45;
  --bad: #b4442f;
  --shadow-sm: 0 1px 2px rgba(47, 41, 40, .06), 0 2px 8px -4px rgba(47, 41, 40, .1);
  --shadow: 0 14px 34px -16px rgba(47, 41, 40, .3);
  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #c2b7b3;
    --brand-strong: #e2d9d5;
    --brand-soft: #2a2524;
    --accent: #d7a990;
    --bg: #141211;
    --surface: #1d1a19;
    --surface-2: #242020;
    --text: #efe9e6;
    --muted: #a69d9a;
    --border: rgba(255, 255, 255, .08);
    --on-brand: #171413;
    --ok: #5fd08f;
    --bad: #f08a74;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 999px;
  background: var(--brand-strong); color: var(--bg); font-weight: 600; font-size: .9rem;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* Fondo */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(55% 40% at 100% 100%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  background: var(--brand-soft);
  animation: drift 24s ease-in-out infinite alternate;
}
.blob.b1 { width: 420px; height: 420px; top: -140px; left: -160px; }
.blob.b2 { width: 360px; height: 360px; bottom: -140px; right: -140px; animation-delay: -9s; }
@keyframes drift {
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-40px, 80px) scale(.95); }
}

main { max-width: 560px; margin: 0 auto; padding: 48px 16px 120px; }

/* Aparición */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Encabezado */
.hero { text-align: center; margin-bottom: 28px; }
.logo {
  width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent);
  display: grid; place-items: center; position: relative;
  animation: float 6s ease-in-out infinite;
}
.logo::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0;
  animation: halo 3.2s ease-out infinite;
}
.logo img { width: 88px; height: 88px; border-radius: 50%; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes halo { 0% { transform: scale(.9); opacity: .55; } 100% { transform: scale(1.28); opacity: 0; } }

.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
h1 {
  font-size: clamp(1.75rem, 7vw, 2.25rem); font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em; color: var(--brand-strong);
  text-wrap: balance;
}
.tagline { color: var(--muted); font-size: .98rem; margin: 10px auto 0; max-width: 34ch; text-wrap: balance; }

.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; line-height: 1;
  color: var(--brand-strong); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 8px 12px; border-radius: 999px;
  transition: transform .2s var(--ease), border-color .2s;
}
.chip svg { width: 14px; height: 14px; flex: none; }
a.chip:hover { transform: translateY(-2px); border-color: var(--brand); }
.chip.rating svg { color: var(--star); }

.status { color: var(--ok); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; flex: none; }
.status i::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor;
  animation: ping 1.8s ease-out infinite;
}
.status.closed { color: var(--bad); }
.status.closed i::after { animation: none; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }

/* Enlaces */
.links { display: grid; gap: 12px; }
.link {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: 1rem;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.link::before {
  content: ""; position: absolute; z-index: -1; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg); transition: left .7s ease;
}
.link:hover, .link:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.link:hover::before { left: 130%; }
.link:active { transform: translateY(-1px) scale(.99); }
.link .icon {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; color: var(--brand-strong); background: var(--brand-soft);
  transition: transform .3s var(--ease);
}
.link:hover .icon { transform: rotate(-6deg) scale(1.06); }
.link .icon svg { width: 22px; height: 22px; }
.link .label { flex: 1; min-width: 0; line-height: 1.3; }
.link .label small { display: block; margin-top: 2px; font-weight: 500; font-size: .8rem; color: var(--muted); }
.link .arrow { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .25s var(--ease), color .25s; }
.link:hover .arrow { transform: translateX(4px); color: var(--brand-strong); }

.link.primary {
  padding: 18px 18px; border-color: transparent; color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: var(--shadow);
}
.link.primary .icon { color: var(--on-brand); background: rgba(255, 255, 255, .16); }
.link.primary .label small, .link.primary .arrow { color: color-mix(in srgb, var(--on-brand) 78%, transparent); }
.link.primary:hover .arrow { color: var(--on-brand); }
@media (prefers-color-scheme: dark) {
  .link.primary .icon { background: rgba(0, 0, 0, .12); }
  .link::before { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08), transparent); }
}

/* Secciones */
section { margin-top: 48px; scroll-margin-top: 24px; }
.section-title {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font-size: 1.2rem; font-weight: 600; font-style: italic; color: var(--brand-strong);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

.card {
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* Ubicación */
.map { overflow: hidden; aspect-ratio: 16 / 11; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (prefers-color-scheme: dark) { .map iframe { filter: invert(.9) hue-rotate(180deg) saturate(.6); } }

.info { list-style: none; margin-top: 12px; padding: 6px 18px; font-size: .9rem; }
.info li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.info li + li { border-top: 1px solid var(--border); }
.info svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.info a { font-weight: 600; color: var(--brand-strong); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.info a:hover { text-decoration-color: currentColor; }
.hours { display: grid; gap: 2px; flex: 1; }
.hours .row { display: flex; justify-content: space-between; gap: 12px; }
.hours .row b { font-weight: 600; }
.hours .row span { color: var(--muted); font-variant-numeric: tabular-nums; }
.hours .row.today b, .hours .row.today span { color: var(--text); }
.hours .row.today b::after { content: " · hoy"; font-weight: 500; color: var(--accent); }

/* Reseñas */
.google-box { display: grid; gap: 16px; padding: 20px; margin-bottom: 14px; }
.google-box .top { display: flex; align-items: center; gap: 14px; }
.google-box .g { width: 36px; height: 36px; flex: none; }
.google-box strong { display: block; font-size: .98rem; line-height: 1.3; }
.google-box .hint { font-size: .84rem; color: var(--muted); }
.score { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; font-size: .84rem; color: var(--muted); }
.score b { font-size: 1.4rem; line-height: 1; color: var(--text); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .actions { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: .88rem; line-height: 1.2; white-space: nowrap;
  border: 1.5px solid var(--brand); color: var(--brand-strong); background: transparent; cursor: pointer;
  transition: background .25s, color .25s, transform .2s var(--ease), border-color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn.solid { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.btn.solid:hover { background: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }

.stars { display: flex; gap: 2px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }
.js .review .stars svg { opacity: 0; transform: scale(.4); }
.js .review.in .stars svg { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.review.in .stars svg:nth-child(2) { animation-delay: .08s; }
.review.in .stars svg:nth-child(3) { animation-delay: .16s; }
.review.in .stars svg:nth-child(4) { animation-delay: .24s; }
.review.in .stars svg:nth-child(5) { animation-delay: .32s; }
@keyframes pop { to { opacity: 1; transform: scale(1); } }

.reviews { display: grid; gap: 12px; }
.review { padding: 18px; transition: transform .3s var(--ease), box-shadow .3s; }
.review:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  color: var(--brand-strong); background: var(--brand-soft);
}
.who { flex: 1; min-width: 0; line-height: 1.3; }
.who strong { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .when { font-size: .75rem; color: var(--muted); }
.review blockquote { font-size: .93rem; }
.review blockquote::before { content: "“"; }
.review blockquote::after { content: "”"; }
.reply {
  margin-top: 12px; padding: 10px 12px; font-size: .82rem;
  border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0;
}
.reply strong { display: block; font-size: .74rem; color: var(--brand-strong); margin-bottom: 2px; }
.review[hidden] { display: none; }
.more { width: 100%; margin-top: 14px; }

footer { margin-top: 56px; text-align: center; font-size: .78rem; color: var(--muted); }
footer a { text-decoration: underline; text-underline-offset: 3px; }

/* Botón flotante de WhatsApp (móvil) */
.dock {
  position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  max-width: 528px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px; border-radius: 999px;
  background: var(--brand-strong); color: var(--on-brand);
  font-weight: 600; font-size: .95rem; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55);
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.dock svg { width: 20px; height: 20px; }
.dock.show { transform: none; }

/* Página 404 */
.notfound { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; text-align: center; gap: 14px; padding: 24px 16px; }
.notfound .code { font-size: 4rem; font-weight: 700; line-height: 1; color: var(--accent); }
.notfound .btn { justify-self: center; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .review .stars svg { opacity: 1; transform: none; }
}
address { font-style: normal; }
