/* =========================================================
   ZARRAGA BAKERY — Estilos
   1. Tokens (colores, tipografías, espaciado)  ← editar aquí
   2. Base
   3. Componentes (botones, eyebrow, pills)
   4. Secciones: header, hero, valor, productos, redes,
      sobre, CTA, footer
   5. Responsive
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Paleta */
  --c-wall:      #d9a8a4;  /* rosado del muro del hero */
  --c-wall-top:  #e8bcb8;
  --c-wall-seam: #d5a4a0;  /* une texto e imagen del hero en móvil */
  --c-rose:      #b9827b;  /* rosado empolvado profundo (botón principal) */
  --c-rose-soft: #e8cbc5;  /* botones suaves */
  --c-blush:     #f1e0da;  /* fondo productos */
  --c-blush-2:   #e4c3bd;  /* fondo redes */
  --c-cream:     #f8efe9;  /* fondo propuesta / sobre */
  --c-ivory:     #fcf8f5;  /* footer */
  --c-sand:      #e7dbd2;  /* fondo CTA (beige cálido) */
  --c-ink:       #221d1d;  /* negro carbón */
  --c-text:      #4a3f3e;
  --c-muted:     #7b6c69;
  --c-line:      rgba(120, 85, 78, .22);
  --c-gold:      #b89a6e;  /* detalle dorado, uso mínimo */
  --c-white:     #ffffff;

  /* Tipografía */
  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-body:    "Jost", "Helvetica Neue", Arial, sans-serif;

  --fs-h1:   clamp(2.5rem, 1.7rem + 3.1vw, 4.25rem);
  --fs-h2:   clamp(2.1rem, 1.5rem + 2.2vw, 3.3rem);
  --fs-lead: clamp(1.02rem, .95rem + .3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-sm:   .875rem;
  --fs-xs:   .75rem;

  /* Espaciado y layout */
  --gutter:   clamp(1rem, 4vw, 3rem);
  --maxw:     1240px;
  --sec-y:    clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius-pill: 999px;
  --radius-img:  2px;

  color-scheme: light;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
:focus-visible { outline: 1.5px solid var(--c-ink); outline-offset: 3px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec-y); position: relative; }
.ic { width: 1.05em; height: 1.05em; flex: none; }
.ic-chev { width: .85em; height: .85em; margin-left: .1em; }

/* ---------- 3. COMPONENTES ---------- */
.eyebrow {
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 1rem;
}
.lead { font-size: var(--fs-lead); color: var(--c-ink); font-weight: 300; margin-top: .9rem; }
.section-head.center { text-align: center; max-width: 40rem; margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 42px; padding: .55rem 1.2rem; letter-spacing: .04em; text-transform: none; font-size: var(--fs-sm); }
.btn-rose    { background: var(--c-rose); color: var(--c-white); }
.btn-rose:hover { background: #a9726b; }
.btn-outline { background: rgba(255,255,255,.18); color: var(--c-ink); border-color: rgba(34,29,29,.55); }
.btn-outline:hover { background: rgba(255,255,255,.45); }
.btn-dark    { background: var(--c-ink); color: var(--c-white); }
.btn-dark:hover { background: #3a3131; }
.btn-soft    { background: var(--c-rose-soft); color: var(--c-ink); }
.btn-soft:hover { background: #dfbcb5; }

.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.7rem;
  background: var(--c-cream);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-ink);
  transition: background-color .25s ease;
}
.pill:hover { background: var(--c-white); }

.sprig { position: absolute; color: var(--c-rose); opacity: .55; pointer-events: none; }

/* ---------- 4a. HEADER ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; }
.header-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.4rem var(--gutter) 0;
  display: flex; align-items: center; gap: 2rem;
}
.brand img { width: clamp(64px, 6.4vw, 92px); }
.nav { display: flex; gap: clamp(1.4rem, 2.6vw, 2.6rem); margin-left: clamp(2rem, 13vw, 12rem); margin-right: auto; font-size: var(--fs-sm); color: var(--c-ink); }
.nav a { position: relative; padding-block: .3rem; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transition: transform .3s ease;
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* ---------- 4b. HERO ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 56.3vw, 860px);
  display: flex; align-items: center;
  background: var(--c-wall);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero-content { position: relative; padding-top: 7rem; padding-bottom: 5rem; }
.hero h1 { max-width: 10.5em; }
.hero .eyebrow { color: var(--c-ink); margin-bottom: 1.3rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

/* ---------- 4c. PROPUESTA DE VALOR ---------- */
.value { background: var(--c-cream); overflow: hidden; }
.sprig-value { width: clamp(90px, 10vw, 140px); height: auto; aspect-ratio: 120/170; right: clamp(1rem, 6vw, 6rem); top: 3.5rem; }
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 60rem; margin: clamp(3rem, 5vw, 4.5rem) auto 0;
  text-align: center;
}
.pillars li { padding: .5rem 2rem; display: flex; flex-direction: column; align-items: center; }
.pillars li + li { border-left: 1px solid var(--c-line); }
.pillar-ic { width: 34px; height: 34px; color: var(--c-ink); margin-bottom: 1.1rem; }
.pillars h3 { font-size: var(--fs-sm); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink); }
.pillars p { font-size: var(--fs-sm); color: var(--c-muted); margin-top: .5rem; max-width: 15rem; }

/* ---------- 4d. PRODUCTOS ---------- */
.products { background: var(--c-blush); }
.products-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.4rem); }
.product { text-align: center; }
.product-img { aspect-ratio: 1 / 1.02; overflow: hidden; border-radius: var(--radius-img); background: var(--c-rose-soft); }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.product:hover .product-img img { transform: scale(1.03); }
.product h3 { margin-top: 1.1rem; font-size: var(--fs-sm); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink); }
.product p { font-size: var(--fs-sm); color: var(--c-muted); margin-top: .25rem; padding-inline: .5rem; }
.products-cta-mobile { display: none; }

/* ---------- 4e. COMENTARIOS ---------- */
.testimonials { background: var(--c-blush); }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}
.testimonial {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--c-ivory);
  border-radius: 4px;
  padding: clamp(2rem, 3vw, 2.75rem) clamp(1.5rem, 2.5vw, 2.25rem);
}
.testimonial .quote { width: 30px; height: 24px; color: var(--c-rose); opacity: .55; margin-bottom: 1.4rem; }
.testimonial blockquote { margin: 0; flex: 1; }
.testimonial blockquote p {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 1.1rem + .35vw, 1.4rem); line-height: 1.45; color: var(--c-ink);
  text-wrap: pretty;
}
.t-name { margin-top: 1.6rem; font-size: var(--fs-xs); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink); }
.t-detail { margin-top: .2rem; font-size: var(--fs-sm); color: var(--c-muted); }
.t-name::before { content: ""; display: block; width: 28px; height: 1px; background: var(--c-gold); margin: 0 auto 1.2rem; }

/* ---------- 4f. REDES ---------- */
.social { background: var(--c-blush-2); }
.social .eyebrow, .social .lead { color: var(--c-ink); }
.feed-posts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center; align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}
.feed-col, .feed-youtube { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; min-width: 0; }
.feed-body { width: 100%; display: grid; gap: 1.2rem; }
.feed-body .instagram-media { margin: 0 auto !important; }
.tt-frame { aspect-ratio: 9 / 16; width: 100%; border-radius: 10px; overflow: hidden; background: var(--c-ink); }
.tt-frame iframe, .yt-video iframe { display: block; width: 100%; height: 100%; border: 0; }

.feed-youtube { margin-top: clamp(3rem, 5vw, 4.5rem); }
.yt-grid { width: 100%; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.25rem); }
.yt-grid.is-empty, .yt-grid[data-cols="1"] { grid-template-columns: minmax(0, 760px); justify-content: center; }
.yt-video {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--c-ink);
}
.yt-video img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .3s ease; }
.yt-video:hover img { transform: scale(1.03); opacity: .92; }
.play {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; padding: 15px 13px 15px 17px;
  transform: translate(-50%, -50%);
  color: var(--c-white); background: rgba(34,29,29,.42); border-radius: 50%;
  backdrop-filter: blur(3px);
}

/* Tarjeta mientras no haya publicaciones cargadas */
.feed-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem;
  aspect-ratio: 4 / 5; width: 100%;
  background: var(--c-cream); border-radius: 10px;
  color: var(--c-ink); text-align: center;
  transition: background-color .3s ease;
}
.feed-fallback:hover { background: var(--c-ivory); }
.feed-fallback--youtube { aspect-ratio: 16 / 7; }
.ff-ic { width: 38px; height: 38px; color: var(--c-rose); margin-bottom: .4rem; }
.ff-user { font-family: var(--f-display); font-size: clamp(1.5rem, 1.3rem + .6vw, 1.9rem); line-height: 1.1; }
.ff-cta { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }

/* ---------- 4f. SOBRE ZARRAGA ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--c-cream); }
.about-media { margin: 0; min-height: 100%; }
.about-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.about-copy {
  position: relative;
  padding: var(--sec-y) var(--gutter);
  padding-left: clamp(2rem, 5vw, 5rem);
  display: flex; flex-direction: column; justify-content: center;
  max-width: 38rem;
}
.about-copy h2 { max-width: 10.5em; }
.about-copy p:not(.eyebrow) { color: var(--c-text); max-width: 31rem; }
.about-copy p + p { margin-top: 1rem; }
.rule { display: block; width: 44px; height: 1px; background: var(--c-gold); margin: 1.6rem 0 1.6rem; }
.sprig-about { width: clamp(64px, 6vw, 92px); height: auto; aspect-ratio: 120/170; right: clamp(1rem, 3vw, 2.5rem); top: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- 4g. CTA FINAL ---------- */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  background: var(--c-sand);
  overflow: hidden;
}
.cta-copy {
  padding: var(--sec-y) var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.cta-copy h2 { font-size: clamp(2.1rem, 1.6rem + 1.7vw, 3.1rem); }
.cta-copy p { font-size: var(--fs-lead); color: var(--c-ink); margin: .6rem 0 2rem; }
.cta-media { position: relative; min-height: 100%; }
.cta-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
}

/* ---------- 4h. FOOTER ---------- */
.site-footer { background: var(--c-ivory); padding-block: 2.2rem; border-top: 1px solid var(--c-line); }
.footer-inner { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.footer-logo img { width: 62px; }
.footer-nav { display: flex; gap: clamp(1.2rem, 3vw, 2.5rem); font-size: var(--fs-sm); color: var(--c-ink); }
.footer-nav a:hover { color: var(--c-rose); }
.footer-social { display: flex; gap: 1.1rem; margin-left: auto; color: var(--c-ink); }
.footer-social a { display: grid; place-items: center; width: 32px; height: 32px; }
.footer-social .ic { width: 19px; height: 19px; }
.footer-social a:hover { color: var(--c-rose); }
.copyright { font-size: var(--fs-xs); color: var(--c-muted); padding-left: clamp(1rem, 2.5vw, 2rem); border-left: 1px solid var(--c-line); }

[aria-disabled="true"] { cursor: default; }
[hidden] { display: none !important; }

/* ---------- 5. RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero-media img { object-position: 66% 60%; }
  .testimonial-grid[data-cols="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .footer-social { margin-left: 0; }
  .footer-nav { order: 3; width: 100%; justify-content: center; }
  .copyright { order: 4; width: 100%; border-left: 0; padding-left: 0; }
}

@media (max-width: 860px) {
  /* Header móvil */
  .site-header { position: relative; background: var(--c-wall-top); }
  .header-inner { padding-block: .9rem; gap: .75rem; }
  .brand img { width: 58px; }
  .header-wa { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 11px; border: 0; background: transparent; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1.5px; background: var(--c-ink); transition: transform .3s ease; }
  .is-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .is-open .nav-toggle span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0;
    background: var(--c-cream);
    padding: .5rem var(--gutter) 1.2rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--c-line);
    display: none;
  }
  .is-open .nav { display: flex; }
  .nav a { padding-block: .85rem; border-bottom: 1px solid var(--c-line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }

  /* Hero apilado: texto arriba, torta abajo */
  .hero { flex-direction: column; align-items: stretch; min-height: 0; background: var(--c-wall-seam); }
  .hero-content { order: 1; padding-top: 2.2rem; padding-bottom: 2rem; max-width: none; background: linear-gradient(var(--c-wall-top), var(--c-wall-seam)); }
  .hero-media { position: relative; order: 2; aspect-ratio: 1 / 1.02; }
  .hero-media img { object-position: 80% 70%; }
  .hero-media::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 18%; z-index: 1;
    background: linear-gradient(var(--c-wall-seam), transparent); pointer-events: none; }
  .hero .eyebrow { margin-bottom: .9rem; }
  .btn-row { margin-top: 1.6rem; }

  /* Propuesta */
  .sprig-value { top: 1.5rem; right: .5rem; opacity: .35; width: 78px; }
  .pillars { grid-template-columns: 1fr; max-width: 22rem; }
  .pillars li { padding: 1.8rem 0; }
  .pillars li + li { border-left: 0; border-top: 1px solid var(--c-line); }

  /* Productos */
  .products-head { flex-direction: column; align-items: flex-start; }
  .products-head .btn { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .products-cta-mobile { display: flex; justify-content: center; margin-top: 2.5rem; }

  /* Comentarios y redes */
  .testimonial-grid, .testimonial-grid[data-cols] { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .feed-posts { grid-template-columns: minmax(0, 360px); }
  .yt-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .feed-fallback--youtube { aspect-ratio: 16 / 9; }

  /* Sobre: foto completa sin recorte */
  .about { grid-template-columns: 1fr; }
  .about-media img { height: auto; aspect-ratio: 1418 / 1109; }
  .about-copy { max-width: none; padding-left: var(--gutter); }
  .sprig-about { opacity: .35; }

  /* CTA */
  .cta { grid-template-columns: 1fr; }
  .cta-copy { padding-left: var(--gutter); padding-bottom: 2.5rem; align-items: center; text-align: center; }
  .cta-media img { aspect-ratio: 678 / 575; height: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 18%); }
}

@media (max-width: 520px) {
  .header-wa span { display: none; }
  .header-wa { width: 42px; padding: 0; }
  .hero-content .btn-row { flex-direction: column; align-items: stretch; }
  .hero-content .btn { width: 100%; }
  .cta-copy .btn { width: 100%; }
  .product p { font-size: .8rem; padding-inline: 0; }
  .product h3 { font-size: .78rem; letter-spacing: .12em; }
}

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