/* ===========================================================
   josue pasteleria — "Confitería joya"
   Plum profundo + oro trigo + crema. Fraunces + Hanken Grotesk.
   =========================================================== */

:root {
  /* Color */
  --plum-900: #24092E;
  --plum-800: #340E42;
  --plum-700: #4A1259;
  --grape:    #8E2DAB;
  --magenta:  #C2185B;
  --gold:     #E9A93C;
  --gold-soft:#F6D69A;
  --cream:    #FBF4EA;
  --cream-2:  #F3E7D5;
  --choco:    #3E2417;
  --ink:      #2A141C;

  --max: 1140px;
  --pad: clamp(1.1rem, 4vw, 2.5rem);

  --shadow-soft: 0 18px 50px -24px rgba(36, 9, 46, .55);
  --shadow-card: 0 22px 60px -30px rgba(36, 9, 46, .7);

  --r-arch: 200px 200px 22px 22px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: clamp(1rem, .6vw + .9rem, 1.075rem);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--plum-800);
}

/* ---------- Utilidades tipográficas ---------- */
.eyebrow {
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--magenta);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1.5px;
  background: currentColor;
  display: inline-block;
}
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .005em;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.6px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d9922a);
  color: var(--plum-900);
  box-shadow: 0 14px 30px -14px rgba(233, 169, 60, .8);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -14px rgba(233, 169, 60, .9); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 214, 154, .5);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); transform: translateY(-3px); }
/* Ghost sobre fondo claro */
.on-cream .btn-ghost { color: var(--plum-700); border-color: rgba(74, 18, 89, .3); }
.on-cream .btn-ghost:hover { color: var(--grape); border-color: var(--grape); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 244, 234, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 18, 89, .1);
}
.nav-inner {
  max-width: var(--max); margin-inline: auto;
  padding: .7rem var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { height: 46px; width: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 14px -6px rgba(36,9,46,.6); }
.brand span {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 1.15rem;
  color: var(--plum-800); letter-spacing: -.01em;
}
.nav-links { display: flex; gap: clamp(.6rem, 2vw, 1.7rem); align-items: center; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  color: var(--plum-700); padding: .3rem 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--plum-900); }
.nav-cta { display: none; }
@media (min-width: 720px) { .nav-cta { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(142,45,171,.5), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(194,24,91,.35), transparent 55%),
    linear-gradient(160deg, var(--plum-900), var(--plum-700));
  color: var(--cream);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max); margin-inline: auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad) clamp(3.5rem, 9vw, 6.5rem);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(2.2rem, 5vw, 3.4rem);
}
.hero-text { max-width: 760px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.7rem, 7vw, 4.9rem);
  font-weight: 500;
  margin: 1rem 0 1.1rem;
}
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
.hero-lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 46ch; margin-inline: auto; color: rgba(251,244,234,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; justify-content: center; }

/* Marco en arco con doble contorno dorado (firma) */
.hero-media { position: relative; width: min(100%, 520px); margin-inline: auto; }
.hero-media .frame {
  border-radius: var(--r-arch);
  overflow: hidden;
  border: 1px solid rgba(246,214,154,.35);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::before {
  content: ""; position: absolute; inset: -14px -14px 14px -14px;
  border: 1.5px solid var(--gold); border-radius: var(--r-arch);
  opacity: .55; z-index: -1;
}

/* ---------- Divisor de espiga ---------- */
.wheat-rule {
  display: flex; align-items: center; justify-content: center; gap: 1.1rem;
  color: var(--gold); padding: clamp(2rem, 5vw, 3.2rem) var(--pad) 0;
  max-width: var(--max); margin-inline: auto;
}
.wheat-rule::before, .wheat-rule::after {
  content: ""; height: 1px; flex: 0 1 120px;
  background: linear-gradient(90deg, transparent, rgba(233,169,60,.7));
}
.wheat-rule::after { transform: scaleX(-1); }
.wheat-rule svg { width: 30px; height: 44px; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section-head { max-width: 620px; margin: 0 auto clamp(1.8rem, 4vw, 2.8rem); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-top: .8rem; }
.section-head p { margin: .8rem auto 0; color: color-mix(in srgb, var(--ink) 78%, transparent); }
.center { text-align: center; }

.section-dark { background: var(--plum-800); color: var(--cream); }
.section-dark h2 { color: var(--cream); }
.section-dark .eyebrow { color: var(--gold-soft); }

/* ---------- Tarjetas destacadas / galería ---------- */
.cards {
  display: grid; gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.card .media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--cream-2); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .media img { transform: scale(1.05); }
.card figcaption { padding: 1rem 1.1rem 1.2rem; text-align: center; }
.card figcaption b { font-family: "Fraunces", serif; font-weight: 600; color: var(--plum-800); display: block; }
.card figcaption small { color: color-mix(in srgb, var(--ink) 62%, transparent); font-size: .85rem; }

/* Menú de categorías (fijo, con scroll a cada sección) */
.cat-menu {
  position: sticky; top: 61px; z-index: 30;
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  padding: .7rem var(--pad);
  background: rgba(251, 244, 234, .92); backdrop-filter: blur(8px);
  border-block: 1px solid rgba(74, 18, 89, .1);
}
.cat-menu a {
  font-weight: 600; font-size: .92rem; text-decoration: none;
  color: var(--plum-700); padding: .45rem 1.05rem; border-radius: 999px;
  border: 1.5px solid rgba(74, 18, 89, .2);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.cat-menu a:hover { border-color: var(--grape); color: var(--grape); }
.cat-menu a.active {
  background: linear-gradient(135deg, var(--grape), var(--plum-700));
  color: var(--cream); border-color: transparent;
}

.cat-section { scroll-margin-top: 130px; padding-block: clamp(2rem, 5vw, 3.5rem); }
.cat-head { text-align: center; max-width: 620px; margin: 0 auto clamp(1.4rem, 3vw, 2.2rem); }
.cat-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cat-head p { margin-top: .6rem; color: color-mix(in srgb, var(--ink) 72%, transparent); }

/* Grid de galería con marcos en arco alternos */
.gallery { display: grid; gap: clamp(1.2rem, 3vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery figure {
  overflow: hidden; box-shadow: var(--shadow-soft); background: #fff;
  border-radius: 20px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.gallery figure:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Prosa (Sobre / Contacto) ---------- */
.prose { max-width: 680px; margin-inline: auto; text-align: center; }
.prose h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.prose p { margin-top: 1.1rem; font-size: 1.08rem; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.prose .btn { margin-top: 1.8rem; }

.contact-grid { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 620px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: #fff; border-radius: 18px; padding: 1.5rem;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(74,18,89,.06);
  text-align: center;
}
.contact-card .eyebrow { color: var(--grape); justify-content: center; }
.contact-card .eyebrow::before { display: none; }
.contact-card p { margin-top: .5rem; font-size: 1.05rem; }
.contact-card a { color: var(--grape); text-decoration: none; font-weight: 600; }
.contact-card a:hover { color: var(--magenta); }

/* ---------- Cómo pedir (pasos) ---------- */
.steps {
  display: grid; gap: clamp(1rem, 3vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 920px; margin-inline: auto;
}
.step {
  background: #fff; border-radius: 18px; padding: 1.8rem 1.4rem;
  box-shadow: var(--shadow-soft); text-align: center;
}
.step-num {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem;
  background: linear-gradient(135deg, var(--grape), var(--plum-700));
  color: var(--cream); font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.step p { color: color-mix(in srgb, var(--ink) 72%, transparent); font-size: .98rem; }

/* ---------- Testimonios ---------- */
.quotes {
  display: grid; gap: clamp(1rem, 3vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1000px; margin-inline: auto;
}
.quote {
  background: #fff; border-radius: 18px; padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow-soft); text-align: center;
}
.quote .stars { color: var(--gold); letter-spacing: .12em; margin-bottom: .6rem; }
.quote p { font-family: "Fraunces", serif; font-style: italic; color: var(--plum-800); }
.quote cite {
  display: block; margin-top: .9rem; font-style: normal; font-weight: 600;
  color: color-mix(in srgb, var(--ink) 65%, transparent); font-size: .9rem;
}

/* ---------- Banda CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.cta-band p { max-width: 46ch; margin: 0 auto 2rem; color: rgba(251,244,234,.8); }

/* ---------- Footer ---------- */
.footer {
  background: var(--plum-900); color: rgba(251,244,234,.75);
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 2.5rem;
}
.footer-inner {
  max-width: var(--max); margin-inline: auto;
  display: grid; gap: 1.6rem; align-items: center;
  grid-template-columns: 1fr; text-align: center;
}
@media (min-width: 720px) { .footer-inner { grid-template-columns: auto 1fr auto; text-align: left; } }
.footer .brand span { color: var(--cream); }
.footer-tag { font-family: "Fraunces", serif; font-style: italic; color: var(--gold-soft); }
.footer-links { display: inline-flex; gap: 1.3rem; justify-content: center; }
.footer-links a { color: var(--cream); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .45rem; }
.footer-links a:hover { color: var(--gold); }
.footer-links svg { width: 1.15em; height: 1.15em; }
.footer-legal { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(246,214,154,.14); text-align: center; font-size: .82rem; color: rgba(251,244,234,.5); }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 1.6rem); bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  transition: transform .35s var(--ease);
}
.wa-float:hover { transform: scale(1.08) rotate(-4deg); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Animación de entrada del hero ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-text > * { animation: fadeUp .7s var(--ease) both; }
.hero-text > *:nth-child(2) { animation-delay: .08s; }
.hero-text > *:nth-child(3) { animation-delay: .16s; }
.hero-text > *:nth-child(4) { animation-delay: .24s; }
.hero-media { animation: fadeUp .8s var(--ease) .18s both; }

/* ---------- Reveal al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .09s; }
.reveal.d2 { transition-delay: .18s; }
.reveal.d3 { transition-delay: .27s; }

/* ---------- Lightbox de galería ---------- */
.gallery img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(24, 6, 30, .93); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 5vw;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { max-width: min(92vw, 860px); text-align: center; }
.lightbox img {
  width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
  transform: scale(.96); transition: transform .3s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lightbox figcaption { color: var(--gold-soft); margin-top: 1rem; font-family: "Fraunces", serif; font-style: italic; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.3rem;
  background: none; border: none; color: var(--cream); cursor: pointer;
  font-size: 2.2rem; line-height: 1; padding: .3rem .6rem;
}
.lightbox-close:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Focus accesible ---------- */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}
