/* ============================================
   Dulces Jana — sistema de diseño
   Paleta: crema cálida, chocolate, frambuesa, dorado caramelo
   Tipografía: Fraunces (display) + Karla (texto)
============================================ */

:root {
  --cream: #FBF3E6;
  --paper: #FFFCF7;
  --choco: #3B2113;
  --choco-soft: #6B4530;
  --berry: #C0273C;
  --berry-dark: #8E1A29;
  --gold: #C1893F;
  --blush: #F6D8DD;
  --blush-soft: #FCEEF1;
  --line: rgba(59, 33, 19, 0.14);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Karla", "Segoe UI", sans-serif;

  --max-w: 1180px;
  --radius-lg: 28px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 40px rgba(59, 33, 19, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--choco);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  color: var(--choco);
  margin: 0 0 0.4em;
  line-height: 1.12;
  font-weight: 600;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); font-weight: 560; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.28rem; }

p { max-width: 62ch; }

.lede {
  font-size: 1.18rem;
  color: var(--choco-soft);
  max-width: 46ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--berry);
  color: var(--paper);
  box-shadow: 0 12px 24px rgba(192, 39, 60, 0.32);
}
.btn-primary:hover { background: var(--berry-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--choco);
  color: var(--choco);
}
.btn-ghost:hover { background: var(--choco); color: var(--paper); }

.btn-small {
  padding: 10px 18px;
  font-size: 0.92rem;
}

/* ---------- Ribbon tag (motivo recurrente: cinta de regalo) ---------- */
.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--berry);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 8px 18px 8px 16px;
  border-radius: 4px 14px 14px 4px;
  position: relative;
  margin-bottom: 22px;
}
.ribbon::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 12px 0 12px 10px;
  border-color: transparent transparent transparent var(--berry-dark);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 230, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(59,33,19,0.25);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--choco);
}
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--choco-soft);
  font-weight: 400;
  margin-top: -2px;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--choco-soft);
  font-weight: 700;
  font-size: 0.95rem;
}
nav.main-nav a:hover { color: var(--berry); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--choco);
  margin: 5px 0;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 90px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy p.lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 34px; }

.hero-meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.hero-meta div {
  display: flex;
  flex-direction: column;
}
.hero-meta strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--berry);
}
.hero-meta span {
  font-size: 0.84rem;
  color: var(--choco-soft);
}

.hero-photo {
  position: relative;
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s ease 0.15s forwards;
}
.hero-photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(-2.2deg);
  border: 10px solid var(--paper);
}
.hero-photo-frame img { width: 100%; height: 420px; object-fit: cover; }

.hero-tag {
  position: absolute;
  top: -18px;
  right: -14px;
  background: var(--paper);
  color: var(--choco);
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 12px 18px;
  border-radius: 50%;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  box-shadow: var(--shadow-soft);
  transform: rotate(8deg);
  border: 2px dashed var(--gold);
}

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scallop divider (borde de caja de dulces) ---------- */
.scallop {
  height: 34px;
  width: 100%;
  background-repeat: repeat-x;
  background-size: 40px 34px;
  background-position: center;
}
.scallop-to-blush {
  background-image: radial-gradient(circle at 50% 0, transparent 17px, var(--blush) 17.5px);
  background-color: var(--cream);
}
.scallop-to-cream {
  background-image: radial-gradient(circle at 50% 0, transparent 17px, var(--cream) 17.5px);
  background-color: var(--blush);
}
.scallop-to-choco {
  background-image: radial-gradient(circle at 50% 0, transparent 17px, var(--choco) 17.5px);
  background-color: var(--cream);
}

/* ---------- Secciones generales ---------- */
section { padding: 76px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.bg-blush { background: var(--blush); }
.bg-cream { background: var(--cream); }

/* ---------- Productos: galería tipo mesa de dulces ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.gallery-item {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 10px 10px 16px;
  box-shadow: 0 10px 24px rgba(59,33,19,0.1);
  transition: transform 0.2s ease;
}
.gallery-item:hover { transform: translateY(-6px) rotate(0deg) !important; }
.gallery-item:nth-child(2n) { transform: rotate(1.4deg); }
.gallery-item:nth-child(3n) { transform: rotate(-1.6deg); }
.gallery-item:nth-child(5n) { transform: rotate(0.8deg); }
.gallery-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: zoom-in;
}
.gallery-item h3 {
  font-size: 1.02rem;
  margin: 0 0 4px;
  padding: 0 4px;
}
.gallery-item p {
  font-size: 0.88rem;
  color: var(--choco-soft);
  margin: 0;
  padding: 0 4px;
}
.gallery-item--wide {
  grid-column: span 2;
}
.gallery-item--wide img { height: 260px; }

.nuez-note {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}
.nuez-note svg { flex-shrink: 0; }
.nuez-note p { margin: 0; font-size: 0.95rem; color: var(--choco-soft); }
.nuez-note strong { color: var(--choco); }

/* ---------- Cómo pedir ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--berry);
  display: block;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--choco-soft); font-size: 0.96rem; }

/* ---------- Por qué elegirnos ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.why-list li { display: flex; gap: 16px; align-items: flex-start; }
.why-list svg { flex-shrink: 0; margin-top: 3px; }
.why-list h3 { margin-bottom: 4px; font-size: 1.08rem; }
.why-list p { margin: 0; font-size: 0.94rem; color: var(--choco-soft); }

.why-photo {
  position: relative;
}
.why-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  height: 460px;
  object-fit: cover;
  width: 100%;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: var(--choco);
  color: var(--blush-soft);
  text-align: center;
}
.cta-final h2 { color: var(--paper); }
.cta-final .lede { color: rgba(252, 238, 241, 0.8); margin: 0 auto 32px; }
.cta-final .btn-primary { box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.cta-final .btn-ghost { border-color: var(--blush-soft); color: var(--blush-soft); }
.cta-final .btn-ghost:hover { background: var(--blush-soft); color: var(--choco); }
.cta-actions { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--choco);
  color: rgba(252, 238, 241, 0.65);
  padding: 40px 0 30px;
  font-size: 0.88rem;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
footer.site-footer a { text-decoration: none; color: rgba(252,238,241,0.85); font-weight: 700; }
footer.site-footer a:hover { color: var(--gold); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  background: var(--berry);
  color: var(--paper);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(192,39,60,0.4);
  text-decoration: none;
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(59, 33, 19, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 720px);
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: var(--paper);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .why-grid { grid-template-columns: 1fr; }
  .why-photo img { height: 320px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--wide { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 26px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-actions .btn-small { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item--wide { grid-column: span 2; }
  .hero-photo-frame img { height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo { animation: none; opacity: 1; transform: none; }
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
