/* Brick-o-cream styles: white page, yellow nav bar, clean card grid. */

:root {
  --red: #FF2800;
  --yellow: #FFCF00;
  --ink: #1B1B1B;
  --pink: #F59CBF;
  --light-pink: #FFD6E5;
  --blue: #0055BF;
  --green: #00A651;
  --nav-muted: #5c5000; /* 5.45:1 on #FFCF00 (WCAG AA) */
  --muted: #6b6b6b;
  --line: #eee;
  --tint-yellow: #FFF6C7;
  --tint-pink: #FFE1EC;
  --tint-blue: #DDE8FF;
  --tint-gray: #F1F1F1;
  --radius: 12px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-height: 56px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

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

h1, h2, h3 { margin: 0; line-height: 1.15; }

a { color: inherit; }

/* ---------- Top bar + nav ---------- */

.topbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter) 4px;
}

.brand { display: inline-block; border-radius: 8px; }
.brand:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
/* The logo SVG has built-in whitespace below and beside the brick; the
   negative margins trim it so the brick lines up with the content edge and
   sits close to the nav bar. */
.brand img { display: block; width: 112px; height: 112px; max-width: none; margin: 0 0 -6px -8px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--nav-height);
  background: var(--yellow);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px clamp(12px, 4vw, 48px);
  padding: 8px var(--gutter);
}

.nav a {
  color: var(--nav-muted);
  font-weight: 500;
  text-decoration: none;
  padding: 6px 2px;
  transition: color .15s;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-active,
.nav a[aria-current] { color: var(--ink); }

.nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
  scroll-margin-top: calc(var(--nav-height) + 8px);
}

main > section h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 8px;
  transition: background .15s, transform .15s;
}

.button:hover { background: #000; transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

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

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero-text p {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  margin: 0 0 32px;
}

.hero-art {
  position: relative;
  background: var(--yellow);
  border-radius: 48px;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  width: 100%;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12%;
}

.hero-art img { width: 78%; height: auto; }

.badges {
  list-style: none;
  margin: 0;
  padding: 0;
}

.badge {
  position: absolute;
  display: grid;
  grid-template-columns: 40px auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: 10px 18px 10px 10px;
}

.badge[hidden] { display: none; }

.badge::before {
  content: "";
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  /* a little 2x2 brick top */
  background:
    radial-gradient(circle, rgba(255, 255, 255, .55) 0 4px, transparent 5px) 0 0 / 20px 20px,
    var(--green);
}

.badge:nth-child(1) { top: 8%; left: -28px; }
.badge:nth-child(2) { bottom: 10%; right: -28px; }
.badge:nth-child(2)::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .55) 0 4px, transparent 5px) 0 0 / 20px 20px,
    var(--red);
}

.badge span { font-size: .8rem; color: var(--muted); line-height: 1.2; }
.badge b { font-size: 1.3rem; font-weight: 600; line-height: 1.2; }

/* ---------- Prices ---------- */

.price-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.price-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border-radius: var(--radius);
  padding: 24px 12px;
  min-height: 130px;
}

.price-tile:nth-child(1) { background: var(--tint-yellow); }
.price-tile:nth-child(2) { background: var(--tint-pink); }
.price-tile:nth-child(3) { background: var(--tint-blue); }
.price-tile:nth-child(4) { background: var(--tint-gray); }

.price-name { font-weight: 500; color: #444; }
.price-value { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.1; }
.price-tile:nth-child(4) .price-value { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }

/* ---------- Flavors ---------- */

#flavor-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

@media (min-width: 560px) {
  #flavor-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  #flavor-grid { grid-template-columns: repeat(3, 1fr); }
}

.flavor-card {
  position: relative;
  min-width: 0;
  padding: 28px 20px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: box-shadow .15s;
}

.flavor-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .07); z-index: 1; }

/* three studs on the card's top edge */
.flavor-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 72px;
  height: 8px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 100%, var(--yellow) 0 7px, transparent 7.5px) 0 0 / 24px 8px repeat-x;
}

.flavor-photo {
  aspect-ratio: 4 / 3;
  background: var(--light-pink);
  border-radius: 8px;
  overflow: hidden;
}

.flavor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flavor-new {
  position: absolute;
  top: 36px;
  right: 28px;
  background: var(--yellow);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 500;
  padding: 4px 12px;
}

.flavor-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 16px 0 6px;
  overflow-wrap: anywhere;
}

.flavor-desc {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.flavor-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#flavors noscript .flavor-message { border: 1px solid var(--line); }

/* ---------- Visit us ---------- */

.visit {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title  button"
    "addr   button"
    "hours  button";
  column-gap: 24px;
  align-items: center;
}

.visit h2 { grid-area: title; }
.visit address { grid-area: addr; }
.visit p { grid-area: hours; }
.visit .button { grid-area: button; justify-self: end; }

.visit::before {
  content: "";
  grid-row: 1 / -1;
  grid-column: 1 / -1;
  align-self: stretch;
  background: var(--tint-yellow);
  border-radius: 24px;
  margin: 0 -24px;
}

.visit > * { position: relative; z-index: 1; }

.visit address {
  font-style: normal;
  font-size: 1.15rem;
  font-weight: 500;
}

.visit p { margin: 8px 0 0; color: #444; }

/* The tinted card needs inner padding: use the grid rows' padding. */
.visit h2 { padding-top: 40px; }
.visit p { padding-bottom: 40px; }

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

.footer {
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  padding: 24px var(--gutter);
}

.footer p { margin: 0; }

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

@media (max-width: 767px) {
  .brand img { width: 84px; height: 84px; margin: 0 0 -4px -6px; }

  .hero { grid-template-columns: 1fr; }

  .hero-art {
    max-width: 340px;
    border-radius: 40px;
  }

  .badge { padding: 8px 14px 8px 8px; column-gap: 10px; grid-template-columns: 32px auto; }
  .badge::before { width: 32px; height: 32px; background-size: 16px 16px, auto; }
  .badge:nth-child(1) { left: -8px; }
  .badge:nth-child(2) { right: -8px; }
  .badge b { font-size: 1.1rem; }

  .price-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .visit {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "addr"
      "hours"
      "button";
  }

  .visit .button { justify-self: start; margin-bottom: 32px; }
  .visit p { padding-bottom: 24px; }
  .visit h2 { padding-top: 32px; }
  .visit::before { margin: 0 -12px; }
}
