/* ==========================================================================
   Lovers Bakery — Peace, Love, & Pastries
   Retro love-letter design system
   ========================================================================== */

:root {
  --paper: #FFF7EC;        /* warm paper background */
  --butter: #F6E5C3;       /* butter panel */
  --choc: #3E2417;         /* chocolate ink */
  --choc-soft: #6B4A38;    /* lighter chocolate for body copy */
  --cherry: #B63627;       /* cherry red accent (4.5:1+ on butter and paper) */
  --rose: #E7B4B4;         /* soft rose */
  --pistachio: #7C8A54;    /* small green accent */

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(62, 36, 23, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--choc);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the width/height attributes as an aspect-ratio hint only —
   without it, images squeezed by max-width keep their attribute height and distort */
img { max-width: 100%; height: auto; display: block; }

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cherry);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--choc);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cherry);
  margin-bottom: 0.9rem;
}

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--choc);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--choc);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  white-space: nowrap;
}

.wordmark .heart { color: var(--cherry); font-size: 1.1rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  color: var(--choc);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover { border-bottom-color: var(--cherry); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--choc); }

/* The generic .nav-links a rules above outrank .btn, which stripped the
   Order Now pill's bottom border and side padding — restore them */
.nav-links a.btn,
.nav-links a.btn:hover {
  color: var(--paper);
  padding: 0.7rem 1.5rem;
  border-bottom: 2px solid var(--choc);
}

.btn {
  display: inline-block;
  background: var(--cherry);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap; /* a pill that wraps to two lines collapses into a blob */
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--choc);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--choc);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--choc); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--choc); }

.btn--ghost {
  background: transparent;
  color: var(--choc);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--choc);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--choc);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Announcement bar — injected under the header by js/main.js
   (edit the message at the top of js/main.js)
   -------------------------------------------------------------------------- */

.announcement {
  background: var(--rose);
  border-bottom: 2px solid var(--choc);
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding-block: 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.announcement a { color: var(--choc); }

.announcement-close {
  background: none;
  border: none;
  color: var(--choc);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Marquee ticker — Peace ✌ Love ❤ Pastries 🥐
   -------------------------------------------------------------------------- */

.ticker {
  background: var(--choc);
  color: var(--butter);
  overflow: hidden;
  border-block: 2px solid var(--choc);
  padding-block: 0.55rem;
}

.ticker-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: ticker 28s linear infinite;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ticker-track span { display: inline-block; }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .btn, .carousel-track img { transition: none; }
  .carousel-track { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Scalloped pie-crust divider (signature)
   -------------------------------------------------------------------------- */

.scallop {
  height: 22px;
  background:
    radial-gradient(circle at 50% 0, var(--butter) 14px, transparent 15px)
    top center / 34px 22px repeat-x;
}

.scallop--paper {
  background:
    radial-gradient(circle at 50% 0, var(--paper) 14px, transparent 15px)
    top center / 34px 22px repeat-x;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  margin-bottom: 1.2rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--cherry);
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--choc-soft);
  max-width: 46ch;
  margin-bottom: 1.6rem;
}

.hours-card {
  display: inline-block;
  background: var(--butter);
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  padding: 0.9rem 1.3rem;
  margin-bottom: 1.8rem;
  box-shadow: 3px 3px 0 var(--choc);
}

.hours-card strong { display: block; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cherry); margin-bottom: 0.2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.hero-photo {
  position: relative;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  border: 2px solid var(--choc);
  border-radius: 50% 50% var(--radius) var(--radius) / 32% 32% var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

.hero-photo .stamp {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--cherry);
  color: var(--paper);
  border: 2px solid var(--choc);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.25;
  transform: rotate(8deg);
  padding: 0.6rem;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--butter { background: var(--butter); }

.section h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }

.section .measure { max-width: var(--measure); color: var(--choc-soft); }
.section .measure + .measure { margin-top: 1rem; }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Gallery carousel */

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-inline: min(4vw, 2.5rem);
}

.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-block: 0.3rem;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track img {
  flex: 0 0 auto;
  width: 240px;
  height: 240px;
  object-fit: cover;
  border: 2px solid var(--choc);
  border-radius: 10px;
  scroll-snap-align: start;
  transition: transform 150ms ease;
}

.carousel-track img:hover { transform: rotate(-1.2deg) scale(1.02); }

.carousel-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--paper);
  color: var(--choc);
  font-size: 1.2rem;
  border: 2px solid var(--choc);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--choc);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.carousel-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--choc); }
.carousel-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--choc); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; box-shadow: 3px 3px 0 var(--choc); transform: none; }

@media (max-width: 640px) {
  .carousel { padding-inline: 0; gap: 0.4rem; }
  .carousel-btn { width: 38px; height: 38px; font-size: 1rem; }
  .carousel-track img { width: 180px; height: 180px; }
}

/* Reviews — love letters from the neighbors */

.reviews-rating {
  margin-top: 0.7rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.reviews-rating .stars {
  color: var(--cherry);
  letter-spacing: 0.12em;
  font-size: 1.1rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2.2rem;
}

.review-card {
  background: var(--paper);
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--choc);
  padding: 1.5rem 1.6rem;
}

/* hand-placed, slightly askew — like notes pinned to a board */
.review-card:nth-child(odd) { transform: rotate(-0.8deg); }
.review-card:nth-child(2) { transform: rotate(0.7deg); }

.review-card blockquote {
  color: var(--choc-soft);
  font-style: italic;
}

.review-card figcaption {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  color: var(--cherry);
}

.reviews-more { margin-top: 2rem; font-weight: 700; }

@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: 1fr; }
}

/* Big CTA band */

.cta-band {
  background: var(--cherry);
  color: var(--paper);
  text-align: center;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}

.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.4rem; }

.cta-band .btn {
  background: var(--paper);
  color: var(--choc);
}

/* --------------------------------------------------------------------------
   Menu page
   -------------------------------------------------------------------------- */

.page-head { padding-block: clamp(2.6rem, 6vw, 4rem) 0; }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 0.8rem; }
.page-head p { max-width: var(--measure); color: var(--choc-soft); }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  margin-top: 2.2rem;
}

.menu-item {
  border-bottom: 2px dashed rgba(62, 36, 23, 0.3);
  padding-block: 0.95rem;
}

.menu-item h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.menu-item p { color: var(--choc-soft); font-size: 0.98rem; }
.menu-item .price { color: var(--cherry); font-weight: 800; margin-left: 0.4rem; font-family: var(--font-body); font-size: 1rem; }

.coffee-list { list-style: none; margin-top: 1rem; }
.coffee-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px dashed rgba(62, 36, 23, 0.3);
  padding-block: 0.7rem;
  font-weight: 700;
}
.coffee-list li span:last-child { color: var(--cherry); font-weight: 800; }

.staples {
  margin-top: 1.6rem;
  background: var(--paper);
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--choc);
  padding: 1.4rem 1.6rem;
}

.menu-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 820px;
}

.menu-boards img {
  border: 2px solid var(--choc);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.staples h3 { margin-bottom: 0.6rem; }
.staples ul { list-style: none; columns: 2; gap: 2rem; }
.staples li { padding-block: 0.3rem; font-weight: 700; break-inside: avoid; }
.staples li::before { content: "❤"; color: var(--cherry); margin-right: 0.55rem; font-size: 0.8em; }

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-grid figure img {
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-grid figcaption {
  font-size: 0.9rem;
  color: var(--choc-soft);
  margin-top: 0.7rem;
  text-align: center;
}

.signoff {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--cherry);
  margin-top: 1.6rem;
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.info-card {
  background: var(--paper);
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--choc);
  padding: 1.5rem 1.7rem;
}

.info-card + .info-card { margin-top: 1.3rem; }
.info-card h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.info-card p { color: var(--choc-soft); }
.info-card a { font-weight: 700; }

.contact-form .botcheck { display: none; }

.contact-form .field { margin-top: 1rem; }

.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.contact-form .optional {
  font-weight: 400;
  color: var(--choc-soft);
}

.contact-form input:not([type="hidden"]):not([type="checkbox"]),
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--choc);
  background: var(--paper);
  border: 2px solid var(--choc);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--cherry);
  outline-offset: 1px;
}

.contact-form textarea { resize: vertical; }

.contact-form .btn { margin-top: 1.3rem; cursor: pointer; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.form-status { margin-top: 0.9rem; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-success { color: #5C6839; } /* darker pistachio for AA contrast on paper */
.form-status.is-error { color: var(--cherry); }

.contact-photo { margin-top: 1.5rem; }

.contact-photo img {
  border: 2px solid var(--choc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-embed { margin-top: 1.1rem; }

.map-embed iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 2px solid var(--choc);
  border-radius: 10px;
}

.newsletter {
  background: var(--choc);
  color: var(--butter);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  margin-top: 1.3rem;
}

.newsletter h2 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--butter); }
.newsletter p { font-size: 0.95rem; opacity: 0.9; }
.newsletter .note { margin-top: 0.8rem; font-size: 0.82rem; opacity: 0.7; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--choc);
  color: var(--butter);
  padding-block: 2.6rem 2rem;
  text-align: center;
}

.site-footer .wordmark { color: var(--butter); font-size: 1.6rem; justify-content: center; display: flex; }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  list-style: none;
  margin: 1.2rem 0 1rem;
}

.footer-links a { color: var(--butter); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.footer-links a:hover { color: var(--rose); }

.footer-links li { display: flex; align-items: center; }
.footer-links .social-link { display: inline-flex; padding: 2px; }
.footer-links .social-link svg { display: block; }

.site-footer address {
  font-style: normal;
  font-size: 0.95rem;
  opacity: 0.85;
}

.site-footer address a { color: var(--butter); }

.copyright { margin-top: 1rem; font-size: 0.85rem; opacity: 0.65; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid, .intro-grid, .about-grid, .contact-grid, .menu-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 480px; }
}

/* 720px, not 640: between 640 and ~700 the full nav no longer fits on one
   row and the Order Now pill wrapped onto two lines */
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--choc);
    padding: 0.4rem 4vw 1rem;
  }

  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px dashed rgba(62,36,23,0.25); }
  .nav-links a { display: block; padding: 0.85rem 0; border-bottom: none; }
  .nav-links .btn { margin-top: 0.9rem; text-align: center; box-shadow: 3px 3px 0 var(--choc); }
}

@media (max-width: 640px) {
  /* the -14px offset (plus the rotation) pushed the stamp past the viewport
     edge and caused sideways page scroll on phones */
  .hero-photo .stamp { right: -4px; bottom: -8px; }

  .hero .hours-card { display: block; width: fit-content; margin-inline: auto; }
  .hero .hero-actions { justify-content: center; }

  /* tighter gap so all four links + both social icons share one row */
  .footer-links { gap: 1rem; }

  .menu-boards { grid-template-columns: 1fr; }

  .staples ul { columns: 1; }
}
