/* The Occasional Baker: storefront
   Ink-on-paper, borrowed from the logo: warm paper, hairline ink rules,
   the stadium outline and its four-point sparkles. */

:root {
  --paper: #f2e9e0;
  --paper-2: #e9ded2;
  --card: #fbf7f2;
  --ink: #1c1916;
  --ink-2: #463f38;
  --muted: #74695e;
  --rule-soft: #d8cabb;
  --crust: #9a4a22;
  --sage: #3e6447;
  --focus: #9a4a22;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Jost', 'Avenir Next', 'Segoe UI', sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-pill: 999px;
  --r-card: 22px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type */
.eyebrow,
.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3 { font-weight: 400; letter-spacing: -0.015em; line-height: 1.08; margin: 0; }
h1 em, h2 em { font-style: italic; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34em; }
.small { font-size: 15px; }
.muted { color: var(--muted); }

/* ---------- sparkle (the logo's four-point star) */
.spark { display: inline-block; width: 12px; height: 12px; background: currentColor;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }

/* ---------- header */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark img { width: 58px; height: auto; }
.wordmark span { font-family: var(--sans); font-size: 13px; letter-spacing: 0.26em; text-transform: uppercase; line-height: 1.25; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-family: var(--sans); font-size: 14px; letter-spacing: 0.04em; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .wordmark span { display: none; }
  .nav .hide-sm { display: none; }
}

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border-radius: var(--r-pill); border: 1px solid var(--ink);
  background: var(--ink); color: var(--card);
  font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--card); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- hero */
.hero { padding: clamp(20px, 5vw, 64px) 0 clamp(36px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(48px, 8.4vw, 104px); margin: 18px 0 22px; line-height: .98; }
.hero h1 em { display: block; color: var(--ink-2); }
.hero .lede { margin: 0 0 30px; }
.hero-badge { justify-self: center; width: min(100%, 440px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-actions .note { font-family: var(--sans); font-size: 14px; color: var(--muted); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-badge { order: -1; width: min(72%, 320px); }
}

/* ---------- announcement */
.announce { background: var(--ink); color: var(--card); font-family: var(--sans); font-size: 14px; letter-spacing: .03em; text-align: center; padding: 10px var(--gutter); }

/* ---------- bake-day ticket (stadium outline like the logo) */
.ticket {
  position: relative;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 26px clamp(24px, 6vw, 72px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 36px;
  background: transparent;
}
.ticket::before,
.ticket::after {
  content: ''; position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: var(--ink);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  box-shadow: 0 0 0 6px var(--paper);
}
.ticket::before { top: -7px; }
.ticket::after { bottom: -7px; }
.ticket .when { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; }
.ticket .meta { font-family: var(--sans); font-size: 15px; color: var(--ink-2); display: grid; gap: 2px; }
.ticket .meta strong { color: var(--ink); font-weight: 500; }
.ticket .countdown { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-align: right; }
@media (max-width: 760px) {
  .ticket { border-radius: 34px; grid-template-columns: 1fr; text-align: center; padding: 30px 22px; }
  .ticket .countdown { text-align: center; }
}

.day-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; font-family: var(--sans); font-size: 14px; }
.day-tabs a { text-decoration: none; padding: 8px 16px; border: 1px solid var(--rule-soft); border-radius: var(--r-pill); }
.day-tabs a[aria-current='true'] { border-color: var(--ink); background: var(--ink); color: var(--card); }

/* ---------- menu (printed bakery-menu rows with leaders) */
.section { padding: clamp(44px, 7vw, 88px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(36px, 5vw, 58px); }

.menu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.menu-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 4px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}
.menu-item.no-photo { grid-template-columns: 1fr auto; }
.menu-item .thumb { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; background: var(--paper-2); }
.menu-item .line { display: flex; align-items: baseline; gap: 12px; }
.menu-item h3 { font-size: clamp(23px, 2.4vw, 29px); }
.menu-item h3 a { text-decoration: none; }
.menu-item h3 a:hover { text-decoration: underline; }
.menu-item .leader { flex: 1; border-bottom: 1.5px dotted var(--muted); transform: translateY(-6px); min-width: 24px; }
.menu-item .price { font-family: var(--sans); font-size: 20px; font-variant-numeric: tabular-nums; }
.menu-item .unit { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.menu-item .desc { margin: 0; color: var(--ink-2); max-width: 38em; }
.menu-item .contains { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 8px; }
.menu-item .buy { display: grid; justify-items: end; gap: 8px; padding-top: 4px; min-width: 132px; }
.menu-item.sold-out h3, .menu-item.sold-out .price { color: var(--muted); }
.menu-item.sold-out .price { text-decoration: line-through; }

.left { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.left.low { color: var(--crust); }
.left.out { color: var(--ink); }

@media (max-width: 640px) {
  .menu-item, .menu-item.no-photo { grid-template-columns: 1fr; }
  .menu-item .thumb { width: 100%; height: 200px; }
  .menu-item .buy { justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; min-width: 0; margin-top: 12px; }
}

/* quantity stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: var(--r-pill); height: 44px; }
.stepper button { width: 44px; height: 42px; border: 0; background: none; font-family: var(--sans); font-size: 20px; cursor: pointer; color: var(--ink); border-radius: var(--r-pill); }
.stepper button:hover:not([disabled]) { background: var(--paper-2); }
.stepper button[disabled] { color: var(--rule-soft); cursor: default; }
.stepper input[type='number'] { width: 38px; min-height: 0; height: 40px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: center; font-family: var(--sans); font-size: 17px; font-variant-numeric: tabular-nums; color: var(--ink); -moz-appearance: textfield; }
.stepper:focus-within { box-shadow: 0 0 0 3px rgba(154, 74, 34, .18); }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* sticky order bar */
.order-bar {
  position: sticky; bottom: 14px; z-index: 5; margin-top: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--ink); color: var(--card); border-radius: var(--r-pill);
  padding: 10px 10px 10px 28px; font-family: var(--sans);
  box-shadow: 0 10px 30px -12px rgba(28, 25, 22, .45);
}
.order-bar .sum { font-size: 15px; letter-spacing: .02em; }
.order-bar .sum strong { font-size: 18px; font-weight: 500; margin-left: 6px; }
.order-bar .btn { background: var(--card); color: var(--ink); border-color: var(--card); }
.order-bar .btn:hover { background: #fff; }
.order-bar[hidden] { display: none; }

/* closed state */
.closed-card { border: 1px solid var(--ink); border-radius: var(--r-card); padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.closed-card h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
@media (max-width: 760px) { .closed-card { grid-template-columns: 1fr; } }

/* ---------- how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.steps > div { padding: 26px 28px 8px 0; }
.steps > div + div { border-left: 1px solid var(--rule-soft); padding-left: 28px; }
.steps .n { font-style: italic; font-size: 54px; line-height: 1; color: var(--crust); }
.steps h3 { font-size: 24px; margin: 14px 0 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 17px; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-soft); }
}

/* ---------- about / faq */
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 6vw, 96px); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.faq details { border-top: 1px solid var(--rule-soft); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule-soft); }
.faq summary { cursor: pointer; font-size: 21px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--sans); font-weight: 300; font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

/* ---------- forms */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > span, .field legend { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.field .hint { font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: 0; text-transform: none; }
input[type='text'], input[type='email'], input[type='tel'], input[type='date'], input[type='number'], textarea, select {
  width: 100%; font: inherit; font-family: var(--sans); font-size: 17px; color: var(--ink);
  background: var(--card); border: 1px solid #bfb1a2; border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(154, 74, 34, .18); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.choice { display: grid; gap: 10px; }
.choice label { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; border: 1px solid #bfb1a2; border-radius: 16px; padding: 14px 16px; background: var(--card); cursor: pointer; font-family: var(--sans); font-size: 16px; }
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { margin: 4px 0 0; accent-color: var(--ink); width: 18px; height: 18px; }
.choice small { grid-column: 2; color: var(--muted); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error-box { border: 1px solid var(--crust); color: var(--crust); background: #f7e6dc; border-radius: 14px; padding: 12px 16px; font-family: var(--sans); font-size: 15px; margin-bottom: 18px; }
.ok-box { border: 1px solid var(--sage); color: var(--sage); background: #e3ebe1; border-radius: 14px; padding: 12px 16px; font-family: var(--sans); font-size: 15px; margin-bottom: 18px; }

/* ---------- checkout / order */
.page { padding: clamp(20px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.page h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 12px 0 28px; }
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .two-col > aside { order: -1; } }
.summary { background: var(--card); border: 1px solid var(--ink); border-radius: var(--r-card); padding: 26px; position: sticky; top: 20px; }
.summary h2 { font-size: 26px; margin-bottom: 4px; }
.summary table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 16px; margin: 16px 0 6px; }
.summary td { padding: 9px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.summary td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.summary tr.total td { border-bottom: 0; font-size: 19px; font-weight: 500; padding-top: 14px; }
.summary .where { font-family: var(--sans); font-size: 15px; color: var(--ink-2); display: grid; gap: 4px; margin-top: 10px; }

.status-line { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0 0 30px; font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.status-line li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status-line li + li::before { content: ''; width: clamp(18px, 4vw, 48px); height: 1px; background: var(--rule-soft); margin: 0 10px; }
.status-line li.done { color: var(--ink); }
.status-line li.done .dot { background: var(--ink); }
.status-line .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid currentColor; }

.pay-card { border: 1px solid var(--ink); border-radius: var(--r-card); padding: clamp(22px, 3.5vw, 34px); background: var(--card); margin-bottom: 22px; }
.pay-card h2 { font-size: 30px; margin-bottom: 6px; }
.pay-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; }
.pay-grid .qr { width: 132px; border: 1px solid var(--rule-soft); border-radius: 12px; padding: 8px; background: #fff; }
@media (max-width: 560px) { .pay-grid { grid-template-columns: 1fr; } .pay-grid .qr { display: none; } }
.pay-detail { font-family: var(--sans); font-size: 16px; display: grid; gap: 6px; margin: 12px 0 16px; }
.pay-detail code { font-family: var(--sans); font-weight: 500; background: var(--paper); border-radius: 8px; padding: 2px 8px; }
.copy { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--rule-soft); background: none; border-radius: var(--r-pill); padding: 4px 10px; cursor: pointer; margin-left: 6px; color: var(--ink-2); }
.copy:hover { border-color: var(--ink); color: var(--ink); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 22px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--rule-soft); }

/* ---------- product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 72px); align-items: start; }
.product .photo { border-radius: var(--r-card); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 5; display: grid; place-items: center; }
.product .photo img { width: 100%; height: 100%; object-fit: cover; }
.product .photo .pin { width: 64%; opacity: .9; }
.product h1 { font-size: clamp(40px, 5.6vw, 68px); margin: 12px 0 8px; }
.product .price-big { font-family: var(--sans); font-size: 26px; margin: 8px 0 22px; }
.facts { border-top: 1px solid var(--ink); margin-top: 28px; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); font-size: 17px; }
.facts dt { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.facts dd { margin: 0; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } .facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- notify */
.notify { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.notify input { flex: 1 1 240px; border-radius: var(--r-pill); padding-left: 20px; }

/* ---------- footer */
.site-foot { background: var(--ink); color: var(--paper); padding: clamp(48px, 7vw, 80px) 0 36px; margin-top: clamp(40px, 6vw, 80px); }
.site-foot .wrap { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 36px clamp(28px, 5vw, 64px); }
.site-foot img { width: 200px; }
.site-foot h4 { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 12px; color: #b9ab9c; }
.site-foot p, .site-foot li { font-size: 16px; margin: 0 0 6px; color: #e6dbcf; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot .legal { grid-column: 1 / -1; border-top: 1px solid #3b352f; padding-top: 22px; font-family: var(--sans); font-size: 13px; color: #a89a8b; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }
