/* Dahlia's Bakehouse: a letterpress card. Navy ink on cream, thin lines, italic serif, small mono caps.
   Every colour and font here comes from branding/brand-kit-prompt.md. */

:root {
  --navy: #3D3A5E;      /* primary ink: lines, headings, buttons, bold grounds */
  --cream: #F6F3EC;     /* primary ground; text on navy */
  --olive: #6E6B3E;     /* secondary accent, sparingly */
  --ink: #2E2C47;       /* body text */
  --muted: #6A6880;
  --line: #DDD7C8;
  --card: #FFFDF8;
  --soft-rule: rgba(61, 58, 94, .45);

  --bg: var(--cream);
  --on-navy: var(--cream);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-text: "Source Sans 3", system-ui, sans-serif;

  --measure: 45rem;     /* ~720px */
  --gutter: 16px;
  --section: clamp(3.5rem, 9vw, 6rem);
  --masthead: 3.5rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #B9B5E0; --olive: #C3BF86; --ink: #EEEAE0; --muted: #A9A6BC;
    --line: #3A3852; --card: #25243A; --cream: #1C1B29; --soft-rule: rgba(185, 181, 224, .4);
    --on-navy: #1C1B29;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #B9B5E0; --olive: #C3BF86; --ink: #EEEAE0; --muted: #A9A6BC;
  --line: #3A3852; --card: #25243A; --cream: #1C1B29; --soft-rule: rgba(185, 181, 224, .4);
  --on-navy: #1C1B29;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: calc(var(--masthead) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--navy); color: var(--bg); }

h1, h2, h3, h4 { margin: 0; color: var(--navy); font-family: var(--font-serif); font-weight: 500; line-height: 1.05; text-wrap: balance; }
h2 { font-size: clamp(2.6rem, 9vw, 4rem); font-style: italic; }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--soft-rule); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .6rem 1rem; background: var(--navy); color: var(--bg); border-radius: 2px; }
.skip:focus { top: .6rem; }

/* ---------- The pattern: mono kicker → italic serif → serif sub-line → short rule ---------- */

.kicker {
  margin: 0;
  color: var(--navy);
  font: 500 .74rem/1.6 var(--font-mono);
  letter-spacing: .26em;
  text-transform: uppercase;
}
.sub {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--navy);
  font: 400 clamp(1.25rem, 3.6vw, 1.5rem)/1.35 var(--font-serif);
}
.sub + p { margin: 1rem auto 0; max-width: 34rem; color: var(--muted); }
.rule { width: 4rem; margin: 2rem auto 0; border: 0; border-top: 1px solid var(--navy); }

/* Placeholder mark: every fact still to be supplied carries it. */
.tbc { text-decoration: underline wavy var(--olive) 1px; text-underline-offset: .3em; text-decoration-skip-ink: none; }
.sample-note { margin-top: 1rem; color: var(--olive); font: 500 .7rem/1.6 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }

/* Double-line frame: two thin navy borders, a small gap apart. */
.frame {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.25rem, 7vw, 3.75rem) clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--navy);
  outline: 1px solid var(--navy);
  outline-offset: -7px;
}

/* ---------- Buttons: navy fill or outline, small radius ---------- */

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: .7rem 1.4rem;
  border: 1px solid var(--navy); border-radius: 3px;
  background: var(--navy); color: var(--bg);
  font: 500 .74rem/1.2 var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  transition: background-color .25s, color .25s;
}
.btn:hover { background: transparent; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--bg); }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.masthead-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 60rem; min-height: var(--masthead); margin: 0 auto; padding: .5rem var(--gutter);
}
.wordmark { color: var(--navy); font: italic 500 1.4rem/1 var(--font-serif); text-decoration: none; white-space: nowrap; }
.masthead-row { position: relative; }
/* Simple inline links (allergens page). */
.masthead nav:not(.site-nav) ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.masthead nav:not(.site-nav) a { color: var(--navy); font: 500 .7rem/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase; text-decoration: none; }
.masthead nav:not(.site-nav) a:hover { text-decoration: underline; }

/* Homepage: one menu button that opens a dropdown on the right. */
.menu-btn {
  display: inline-flex; align-items: center; gap: .65rem;
  min-height: 2.5rem; padding: .45rem .8rem;
  border: 1px solid var(--navy); border-radius: 3px;
  background: transparent; color: var(--navy);
  font: 500 .7rem/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--navy); color: var(--bg); }
.menu-icon { width: 1.15rem; height: .8rem; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }
@media (max-width: 26rem) {
  .menu-btn { padding: .45rem .65rem; }
  .menu-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.menu-panel {
  position: absolute; top: calc(100% - .25rem); right: var(--gutter); z-index: 20;
  width: min(17rem, calc(100vw - 2 * var(--gutter)));
  margin: 0; padding: .25rem 0; list-style: none;
  background: var(--card); border: 1px solid var(--navy); border-radius: 3px;
  box-shadow: 0 6px 18px rgba(46, 44, 71, .06);
  text-align: left;
}
.menu-panel li + li { border-top: 1px solid var(--line); }
.menu-panel a {
  display: block; padding: .7rem 1.1rem;
  color: var(--navy); font: 500 1.3rem/1.2 var(--font-serif); text-decoration: none;
}
.menu-panel a:hover { background: var(--bg); text-decoration: underline; text-decoration-thickness: 1px; }
.menu-panel a:focus-visible { outline-offset: -3px; background: var(--bg); }

/* ---------- Hero: big when-and-where type with a dusty-rose dahlia blooming in ---------- */

:root { --rose: #C4A09C; --rose-soft: #EAD9D4; --leaf: #8A8760; --leaf-fill: #BCB89A; --glow: rgba(234, 217, 212, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rose: #A9837F; --rose-soft: #4A3F4A; --leaf: #7F7C55; --leaf-fill: #4E4C3E; --glow: rgba(74, 63, 74, .45); } }
:root[data-theme="dark"] { --rose: #A9837F; --rose-soft: #4A3F4A; --leaf: #7F7C55; --leaf-fill: #4E4C3E; --glow: rgba(74, 63, 74, .45); }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: calc(100svh - var(--masthead));
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 5.5rem);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 70% 60% at 72% 40%, var(--glow), transparent 70%);
}
/* Thin double-line frame, like the shed poster. */
.hero::before {
  content: ""; position: absolute; inset: clamp(.6rem, 1.6vw, 1rem); z-index: 2; pointer-events: none;
  border: 1px solid var(--soft-rule); outline: 1px solid var(--soft-rule); outline-offset: -6px;
}

/* Back layer: a few loose petals drifting slowly with scroll. */
.hero-sprigs { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; translate: 0 calc(var(--sy, 0) * .2px); }
.hero-sprigs use { fill: var(--rose-soft); stroke: var(--navy); stroke-width: .12; opacity: .55; }

/* The dahlia. */
.bloom-wrap {
  position: absolute; z-index: -1;
  right: max(-8vw, -8rem); top: 46%;
  width: min(52rem, 56vw);
  translate: 0 calc(-50% + var(--sy, 0) * .4px);
  rotate: var(--tilt, 0deg);
  transition: rotate .8s ease-out;
}
.bloom { display: block; width: 100%; height: auto; overflow: visible; stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.bloom .head * { vector-effect: non-scaling-stroke; }
/* Stem and leaves draw on, so their stroke is in drawing units (non-scaling strokes break the dash trick). */
.bloom .stem-group { stroke-width: .55; }
.bloom .p1 { fill: var(--rose); }
.bloom .p2 { fill: var(--rose-soft); }
.bloom .eye { fill: var(--leaf); }
.bloom .stem { fill: none; }
.bloom .leaf { fill: var(--leaf-fill); }
.bloom .ring, .bloom .head { transform-box: view-box; transform-origin: 50% 35.7%; } /* flower centre is (0,0) in the viewBox */

.hero-text { position: relative; z-index: 1; width: min(68rem, 100%); margin: 0 auto; padding-inline: clamp(.75rem, 4vw, 3rem); text-align: left; }
.hero-text > * { max-width: 40rem; }
.hero-wordmark { color: var(--navy); font: italic 500 clamp(2.6rem, 7.5vw, 4.75rem)/1 var(--font-serif); letter-spacing: -.01em; }
.hero-wordmark + .hero-kicker { margin-top: .9rem; }
.hero-kicker { margin-top: .35rem; color: var(--olive); }
.hero-day {
  margin: clamp(.75rem, 2vw, 1.25rem) 0 0 -.04em;
  color: var(--navy); font: italic 500 clamp(4.5rem, 16vw, 11rem)/.86 var(--font-serif); letter-spacing: -.02em;
}
.hero-time { margin-top: .35em; color: var(--navy); font: 500 clamp(1.6rem, 4.5vw, 3rem)/1.1 var(--font-serif); }
.hero .rule { margin: clamp(1.25rem, 3vw, 2rem) 0 0; }
.hero-address { display: grid; gap: .2rem; margin-top: clamp(1.25rem, 3vw, 1.75rem); }
.hero-address a { color: var(--navy); font: 500 clamp(1.75rem, 4.5vw, 2.6rem)/1.05 var(--font-serif); text-decoration: none; }
.hero-address a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.hero-address span { color: var(--muted); font: 400 clamp(1.05rem, 2.4vw, 1.25rem)/1.3 var(--font-serif); }
.hero-tag { margin-top: 1rem; color: var(--navy); font: italic 400 clamp(1.3rem, 3vw, 1.6rem)/1.2 var(--font-serif); }
.hero .actions { justify-content: flex-start; margin-top: 1.75rem; }

.status { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.25rem; }
.status::before { content: ""; width: .5rem; height: .5rem; border: 1px solid currentColor; border-radius: 50%; }
.status[data-state="open"]::before { background: var(--olive); border-color: var(--olive); }
.status[data-state="unknown"]::before { display: none; }

/* Phones: the flower sits above the words, cropped off the right edge. */
@media (max-width: 46rem) {
  .hero { align-items: end; padding-top: 72vw; }
  .bloom-wrap { top: -10vw; right: -26vw; width: 88vw; translate: 0 calc(var(--sy, 0) * .4px); }
  .bloom .stem-group { opacity: .4; } /* keeps the words readable where the leaves sit behind them */
}

/* Movement: the dahlia drifts in and blooms ring by ring, then the words rise in. */
@media (prefers-reduced-motion: no-preference) {
  .bloom-wrap > .bloom { animation: drift-in 2.2s cubic-bezier(.2, .7, .2, 1) both, sway 9s ease-in-out 2.4s infinite alternate; transform-origin: 50% 90%; }
  .bloom .draw { stroke-dasharray: 1; animation: draw-on 1.4s cubic-bezier(.4, 0, .2, 1) .1s both; }
  .bloom .leaf { animation: draw-on 1.4s cubic-bezier(.4, 0, .2, 1) .35s both, fill-in 1s ease .9s both; }
  .bloom .ring { animation: bloom-open 1.7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.35s + (5 - var(--i)) * -0.05s + var(--i) * .12s); }
  .rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(1.3s + var(--d) * .1s); }
}
@keyframes drift-in { from { translate: 18% 6%; rotate: 14deg; opacity: 0; } 30% { opacity: 1; } }
@keyframes sway { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
@keyframes draw-on { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fill-in { from { fill-opacity: 0; } }
@keyframes bloom-open { from { transform: scale(.25) rotate(-60deg); opacity: 0; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; translate: 0 20px; } }

/* ---------- On the table: a menu poster ---------- */

.menu { padding: var(--section) 0; border-top: 1px solid var(--line); }
.allergen-link { margin-top: .75rem; }
.allergen-link a { color: var(--navy); font: 500 .74rem/1.6 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }

.menu-group { margin-top: 3rem; }
.menu-group > .kicker { display: flex; align-items: center; gap: 1rem; color: var(--olive); }
.menu-group > .kicker::before, .menu-group > .kicker::after { content: ""; flex: 1; border-top: 1px solid var(--soft-rule); }
.menu-list { margin: 0; padding: 0; list-style: none; }
.menu-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text price" "text qty"; gap: .5rem 1rem; align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.menu-list li:last-child { border-bottom: 0; }
.menu-list h4 { font-size: clamp(1.35rem, 4.2vw, 1.6rem); font-weight: 600; }
.menu-list p { margin-top: .3rem; color: var(--muted); font-size: .98rem; line-height: 1.5; }

.item-text { grid-area: text; min-width: 0; }
.price { grid-area: price; justify-self: end; color: var(--navy); font: 500 .8rem/1.6 var(--font-mono); letter-spacing: .08em; }
.qty { grid-area: qty; justify-self: end; display: inline-flex; align-items: center; border: 1px solid var(--navy); border-radius: 3px; }
.qty button {
  width: 2.5rem; height: 2.5rem; border: 0; background: transparent; color: var(--navy);
  font: 400 1.3rem/1 var(--font-text); cursor: pointer;
}
.qty button:hover { background: var(--line); }
.qty input {
  width: 2.2rem; height: 2.5rem; padding: 0; border: 0; background: transparent;
  color: var(--navy); font: 500 .9rem/1 var(--font-mono); text-align: center; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; border-radius: 2px; }
.item.is-picked .qty input:focus-visible { outline-color: var(--bg); }
.item.is-picked .qty { background: var(--navy); }
.item.is-picked .qty :is(button, input) { color: var(--bg); }
.item.is-picked .qty button:hover { background: transparent; }

.paused-note { max-width: 30rem; margin: 1.5rem auto 0; padding: .9rem 1rem; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); color: var(--navy); font: italic 500 1.2rem/1.4 var(--font-serif); }
.preorders-paused .menu-list li { grid-template-areas: "text price"; }

.allergy-ask { margin-top: 1rem; color: var(--navy); font-weight: 600; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty button:disabled:hover { background: transparent; }

.pantry-list .contains, .menu-list .contains { margin-top: .45rem; color: var(--muted); font: italic 400 .88rem/1.45 var(--font-text); }
.menu-list .contains strong { font-weight: 400; }

.treat-note { max-width: 26rem; margin: 1.5rem auto 0; padding: 1rem 1.25rem 1.1rem; border: 1px solid var(--line); border-top: 2px solid var(--rose, var(--navy)); border-radius: 3px; background: var(--card); }
.treat-note .kicker { color: var(--olive); font-size: .66rem; }
.treat-title { margin-top: .2rem; color: var(--navy); font: italic 500 1.6rem/1.15 var(--font-serif); }
.treat-note p:last-child { margin-top: .35rem; color: var(--ink); font-size: .95rem; }

/* ---------- Pantry ---------- */

.menu-list li.coming { grid-template-areas: "text price"; align-items: baseline; }
.soon { grid-area: price; justify-self: end; color: var(--olive); font: 500 .66rem/1.6 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }

.pantry { padding: var(--section) 0; border-top: 1px solid var(--line); }
.pantry-list { margin-top: 2rem; }

/* ---------- Pre-order ---------- */

.preorder { padding: 0 0 var(--section); }
.cutoff { margin-top: .75rem; color: var(--muted); }
.basket { max-width: 26rem; margin: 2rem auto 0; padding: 0; list-style: none; text-align: left; }
.basket li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.basket li span:last-child { color: var(--navy); font: 500 .85rem/1.6 var(--font-mono); white-space: nowrap; }
.basket-empty { margin-top: 2rem; color: var(--muted); font: italic 400 1.1rem/1.4 var(--font-serif); }

/* ---------- Forms (pre-order) ---------- */

.order-form { display: grid; gap: 1.1rem; max-width: 26rem; margin: 2rem auto 0; text-align: left; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { color: var(--navy); font: 500 .66rem/1.3 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.optional { color: var(--muted); letter-spacing: .1em; text-transform: none; }
.field :is(input, select, textarea) {
  width: 100%; min-height: 2.9rem; padding: .6rem .75rem;
  border: 1px solid var(--soft-rule); border-radius: 3px;
  background: var(--card); color: var(--ink);
  font: 400 1rem/1.4 var(--font-text);
}
.field textarea { resize: vertical; }
.field :is(input, select, textarea):focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.order-form .btn { justify-self: center; margin-top: .5rem; }
.form-help { color: var(--muted); font-size: .9rem; text-align: center; }
.form-help a { color: var(--navy); }
.form-error { color: var(--navy); font-weight: 600; text-align: center; }

/* ---------- Christmas gift boxes ---------- */

.gifts { padding: var(--section) 0; border-top: 1px solid var(--line); }

.gift-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1rem; max-width: 44rem; margin: 2rem auto 0; text-align: left; }
.gift-card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.4rem 1.4rem 1.3rem;
  border: 1px solid var(--line); border-top: 2px solid var(--rose, var(--navy)); border-radius: 3px; background: var(--card);
}
.gift-card h3 { color: var(--navy); font: italic 500 clamp(1.6rem, 4vw, 1.9rem)/1.1 var(--font-serif); }
.gift-price { color: var(--navy); font: 600 clamp(1.9rem, 5vw, 2.3rem)/1.1 var(--font-serif); font-variant-numeric: lining-nums; }
.gift-contents { display: grid; gap: .35rem; margin: .6rem 0 0; padding: .9rem 0 0 1.1rem; border-top: 1px solid var(--line); color: var(--ink); font-size: 1rem; line-height: 1.45; }
.gift-contents li::marker { color: var(--rose, var(--olive)); }
/* Poster on the left, cards on the right (iPad and desktop); poster above the cards on phones. */
.gift-layout { max-width: 44rem; margin: 2rem auto 0; }
.gift-layout .gift-boxes { margin: 0; max-width: none; }
.gift-poster { margin: 0 0 1.25rem; }
.gift-poster img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 28px rgba(43, 41, 68, .14), 0 2px 6px rgba(43, 41, 68, .08); }
@media (min-width: 46rem) {
  .gift-layout.has-poster { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 1.5rem; align-items: center; max-width: 62rem; }
  .gift-layout.has-poster .gift-poster { margin: 0; }
  .gift-layout.has-poster .gift-boxes { grid-template-columns: 1fr 1fr; gap: .9rem; }
  .gift-layout.has-poster .gift-card { padding: 1.15rem 1.1rem 1.1rem; }
}
/* With the poster, the gift box frame widens on bigger screens so the poster can be a good size. */
@media (min-width: 64rem) {
  .gifts .frame:has(.gift-layout.has-poster) { max-width: 64rem; }
}
.gift-info { display: grid; gap: 0; max-width: 44rem; margin: 2rem auto 0; text-align: left; }
.gift-info > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .35rem 1.25rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.gift-info > div:last-child { border-bottom: 1px solid var(--line); }
.gift-info dt { padding-top: .2rem; color: var(--olive); font: 500 .66rem/1.5 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.gift-info dd { margin: 0; color: var(--ink); line-height: 1.55; }
.gift-info dd strong { color: var(--navy); font-weight: 600; letter-spacing: .02em; }
.gift-info a { color: var(--navy); }
@media (max-width: 34rem) { .gift-info > div { grid-template-columns: 1fr; } }
.gifts .actions { margin-top: 1.75rem; }

/* ---------- Allergen note ---------- */

.allergen-note { padding: var(--section) 0; border-top: 1px solid var(--line); }
.allergen-body { max-width: 34rem; margin: 1rem auto 0; color: var(--ink); line-height: 1.7; }
.allergen-note .allergen-link { margin-top: 1.25rem; }

/* Pre-order bar: appears once something is picked. */
.basket-bar {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 15;
  display: flex; gap: 1.25rem; align-items: center;
  translate: -50% 0;
  padding: .85rem 1.25rem;
  border-radius: 3px; background: var(--navy); color: var(--bg);
  font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}

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

.about { padding: var(--section) 0; border-top: 1px solid var(--line); }
.about-photo { max-width: 22rem; margin: 0 auto 2.5rem; }
.about-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  padding: 7px; border: 1px solid var(--navy); background: var(--bg);
}
.story { display: grid; gap: 1rem; max-width: 34rem; margin: 1.5rem auto 0; color: var(--ink); font-size: 1.08rem; line-height: 1.7; }
.about-photo figcaption { margin-top: .75rem; color: var(--muted); font: italic 400 1rem/1.4 var(--font-serif); }

/* ---------- Follow ---------- */

.follow { padding: var(--section) 0; border-top: 1px solid var(--line); }
.handle { margin-top: 1.5rem; font: italic 500 clamp(1.7rem, 6vw, 2.4rem)/1.1 var(--font-serif); overflow-wrap: anywhere; }
.handle a { color: var(--navy); }
.follow-links { margin-top: 1rem; }

/* ---------- Find us: the bold navy piece ---------- */

.findus { padding: var(--section) var(--gutter); background: var(--navy); color: var(--on-navy); }
.findus .frame { border-color: var(--on-navy); outline-color: var(--on-navy); }
.findus :is(.kicker, h2, h3, .sub) { color: var(--on-navy); }
.findus h2 { font-size: clamp(3.4rem, 14vw, 6rem); }
.findus .rule { border-color: var(--on-navy); }
.findus a { text-decoration-color: currentColor; }
.findus ::selection { background: var(--on-navy); color: var(--navy); }
.findus :focus-visible { outline-color: var(--on-navy); }
.findus .tbc { text-decoration-color: var(--on-navy); }
.address-big { margin-top: 1.75rem; font: normal 500 clamp(1.5rem, 5vw, 2.1rem)/1.2 var(--font-serif); }
.findus .status[data-state="open"]::before { background: var(--on-navy); border-color: var(--on-navy); }
.findus .btn { background: var(--on-navy); border-color: var(--on-navy); color: var(--navy); }
.findus .btn:hover { background: transparent; color: var(--on-navy); }

.contact { margin-top: 3rem; }
.contact dl { max-width: 26rem; margin: 1rem auto 0; }
.contact dl > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 0; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, var(--on-navy) 35%, transparent);
}
.contact dt { font: 500 .68rem/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase; }
.contact dd { margin: 0; font: 500 1.2rem/1.3 var(--font-serif); text-align: right; overflow-wrap: anywhere; }

/* In dark mode the bold navy pieces become a deep card instead of a light block. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.findus, .a-foot) { --on-navy: #EEEAE0; background: #25243A; }
  :root:not([data-theme="light"]) :is(.findus, .a-foot) .btn:not(.btn-ghost) { color: #1C1B29; }
}
:root[data-theme="dark"] :is(.findus, .a-foot) { --on-navy: #EEEAE0; background: #25243A; }
:root[data-theme="dark"] :is(.findus, .a-foot) .btn:not(.btn-ghost) { color: #1C1B29; }

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

.footer { padding: 3rem 0 3.5rem; }
.footer-mark { color: var(--navy); font: italic 500 1.8rem/1 var(--font-serif); }
.footer .kicker { margin-top: 1.25rem; }
.footer .small { margin-top: .75rem; color: var(--muted); font-size: .85rem; }

/* ---------- Allergens page (allergens/index.html) ---------- */

.a-head { padding: clamp(1.25rem, 4vw, 3rem) var(--gutter) 0; }
.a-head h1 { font-size: clamp(3.2rem, 13vw, 5.5rem); font-style: italic; line-height: .95; margin-top: 1rem; }
.a-updated { margin-top: 1rem; }
.a-intro { margin: 1rem auto 0; max-width: 34rem; color: var(--muted); }
.a-warning {
  max-width: 34rem; margin: 1.75rem auto 0; padding: 1rem 1.25rem;
  border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy);
  color: var(--ink);
}
.a-warning strong { color: var(--navy); }

.a-list { padding: var(--section) 0; }
.a-sample { margin-bottom: 1rem; }
.a-bakes { margin: 0; padding: 0; list-style: none; text-align: left; }
.a-bake { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.a-bake h2 { font-size: clamp(1.45rem, 4.5vw, 1.75rem); font-style: normal; font-weight: 600; }
.a-no { display: block; margin-bottom: .4rem; color: var(--muted); font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
/* Allergens: a quiet line in small italics under each bake. */
.a-bake dl { margin: .4rem 0 0; color: var(--muted); font: italic 400 .95rem/1.5 var(--font-text); }
.a-bake :is(dt, dd) { display: inline; }
.a-bake dt { font: inherit; color: inherit; }
.a-bake dt::after { content: ": "; }
.a-bake dt.a-may-label { color: var(--muted); }
.a-bake dd { margin: 0; }
.a-chips { display: inline; margin: 0; padding: 0; list-style: none; }
.a-chips li { display: inline; }
.a-chips li:not(:last-child)::after { content: ", "; }
.a-none { padding-top: .3rem; color: var(--olive); font-weight: 600; }

.a-section { margin: 2.5rem 0 .25rem; color: var(--navy); font: italic 500 clamp(1.6rem, 5vw, 2rem)/1.1 var(--font-serif); text-align: center; }
.a-box-note { margin-top: .9rem; color: var(--ink); font-size: .95rem; line-height: 1.55; }
.a-box-note strong { color: var(--navy); }
.a-key { max-width: 34rem; margin: 2.5rem auto 0; text-align: left; }
.a-key summary { cursor: pointer; color: var(--navy); font: italic 500 1.4rem/1.3 var(--font-serif); text-align: center; }
.a-key ul { margin: 1rem 0 0; padding-left: 1.2rem; }
.a-key li { padding: .15rem 0; }
.a-key li::marker { color: var(--olive); }

.a-foot { padding: var(--section) var(--gutter); background: var(--navy); color: var(--on-navy); }
.a-foot .frame { border-color: var(--on-navy); outline-color: var(--on-navy); }
.a-foot .kicker, .a-foot-address { color: var(--on-navy); }
.a-foot-address { margin-top: 1rem; font: 500 clamp(1.5rem, 5vw, 2.1rem)/1.2 var(--font-serif); }
.a-foot .btn { background: var(--on-navy); border-color: var(--on-navy); color: var(--navy); }
.a-foot .btn:hover { background: transparent; color: var(--on-navy); }
.a-foot .btn-ghost { background: transparent; color: var(--on-navy); }
.a-foot .btn-ghost:hover { background: var(--on-navy); color: var(--navy); }
.a-foot .tbc { text-decoration-color: var(--on-navy); }
.a-foot :focus-visible { outline-color: var(--on-navy); }

@media print {
  .masthead, .skip, .a-foot .actions { display: none; }
  body { background: #fff; }
}
.basket-bar.is-away { display: none; }

/* ---------- Compact layout: less scrolling, things side by side on wider screens ---------- */

:root { --section: clamp(2.25rem, 5vw, 3.5rem); }
:is(.menu, .pantry, .gifts, .about) > .wrap { max-width: 68rem; }
.menu-group { margin-top: 0; }
.menu-groups { display: flex; flex-wrap: wrap; gap: 1.5rem 1.25rem; margin-top: 2rem; }
.menu-groups > .menu-group { flex: var(--n, 1) 1 15rem; min-width: 0; }
.menu-group > .kicker { margin-bottom: .75rem; }

/* Bakes as cards that sit side by side and wrap onto new rows. */
.menu .menu-list, .pantry-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem;
}
.menu .menu-list li, .pantry-list li {
  grid-template-areas: "text text" "price qty"; align-items: center; align-content: start;
  padding: 1.1rem 1.1rem 1rem; border: 1px solid var(--line); border-radius: 3px; background: var(--card);
}
.menu .menu-list li:last-child, .pantry-list li:last-child { border-bottom: 1px solid var(--line); }
.menu .menu-list li .item-text, .pantry-list li .item-text { padding-bottom: .4rem; }
.menu .menu-list li .price, .pantry-list li .price { justify-self: start; font-size: .95rem; }
.preorders-paused .menu-list li { grid-template-areas: "text text" "price price"; }
.menu-list li.coming { grid-template-areas: "text soon"; align-items: center; padding: .9rem 1.1rem; }
.menu-list li.coming .soon { grid-area: soon; }
.pantry-list { margin-top: 1.5rem; }

/* About: photo beside the story. */
@media (min-width: 52rem) {
  .about-grid { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 3.5rem; align-items: center; text-align: left; }
  .about-grid .about-photo { margin: 0; }
  .about-grid .story { margin-left: 0; max-width: 36rem; }
}
.about-photo { max-width: 18rem; margin-bottom: 2rem; }
.story { gap: .8rem; }

/* Pantry: coming-soon items stay small. */
.pantry-list { align-items: start; }
.menu-list li.coming { grid-template-areas: "text" "soon"; grid-template-columns: 1fr; gap: .35rem; }
.menu-list li.coming .soon { justify-self: start; }

/* Pre-order form: name and note side by side on wider screens. */
@media (min-width: 46rem) {
  .preorder .order-form { max-width: 36rem; grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .preorder .order-form > :is(.form-error, .btn, .form-help) { grid-column: 1 / -1; }
  .preorder .order-form textarea { min-height: 2.9rem; }
}

/* Allergen note and Follow along side by side. */
.duo { border-top: 1px solid var(--line); }
.duo > section { border-top: 0; }
@media (min-width: 52rem) {
  .duo { display: grid; grid-template-columns: 1fr 1fr; max-width: 68rem; margin: 0 auto; }
  .duo > section + section { border-left: 1px solid var(--line); }
}
@media (max-width: 51.99rem) { .duo > section + section { border-top: 1px solid var(--line); } }

/* Phones: coming-soon pantry jars three across; smaller baker photo. */
@media (max-width: 40rem) {
  .pantry-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .pantry-list li.item { grid-column: 1 / -1; }
  .pantry-list li.coming { padding: .75rem .7rem; text-align: center; }
  .pantry-list li.coming h4 { font-size: 1.15rem; }
  .pantry-list li.coming .soon { justify-self: center; font-size: .56rem; letter-spacing: .14em; }
  .about-photo { max-width: 13rem; margin-bottom: 1.5rem; }
}

/* ---------- Swing tags: the cake-dome tag hanging on a thread, swaying gently ---------- */

.menu { position: relative; }
.tag-hang {
  --w: clamp(4.25rem, 8vw, 6.5rem);
  --thread: clamp(1.5rem, 4vw, 3rem);
  --tilt: -4deg;
  position: absolute; z-index: 1; width: var(--w); pointer-events: none;
  padding-top: var(--thread);
  transform-origin: 50% 0; rotate: var(--tilt);
}
/* The thread runs from the top edge down to the tag's hole. */
.tag-hang::before {
  content: ""; position: absolute; top: 0; left: calc(50% - 1.25px);
  width: 2.5px; height: calc(var(--thread) + var(--w) * .1);
  background: var(--rose); border-radius: 1px;
}
.tag-hang img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 6px 6px rgba(43, 41, 68, .18)) drop-shadow(0 1px 1px rgba(43, 41, 68, .2));
}
@media (prefers-reduced-motion: no-preference) {
  .tag-hang { animation: tag-sway 6.5s ease-in-out infinite alternate; }
  .tag-gift { animation-duration: 7.5s; animation-delay: -2s; }
}
@keyframes tag-sway { from { rotate: calc(var(--tilt) - 3deg); } to { rotate: calc(var(--tilt) + 3deg); } }

/* On the table: hangs from the top edge of the section, to the left of the heading. */
.tag-menu { top: 0; left: max(var(--gutter), calc(50% - 30rem)); --tilt: 3deg; }
/* Christmas gift boxes: tied to the top-right corner, like a gift tag. */
.tag-gift { top: -1px; right: clamp(1rem, 6%, 3rem); --w: clamp(4.25rem, 9vw, 7.5rem); --tilt: -6deg; --thread: clamp(1.25rem, 3vw, 2rem); }

.gifts { overflow-x: clip; }
@media (min-width: 40.01rem) { .tag-gift { right: -2.75rem; } }

/* Phones: the tags hang centred above the section heading, so they never cover words. */
@media (max-width: 40rem) {
  .tag-menu, .tag-gift { left: calc(50% - var(--w) / 2); right: auto; --w: 3.6rem; --thread: 1rem; --tilt: 0deg; }
  .menu { padding-top: calc(var(--section) + 5.5rem); }
  .gifts .frame { padding-top: calc(clamp(2.25rem, 7vw, 3.75rem) + 5rem); }
  .tag-gift { top: 0; }
}
