/* =========================================================
   enterapia.online — "Calma clínica"
   Mobile-first. Tokens → base → componentes → secciones.
   ========================================================= */

:root {
  color-scheme: light;
  /* Paleta */
  --white: #FFFFFF;
  --mist: #F0F2F3;
  --sage: #DCE8E6;
  --petrol: #205B59;
  --petrol-deep: #174544;
  --ink: #16232B;
  --ink-soft: #4A5A62;
  --ink-faint: #6E7C83;
  --line: #DCE2E4;
  --danger: #A23B2A;

  /* Tipografía */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-h1: clamp(2.5rem, 7vw, 4.25rem);
  --step-h2: clamp(1.85rem, 4.4vw, 2.75rem);
  --step-h3: 1.2rem;

  /* Layout */
  --wrap: 1160px;
  --gutter: 20px;
  --header-h: 68px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-underline-offset: .2em; }
a:hover { color: var(--petrol-deep); }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 300; line-height: 1.08; letter-spacing: -0.015em; }
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h1 em, h2 em { font-style: italic; color: var(--petrol); }
h3 { font-family: var(--sans); font-size: var(--step-h3); font-weight: 600; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
abbr[title] { text-decoration: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  display: block; font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--petrol); line-height: 1.4;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .85em 1.5em; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn .icon { width: 1.25em; height: 1.25em; flex: none; }
.btn-primary { background: var(--petrol); color: var(--white); }
.btn-primary:hover { background: var(--petrol-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: var(--white); color: var(--petrol-deep); }
.btn-light:hover { background: var(--sage); color: var(--petrol-deep); }
.btn-sm { min-height: 44px; padding: .6em 1.15em; font-size: .94rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--petrol); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--ink); line-height: 1; white-space: nowrap; }
.logo-word { font-family: var(--serif); font-size: 1.55rem; font-weight: 400; letter-spacing: -0.02em; }
.logo-tld { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--petrol); letter-spacing: .04em; margin-left: 1px; }
.logo:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: saturate(1.2) blur(8px); } }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.header-inner .logo { margin-right: auto; }
.header-wa { display: none; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: var(--mist); border: 0; border-radius: 999px; color: var(--ink);
  font: 600 .94rem var(--sans); cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -5px; }
.menu-bars::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 20px;
}
.nav.is-open { display: block; }
.nav ul { display: flex; flex-direction: column; }
.nav li a {
  display: block; padding: 14px 2px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 500;
}
.nav-wa { margin-top: 18px; width: 100%; }

@media (min-width: 900px) {
  .menu-toggle, .nav-wa { display: none; }
  .nav { display: block; position: static; padding: 0; border: 0; background: none; }
  .nav ul { flex-direction: row; gap: 28px; }
  .nav li a { padding: 6px 0; border: 0; font-size: .95rem; color: var(--ink-soft); }
  .nav li a:hover { color: var(--ink); }
  .header-wa { display: inline-flex; margin-left: 12px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 32px 64px; }
.hero-grid { display: grid; gap: 40px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 .eyebrow { margin-bottom: 18px; }
.cta-row { display: flex; flex-direction: column; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; color: var(--ink-soft); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--petrol); }

.portrait { margin: 0; position: relative; max-width: 460px; width: 100%; justify-self: center; padding-bottom: 28px; }
.portrait-frame {
  aspect-ratio: 1122 / 1402; max-width: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, #2A3842 0%, var(--ink) 70%);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.credential {
  position: absolute; left: -8px; bottom: 0;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--white); border-radius: var(--r-md); padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(22, 35, 43, .06), 0 12px 32px -12px rgba(22, 35, 43, .28);
}
.credential strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.credential span { font-size: .82rem; color: var(--ink-soft); letter-spacing: .01em; }

@media (min-width: 600px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .hero { padding-block: 56px 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
  .portrait { justify-self: end; }
  .credential { left: -40px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: 72px; }
.section-tint { background: var(--mist); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 42rem; margin-bottom: 40px; }
@media (min-width: 900px) { .section { padding-block: 104px; } }

/* Sobre mí */
.about { display: grid; gap: 32px; }
.about-intro { display: flex; flex-direction: column; gap: 14px; }
.about-quote {
  margin: 8px 0 0; padding-left: 18px; border-left: 2px solid var(--petrol);
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.25rem; line-height: 1.4; color: var(--ink-soft); max-width: 26rem;
}
.about-body { display: flex; flex-direction: column; gap: 18px; color: var(--ink-soft); max-width: 40rem; }
.ways { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); margin-top: 12px; }
.ways li { background: var(--white); padding: 18px 0; display: grid; gap: 4px; }
.ways h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.ways p { font-size: .98rem; }
.creds { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.creds dt { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.creds dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
@media (min-width: 900px) {
  .about { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .about-intro { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* Áreas */
.audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
.audience li {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--sage); border-radius: var(--r-md);
}
.audience strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--petrol-deep); }
.audience span { font-size: .86rem; color: var(--ink-soft); }
.topics { display: grid; gap: 12px; }
.topic {
  background: var(--white); border-radius: var(--r-md); padding: 24px 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.topic h3 { font-size: 1.08rem; }
.topic h3 abbr { color: var(--ink-faint); font-weight: 500; }
.topic p { font-size: .96rem; color: var(--ink-soft); }
.topic-link { background: var(--petrol); }
.topic-link h3, .topic-link p { color: var(--white); }
.topic-link p { opacity: .85; }
.topic-link a { margin-top: auto; padding-top: 6px; color: var(--white); font-weight: 600; font-size: .94rem; }
.note { margin-top: 28px; max-width: 46rem; font-size: .95rem; color: var(--ink-soft); padding-left: 16px; border-left: 2px solid var(--petrol); }
@media (min-width: 600px) { .topics { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .audience { grid-template-columns: repeat(4, 1fr); }
  .topics { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

/* Crianza */
.crianza { background: var(--sage); }
.crianza-grid { display: grid; gap: 40px; }
.crianza-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.crianza-copy p { color: var(--ink-soft); max-width: 36rem; }
.crianza-copy .eyebrow { color: var(--petrol-deep); }
.crianza-copy .btn { margin-top: 8px; }
.crianza-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--petrol-deep); margin-bottom: 8px; }
.crianza-list ul { display: flex; flex-direction: column; }
.crianza-list li {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem); line-height: 1.35; color: var(--ink);
  padding-block: 16px; border-bottom: 1px solid rgba(32, 91, 89, .22);
}
.crianza-list li:first-child { border-top: 1px solid rgba(32, 91, 89, .22); }
@media (min-width: 900px) {
  .crianza-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
}

/* Modalidad */
.modality { display: grid; gap: 28px; }
.facts { display: grid; gap: 12px; }
.facts li { background: var(--white); border-radius: var(--r-md); padding: 22px; display: grid; gap: 6px; }
.facts p { font-size: .96rem; color: var(--ink-soft); }
.clocks { background: var(--ink); color: var(--white); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.clocks-title { font-size: .92rem; color: #B9C6CC; max-width: 18rem; }
.clock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.clock { display: flex; flex-direction: column; gap: 2px; }
.clock + .clock { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: 16px; }
.clock-city { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9FB6B4; }
.clock-time { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; }
.steps-title { margin-top: 56px; margin-bottom: 18px; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.steps { display: grid; gap: 0; counter-reset: paso; border-top: 1.5px solid var(--ink); }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 2.5rem 1fr; gap: 4px 12px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(paso); grid-row: span 2; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; color: var(--petrol); }
.steps strong { font-weight: 600; }
.steps span { color: var(--ink-soft); font-size: .98rem; }
@media (min-width: 900px) {
  .modality { grid-template-columns: 2fr 1fr; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 0; }
  .steps li { border-top: 1.5px solid var(--ink); border-bottom: 0; }
}

/* FAQ */
.faq-grid { display: grid; gap: 8px; }
.faq-aside { color: var(--ink-soft); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 44px 20px 0; font-family: var(--serif); font-size: 1.22rem; line-height: 1.35; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 1.5px solid var(--petrol); border-bottom: 1.5px solid var(--petrol);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--petrol); }
.faq-a { padding: 0 0 22px; color: var(--ink-soft); max-width: 40rem; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; } }

/* Contacto */
.contact { background: var(--petrol-deep); color: #D7E4E2; }
.contact h2 { color: var(--white); }
.contact h2 em { color: #B7D6D1; }
.contact .eyebrow { color: #A9CCC7; }
.contact-grid { display: grid; gap: 40px; }
.contact-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.contact-copy .btn { margin-top: 6px; }
.contact-alt { font-size: .94rem; color: #A9C2BF; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

/* Formulario */
.form {
  background: var(--white); color: var(--ink); border-radius: var(--r-lg);
  padding: 26px 20px; display: flex; flex-direction: column; gap: 18px;
}
@media (min-width: 600px) { .form { padding: 34px; } }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-size: .9rem; font-weight: 600; padding: 0; }
.field legend { margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--ink-faint); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: var(--mist); border: 1.5px solid transparent; border-radius: var(--r-sm);
  padding: .8em .9em; min-height: 50px;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--petrol); background: var(--white); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; }
.field-hint { font-size: .82rem; color: var(--ink-faint); }
.field-error { font-size: .85rem; color: var(--danger); font-weight: 500; }
.segmented { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 4px; align-self: flex-start; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: .55em 1.2em; border-radius: 999px; font-weight: 500; font-size: .95rem; cursor: pointer; color: var(--ink-soft); }
.segmented input:checked + label { background: var(--white); color: var(--petrol-deep); box-shadow: 0 1px 3px rgba(22, 35, 43, .12); }
.segmented input:focus-visible + label { outline: 3px solid var(--petrol); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--petrol); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--r-sm); padding: 14px 16px; font-size: .95rem; }
.form-status.is-success { background: var(--sage); color: var(--petrol-deep); }
.form-status.is-error { background: #F7E7E3; color: #7A2B1E; }
.form-status a { color: inherit; font-weight: 600; }

/* Footer */
.site-footer { background: var(--white); padding-block: 48px calc(96px + env(safe-area-inset-bottom, 0px)); font-size: .9rem; color: var(--ink-soft); }
.footer-inner { display: grid; gap: 28px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.crisis { background: var(--mist); border-radius: var(--r-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.copy { color: var(--ink-faint); font-size: .82rem; }
@media (min-width: 900px) {
  .site-footer { padding-bottom: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; align-items: start; }
  .copy { grid-column: 1 / -1; }
}

/* WhatsApp flotante (mobile) */
.wa-float {
  position: fixed; z-index: 25; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--petrol); color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(22, 35, 43, .45);
  transition: opacity .2s, transform .2s;
}
.wa-float .icon { width: 28px; height: 28px; }
.wa-float:hover { color: var(--white); background: var(--petrol-deep); }
.wa-float.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; }
@media (min-width: 900px) { .wa-float { display: none; } }

/* Aviso de cookies */
.consent {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 16px 40px -16px rgba(22, 35, 43, .35);
  padding: 18px; display: flex; flex-direction: column; gap: 14px; font-size: .9rem; color: var(--ink-soft);
}
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
