/* =========================================================
   LA CASA DE MERCEDES · estilos
   Mobile first: la base es para teléfono (desde 320px);
   los @media amplían hacia tablet y escritorio.
   ========================================================= */

:root {
  /* Paleta */
  --crema: #FBF5EA;
  --crema-2: #F6ECDC;
  --beige: #EFE3CF;
  --terracota: #75352A;      /* color exacto de la portada */
  --barro: #A5442A;          /* botones */
  --barro-hover: #8E3920;
  --cafe: #3A2419;           /* texto principal */
  --cafe-suave: #6B5040;     /* texto secundario */
  --madera: #8B5E3C;
  --linea: #DCC9AD;
  --blanco: #FFFDF8;

  /* Tipografía */
  --f-titulo: "Alegreya", Georgia, "Times New Roman", serif;
  --f-texto: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Espacio */
  --gutter: 1.25rem;
  --section: 3rem;
  --radius: 10px;
  --sticky-h: 0px;           /* JS/CSS lo ajusta en móvil */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--cafe);
  font-family: var(--f-texto);
  font-size: 1.0625rem;          /* 17px: cómodo en teléfono */
  line-height: 1.55;
  overflow-x: hidden;
  /* espacio para que la barra fija no tape el footer */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0 0 .75em; }
h1, h2, h3 { margin: 0; }
figure { margin: 0; }
s { text-decoration-thickness: 2px; }

a { color: var(--barro); }

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

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.container--narrow { max-width: 720px; }

.section-title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: clamp(1.6rem, 6.4vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.005em;
  text-align: center;
  color: var(--terracota);
  margin-bottom: .5rem;
  text-wrap: balance;
}
.section-title--left { text-align: left; }
.section-sub {
  text-align: center;
  color: var(--cafe-suave);
  margin: 0 auto 1.5rem;
  max-width: 34ch;
}

/* ---------------------------------------------------------
   1. Barra de oferta
   --------------------------------------------------------- */
.offer-bar {
  background: var(--terracota);
  color: var(--blanco);
  padding-top: env(safe-area-inset-top, 0px);
}
.offer-bar__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .55rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem 1.25rem;
  text-align: center;
}
.offer-bar__deal {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .1rem .7rem;
  font-size: .95rem;
  line-height: 1.3;
}
.offer-bar__title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: 1.05rem;
  color: #FFE3B8;
}
.offer-bar__prices { display: inline-flex; gap: .7rem; white-space: nowrap; }
.offer-bar__old { opacity: .85; }
.offer-bar__new strong { font-size: 1.1rem; }
.offer-bar__timer {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
}
.offer-bar__ends { opacity: .9; }

/* Contador */
.countdown {
  display: inline-flex;
  align-items: flex-start;
  gap: .2rem;
  font-variant-numeric: tabular-nums;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.35rem;
}
.countdown__num {
  display: block;
  background: rgba(255, 253, 248, .14);
  border: 1px solid rgba(255, 253, 248, .28);
  border-radius: 6px;
  padding: .1rem .35rem;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
  min-width: 2.35rem;
}
.countdown__label {
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .85;
  margin-top: .1rem;
}
.countdown__sep { font-weight: 700; line-height: 1.8; }

/* ---------------------------------------------------------
   2. Hero
   --------------------------------------------------------- */
.hero {
  padding: 1.5rem 0 2.25rem;
  background:
    linear-gradient(180deg, var(--crema-2) 0%, var(--crema) 100%);
}
.hero__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-areas:
    "text"
    "cover"
    "buy";
}
.hero__text { grid-area: text; text-align: center; }
.hero__cover { grid-area: cover; }
.hero__buy { grid-area: buy; text-align: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .85rem;
  padding: .3rem .8rem;
  border: 1.5px solid var(--terracota);
  border-radius: 999px;
  color: var(--terracota);
  font-weight: 700;
  font-size: .85rem;
  background: var(--blanco);
}
.badge::before {
  content: "";
  width: .8rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 3px 0 -1.5px currentColor;
}

.hero__title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: clamp(1.85rem, 8.4vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  color: var(--cafe);
  text-wrap: balance;
}
.hero__brand {
  margin: .6rem 0 0;
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--terracota);
}

.hero__cover img {
  width: min(64vw, 300px);
  margin: 0 auto;
  border-radius: 4px 8px 8px 4px;
  box-shadow:
    -6px 0 0 -3px rgba(58, 36, 25, .25),
    0 18px 34px -14px rgba(58, 36, 25, .55),
    0 2px 6px rgba(58, 36, 25, .18);
}

.hero__lead {
  font-size: 1.08rem;
  max-width: 36ch;
  margin: 0 auto 1.1rem;
}

/* Precio */
.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
  margin: 0 0 1rem;
}
.price p { margin: 0; }
.price span {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cafe-suave);
  margin-right: .25rem;
}
.price__old s {
  font-size: 1.25rem;
  color: var(--cafe-suave);
  text-decoration-color: var(--barro);
}
.price__new strong {
  font-family: var(--f-titulo);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--barro);
}
.price__new small {
  font-size: .85rem;
  font-weight: 700;
  color: var(--cafe-suave);
}
.price--on-dark span,
.price--on-dark .price__old s,
.price--on-dark small { color: #F2DCC4; }
.price--on-dark .price__old s { text-decoration-color: #FFE3B8; }
.price--on-dark .price__new strong { color: var(--blanco); }

/* Botones */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 3.5rem;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--f-texto);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--barro);
  color: var(--blanco);
  box-shadow: 0 3px 0 var(--terracota);
}
.btn--primary:hover { background: var(--barro-hover); }
.btn--light {
  background: var(--blanco);
  color: var(--terracota);
  box-shadow: 0 3px 0 #D9B99A;
}
.btn--light:hover { background: #FFF1DE; }
.btn--small {
  width: auto;
  min-height: 2.9rem;
  margin: 0;
  padding: .6rem 1rem;
  font-size: 1rem;
  white-space: nowrap;
}
.btn[aria-disabled="true"] { cursor: not-allowed; }

.microcopy {
  margin: .75rem 0 0;
  font-size: .9rem;
  color: var(--cafe-suave);
  text-align: center;
}
.microcopy--on-dark { color: #F2DCC4; }

/* ---------------------------------------------------------
   3. Video
   --------------------------------------------------------- */
.video-section {
  padding: var(--section) 0 1.5rem;
  background: var(--beige);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cafe);
  border-radius: var(--radius);
  overflow: hidden;
  border: 6px solid var(--blanco);
  box-shadow: 0 14px 30px -16px rgba(58, 36, 25, .5);
}
.video-frame__video {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* nunca recorta ni deforma */
  background: var(--cafe);
}
.video-frame__play { display: none; }          /* solo aparece con JS */
.video-frame.is-enhanced .video-frame__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  border: 0;
  padding: 0;
  background: linear-gradient(0deg, rgba(58, 36, 25, .45), rgba(58, 36, 25, .05) 60%);
  color: var(--blanco);
  cursor: pointer;
  font: 700 1rem var(--f-texto);
}
.video-frame__play-icon {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--barro);
  box-shadow: 0 0 0 6px rgba(255, 253, 248, .35), 0 8px 20px rgba(0, 0, 0, .3);
  transition: transform .15s ease;
}
.video-frame__play-icon svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: var(--blanco);
  margin-left: 4px;
}
.video-frame__play:hover .video-frame__play-icon { transform: scale(1.06); }
.video-frame__play-text {
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.video-frame.is-enhanced.is-playing .video-frame__play { display: none; }

/* ---------------------------------------------------------
   4. Oferta después del video
   --------------------------------------------------------- */
.offer-block {
  padding: 1.75rem 0 var(--section);
  background: var(--beige);
}
.offer-block__inner { text-align: center; }
.offer-block .section-title { margin-bottom: 1rem; }

/* Puntada bordada: separador discreto */
.stitch {
  height: 10px;
  background:
    repeating-linear-gradient(90deg,
      var(--barro) 0 10px,
      transparent 10px 16px,
      var(--madera) 16px 22px,
      transparent 22px 28px);
  background-size: 28px 2px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: .55;
  margin: 0 auto;
  max-width: 1080px;
}

/* ---------------------------------------------------------
   5. Qué contiene (índice)
   --------------------------------------------------------- */
.contents { padding: var(--section) 0; }
.contents .section-title { margin-bottom: 1.5rem; }
.index {
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem .5rem;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--beige);
}
.index__row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 0;
  border-bottom: 1px solid #EFE4D3;
}
.index__row:last-child { border-bottom: 0; }
.index__icon {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  fill: none;
  stroke: var(--barro);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.index__name {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.2;
  min-width: 0;
}
.index__dots {
  flex: 1 1 1rem;
  min-width: .75rem;
  align-self: flex-end;
  margin-bottom: .4rem;
  border-bottom: 2px dotted var(--linea);
}
.index__count {
  flex: 0 0 auto;
  font-size: .88rem;
  color: var(--cafe-suave);
  white-space: nowrap;
}
.index__count b {
  font-family: var(--f-titulo);
  font-size: 1.2rem;
  color: var(--cafe);
  margin-right: .1rem;
}
.index__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: .85rem 1.1rem;
  background: var(--terracota);
  color: var(--blanco);
  border-radius: 4px;
}
.index__total span { font-weight: 700; }
.index__total strong {
  font-family: var(--f-titulo);
  font-size: 1.45rem;
}

/* ---------------------------------------------------------
   6. Beneficios
   --------------------------------------------------------- */
.benefits { padding: 0 0 var(--section); }
.benefits .section-title { margin-bottom: 1.25rem; }
.checklist {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: .85rem;
  max-width: 560px;
}
.checklist li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: 1.08rem;
  line-height: 1.4;
}
.checklist svg {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  padding: .2rem;
  border-radius: 50%;
  background: var(--terracota);
  fill: none;
  stroke: var(--blanco);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: .05rem;
}

/* ---------------------------------------------------------
   7. Sobre Doña Meche
   --------------------------------------------------------- */
.about {
  padding: var(--section) 0;
  background: var(--crema-2);
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}
.about__grid {
  display: grid;
  gap: 1.5rem;
  max-width: 880px;
}
.about__photo img {
  width: min(78vw, 340px);
  margin: 0 auto;
  border-radius: 50% 50% var(--radius) var(--radius);  /* arco, como una ventana de casa */
  border: 6px solid var(--blanco);
  box-shadow: 0 12px 28px -14px rgba(58, 36, 25, .5);
}
.about__quote {
  margin: 1rem 0 0;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--barro);
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--cafe);
}
.about__quote p { margin: 0; }

/* ---------------------------------------------------------
   8. Cómo funciona
   --------------------------------------------------------- */
.steps { padding: var(--section) 0; }
.steps .section-title { margin-bottom: 1.5rem; }
.steps__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 620px;
}
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--terracota);
  color: var(--terracota);
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--blanco);
}
.step__title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  margin: .35rem 0 .3rem;
}
.step p { margin: 0; color: var(--cafe-suave); }

/* ---------------------------------------------------------
   9. Aviso de formato
   --------------------------------------------------------- */
.notice-wrap { padding: 0 0 var(--section); }
.notice {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem 1.1rem 1rem;
  background: #FFF6E4;
  border: 2px solid #E3BF8A;
  border-radius: var(--radius);
}
.notice__icon {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  fill: none;
  stroke: var(--terracota);
  stroke-width: 2;
  stroke-linecap: round;
  margin-top: .1rem;
}
.notice__title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--terracota);
  margin-bottom: .35rem;
}
.notice p { margin: 0 0 .3rem; }
.notice p:last-child { margin: 0; }

/* ---------------------------------------------------------
   10. FAQ
   --------------------------------------------------------- */
.faq { padding: 0 0 var(--section); }
.faq .section-title { margin-bottom: 1.25rem; }
.faq__list {
  border-top: 1px solid var(--linea);
}
.faq__item { border-bottom: 1px solid var(--linea); }
.faq__item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem .25rem;
  min-height: 3.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: 0 0 auto;
  width: .7rem;
  height: .7rem;
  border-right: 2.5px solid var(--barro);
  border-bottom: 2.5px solid var(--barro);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq__item p {
  margin: 0;
  padding: 0 .25rem 1.1rem;
  color: var(--cafe-suave);
}

/* ---------------------------------------------------------
   11. CTA final
   --------------------------------------------------------- */
.final-cta {
  padding: var(--section) 0;
  background: var(--terracota);
  color: var(--blanco);
}
.final-cta__inner { text-align: center; }
.final-cta__title {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: clamp(1.75rem, 7.4vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.final-cta__timer {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  color: #F2DCC4;
}
.countdown--small .countdown__num { font-size: 1rem; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
  padding: 2rem 0 1.5rem;
  background: var(--cafe);
  color: #E8D8C4;
  font-size: .9rem;
}
.footer__inner { text-align: center; }
.footer__brand {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blanco);
  margin-bottom: .2rem;
}
.footer__links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.25rem;
}
.footer__links a {
  display: inline-block;
  padding: .35rem 0;
  color: #E8D8C4;
}
.footer__links a:hover { color: var(--blanco); }

/* ---------------------------------------------------------
   12. Barra fija de compra (móvil)
   --------------------------------------------------------- */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem max(var(--gutter), env(safe-area-inset-right, 0px))
           calc(.6rem + env(safe-area-inset-bottom, 0px))
           max(var(--gutter), env(safe-area-inset-left, 0px));
  background: var(--blanco);
  border-top: 1px solid var(--linea);
  box-shadow: 0 -6px 18px -8px rgba(58, 36, 25, .3);
  transform: translateY(110%);
  transition: transform .25s ease;
}
.sticky-buy.is-visible { transform: translateY(0); }
.sticky-buy__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.sticky-buy__name {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: .98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-buy__price { font-size: .9rem; color: var(--cafe-suave); }
.sticky-buy__price strong { color: var(--barro); font-size: 1.1rem; }

/* Pantallas muy estrechas (320px) */
@media (max-width: 359px) {
  :root { --gutter: 1rem; }
  body { font-size: 1rem; }
  .offer-bar__deal { font-size: .88rem; }
  .countdown__unit, .countdown__num { min-width: 2.1rem; }
  .btn { font-size: 1.02rem; }
  .btn--small { padding: .55rem .8rem; font-size: .95rem; }
  .sticky-buy__name { font-size: .9rem; }
  .index__row { gap: .45rem; }
  .index__icon { width: 1.45rem; height: 1.45rem; }
  .index__name { font-size: 1.02rem; }
  .index__count { font-size: .8rem; }
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */
@media (min-width: 640px) {
  :root { --section: 4rem; --gutter: 2rem; }
  .offer-bar__inner { flex-wrap: nowrap; }
  .hero__cover img { width: 300px; }
  .index { padding: 1.25rem 1.75rem .75rem; }
  .about__grid {
    grid-template-columns: 300px 1fr;
    align-items: center;
    gap: 2.5rem;
  }
  .about__photo img { width: 100%; }
}

/* ---------------------------------------------------------
   Escritorio
   --------------------------------------------------------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .sticky-buy { display: none; }

  .hero { padding: 3.5rem 0 4rem; }
  .hero__grid {
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas:
      "text  cover"
      "buy   cover";
    column-gap: 4rem;
    row-gap: 1.5rem;
    align-items: start;
  }
  .hero__text, .hero__buy { text-align: left; }
  .hero__text { align-self: end; }
  .hero__lead { margin-left: 0; }
  .price { justify-content: flex-start; }
  .price--center { justify-content: center; }
  .hero__buy .btn { margin-left: 0; }
  .hero__buy .microcopy { text-align: left; }
  .hero__cover { align-self: center; }
  .hero__cover img { width: 100%; max-width: 380px; }

  .steps__list {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
    gap: 2rem;
  }
  .step { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
