/* Poppy Seed Bakery · styles.css
   Mobile-first. Breakpoints: 640px (tablet) and 960px (desktop). */

:root {
  --cream: #fcf2e3;
  --cream-light: #fffaf2;
  --ink: #4a2a1a;
  --accent: #b5532b;
  --accent-text: #a84a24; /* accent darkened for text under 24px (WCAG AA) */
  --olive: #5f6650;
  --sand: #d9b99a;
  --sand-dark: #c9a586;

  --font-body: Alegreya, Georgia, serif;
  --font-display: 'Alegreya SC', Alegreya, Georgia, serif;
  --font-script: Caveat, 'Brush Script MT', cursive;
  --font-ui: Figtree, system-ui, sans-serif;

  --gutter: clamp(20px, 6vw, 80px);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page { max-width: 1280px; margin: 0 auto; }

img { max-width: 100%; height: auto; display: block; }
.hero__poppy, .menu-item__image { mix-blend-mode: multiply; }

a { color: var(--accent-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

section { scroll-margin-top: 16px; }

h1, h2, h3, p, ul { margin: 0; }
h2 {
  font: 700 clamp(2rem, 5vw, 3rem) / 1.1 var(--font-display);
  letter-spacing: .06em;
}

.eyebrow {
  font-size: 15px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--olive);
}
.price { color: var(--accent-text); font-style: italic; }

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

.button {
  display: inline-block;
  font: 600 15px / 1 var(--font-ui);
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.button--dark { background: var(--ink); color: var(--cream); }
.button--dark:hover { background: #2f1a10; color: var(--cream); }
.button--accent { background: var(--accent); color: #fffaf2; }
.button--accent:hover { background: var(--accent-text); color: #fffaf2; }
.button--outline { border: 1px solid var(--ink); color: var(--ink); }
.button--outline:hover { background: var(--ink); color: var(--cream); }

/* ---------- Nav ---------- */

.site-header {
  padding: 16px var(--gutter);
  border-bottom: 1px dotted var(--sand);
}
.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.nav__brand {
  font: 700 24px / 1 var(--font-display);
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.nav__links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}
.nav__links a { color: var(--ink); text-decoration: none; font-size: 18px; }
.nav__links a:hover { color: var(--accent-text); }
.nav__cta { display: none; }

@media (min-width: 640px) {
  .site-header { padding: 20px var(--gutter); }
  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
  }
  .nav__links { grid-column: 1; grid-row: 1; justify-content: flex-start; gap: 28px; }
  .nav__brand { grid-column: 2; grid-row: 1; }
  .nav__cta { display: inline-block; grid-column: 3; grid-row: 1; justify-self: end; }
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 48px;
}
.hero__poppy { width: min(400px, 80vw); margin-bottom: 8px; }
.hero__title {
  font: 700 clamp(2.75rem, 11vw, 6.5rem) / 1 var(--font-display);
  letter-spacing: .01em;
  text-wrap: balance;
}
.hero__season {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: min(760px, 100%);
  margin-top: 8px;
}
.hero__season::before,
.hero__season::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: .5;
}
.hero__season span {
  font: 600 clamp(1.75rem, 6vw, 3.75rem) / 1.1 var(--font-script);
  color: var(--accent);
}
@media (max-width: 639px) {
  .hero__season::before,
  .hero__season::after { display: none; }
}
.hero .eyebrow { margin-top: 12px; font-size: 16px; letter-spacing: .34em; }
.hero__lede {
  margin-top: 28px;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  max-width: 620px;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.hero__actions .button { padding: 15px 28px; font-size: 16px; }

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

.menu { padding: 0 var(--gutter); }

.menu-item {
  border-top: 2px dotted var(--sand);
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.menu-item__image { order: -1; width: min(260px, 60vw); }
.menu-item__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  text-align: center;
}
.menu-item__note {
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
}
.menu-item__title + .menu-item__note { margin-top: -12px; }

.cookie-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  text-align: left;
}
.cookie-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cookie-group + .cookie-group { border-top: 2px dotted var(--sand); padding-top: 28px; }
.cookie-group__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 500;
}
.cookie-group__name { font: inherit; }
.cookie-group__leader { flex: 1; border-bottom: 2px dotted var(--sand-dark); }

.flavors {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
}
.flavors--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 32px;
  width: 100%;
}
.flavors--inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 22px;
}
.flavors--inline li:not(:last-child)::after {
  content: "·" / "";
  color: var(--sand-dark);
  margin: 0 12px;
}

@media (min-width: 640px) {
  .cookie-groups { flex-direction: row; gap: 48px; }
  .cookie-group { flex: 1; }
  .cookie-group + .cookie-group {
    border-top: 0;
    padding-top: 0;
    border-left: 2px dotted var(--sand);
    padding-left: 48px;
  }
}

@media (min-width: 960px) {
  .menu-item { display: grid; align-items: center; gap: 40px; }
  .menu-item__image { order: 0; width: 260px; }

  .menu-item--cookies { grid-template-columns: minmax(0, 1fr) 260px; }

  .menu-item--loaves { grid-template-columns: 400px minmax(0, 1fr); gap: 56px; }
  .menu-item--loaves .menu-item__image { width: 400px; }
  .menu-item--loaves .menu-item__body { align-items: flex-start; text-align: left; }

  .menu-item--sourdough { grid-template-columns: minmax(0, 1fr) 260px; }
  .menu-item:last-of-type { padding-bottom: 56px; }
}

@media (min-width: 1200px) {
  /* Empty first cell keeps the sourdough text centred on the page, as in the prototype. */
  .menu-item--sourdough { grid-template-columns: 260px minmax(0, 1fr) 260px; }
  .menu-item--sourdough::before { content: ""; }
}

/* ---------- How to order ---------- */

.order {
  background: var(--cream-light);
  padding: 64px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
}
.order__lede {
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  max-width: 640px;
  margin-top: -24px;
}
.order__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.order__cards li { flex: 1 1 300px; display: flex; }
.order-card {
  flex: 1;
  background: var(--cream);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.order-card:hover { background: #f8e8d2; color: inherit; }
.order-card__title {
  font: 700 26px / 1.2 var(--font-display);
  letter-spacing: .04em;
}
.order-card__detail {
  color: var(--accent-text);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding: 40px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer__rule { display: flex; align-items: center; gap: 20px; width: 100%; }
.footer__rule span:nth-child(odd) { flex: 1; height: 1px; background: var(--sand-dark); }
.footer__rule span:nth-child(2) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.footer__motto {
  font: 500 clamp(26px, 4vw, 34px) / 1.2 var(--font-script);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 18px;
}
.footer__motto span + span::before { content: "·"; margin-right: 18px; }
@media (max-width: 639px) {
  .footer__motto { flex-direction: column; gap: 2px; }
  .footer__motto span + span::before { content: none; }
}
.footer__credit { font-style: italic; font-size: 16px; opacity: .75; }
