/* =========================================================
   Karin Navia · Psicóloga Clínica
   Para cambiar la identidad visual, edita las variables de :root
   ========================================================= */

:root {
  /* Paleta de marca de Karin Navia */
  --sage:          #94A383;   /* verde salvia principal */
  --ivory:         #F4EFE6;   /* marfil */
  --taupe:         #655A52;   /* taupe, texto y elementos secundarios */
  --sage-light:    #B7C2AA;   /* salvia claro */
  --terracotta:    #A66F62;   /* acento, usar con moderación */

  /* Derivados para uso en la web (mismos tonos, ajustados para legibilidad) */
  --bg:            var(--ivory);
  --bg-tint:       #E9ECE0;   /* salvia muy claro, secciones alternas */
  --surface:       #FBF9F4;   /* marfil más claro para tarjetas */
  --text:          #4A413B;   /* taupe oscuro, títulos y cuerpo */
  --text-soft:     var(--taupe);
  --primary:       #6F8060;   /* salvia oscurecido: botones (contraste con texto marfil) */
  --primary-dark:  #5A6A4D;
  --accent:        var(--terracotta);
  --accent-soft:   #EADCD5;   /* terracota muy claro */
  --sage-soft:     #DCE2D2;
  --line:          #D9D8CA;

  /* Tipografía */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body:    "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius:   18px;
  --radius-s: 12px;
  --shadow:   0 10px 30px rgba(44, 58, 55, 0.08);
  --max:      1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.4rem; }
.h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--text); color: var(--ivory); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Marcador de texto provisional: borrar esta regla cuando todo esté definido */
mark.ph {
  background: #FFF1B8;
  color: inherit;
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--ivory); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--primary); color: var(--primary-dark); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: var(--ivory); }
.btn-small { padding: 9px 20px; font-size: .95rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 20px;
}

.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand-mark { width: 46px; height: 46px; flex: none; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; color: var(--primary); }
.brand-role { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; color: var(--text); font-size: .98rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--primary); }
.nav .nav-cta { color: var(--ivory); background: var(--primary); }
.nav .nav-cta:hover { background: var(--primary-dark); color: var(--ivory); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }

.eyebrow {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--primary-dark); font-weight: 600; margin-bottom: 1rem;
}
.lead { font-size: 1.18rem; color: var(--text-soft); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 14px; }
.hero-note { font-size: .92rem; color: var(--text-soft); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.photo-frame {
  position: relative; z-index: 2;
  width: min(100%, 340px); aspect-ratio: 4 / 5;
  border-radius: 48% 52% 46% 54% / 38% 38% 62% 62%;
  background: linear-gradient(160deg, var(--sage-soft), var(--sage-light));
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-initials { font-family: var(--font-display); font-size: 5rem; color: var(--ivory); opacity: .9; }
.hero-blob { position: absolute; border-radius: 50%; z-index: 1; }
.blob-a { width: 220px; height: 220px; background: var(--accent-soft); top: 0; right: 4%; opacity: .9; }
.blob-b { width: 150px; height: 150px; background: var(--sage-soft); bottom: 2%; left: 6%; }

/* ---------- Pasos ---------- */
.steps-strip { padding-bottom: 20px; }
.steps {
  list-style: none; margin: 0; padding: 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
}
.steps strong { display: block; font-size: 1.02rem; }
.steps p { margin: 2px 0 0; font-size: .95rem; color: var(--text-soft); }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-tint { background: var(--bg-tint); }
.section-small { padding: 40px 0; }
.section-head { margin-bottom: 40px; }
.section-head .lead { margin-bottom: 0; }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.photo-frame-alt { border-radius: var(--radius); aspect-ratio: 4 / 5; margin-inline: auto; }

.credentials { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.credentials li {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.credentials span { color: var(--text-soft); font-size: .92rem; }
.credentials b small { display: block; font-weight: 400; font-size: .85rem; color: var(--text-soft); }
.credentials b { font-weight: 500; text-align: right; max-width: 24em; }
@media (max-width: 560px) { .credentials b { text-align: left; max-width: none; } }

/* Tarjetas */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); padding: 28px; border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 4px solid var(--sage-light);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-top-color: var(--accent); }
.card h3 { font-size: 1.35rem; margin-bottom: .35em; }
.card p { margin: 0; color: var(--text-soft); font-size: .98rem; }

.modalities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.modality { padding: 22px 0 0; border-top: 2px solid var(--primary); }
.modality h3 { font-size: 1.25rem; margin-bottom: .25em; }
.modality p { margin: 0; color: var(--text-soft); font-size: .98rem; }

/* Cómo funciona */
.timeline { border-left: 2px solid var(--line); margin-left: 8px; }
.timeline-item { position: relative; padding: 0 0 34px 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -9px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
}
.timeline-item p { margin: 0; color: var(--text-soft); }

/* FAQ */
.faq details {
  background: var(--surface); border-radius: var(--radius-s);
  margin-bottom: 12px; padding: 0 22px; border: 1px solid var(--line);
}
.faq summary {
  cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--primary); font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-soft); padding-bottom: 8px; }

/* Agenda */
.booking-box {
  text-align: center; padding: 44px 28px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow); border: 2px dashed var(--line);
}
.booking-title { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin-bottom: .2em; }
.booking-text { color: var(--text-soft); max-width: 44ch; margin-inline: auto; }
.booking-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 18px; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; }
.contact-list li {
  display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.contact-list span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }

.contact-form {
  background: var(--surface); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
}
.contact-form label { font-weight: 600; font-size: .92rem; margin-top: 10px; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; color: inherit; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(148,163,131,.35);
}
.contact-form button { margin-top: 20px; }
.form-note { font-size: .85rem; color: var(--text-soft); margin: 10px 0 0; text-align: center; }

.small-text { font-size: .92rem; color: var(--text-soft); }

/* ---------- Pie ---------- */
.site-footer { background: var(--taupe); color: var(--ivory); padding: 56px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; padding-bottom: 36px; }
.footer-brand { font-family: var(--font-display); font-size: 1.9rem; margin: 0; color: var(--ivory); }
.footer-sub { color: var(--sage-light); margin: 0; }
.crisis { background: rgba(255,255,255,.07); padding: 20px 22px; border-radius: var(--radius-s); font-size: .94rem; }
.crisis strong { color: var(--ivory); }
.crisis p { margin: 6px 0 0; color: #E4DED3; }
.crisis a { color: var(--ivory); font-weight: 600; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; font-size: .88rem; color: var(--sage-light);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ivory); }


/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid, .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { min-height: 300px; order: -1; }
  .photo-frame { width: min(70%, 260px); }
  .blob-a { width: 160px; height: 160px; }
  .blob-b { width: 110px; height: 110px; }
  .steps { grid-template-columns: 1fr; padding: 22px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .modalities { grid-template-columns: 1fr; gap: 14px; }
  .about-visual { order: -1; }
  .photo-frame-alt { width: min(70%, 260px); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 14px; text-align: center; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .contact-form { padding: 24px 20px; }
}

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


/* Agenda incrustada */
.booking-embed { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.booking-embed[hidden], .booking-box[hidden] { display: none; }
.booking-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.booking-tabs button {
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 2px solid var(--line);
  background: transparent; color: var(--text-soft);
}
.booking-tabs button[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--ivory); }
.booking-frame iframe { width: 100%; height: 720px; border: 0; border-radius: var(--radius-s); background: var(--surface); }
.booking-help { margin: 14px 0 0; font-size: .9rem; color: var(--text-soft); text-align: center; }
@media (max-width: 560px) { .booking-embed { padding: 12px; } .booking-frame iframe { height: 760px; } }

/* Formulario */
.contact-form .opcional { font-weight: 400; color: var(--text-soft); }
.contact-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; margin-top: 14px; color: var(--text-soft); }
.contact-form .consent input { margin-top: 4px; flex: none; accent-color: var(--primary); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-s); font-size: .95rem; background: var(--sage-soft); color: var(--text); }
.form-status[hidden] { display: none; }
.form-status.error { background: var(--accent-soft); }
.contact-form button[disabled] { opacity: .6; cursor: progress; }

/* Servicios en texto */
.prose { max-width: 62ch; }
.prose p { font-size: 1.1rem; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }

/* Cómo funciona: subtítulos */
.timeline-item .tl-sub { margin: -.4em 0 .6em; font-family: var(--font-display); font-size: 1.2rem; color: var(--primary-dark); }

/* Formulario ampliado */
.contact-form .req { color: var(--accent); }
.contact-form .field-help { margin: -2px 0 4px; font-size: .88rem; color: var(--text-soft); }
.contact-form .choices { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.contact-form .choices legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.contact-form .choice { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; font-size: 1rem; }
.contact-form .choice input { accent-color: var(--primary); width: 18px; height: 18px; }
.contact-form .consent[hidden] { display: none; }
.contact-form input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--accent); }

/* Página de privacidad */
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: .2em; }
.legal .legal-date { color: var(--text-soft); font-size: .95rem; margin-bottom: 2em; }
.legal h2 { font-size: 1.6rem; margin: 1.8em 0 .5em; }
.legal p, .legal li { font-size: 1rem; }
.legal ul { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: .35em; }
