/* ============================================================
   Luciana Conti — Psicóloga
   Implementación del DESIGN_BRIEF. Paleta y tipografía fijas.
   ============================================================ */

/* --- Tokens (brief §2) --------------------------------------- */
:root {
  --paper: #f7f5f0;
  --ink: #16140f;
  --line: #d9d4c7;
  --muted: #6e6a5d;
  --paper-muted: #edeae0;

  /* Acento violeta (sobrio, algo desaturado). --accent para uso sobre paper;
     --accent-on-ink, más claro, para detalles sobre fondo oscuro. */
  --accent: #6a4c93;
  --accent-on-ink: #b49ddb;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 640px; /* ancho de columna de lectura (brief §5.3) */
  --header-h: 4rem;
}

/* --- Reset mínimo -------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth; /* brief §6 */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* clipea los ~15px del 100vw (ancho de scrollbar) */
}

body {
  background: var(--paper);
  color: var(--ink);
  font:
    400 1.0625rem/1.7 Inter,
    system-ui,
    sans-serif; /* Body, brief §3 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* contiene el fondo full-bleed de 100vw de las secciones ink */
}

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

a {
  color: inherit;
}

/* --- Tipografía (escala exacta del brief §3) ----------------- */
.eyebrow {
  font:
    500 0.75rem/1 Inter,
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  font:
    400 clamp(2.25rem, 5vw, 3.75rem)/1.08 Fraunces,
    Georgia,
    serif;
  font-optical-sizing: auto;
}
h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Palabra resaltada en violeta. Sobre fondo oscuro usa la variante clara. */
.hl {
  color: var(--accent);
}
.section-ink .hl {
  color: var(--accent-on-ink);
}

h2 {
  font:
    italic 400 clamp(1.75rem, 3vw, 2.5rem)/1.15 Fraunces,
    Georgia,
    serif;
  font-optical-sizing: auto;
}

.body {
  font:
    400 1.0625rem/1.7 Inter,
    sans-serif;
}

.lead {
  font:
    400 1.0625rem/1.7 Inter,
    sans-serif;
  color: var(--muted);
  max-width: 60ch;
}

/* --- Botón outline (brief §5.2) ------------------------------ */
.btn {
  display: inline-block;
  font:
    500 0.9375rem/1 Inter,
    sans-serif;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline {
  padding: 0.9em 1.6em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* --- El elemento de firma: la regla (brief §4) --------------- */
.divider {
  width: 100%;
  max-width: 120px;
  height: 1px;
  /* la regla de firma toma un tinte violeta suave */
  background: color-mix(in srgb, var(--accent) 55%, var(--line));
  margin: clamp(1rem, 3vw, 2rem) auto;
  border: none;
}

/* --- Layout de sección --------------------------------------- */
section {
  padding: clamp(3.25rem, 8vw, 5.5rem) var(--gutter);
}

/* Columna única centrada, para bloques de lectura y avisos */
.hero,
.como-trabajo,
.psicodelicos,
.contacto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: var(--measure);
  margin-inline: auto;
}
.hero > * + *,
.como-trabajo > * + *,
.psicodelicos > * + *,
.contacto > * + * {
  margin-top: 1.5rem;
} /* brief §5.3: párrafos con aire */

.como-trabajo h2,
.psicodelicos h2,
.contacto h2 {
  margin-bottom: 0.5rem;
}

/* Secciones invertidas full-bleed (brief §5.4 / §5.6) ---------
   El contenido queda constreñido por max-width, pero el fondo ink
   se extiende a todo el ancho del viewport con un pseudo-elemento. */
.section-ink {
  position: relative;
  z-index: 0;
  color: var(--paper);
}
.section-ink::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--ink);
  z-index: -1;
}
.section-ink .eyebrow {
  color: var(--paper-muted);
}
.section-ink .lead {
  color: var(--paper-muted);
}
.section-ink .divider {
  background: var(--paper-muted);
}

/* Botón outline sobre fondo ink (contacto) -------------------- */
.section-ink .btn-outline {
  border-color: var(--paper);
  color: var(--paper);
}
.section-ink .btn-outline:hover,
.section-ink .btn-outline:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* --- Header (brief §5.1) ------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--accent);
  transition: transform 0.3s ease;
  z-index: 100;
}
/* aparece al hacer scroll hacia arriba; se esconde al bajar (no invasivo) */
.site-header.is-hidden {
  transform: translateY(-100%);
}

.brand {
  font:
    500 1.0625rem/1 Inter,
    sans-serif;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.site-header .btn-outline {
  padding: 0.6em 1.1em;
}

/* --- Hero (brief §5.2) --------------------------------------- */
.hero {
  min-height: 90vh;
  justify-content: center;
  padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4rem));
}
.hero h1 {
  max-width: 16ch;
}
/* CTA del hero: violeta relleno (acción primaria). El del header sigue outline. */
.hero .btn-outline {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.hero .btn-outline:hover,
.hero .btn-outline:focus-visible {
  background: color-mix(in srgb, var(--accent) 82%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 82%, var(--ink));
}

/* --- Sobre mí (brief §5.4) ----------------------------------
   Columna única de lectura; la foto va chica, circular y flotada
   dentro del texto (menos protagonismo, integrada al relato). */
.sobre-mi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: var(--measure);
  margin-inline: auto;
}
.sobre-mi-texto {
  width: 100%;
}
.sobre-mi-texto > * + * {
  margin-top: 1.5rem;
}
/* separa el rótulo del contenido, con el mismo aire que las otras secciones */
.sobre-mi-texto .eyebrow {
  margin-bottom: 2rem;
  color: var(--accent-on-ink) !important;
}

/* Foto: chica y circular, apoyada arriba del texto (el texto corre a todo el
   ancho debajo, sin envolver el círculo). */
.portrait {
  width: clamp(96px, 24vw, 128px);
  margin: 0 0 1.75rem;
}
.portrait img {
  filter: grayscale(1) contrast(1.05);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border-radius: 50%;
  border: 1px solid var(--paper-muted);
}

/* --- Motivos de consulta (brief §5.5, grilla de fichas) ------ */
.motivos {
  max-width: 1040px;
  margin-inline: auto;
}
.motivos > .eyebrow,
.motivos > h2 {
  text-align: center;
}
.motivos > h2 {
  margin: 0.5rem auto clamp(2rem, 5vw, 3rem);
}

.motivos-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px; /* truco: el gap deja ver el fondo como línea */
  background: var(--line);
  border: 1px solid var(--line);
}
.motivo-card {
  background: var(--paper);
  padding: 2rem 1.5rem;
  border-top: 2px solid var(--accent); /* línea superior de cada ficha en violeta */
}
.motivo-card h3 {
  font:
    italic 500 1.125rem/1.3 Fraunces,
    Georgia,
    serif;
  font-optical-sizing: auto;
}

/* --- Ilustración al cierre de "Enfoque" (círculo con borde) --- */
.enfoque-ilustracion {
  margin: clamp(2.5rem, 6vw, 3.5rem) auto 0; /* centrada, con aire arriba */
  /* width y height iguales para garantizar círculo exacto */
  width: clamp(124px, 28vw, 150px);
  height: clamp(124px, 28vw, 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3.5vw, 1.4rem);
  border: 1px solid var(--paper-muted);
  border-radius: 50%;
}
.enfoque-ilustracion img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* --- Contacto: formulario + email (brief §5.8) --------------- */
.entrevista-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field-label {
  font:
    500 0.75rem/1 Inter,
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.entrevista-form input,
.entrevista-form textarea {
  font:
    400 1rem/1.5 Inter,
    sans-serif;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.entrevista-form textarea {
  resize: vertical;
}
.entrevista-form input:focus-visible,
.entrevista-form textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
}
/* mantiene el color del texto cuando el navegador autocompleta */
.entrevista-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
.entrevista-form .btn-outline {
  align-self: flex-start;
  margin-top: 0.4rem;
}

.contacto-email {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.contacto-email a {
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.contacto-email a:hover,
.contacto-email a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Nota al pie (asterisco de "psicodélicos") --------------- */
.footnote-ref {
  font-family: Inter, sans-serif;
  font-size: 0.4em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footnote-ref:hover,
.footnote-ref:focus-visible {
  color: var(--accent);
}

/* --- Footer -------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper-muted);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  text-align: center;
  font-size: 0.875rem;
}
.footer-note {
  max-width: 68ch;
  margin: 0 auto 1.75rem;
  text-align: left;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--paper-muted);
}
/* la nota es el destino del asterisco: breve resalte al saltar hacia ella */
.footer-note:target {
  color: var(--paper);
}
.footnote-star {
  margin-right: 0.15em;
}
.footer-credit {
  margin: 0;
}

/* --- Accesibilidad ------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* --- Animación (brief §6): un solo movimiento, el fade-up ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header {
    transition: none;
  }
}
