/* =========================================================
   Doula de la muerte y el duelo
   Paleta cálida y terrosa · Season Mix + PP Neue Montreal
   ========================================================= */

@font-face {
  font-family: "Season Mix";
  src: url("../fonts/SeasonMix-Light-TRIAL.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Montreal";
  src: url("../fonts/PPNeueMontreal-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --crema:        #F4EDE1;
  --crema-suave:  #FAF5EC;
  --hueso:        #FFFDF8;
  --ocre:         #C08A4A;
  --ocre-claro:   #E8D2B0;
  --ocre-fondo:   #EBD9BE;
  --cafe:         #4A3728;
  --cafe-hondo:   #2E2118;
  --tinta:        #3A2E24;
  --tinta-suave:  #6B5B4C;

  /* Tipografía */
  --serif: "Season Mix", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "PP Neue Montreal", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Medidas */
  --header-h: 74px;
  --pad-x: clamp(1.5rem, 5vw, 5rem);
  --sec-y: clamp(5rem, 11vw, 9.5rem);

  /* Imágenes */
  --hero-img: url("../img/hero-flores.jpg");
  --retrato-img: url("../img/josefa-retrato.jpg");
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--hueso);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 400; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--cafe); color: var(--hueso);
  padding: 0.75rem 1.25rem;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--ocre); outline-offset: 3px; }

/* ---------- Contenedores ---------- */
.wrap { width: 100%; margin-inline: auto; padding-inline: var(--pad-x); max-width: 1240px; }
.wrap--medium { max-width: 900px; }
.wrap--narrow { max-width: 760px; }

.section { padding-block: var(--sec-y); }
.section--crema  { background: var(--crema); }
.section--crema + .section--crema { padding-top: 0; }
.section--hueso  { background: var(--hueso); }
.section--ocre   { background: var(--ocre-fondo); }
.section--oscura { background: var(--cafe-hondo); color: var(--crema); }

.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Tipografía compartida ---------- */
.h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.lead {
  margin: 1.75rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.85;
  color: var(--tinta-suave);
}

.prose { margin-top: 2rem; max-width: 58ch; }
.prose p { margin: 0 0 1.5rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 500; color: var(--tinta); }
.prose--invert { color: rgba(244, 237, 225, 0.78); }

/* ---------- Botones ----------
   Pastilla alta y angosta, sin interletrado. El texto va tal cual está
   escrito en el HTML, con la primera letra en mayúscula. */
.btn {
  display: inline-flex; align-items: center;
  margin-top: 2.5rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--cafe);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 400;
  /* explícito: si no, el <button> del formulario queda más bajo que los <a> */
  line-height: 1.75;
  letter-spacing: normal;
  text-decoration: none;
  color: var(--cafe);
  background: transparent;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.btn:hover { background: var(--cafe); color: var(--crema); }

.btn--sm { margin-top: 1.5rem; }

.btn--solid {
  margin-top: 0.5rem;
  justify-self: start;
  background: var(--cafe); color: var(--crema); border-color: var(--cafe);
}
.btn--solid:hover { background: var(--cafe-hondo); border-color: var(--cafe-hondo); }

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.4s ease;
}
.header.is-stuck { box-shadow: 0 1px 0 rgba(74, 55, 40, 0.12); }

.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: var(--header-h);
  padding-inline: var(--pad-x);
}

.brand {
  font-family: var(--serif);
  /* mismo cuerpo que el nombre del pie */
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--cafe);
}

.nav { display: flex; gap: clamp(1.1rem, 2vw, 2.1rem); }
.nav a {
  position: relative;
  padding-block: 0.35rem;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-decoration: none;
  color: var(--cafe);
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.burger {
  display: none;
  width: 34px; height: 34px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.burger span {
  display: block; width: 22px; height: 1px; margin: 5px auto;
  background: var(--cafe);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3px) rotate(-45deg); }

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--hueso);
}

.hero__text {
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + clamp(3rem, 7vw, 6rem)) clamp(1.5rem, 4vw, 4.5rem) clamp(2rem, 4vw, 3.5rem);
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.35rem, 1.5rem + 2.9vw, 4.4rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--cafe);
}

.hero .lead { max-width: 42ch; }

.hero .btn { margin-top: auto; align-self: flex-start; }

.wordmark {
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 2rem + 9vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ocre-claro);
  user-select: none;
}

.hero__media {
  background-color: var(--ocre-claro);
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center 62%;
}

/* =========================================================
   3. CARDS — para quién
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.card {
  padding-top: 2.25rem;
  border-top: 1px solid rgba(74, 55, 40, 0.18);
}
.card p { margin: 0; color: var(--tinta-suave); }

.card__icon {
  display: block;
  width: 34px; height: 34px;
  margin-bottom: 1.75rem;
  color: var(--tinta);
}
.card__icon svg { width: 100%; height: 100%; }

.card__title {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem);
  line-height: 1.2;
  color: var(--cafe);
}

/* =========================================================
   4. SERVICIOS
   ========================================================= */
.services { margin: 0; padding: 0; list-style: none; counter-reset: none; }

.service {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  padding-block: clamp(2rem, 3.5vw, 3rem);
  border-top: 1px solid rgba(74, 55, 40, 0.18);
}
.service:last-child { border-bottom: 1px solid rgba(74, 55, 40, 0.18); }

.service__num {
  font-family: var(--serif);
  /* mismo cuerpo que el nombre del servicio */
  font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2.3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: normal;
  color: var(--tinta);
}

.service__name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2.3rem);
  line-height: 1.15;
  color: var(--cafe);
}

.service__desc { margin: 0; color: var(--tinta-suave); max-width: 52ch; }

/* =========================================================
   5. CITA
   ========================================================= */
.quote-section { text-align: center; }

.quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 1.2rem + 4vw, 4.5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--crema);
  text-wrap: balance;
}

.quote-section .prose { margin-inline: auto; margin-top: 3rem; max-width: 52ch; }

/* =========================================================
   6. SOBRE MÍ
   ========================================================= */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.about__media {
  aspect-ratio: 4 / 5;
  background-color: var(--crema);
  background-image: var(--retrato-img);
  background-size: cover;
  background-position: center 25%;
}

/* =========================================================
   7. FAQ
   ========================================================= */
.faq { border-top: 1px solid rgba(74, 55, 40, 0.18); }

.faq__item { border-bottom: 1px solid rgba(74, 55, 40, 0.18); }

.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-block: clamp(1.4rem, 2.5vw, 2rem);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  line-height: 1.25;
  color: var(--cafe);
  cursor: pointer;
  list-style: none;
  transition: color 0.3s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--ocre); }

.faq__item summary::after {
  content: "";
  flex: none;
  width: 13px; height: 13px;
  background:
    linear-gradient(currentColor, currentColor) center/100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center/1px 100% no-repeat;
  transition: transform 0.35s ease;
}
.faq__item[open] summary::after { transform: rotate(90deg); background-size: 100% 1px, 0 0; }

.faq__body { padding-bottom: 2rem; max-width: 62ch; color: var(--tinta-suave); }
.faq__body p { margin: 0; }

/* =========================================================
   8. CONTACTO
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact .lead { color: var(--cafe); }

.form { display: grid; gap: 1.5rem; }

.field { display: grid; gap: 0.55rem; }

.field label {
  /* mismo cuerpo que el párrafo de introducción de la sección */
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--cafe);
}
.field .opt { letter-spacing: 0.04em; color: var(--tinta-suave); }

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid rgba(74, 55, 40, 0.35);
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--tinta);
  border-radius: 0;
  transition: border-color 0.3s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--cafe); }
.field input:invalid.is-touched,
.field textarea:invalid.is-touched { border-bottom-color: #A5442F; }

.form__note {
  margin: 0;
  min-height: 1.4rem;
  font-size: 0.85rem;
  color: var(--cafe);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  background: var(--cafe-hondo);
  color: rgba(244, 237, 225, 0.72);
}

.footer__fila {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(244, 237, 225, 0.16);
}

.footer__nombre {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  line-height: 1.2;
  color: var(--crema);
}

.footer__ig {
  display: inline-flex; flex: none;
  color: rgba(244, 237, 225, 0.72);
  transition: color 0.3s ease;
}
.footer__ig:hover { color: var(--ocre-claro); }
.footer__ig svg { width: 26px; height: 26px; }

.footer__legal {
  display: flex; justify-content: space-between; gap: 0.5rem 2rem; flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.8rem;
}
.footer__legal p { margin: 0; }
.footer__legal a {
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 237, 225, 0.3);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.footer__legal a:hover { color: var(--ocre-claro); border-bottom-color: var(--ocre-claro); }

/* =========================================================
   Luz que sigue al cursor
   Punto difuminado que persigue al mouse con retardo.
   Va bajo la cabecera (z-index 100) para no lavar el menú.
   ========================================================= */
.cursor-luz {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 34rem; height: 34rem;
  margin: -17rem 0 0 -17rem;
  border-radius: 50%;
  /* Sube o baja estos alfas para que la luz se note más o menos */
  background: radial-gradient(circle closest-side,
    rgba(192, 138, 74, 0.85) 0%,
    rgba(192, 138, 74, 0.35) 45%,
    rgba(192, 138, 74, 0) 76%);
  filter: blur(26px);
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
  will-change: transform;
}
.cursor-luz.is-visible { opacity: 1; }

/* Sin mouse o con movimiento reducido, no aporta nada */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-luz { display: none; }
}

/* =========================================================
   Animación de entrada
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding-top: 1.75rem; }

  .service { grid-template-columns: 3.5rem 1fr; }
  .service__desc { grid-column: 2; }

  .about, .contact { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 3 / 2; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }

  .header { background: rgba(255, 253, 248, 0.94); backdrop-filter: blur(10px); }

  .burger { display: block; }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    padding: 1rem var(--pad-x) 2rem;
    background: var(--hueso);
    box-shadow: 0 12px 24px rgba(74, 55, 40, 0.1);
    transform: translateY(-120%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav.is-open { transform: none; }
  .nav a { padding-block: 0.9rem; font-size: 0.8rem; }
  .nav a::after { display: none; }

  /* En pantallas angostas el salto forzado deja líneas desparejas */
  .hero__title br { display: none; }
  .hero__title { text-wrap: balance; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { padding-top: calc(var(--header-h) + 3.5rem); }
  .hero__media { aspect-ratio: 4 / 3; }
  .hero .btn { margin-top: 2.5rem; }
  .wordmark { margin-bottom: 0; }

  .footer__legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
