/* =========================================================
   The Wedding Playbook — styles.css
   FASE 2: sistema de diseño visual aplicado.
   Paleta salvia + dorado + crema. Cormorant Garamond + Montserrat.
   Layout full-bleed con columna de texto. Mobile-first (320px).
   Breakpoints: 768px, 1200px. Sin !important, BEM.
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  background: #FAF8F4;
}

body,
h1, h2, h3, h4,
p, figure, blockquote,
ul, ol, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, picture, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input, textarea, button, select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

:target { scroll-margin-top: 2rem; }

/* ---------- Tokens (:root) ---------- */
:root {
  /* Palette — Sage + gold + cream */
  --color-bg: #FAF8F4;
  --color-surface: #FFFFFF;
  --color-contrast-bg: #DDE3D8;
  --color-primary: #46583F;
  --color-primary-soft: #6B7D6A;
  --color-primary-hover: #354430;
  --color-accent: #C9A84C;
  --color-accent-deep: #86671F;
  --color-text: #1F241E;
  --color-text-secondary: #4F5A50;
  --color-border: #E4E1D8;
  --color-error: #A5342A;
  --color-success: #1F6B4A;
  --color-footer-text: #FFFFFF;

  /* Typography */
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --container-text: 44rem;   /* ~704px reading column */
  --container-wide: 75rem;   /* ~1200px media rows */
  --container-pad: 1.25rem;
  --section-pad: clamp(3rem, 8vw, 6rem);

  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Radius & shadow */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 4px 20px rgba(31, 36, 30, 0.06);
  --shadow-strong: 0 20px 60px rgba(31, 36, 30, 0.25);

  /* Modal */
  --modal-max-width: 480px;
  --modal-pad: 2rem;

  --transition: 200ms ease;
}

/* ---------- Base elements ---------- */
body {
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.2; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

::selection {
  background: var(--color-primary-soft);
  color: #fff;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

main > section,
.footer {
  position: relative;
  padding-block: var(--section-pad);
}

/* Decorative floral background (parallax layer set in main.js) */
.floral-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("assets/floral-bg.svg");
  background-repeat: repeat;
  background-size: 620px auto;
  background-position: 0 0;
  opacity: 0.16;
  pointer-events: none;
}

/* Full-bleed photo band (direct child of a section, outside .container) */
.section-photo {
  width: 100%;
  margin: 0 0 var(--spacing-2xl);
  overflow: hidden;
}
.section-photo__img {
  width: 100%;
  height: clamp(220px, 42vw, 460px);
  object-fit: cover;
  /* Sage fallback while the real photo is not yet in /assets/ */
  background: var(--color-contrast-bg);
}
.section-photo--inset {
  max-width: 100%;
  margin-block: var(--spacing-lg);
  border-radius: var(--radius-md);
}
.section-photo--inset .section-photo__img {
  height: clamp(200px, 38vw, 360px);
  border-radius: var(--radius-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.875rem 2rem;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: var(--color-primary-hover); }
.btn:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }

/* Light button variant (for use on dark backgrounds) */
.btn--light {
  background: var(--color-surface);
  color: var(--color-primary);
}
.btn--light:hover { background: #EFECE3; }
.btn--light:focus-visible { outline-color: #fff; }


/* === HEADER | Fase 2: colores, tipografía, spacing, efectos === */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-md) var(--container-pad) var(--spacing-sm);
}
.header__logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  color: var(--color-primary);
}


/* === HERO | Fase 2: colores, tipografía, spacing, efectos === */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #2C3A28 0%, #46583F 58%, #38472F 100%);
  color: #fff;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
/* Subtle white floral texture over the dark hero (traced from BNW-floral.webp) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-floral.svg") center / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
  text-align: center;
}
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}
.hero__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #EBD9A6;
  background: rgba(201, 168, 76, 0.14);
  border: 1px solid rgba(201, 168, 76, 0.55);
  border-radius: 100px;
  padding: 0.4rem 1rem;
}
.hero__headline {
  color: #fff;
  max-width: 15ch;
}
.hero__headline-em {
  display: block;
  color: var(--color-accent);
}
.hero__body {
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
}
.hero__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}
.hero__subtext {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero__media {
  width: 100%;
  max-width: 620px;
  margin: 0;
}
.hero__mockup {
  width: 100%;
  height: auto;
}


/* === SOCIAL-PROOF | Fase 2: colores, tipografía, spacing, efectos === */
.social-proof .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
}
.social-proof__headline { text-align: center; }
.social-proof__quotes {
  display: grid;
  gap: var(--spacing-lg);
  width: 100%;
}
.quote-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: var(--spacing-lg);
}
.quote-card__source {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.quote-card__logo {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}
.quote-card__sub {
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}
.quote-card__text {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.social-proof__anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
  text-align: center;
  background: var(--color-contrast-bg);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
}
.social-proof__anchor-text { font-size: 1.1rem; }
.social-proof__anchor-text strong { color: var(--color-primary); }


/* === PAIN | Fase 2: colores, tipografía, spacing, efectos === */
.pain__headline { text-align: center; margin-bottom: var(--spacing-lg); }
.pain__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.pain__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary-soft);
  border-radius: var(--radius-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--color-text-secondary);
}


/* === FEATURES | Fase 2: colores, tipografía, spacing, efectos === */
.features__headline { text-align: center; margin-bottom: var(--spacing-lg); }
.features__caption {
  caption-side: top;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}
.features__table th,
.features__table td {
  text-align: left;
  vertical-align: top;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}
.features__table thead th {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
}
.features__table tbody th[scope="row"] {
  font-weight: 600;
  color: var(--color-primary);
  width: 34%;
}
.features__table td { color: var(--color-text-secondary); }


/* === DIFFERENTIATOR | Fase 2: colores, tipografía, spacing, efectos === */
.differentiator { background: var(--color-contrast-bg); }
.differentiator__block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.differentiator__headline { color: var(--color-primary); }
.differentiator__body { color: var(--color-text); }
.differentiator__subheadline {
  margin-top: var(--spacing-sm);
  color: var(--color-primary);
}
.differentiator__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}
.differentiator__item {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-text-secondary);
}
.differentiator__item::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--color-accent-deep);
}


/* === AUDIENCE | Fase 2: colores, tipografía, spacing, efectos === */
.audience__headline { text-align: center; margin-bottom: var(--spacing-lg); }
.audience__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.audience__item {
  position: relative;
  padding-left: 1.75rem;
}
.audience__item::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-primary);
}


/* === HOW | Fase 2: colores, tipografía, spacing, efectos === */
.how { background: var(--color-contrast-bg); }
.how__headline { text-align: center; margin-bottom: var(--spacing-xl); }
.how__steps {
  display: grid;
  gap: var(--spacing-xl);
  counter-reset: step;
}
.how__step { counter-increment: step; text-align: center; }
.how__step-title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}
.how__step-title::before {
  content: counter(step);
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto var(--spacing-sm);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  line-height: 2.5rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: 50%;
}
.how__step-body { color: var(--color-text-secondary); }


/* === PRICE | Fase 2: colores, tipografía, spacing, efectos === */
.price .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
}
.price__comparison {
  color: var(--color-text-secondary);
  max-width: 52ch;
}
.price__box {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  max-width: 26rem;
  padding: var(--spacing-xl);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.price__badge {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
}
.price__amount {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--color-primary);
}
.price__regular {
  color: var(--color-text-secondary);
  text-decoration: line-through;
}
.price__guarantee {
  color: var(--color-text-secondary);
  max-width: 48ch;
}
.price__subtext {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}


/* === FAQ | Fase 2: colores, tipografía, spacing, efectos === */
.faq__headline { text-align: center; margin-bottom: var(--spacing-lg); }
.faq__list {
  display: flex;
  flex-direction: column;
}
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__question-wrap { margin: 0; font-size: 1rem; }
.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
  text-align: left;
  padding: var(--spacing-lg) 0;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text);
}
.faq__question::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-primary);
  transition: transform var(--transition);
}
.faq__question[aria-expanded="true"]::after { content: "−"; }
.faq__question:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 2px;
}
.faq__answer {
  padding: 0 0 var(--spacing-lg);
  color: var(--color-text-secondary);
}
.faq__answer[hidden] { display: none; }


/* === FOOTER | Fase 2: colores, tipografía, spacing, efectos === */
.footer {
  text-align: center;
  overflow: hidden;
  padding-block: clamp(4rem, 12vw, 8rem);
}
.footer__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-primary);
}
.footer__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 36, 30, 0.62), rgba(53, 68, 48, 0.72));
}
.footer .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
}
.footer__headline {
  color: var(--color-footer-text);
  max-width: 20ch;
}
.footer__cta {
  background: var(--color-surface);
  color: var(--color-primary);
}
.footer__cta:hover { background: #f0ede4; }
.footer__contact {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}


/* === MODAL | Fase 2: colores, tipografía, spacing, efectos === */
.modal {
  width: min(92vw, var(--modal-max-width));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-strong);
  color: var(--color-text);
}
.modal::backdrop { background: rgba(31, 36, 30, 0.5); }
.modal__content {
  position: relative;
  padding: var(--modal-pad);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.modal__close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-primary);
  border-radius: 50%;
  transition: background var(--transition);
}
.modal__close:hover { background: var(--color-contrast-bg); }
.modal__close:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 2px;
}
.modal__intro {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.modal__title {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--color-primary);
  padding-right: 2rem;
  margin-bottom: var(--spacing-sm);
}
.modal__text { color: var(--color-text-secondary); }
.modal__text strong { color: var(--color-text); }
/* Extra breathing room after the "Join the list…" line, before the form */
.modal__intro > .modal__text:last-of-type { margin-bottom: var(--spacing-sm); }
.modal__success { color: var(--color-success); font-weight: 600; }
.modal__success[hidden] { display: none; }

.lead-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.lead-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}
.lead-form__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}
.lead-form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.lead-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(70, 88, 63, 0.15);
}
.lead-form__textarea { resize: vertical; min-height: 3rem; }
.lead-form__submit { margin-top: var(--spacing-xs); }
.lead-form__error {
  color: var(--color-error);
  font-size: 0.85rem;
}
.lead-form__error:empty { display: none; }
.lead-form[aria-busy="true"] .lead-form__submit {
  opacity: 0.6;
  cursor: not-allowed;
}


/* =========================================================
   BREAKPOINT: 768px (tablet)
   ========================================================= */
@media (min-width: 768px) {
  :root { --container-pad: 2rem; }

  /* Hero: text left + mockup right, fits above the fold */
  .hero {
    min-height: calc(100svh - 5rem);
    display: flex;
    align-items: center;
  }
  .hero__inner {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--spacing-sm);
  }
  .hero__content { align-items: flex-start; flex: 1 1 36%; }
  .hero__cta-wrap { align-items: flex-start; }
  /* Mockup: larger and pulled left (its left side is transparent). Bleeds off the
     right edge (clipped at the viewport). pointer-events:none so the transparent
     area never blocks the CTA underneath. */
  .hero__media { flex: 1 1 64%; align-self: center; }
  .hero__mockup {
    width: 176%;
    max-width: none;
    margin-left: -16%;
    pointer-events: none;
  }

  .social-proof__quotes { grid-template-columns: 1fr 1fr; }

  .how__steps { grid-template-columns: repeat(3, 1fr); }

  .section-photo--inset { max-width: 30rem; }
  .section-photo--inset .section-photo__img { height: 320px; }

  /* Modal: wider + trimmed so the content fits without a vertical scrollbar on desktop */
  .modal { width: min(92vw, 600px); }
  .modal__content { padding: var(--spacing-md) var(--spacing-xl); }
  .modal__title { font-size: 1.4rem; }
  .lead-form { gap: var(--spacing-sm); }
}


/* =========================================================
   BREAKPOINT: 1200px (desktop)
   ========================================================= */
@media (min-width: 1200px) {
  .section-photo__img { height: 460px; }
}


/* =========================================================
   Reduced motion: disable parallax drift & non-essential motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  /* main.js already skips the parallax when reduced-motion is set,
     so the floral layer stays at its static background-position. */
  *, *::before, *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    scroll-behavior: auto;
  }
}
