:root {
  --navy-950: #0b1f3a;
  --navy-900: #0f2a4d;
  --navy-800: #163a63;
  --blue-600: #2c5aa8;
  --blue-500: #3d6fc4;
  --blue-100: #e7eefb;
  --blue-50: #f3f7fd;
  --paper: #fbfcfe;
  --white: #ffffff;
  --ink: #142236;
  --ink-soft: #4a5a72;
  --line: #dbe4f2;
  --shadow: 0 20px 45px -20px rgba(15, 42, 77, 0.35);
  --gold-500: #c9a227;
  --gold-600: #a6841f;
  --orange-500: #FF6A00;
  --orange-600: #E05B00;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--navy-950);
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy-900);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--navy-950); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: var(--shadow);
}
.btn-gold:hover { transform: translateY(-2px); background: var(--gold-600); }
.btn-orange {
  background: var(--orange-500);
  color: var(--navy-950);
  box-shadow: var(--shadow);
}
.btn-orange:hover { transform: translateY(-2px); background: var(--orange-600); }
.btn-ghost {
  background: none;
  border: none;
  color: var(--navy-900);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--blue-600); }
.btn-lg {
  padding: 1.15rem 2.6rem;
  font-size: 1.05rem;
}
.btn svg { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 254, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0;
}
.brand {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--navy-950);
}
.brand small {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(60% 55% at 85% 0%, var(--blue-100) 0%, rgba(231, 238, 251, 0) 70%),
    var(--paper);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue-600);
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  line-height: 1.15;
  max-width: 16ch;
  color: var(--navy-950);
}
.hero p.lead {
  margin-top: 1.3rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero p.lead strong {
  color: var(--navy-950);
  font-weight: 700;
}
.hero p.lead-secondary {
  margin-top: 0.85rem;
  font-size: 0.98rem;
  color: var(--blue-600);
  font-weight: 600;
  max-width: 44ch;
}
.hero .cta-row {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-media {
  position: relative;
  justify-self: center;
}
.hero-media .frame {
  width: min(420px, 100%);
  aspect-ratio: 1 / 1.05;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute;
  left: -1rem;
  bottom: -1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 260px;
}
.badge .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--blue-100);
}
.badge span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
}

/* ---------- Section shell ---------- */
section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .eyebrow { color: var(--blue-600); }
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.2;
}
.section-head p { color: var(--ink-soft); margin-top: 0.9rem; font-size: 1.05rem; }

/* ---------- Doble proteccion cards (flip) ---------- */
.protection { background: var(--white); }
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.card {
  perspective: 1600px;
  min-height: 340px;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 340px;
  transition: transform 0.7s cubic-bezier(0.4, 0.15, 0.2, 1);
  transform-style: preserve-3d;
}
.card:hover .card-inner,
.card:focus-within .card-inner {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
}
.card-front {
  background: var(--blue-50);
  border: 1px solid var(--line);
}
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}
.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--white);
}
.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.6rem;
}
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
}
.card-front p { color: var(--ink-soft); font-size: 1rem; }
.card-back {
  background: var(--navy-900);
  color: var(--white);
  transform: rotateY(180deg);
  justify-content: center;
  box-shadow: var(--shadow);
}
.card-back p {
  font-size: 1.08rem;
  line-height: 1.6;
  color: #dce7f9;
}
.card-back .tag {
  color: #9ec1f5;
}

/* ---------- Agenda 2027 banner ---------- */
.agenda-banner { padding-top: clamp(3.5rem, 7vw, 6rem); }
.agenda-banner-inner {
  background: var(--navy-950);
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.agenda-banner-text { max-width: 46ch; }
.agenda-banner-text .eyebrow { color: #9ec1f5; }
.agenda-banner-text .eyebrow::before { background: #9ec1f5; }
.agenda-banner-text h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.agenda-banner-text p {
  margin-top: 0.8rem;
  color: #c3d3ec;
  font-size: 1rem;
}
.agenda-banner-inner .btn-lg { flex-shrink: 0; }

/* ---------- Symptoms section ---------- */
.symptoms { background: var(--blue-50); }
.symptoms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.symptom-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2rem);
}
.symptom-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.symptom-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- Consultorio section ---------- */
.practice {
  background: var(--navy-950);
  color: var(--white);
}
.practice .wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.practice-media {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.55);
  aspect-ratio: 4 / 5;
}
.practice-media img { width: 100%; height: 100%; object-fit: cover; }
.practice-text .eyebrow { color: #9ec1f5; }
.practice-text .eyebrow::before { background: #9ec1f5; }
.practice-text h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  max-width: 18ch;
}
.practice-text .script-subtitle {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: #9ec1f5;
  margin-top: 0.6rem;
  line-height: 1.4;
}
.practice-text p {
  margin-top: 1.1rem;
  color: #c3d3ec;
  font-size: 1.05rem;
  max-width: 48ch;
}
.highlight-note {
  margin-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
}
.highlight-note .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #6fa3f5;
  flex-shrink: 0;
}
.highlight-note span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
}

.map-card {
  margin-top: 1.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2rem);
}
.map-label {
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
}
.map-frame {
  border-radius: 12px;
  overflow: hidden;
}
.map-frame iframe { display: block; }

/* ---------- Final CTA ---------- */
.final-cta {
  background:
    radial-gradient(70% 100% at 50% 0%, var(--blue-100), rgba(231,238,251,0) 65%),
    var(--paper);
  text-align: center;
}
.final-cta h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  max-width: 20ch;
  margin-inline: auto;
}
.final-cta p {
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 1rem auto 2rem;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
footer.site {
  background: var(--navy-950);
  color: #9fb3d1;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
footer.site strong { color: var(--white); font-family: 'Fraunces', serif; font-weight: 500; }
footer.site .foot-meta { font-size: 0.88rem; text-align: right; }

/* ---------- Mobile sticky contact bar ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 24px -12px rgba(15, 42, 77, 0.25);
}
.mobile-cta-bar .btn { width: 100%; }

/* ---------- Contact modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 31, 58, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay[hidden] { display: none; }

.modal-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(1.8rem, 4vw, 2.6rem);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: none;
  background: var(--blue-50);
  color: var(--navy-900);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--blue-100); }

.modal-body .eyebrow { margin-bottom: 0.8rem; }
.modal-body h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); }
.modal-lead {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.contact-form {
  margin-top: 1.6rem;
}
.form-group {
  margin-bottom: 1.1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-900);
}
.form-group input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  background: var(--blue-50);
  color: var(--ink);
}
.form-group input:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--white);
}

.contact-form .btn { width: 100%; margin-top: 0.4rem; }

.form-message {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.92rem;
  color: #b3261e;
}

.success-message {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  color: var(--navy-950);
  text-align: center;
  margin: 1rem 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; margin-bottom: 1rem; }
  .hero-media .frame { width: min(340px, 80vw); margin-inline: auto; }
  .badge { left: 50%; transform: translateX(-50%); bottom: -1.6rem; }
  .cards { grid-template-columns: 1fr; }
  .agenda-banner-inner { flex-direction: column; text-align: center; }
  .agenda-banner-text { max-width: none; }
  .symptoms-grid { grid-template-columns: 1fr; }
  .practice .wrap { grid-template-columns: 1fr; }
  .practice-media { max-width: 380px; margin-inline: auto; }
  footer.site .wrap { flex-direction: column; text-align: center; }
  footer.site .foot-meta { text-align: center; }
}

@media (max-width: 640px) {
  .mobile-cta-bar { display: block; }
  body { padding-bottom: 4.5rem; }

  /* Mobile: página breve, enfocada en dolor + contacto inmediato */
  .protection,
  .practice {
    display: none;
  }
}

@media (max-width: 480px) {
  header.site .brand small { display: none; }
  .btn-lg { width: 100%; }
  .hero .cta-row { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .hero .cta-row .btn { width: 100%; }
  .agenda-banner-inner .btn-lg { width: 100%; }

  /* Menos scroll en mobile: el contacto inmediato ya vive en la barra fija */
  section { padding: 2.25rem 0; }
  .hero { padding: 1.75rem 0 2rem; }
  .section-head { margin-bottom: 1.5rem; }
  .section-head p { font-size: 0.98rem; }
  .agenda-banner-inner { padding: 1.5rem; gap: 1.25rem; }
  .symptoms-grid { gap: 0.9rem; }
  .symptom-card { padding: 1.15rem; }
}
