/* Dr. Johnny Cuéllar · base del sitio público: marino #0F2A4F, dorado #C9A96E, marfil #F7F3EC.
   Tipografías: Cormorant Garamond (títulos, con los acentos corregidos, ver scripts/fix-fonts.py) y Source Sans 3. */
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-italic-500.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/fonts/source-sans-3.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --navy: #0F2A4F;
  --navy-900: #0A1D38;
  --navy-800: #0D2345;
  --navy-700: #16396A;
  --gold: #C9A96E;
  --gold-light: #E2CC9E;
  --gold-600: #B38F4F;
  --gold-text: #8A6A32;
  --ivory: #F7F3EC;
  --ivory-2: #EFE8DB;
  --line: #E1D8C6;
  --ink: #1B2433;
  --muted: #566074;
  --wa: #1FA855;
  --danger: #B3261E;
  --radius: 22px;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 18px 44px rgba(15, 42, 79, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Textura de papel muy sutil (SVG inline, sin pedidos extra) */
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .22 0 0 0 .6 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.65; color: var(--ink); background: var(--ivory); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
.sec, .band, .hero { overflow-x: clip; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.04; margin: 0; letter-spacing: -.01em; color: var(--navy); font-kerning: normal; }
h1, h2, h3 { text-wrap: balance; }
.lead { text-wrap: pretty; }
h2 em, h1 em { font-style: italic; font-weight: 500; color: var(--gold-text); }
/* Cormorant usa numerales antiguos por defecto (el 1 parece una I). En títulos y cifras se usan numerales de línea. */
h1, h2, h3, h4, .num { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ic { width: 1.2em; height: 1.2em; flex: none; }
.flag { width: 100%; height: 100%; display: block; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(900px, 100% - 40px); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .95rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy-900); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.paper { background-color: var(--ivory); background-image: var(--tex); }
.paper-2 { background-color: var(--ivory-2); background-image: var(--tex); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid transparent; border-radius: 999px; padding: 14px 26px; font: 700 1.02rem/1.1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s; min-height: 52px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: 0 10px 26px rgba(201, 169, 110, .38); }
.btn-gold:hover { background: #d6b87d; box-shadow: 0 14px 30px rgba(201, 169, 110, .5); }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .15); }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line:hover { background: var(--navy); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 10px 26px rgba(15, 42, 79, .3); }
.btn-navy:hover { background: var(--navy-700); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 22px rgba(31, 168, 85, .3); }
.btn-wa:hover { background: #19904a; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { padding: 17px 32px; font-size: 1.12rem; min-height: 60px; }
.btn-sm { padding: 10px 20px; min-height: 46px; font-size: .98rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(10, 29, 56, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201, 169, 110, .28); }
.topbar-in { display: flex; align-items: center; gap: 26px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand-t small { color: var(--gold); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.n-short { display: none; }
.nav { display: none; gap: 28px; }
.nav a { color: #dfe5f0; text-decoration: none; font-weight: 600; font-size: .96rem; position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--gold); transition: width .35s var(--ease); }
.nav a:hover { color: #fff; }
.nav a:hover::after { width: 100%; }
.topbar-act { display: flex; align-items: center; gap: 10px; }
.topbar-act .btn span { white-space: nowrap; }
.menu-btn { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.menu-btn .ic { width: 24px; height: 24px; }
.nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-900); padding: 12px 24px 24px; gap: 0; border-bottom: 1px solid rgba(201, 169, 110, .3); }
.nav.open a { padding: 15px 0; font-size: 1.12rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nav.open a::after { display: none; }
.wizard .topbar-act .btn, .conf .topbar-act .btn { display: none; }

/* Elementos compartidos */
.eyebrow { display: inline-flex; align-items: center; gap: 14px; color: var(--gold); text-transform: uppercase; letter-spacing: .24em; font-size: .78rem; font-weight: 700; }
.eyebrow::before { content: ''; width: 40px; height: 1px; background: currentColor; opacity: .8; }
.eyebrow-dark { color: var(--gold-text); }
.lead { color: var(--muted); font-size: 1.2rem; line-height: 1.6; margin-top: 18px; }
.urgent { display: flex; gap: 14px; align-items: flex-start; background: #FFF5F3; border: 1px solid #F0C4BE; border-left: 5px solid var(--danger); border-radius: 12px; padding: 16px 18px; color: #5A1B16; font-size: .98rem; line-height: 1.5; }
.urgent .ic { color: var(--danger); width: 26px; height: 26px; margin-top: 2px; }
.urgent a { color: var(--danger); font-weight: 700; }
.urgent-wide { margin-top: 32px; }
.urgent-sm { margin-top: 18px; font-size: .92rem; }
.alert { background: #FFF8E6; border: 1px solid #E8D49A; border-radius: 12px; padding: 14px 16px; margin: 14px 0; }

/* Ornamento: línea dorada con rombo */
.orn { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 0 auto; width: min(260px, 70%); }
.orn::before, .orn::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.orn::after { background: linear-gradient(270deg, transparent, currentColor); }
.orn i { width: 8px; height: 8px; background: currentColor; transform: rotate(45deg); }

/* Entrada al hacer scroll. La clase .js la pone /js/boot.js; si la página no inicia, boot.js agrega .rv-off y se ve todo. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.rv-off) .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .js:not(.rv-off) .rv.in { opacity: 1; transform: none; }
}
@media print { .rv { opacity: 1 !important; transform: none !important; } }

/* Footer */
.foot { background: var(--navy-900); color: #cdd6e6; padding: 64px 0 120px; font-size: .98rem; position: relative; }
.foot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.foot-in { display: grid; gap: 34px; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand img { width: 56px; height: 56px; }
.foot-brand strong { display: block; color: #fff; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.foot-brand span { display: block; color: #aab6cb; font-size: .94rem; }
.foot-map { color: var(--gold); font-weight: 700; font-size: .94rem; }
.foot-links { display: grid; gap: 9px; }
.foot-links a, .foot-contact a { text-decoration: none; }
.foot-links a:hover, .foot-contact a:hover { color: var(--gold); }
.foot-contact { display: grid; gap: 9px; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 38px; padding-top: 20px; font-size: .86rem; color: #8f9cb3; display: grid; gap: 4px; }

/* Barra fija en el celular: Agendar + WhatsApp */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(10, 29, 56, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(201, 169, 110, .4); transform: translateY(115%); transition: transform .4s var(--ease); }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { flex: 1 1 0; min-height: 52px; padding: 12px 14px; }
.sticky-cta .btn-wa { flex: 0 1 44%; }

@media (min-width: 960px) {
  body { font-size: 18.5px; }
  .foot-in { grid-template-columns: 1.4fr 1fr 1.4fr; }
  .foot { padding-bottom: 60px; }
  .sticky-cta { display: none; }
}
/* El menú completo entra desde 1100 px; en pantallas más angostas se usa el botón de menú (sin textos apretados) */
@media (min-width: 1100px) {
  .nav, .nav.open { display: flex; position: static; flex-direction: row; gap: 26px; padding: 0; background: none; border: 0; }
  .nav.open a { padding: 6px 0; font-size: .96rem; border: 0; }
  .nav.open a::after { display: block; }
  .menu-btn { display: none; }
}
@media (max-width: 600px) {
  .brand img { width: 40px; height: 40px; }
  .brand { gap: 10px; }
  .brand-t small { display: none; }
  .n-full { display: none; }
  .n-short { display: inline; }
  .topbar-in { gap: 10px; }
  .topbar-act .btn { padding: 10px 16px; }
  .topbar-act .x { display: none; }
  .menu-btn { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
