/* Taliatú Repostería — redesign
   tinta / azulejo / dulce de leche / merengue / glasé / rosa  */

:root {
  --tinta:    #2A1C1B;
  --azulejo:  #6B4E3A;
  --dulce:    #C8752F;
  --merengue: #FFFFFF;
  --glase:    #FBF4EF;
  --rosa:     #F2879E;

  --on-tinta-strong: rgba(255,255,255,.72);
  --on-tinta-soft:   rgba(255,255,255,.45);
  --rule:            rgba(42,28,27,.14);

  --display: "Fraunces", Georgia, serif;
  --body:    "Karla", system-ui, sans-serif;
  --mono:    "Azeret Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--merengue);
  color: var(--tinta);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--dulce); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .22em; }

:focus-visible {
  outline: 3px solid var(--dulce);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--dulce);
  color: #fff;
  padding: .7rem 1rem;
  z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ── topbar ─────────────────────────────────────────── */
.topbar {
  background: var(--tinta);
  color: var(--on-tinta-strong);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.topbar-in {
  max-width: var(--max);
  margin-inline: auto;
  padding: .55rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.topbar-nav { display: flex; gap: 1.4rem; }
.topbar a { color: var(--on-tinta-strong); }
.topbar a:hover { color: var(--merengue); text-decoration: none; }

/* The number lives here rather than the locality: the locality is already
   stated in the hero eyebrow, the hero stat, the FAQ and the schema. */
.topbar-wa {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--merengue);
  white-space: nowrap;
}
.topbar-wa svg { flex: none; color: var(--rosa); }
.topbar a.topbar-wa:hover { color: var(--rosa); text-decoration: none; }

/* ── hero ───────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(200,117,47,.20) 0%, transparent 60%),
    radial-gradient(90% 70% at 95% 20%, rgba(242,135,158,.13) 0%, transparent 55%),
    var(--tinta);
  color: var(--merengue);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
  position: relative;
}

/* ── 3. Piped icing along the seam, the way the old border-image tiles did.
   Domes of the gallery's white rising into the hero. ───────────────── */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 14px;
  background:
    radial-gradient(circle at 50% 100%, var(--merengue) 13px, transparent 13.5px)
    repeat-x 0 100% / 26px 14px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.pennant {
  width: 78px;
  display: block;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}

.hero-eyebrow {
  margin: 0 0 clamp(.9rem, 2vw, 1.3rem);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rosa);
}

.hero-title {
  font-family: var(--display);
  font-optical-sizing: none;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 20;
  font-weight: 900;
  font-size: clamp(2rem, 4.3vw, 3.3rem);
  line-height: .9;
  letter-spacing: -.035em;
  margin: 0;
}
.hero-title .lead { display: block; }
.hero-title .tail { display: block; color: var(--rosa); }

/* Each half is one phrase — never break it mid-line where there is room. */
@media (min-width: 901px) {
  .hero-title .lead,
  .hero-title .tail { white-space: nowrap; }
}

.hero-body {
  margin: clamp(1.4rem, 3vw, 1.9rem) 0 0;
  max-width: 40ch;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--on-tinta-strong);
}
.hero-body strong { color: var(--merengue); font-weight: 700; }

.hero-meta {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.16);
  display: flex;
  gap: 2.5rem;
  color: var(--on-tinta-soft);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-meta b {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 14;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--merengue);
}

/* ── the order slip (signature) ─────────────────────── */
.slip {
  background: var(--glase);
  color: var(--tinta);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  transform: rotate(-1.1deg);
  box-shadow: 0 26px 60px rgba(0,0,0,.42);
  position: relative;
}
.slip::before {
  content: "";
  position: absolute;
  inset: .5rem;
  border: 1px dashed rgba(42,28,27,.22);
  pointer-events: none;
}
.slip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--tinta);
}
.slip-head .n { color: var(--dulce); }

.slip-sentence {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 16;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.85;
  margin: 1.4rem 0 0;
}

.slip-field {
  font-family: var(--mono);
  font-size: .82em;
  font-weight: 500;
  color: var(--dulce);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--dulce);
  padding: .1em .25em;
  margin-inline: .12em;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  max-width: 100%;
}
.slip-field:hover { background: rgba(200,117,47,.10); }
input.slip-field { cursor: text; }
input[type="number"].slip-field { width: 3.8em; text-align: center; }
input[type="date"].slip-field { font-size: .74em; }

.slip-note {
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.65;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed rgba(42,28,27,.3);
  color: rgba(42,28,27,.65);
}
.slip-note.is-warning { color: #A32B2B; }

.slip-send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: 1rem;
  padding: .95rem 1.15rem;
  background: var(--tinta);
  color: var(--merengue);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.slip-send:hover {
  background: var(--dulce);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--merengue);
}
.slip-send svg { flex: none; }
.slip-send.is-blocked {
  background: rgba(42,28,27,.28);
  cursor: not-allowed;
  transform: none;
}

/* ── gallery ────────────────────────────────────────── */
.oven { padding-block: clamp(3rem, 7vw, 5.5rem); }
.oven-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.section-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 18;
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1;
  letter-spacing: -.025em;
  margin: .45rem 0 0;
}
.oven-head .eyebrow { color: var(--dulce); }
.oven-note {
  margin: 0;
  max-width: 32ch;
  font-size: .95rem;
  color: rgba(42,28,27,.6);
}
.oven-feed {
  border-top: 2px solid var(--tinta);
  padding-top: 1.6rem;
}

/* ── how an order works (a real sequence) ───────────── */
.pedido {
  background: var(--glase);
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
}
.pedido .section-title { max-width: 20ch; }
.steps {
  list-style: none;
  margin: clamp(1.8rem, 4vw, 2.8rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  counter-reset: paso;
}
.steps li {
  counter-increment: paso;
  border-top: 2px solid var(--tinta);
  padding-top: 1rem;
}
.steps li::before {
  content: counter(paso, decimal-leading-zero);
  display: block;
  margin-bottom: .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--dulce);
}
.steps h3 {
  margin: 0 0 .35rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 14;
  font-size: 1.2rem;
  font-weight: 700;
}
.steps p { margin: 0; font-size: .97rem; color: rgba(42,28,27,.7); }

/* ── preguntas frecuentes ───────────────────────────── */
.faq {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
}
.faq .eyebrow { color: var(--dulce); }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 3.5vw, 3rem);
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
}
.faq-item {
  border-top: 2px solid var(--tinta);
  padding-top: 1rem;
}
.faq-item h3 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 14;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.faq-item p {
  margin: 0;
  font-size: .97rem;
  color: rgba(42,28,27,.7);
}

@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; }
}

/* ── contact ────────────────────────────────────────── */
.contacto {
  /* Flatlay shot by the owner, pre-treated as a brown duotone so its lightest
     pixel is darker than --azulejo — contrast holds without a scrim. */
  background: var(--azulejo) url(/assets/counter.webp) center / cover no-repeat;
  color: var(--merengue);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.contacto .eyebrow { color: rgba(255,255,255,.65); }
.contacto .section-title { color: var(--merengue); }
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
}
.contacto-card {
  border-top: 2px solid rgba(255,255,255,.55);
  padding-top: 1.1rem;
}
.contacto-card .eyebrow { display: block; margin-bottom: .6rem; }
.contacto-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 16;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--merengue);
  word-break: break-word;
}
.contacto-link:hover { color: var(--glase); }
.contacto-card p {
  margin: .5rem 0 0;
  font-size: .95rem;
  color: rgba(255,255,255,.82);
}

/* ── footer ─────────────────────────────────────────── */
.foot {
  background: var(--tinta);
  color: var(--on-tinta-soft);
}
.foot-in {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.4rem var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.foot a { color: var(--on-tinta-strong); }

/* ── page-load sequence ─────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes settle {
  from { opacity: 0; transform: rotate(2.5deg) translateY(26px); }
  to   { opacity: 1; transform: rotate(-1.1deg) translateY(0); }
}
.pennant,
.hero-eyebrow,
.hero-title .lead,
.hero-title .tail,
.hero-body,
.hero-meta {
  animation: rise .7s cubic-bezier(.2,.7,.3,1) backwards;
}
.pennant          { animation-delay: .05s; }
.hero-eyebrow     { animation-delay: .10s; }
.hero-title .lead { animation-delay: .14s; }
.hero-title .tail { animation-delay: .24s; }
.hero-body        { animation-delay: .34s; }
.hero-meta        { animation-delay: .42s; }
.slip             { animation: settle .85s cubic-bezier(.2,.7,.3,1) .5s backwards; }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid,
  .contacto-grid { grid-template-columns: 1fr; }
  .slip { transform: none; animation: rise .7s cubic-bezier(.2,.7,.3,1) .3s backwards; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Wrap rather than hide: the nav holds the only Instagram link on the page. */
  .topbar-in {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: .5rem;
    font-size: .64rem;
  }
  .topbar-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.10);
  }
  .topbar-wa { gap: .4rem; }
  .hero-meta { flex-direction: column; gap: 1.1rem; }
  .slip-sentence { line-height: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .pennant,
  .hero-title .lead,
  .hero-title .tail,
  .hero-eyebrow,
  .hero-body,
  .hero-meta,
  .slip { animation: none; }
  .slip-send:hover { transform: none; }
}

/* ── curated gallery grid ───────────────────────────── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.5rem, 1.2vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.feed-grid li {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--glase);
}
.feed-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 760px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); }
}
