/*
 * theme.css — Claudia Rodriguez · Dentista
 * Paleta "Teal clínico" del brief (fondo #F1FAF9, superficie #DDEDEB, texto #203B3C,
 * CTA #126568 con texto #FFFFFF, acento decorativo #7CBDB2) y tipografía Outfit + Figtree.
 * El sitio abre en modo claro. El bloque oscuro existe porque la plataforma lo exige;
 * el sitio no muestra selector de tema.
 */

:root {
  --canvas: #F1FAF9;
  --surface: #FFFFFF;
  --surface-2: #DDEDEB;
  --border: #C9E0DD;
  --border-strong: #8FB3AF;
  --ink: #203B3C;
  --muted: #4A6566;
  --accent: #126568;
  --accent-hover: #0B4F52;
  --accent-ink: #FFFFFF;
  --accent-text: #126568;
  --accent-strong: #0E4F51;
  --accent-soft: #DDEDEB;
  --accent-border: #7CBDB2;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dfebe3;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f2e6dd;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f2dfdf;
  --danger-strong: #b91c1c;
  --chart-1: #126568;
  --chart-2: #7CBDB2;
  --chart-3: #203B3C;
  --chart-4: #4A6566;
  --chart-5: #8FB3AF;
  --chart-6: #0B4F52;

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 600;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.08em;

  --radius-btn: 999px;
  --radius-card: 1.25rem;
  --radius-input: 0.75rem;
  --border-w: 1px;
  --shadow-card: none;
  --shadow-btn: none;
  --btn-weight: 600;
  --measure: 62ch;

  --x-deco: #7CBDB2;
  --x-band: #203B3C;
  --x-band-ink: #F1FAF9;
  --x-band-muted: #B9D3D0;
}

html[data-theme="dark"] {
  --canvas: #0F2223;
  --surface: #18302F;
  --surface-2: #1D3B3B;
  --border: #2A4A4A;
  --border-strong: #4C6F6D;
  --ink: #E3F1EF;
  --muted: #A3C2BF;
  --accent: #7CBDB2;
  --accent-hover: #9BCFC6;
  --accent-ink: #0F2223;
  --accent-text: #8DD0C4;
  --accent-strong: #CBEAE4;
  --accent-soft: #1D3B3B;
  --accent-border: #3F6E6A;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #172f22;
  --success-strong: #58a474;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #3a2517;
  --warning-strong: #ca854f;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #3b191b;
  --danger-strong: #d57575;
  --chart-1: #7CBDB2;
  --chart-2: #8DD0C4;
  --chart-3: #CBEAE4;
  --chart-4: #A3C2BF;
  --chart-5: #4C6F6D;
  --chart-6: #9BCFC6;

  --x-deco: #3F6E6A;
  --x-band: #0A1919;
  --x-band-ink: #E3F1EF;
  --x-band-muted: #A3C2BF;
}

/*
 * app.css — Estilos propios de la landing de Claudia Rodriguez - Dentista.
 * Solo tokens de theme.css. Minimalismo: una tipografía de títulos (Outfit 600), una de
 * lectura (Figtree), un solo motivo decorativo (el arco con brackets) y mucho aire.
 * Ojo: este archivo se carga al final y sin capa, así que sus reglas de display ganan a
 * las utilidades (lg:hidden…). Por eso los cortes responsivos de la barra inferior y del
 * botón de menú se declaran aquí con @media.
 */

html { scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.reduced-motion) { scroll-behavior: smooth; }
}
html.is-locked { overflow: hidden; }

.site {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}
@media (min-width: 64rem) { .site { padding-bottom: 0; } }

h1, h2, h3, .wordmark-name, .section-title, .closing-title, .band-title, .feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

/* ---- Saltar al contenido -------------------------------------------------- */
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 80;
  padding: 0.75rem 1rem; border-radius: 0.75rem;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---- Encabezado: transparente sobre el hero, sólido al desplazarse -------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--x-band-ink);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-solid {
  color: var(--ink);
  background: var(--canvas);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px -18px color-mix(in srgb, var(--ink) 60%, transparent);
}
.site-header:not(.is-solid) :where(a, button):focus-visible { outline-color: var(--x-band-ink); }

.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; min-height: 2.75rem; white-space: nowrap; flex-shrink: 0; }
.wordmark-name { font-size: 1.25rem; line-height: 1; }
.wordmark-sub {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding-left: 0.5rem; border-left: 1px solid currentColor; opacity: 0.85; line-height: 1;
}
@media (max-width: 22rem) { .wordmark-sub { display: none; } }
@media (max-width: 26rem) { .menu-panel .wordmark-sub { display: none; } }

.nav-link {
  position: relative; font-weight: 600; font-size: 0.95rem; color: inherit; text-decoration: none;
  padding: 0.75rem 0; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.45rem; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }

.icon-link {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px;
  color: inherit; transition: background-color 0.2s;
}
.icon-link:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

.menu-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; min-width: 2.75rem;
  padding: 0 0.75rem; border-radius: 999px; font-weight: 600; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  background: transparent; cursor: pointer; justify-content: center; flex-shrink: 0;
}
@media (min-width: 64rem) { .site-header .menu-btn { display: none; } }

/* ---- Menú desplegable de pantalla completa (móvil) ------------------------ */
.menu-panel {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0 0 env(safe-area-inset-bottom); border: 0;
  background: var(--canvas); color: var(--ink); overflow-y: auto;
}
.menu-panel::backdrop { background: transparent; }
.menu-panel[open] { animation: menu-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.menu-list { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; width: 100%; max-width: 22rem; }
.menu-list > li { width: 100%; }
.menu-list a, .menu-acc > summary {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.625rem;
  color: var(--ink); text-decoration: none; border-radius: 0.75rem; cursor: pointer;
}
.menu-list a:hover, .menu-acc > summary:hover { color: var(--accent-text); }
.menu-acc > summary { list-style: none; }
.menu-acc > summary::-webkit-details-marker { display: none; }
.menu-acc-mark { transition: transform 0.25s ease; }
.menu-acc[open] .menu-acc-mark { transform: rotate(180deg); }
.menu-acc ul {
  margin: 0.25rem auto 0.75rem; padding: 0.5rem; border-radius: 1rem; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 0.125rem;
}
.menu-acc ul a { font-family: var(--font-body); font-size: 1.0625rem; min-height: 2.75rem; }

/* ---- Hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; color: var(--x-band-ink); background: var(--x-band); isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(var(--hero-scale, 1)); transform-origin: center 40%; will-change: transform;
}
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--x-band) 70%, transparent) 0%, transparent 28%),
    linear-gradient(0deg, color-mix(in srgb, var(--x-band) 94%, transparent) 0%, color-mix(in srgb, var(--x-band) 78%, transparent) 45%, color-mix(in srgb, var(--x-band) 35%, transparent) 100%);
}
@media (min-width: 48rem) {
  .hero-shade {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--x-band) 60%, transparent) 0%, transparent 24%),
      linear-gradient(90deg, color-mix(in srgb, var(--x-band) 92%, transparent) 0%, color-mix(in srgb, var(--x-band) 80%, transparent) 42%, color-mix(in srgb, var(--x-band) 20%, transparent) 100%);
  }
}
.hero-eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-band-muted); }
.hero-title { margin-top: 1rem; font-size: clamp(2.6rem, 8vw, 4.75rem); line-height: 1.02; text-wrap: balance; }
.hero-lead { margin-top: 1.5rem; font-size: 1.125rem; max-width: 34rem; color: var(--x-band-ink); opacity: 0.92; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.reduced-motion) .hero-copy { animation: hero-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Botones sobre fondo oscuro (hero y banda): misma familia que .btn, en claro. */
.btn.btn-photo { background: var(--x-band-ink); border-color: var(--x-band-ink); color: var(--accent-text); }
.btn.btn-photo:hover { background: var(--surface-2); border-color: var(--surface-2); }
.btn.btn-ghost-light {
  background: transparent; color: var(--x-band-ink);
  border-color: color-mix(in srgb, var(--x-band-ink) 55%, transparent);
}
.btn.btn-ghost-light:hover { background: color-mix(in srgb, var(--x-band-ink) 12%, transparent); border-color: var(--x-band-ink); }
.btn-photo:focus-visible, .btn-ghost-light:focus-visible { outline: 2px solid var(--x-band-ink); outline-offset: 3px; }

/* ---- Entrada suave al aparecer (app.js; reposan visibles) ----------------- */
.reveal.is-entering { animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rise-in { from { transform: translateY(24px); } to { transform: none; } }
html.reduced-motion .reveal.is-entering { animation: none; }

/* ---- Tipografía de sección --------------------------------------------------- */
.section-title { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08; text-wrap: balance; color: var(--ink); }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }

/* ---- Nosotros ------------------------------------------------------------- */
.caption-row {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.875rem; padding-top: 0.875rem;
  border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--muted);
}
.caption-name { font-weight: 600; color: var(--ink); }
.facts { border-top: 1px solid var(--border); }
.facts > div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.facts dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.facts dd { font-weight: 600; color: var(--ink); }
@media (max-width: 30rem) { .facts > div { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ---- Servicios: la especialidad grande, el resto como lista --------------- */
.feature {
  background: var(--surface); border-radius: var(--radius-card); padding: 2rem;
  border: 1px solid var(--border);
}
@media (min-width: 48rem) { .feature { padding: 3rem; } }
.feature-title { margin-top: 1rem; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; color: var(--ink); }
.feature-text { margin-top: 1.25rem; max-width: 34rem; color: var(--muted); font-size: 1.125rem; }
.service-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-strong); }
.service-row { padding: 1.75rem 0; border-bottom: 1px solid var(--border-strong); }
.service-row:first-child { padding-top: 1.5rem; }
.service-name { font-size: 1.5rem; line-height: 1.2; color: var(--ink); margin-bottom: 0.5rem; }

/* ---- Banda oscura (aseguradoras y convenios) ----------------------------- */
.band { background: var(--x-band); color: var(--x-band-ink); }
.band-title { font-size: clamp(2.1rem, 5vw, 3.75rem); line-height: 1.05; text-wrap: balance; }
.band-text { color: var(--x-band-muted); font-size: 1.125rem; }

/* ---- Testimonios (cuando existan) ---------------------------------------- */
.quote { padding: 2rem; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border); }
.quote blockquote p { font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.quote-author { margin-top: 1rem; font-weight: 600; color: var(--muted); }

/* ---- Preguntas -------------------------------------------------------------- */
.link-cta {
  display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem;
  font-weight: 600; color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px;
}
.acc-head { min-height: 3.5rem; font-size: 1.0625rem; }
.acc-body p { line-height: 1.65; }

/* ---- Cierre y contacto ---------------------------------------------------- */
.closing-title { font-size: clamp(2.6rem, 8vw, 4.75rem); line-height: 1.02; max-width: 15ch; text-wrap: balance; color: var(--ink); }
.contact-list { border-top: 1px solid var(--border); }
.contact-list li {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: center;
  min-height: 3.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border);
}
.contact-list a { font-weight: 600; color: var(--accent-text); text-decoration: none; display: inline-flex; min-height: 2.75rem; align-items: center; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-label { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--canvas); }
.site-footer .wordmark { min-height: 0; color: var(--ink); }

/* ---- Barra inferior fija (móvil) ----------------------------------------- */
.bottom-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px -20px color-mix(in srgb, var(--ink) 70%, transparent);
}
@media (min-width: 64rem) { .bottom-bar { display: none; } }
.bottom-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
  min-height: 3.5rem; border-radius: 0.875rem; font-size: 0.8125rem; font-weight: 600;
  color: var(--ink); background: transparent; border: 0; cursor: pointer; text-decoration: none;
}
.bottom-action .icon { width: 1.375rem; height: 1.375rem; }
.bottom-action-main { background: var(--accent); color: var(--accent-ink); margin: 0 0.25rem; }

/* ---- Hoja de compartir ----------------------------------------------------- */
.share-sheet {
  width: min(28rem, calc(100vw - 1.5rem)); max-height: min(90dvh, 40rem);
  margin: auto auto calc(0.75rem + env(safe-area-inset-bottom)); padding: 1.5rem;
  border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink) 60%, transparent);
}
@media (min-width: 40rem) { .share-sheet { margin: auto; } }
.share-sheet::backdrop { background: color-mix(in srgb, var(--x-band) 55%, transparent); }
.share-sheet[open] { animation: menu-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }
.share-status { min-height: 1.25rem; font-size: 0.875rem; color: var(--accent-text); font-weight: 600; }
.share-tips { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }

/* ---- Volver arriba ----------------------------------------------------------- */
.to-top {
  position: fixed; right: 1rem; bottom: calc(5.25rem + env(safe-area-inset-bottom)); z-index: 30;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px;
  background: var(--surface); color: var(--accent-text); border: 1px solid var(--border-strong);
  box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--ink) 60%, transparent);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  cursor: pointer;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (min-width: 64rem) { .to-top { bottom: 1.5rem; right: 1.5rem; } }

html.reduced-motion *, html.reduced-motion *::before, html.reduced-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
