/* ============================================================
   La Casa de Tus Padres — Mockup
   Dirección: warm humanist / editorial
   ============================================================ */

/* ---------- Tipografías autoalojadas ---------- */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/lora-400.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/lora-400-italic.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/lora-500.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/lora-600.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/lora-700.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/nunito-sans-400.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/nunito-sans-600.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/nunito-sans-700.woff2') format('woff2');
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --cream: #faf6ef;
  --cream-2: #f3ecdf;
  --paper: #fffdf8;
  --ink: #2e2822;
  --ink-soft: #6d6257;
  --terracotta: #c05a3a;
  --terracotta-dark: #a2472b;
  --terracotta-soft: #f4e4dc;
  --sage: #7d8b6a;
  --sage-dark: #5c6849;
  --amber: #d9a441;
  --line: #e7ddcd;
  --footer-bg: #26211b;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(46, 40, 34, 0.06), 0 4px 12px rgba(46, 40, 34, 0.05);
  --shadow-md: 0 2px 4px rgba(46, 40, 34, 0.06), 0 12px 32px rgba(46, 40, 34, 0.10);
  --shadow-lg: 0 4px 8px rgba(46, 40, 34, 0.08), 0 24px 56px rgba(46, 40, 34, 0.16);
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  border: 2px solid var(--terracotta);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 10px rgba(192, 90, 58, 0.28);
}
.btn:hover {
  background: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(162, 71, 43, 0.32);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--paper);
  border-color: var(--ink-soft);
  color: var(--ink);
}
.btn-block { width: 100%; text-align: center; }
.btn-small { padding: 11px 20px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
.brand-mark { color: var(--terracotta); display: inline-flex; }
.logo-header { display: block; height: 42px; width: auto; }
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--terracotta); }
.nav .btn { margin-left: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.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 {
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(38, 33, 27, 0.74), rgba(38, 33, 27, 0.52)),
    url('../assets/img/img_hero.jpg') center / cover no-repeat;
  color: #fff;
}
.hero-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 110px 24px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  color: #fff;
}
.hero-sub {
  font-size: 20px;
  color: rgba(255, 248, 240, 0.92);
  max-width: 40ch;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; justify-content: center; margin-bottom: 20px; }
.hero-cred {
  font-size: 13.5px;
  color: rgba(255, 248, 240, 0.78);
}

/* ---------- Secciones compartidas ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 16px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.section-sub { color: var(--ink-soft); font-size: 18px; }

/* ---------- Formularios ---------- */
.form { padding: 30px; }
.form label { display: block; margin-bottom: 16px; }
.form label span {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form input, .form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  padding: 12px 15px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px var(--terracotta-soft);
}
.form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--sage);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

/* Checkbox de consentimiento */
.form label.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}
.form label.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--terracotta);
  cursor: pointer;
}
.form label.checkbox span {
  display: inline;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-bottom: 0;
}
.form label.checkbox a {
  color: var(--terracotta);
  text-decoration: underline;
  font-weight: 600;
}
.form label.checkbox a:hover { color: var(--terracotta-dark); }

/* ---------- Modal (popup checklist) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 33, 27, 0.56);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}
.modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px 34px 30px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-dialog .form { padding: 0; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--line); }
.modal-dialog h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 30px;
}
.modal-sub { color: var(--ink-soft); font-size: 16px; margin-bottom: 22px; }
.modal-cred {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 16px;
  opacity: 0.9;
}
body.modal-open { overflow: hidden; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Productos ---------- */
.products { max-width: 1160px; margin: 0 auto; padding: 96px 24px; }
.product-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow-sm);
}
.p-eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 10px;
}
.product-title {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  margin-bottom: 16px;
}
.p-desc { color: var(--ink-soft); font-size: 18px; margin-bottom: 26px; }
.features-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 30px;
}
.features li { display: flex; flex-direction: column; gap: 2px; }
.features strong {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.features span { font-size: 14.5px; color: var(--ink-soft); }

/* Maqueta de la guía (imagen del cliente) */
.book-mockup { display: flex; justify-content: center; }
.book-img {
  max-width: 100%;
  height: auto;
  max-height: 560px;
  width: auto;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

/* ---------- Trust ---------- */
.trust { background: var(--cream-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.trust-item { display: flex; flex-direction: column; gap: 12px; }
.trust-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--terracotta);
}
.trust-item h3 {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 4px;
}
.trust-item p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Sobre mí ---------- */
.about { max-width: 720px; margin: 0 auto; padding: 96px 24px; text-align: center; }
.about h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: 20px; }
.about-text { font-size: 18.5px; color: var(--ink-soft); }
.about .btn { margin-top: 12px; }

/* ---------- Contacto ---------- */
.contact { max-width: 1040px; margin: 0 auto; padding: 96px 24px; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.contact-copy > p:not(.eyebrow) { color: var(--ink-soft); font-size: 18px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg); color: #cfc6b9; }
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer .brand { color: #fff; font-size: 18px; }
.logo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--paper);
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 16px;
}
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.footer-brand p { margin-top: 14px; font-size: 15px; max-width: 32ch; }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9c9181;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 15px;
  color: #cfc6b9;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(207, 198, 185, 0.16);
  padding: 22px 24px;
  text-align: center;
  font-size: 14px;
}
.footer-bottom p { margin: 0; }

/* ---------- Animaciones ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Accesibilidad ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { padding: 64px 24px 80px; }
  .product-feature { grid-template-columns: 1fr; gap: 40px; padding: 36px 28px; }
  .book-mockup { order: -1; }
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav .btn { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
    gap: 16px;
  }
  .nav.open .btn { display: inline-block; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .book { transform: scale(0.85); }
}
