/* D'Knight PWA — page layouts built on dknight.css tokens.
   Layout responds to the .page container (not the viewport), so the same
   markup renders desktop and phone artboards side by side in Figma. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3, h4, p { margin: 0; }

.page { container-type: inline-size; background: var(--surface-100); color: var(--ink); min-height: 100vh; font-family: var(--font-serif); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-6); }
.section { padding: var(--space-8) 0; }
.band { background: var(--surface-200); }
.center { text-align: center; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Type helpers mapped to the design-system type scale */
.t-display { font-family: var(--font-display); font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: 0.02em; }
.t-heading { font-family: var(--font-display); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: 0.02em; }
.t-eyebrow { font-family: var(--font-display); font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.t-lead { font-size: 23px; line-height: 1.45; font-weight: 500; color: var(--ink); }
.t-body { font-size: 19px; line-height: 1.55; font-weight: 500; }
.t-muted { color: var(--ink-muted); }
.t-small { font-size: 16px; line-height: 1.45; }
.t-script { font-family: var(--font-script); font-size: 26px; font-weight: 500; color: var(--accent); }
.sec-head { display: flex; flex-direction: column; gap: var(--space-2); max-width: 640px; margin-bottom: var(--space-6); }
.sec-head.center { margin-left: auto; margin-right: auto; align-items: center; }

/* Header: the storefront sign on espresso */
.site-head { background: var(--espresso); color: var(--sky-cream); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding-top: var(--space-4); padding-bottom: var(--space-4); }
.site-head__logo img { width: 260px; height: auto; border-radius: var(--radius-sm); }
.site-nav { display: flex; align-items: center; gap: var(--space-5); }
.site-nav a { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky-cream); text-decoration: none; padding: var(--space-2) 0; }
.site-nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -1px 0 var(--gold); }
.btn-alerts { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  border: 1px solid var(--gold-deep); color: var(--gold-highlight); background: transparent; font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-7); align-items: center; padding: var(--space-8) 0; }
.hero__copy { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.hero__photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 900 / 530; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero .dk-ribbon { font-size: 34px; margin: var(--space-2) 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Oven status: the PWA's reason to exist */
.oven { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5); align-items: center; background: var(--surface-raised);
  border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); box-shadow: var(--shadow-glow); outline: 1px solid var(--line); outline-offset: -8px; }
.oven__steam { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-200); display: grid; place-items: center; color: var(--ornament); }
.oven__steam .icon { width: 30px; height: 30px; }
.oven__body { display: flex; flex-direction: column; gap: var(--space-1); }
.oven__title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: 0.02em; }
.oven__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 17px; color: var(--ink-muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-deep); margin-right: var(--space-2); vertical-align: middle; }

/* Menu highlights */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.menu-col h3 { margin-bottom: var(--space-3); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-7); }
.gallery figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); background: var(--surface-raised); }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery figcaption { padding: var(--space-3) var(--space-4); font-size: 17px; font-weight: 600; }

/* Split feature (custom orders teaser, about) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ticks li { display: flex; gap: var(--space-3); align-items: baseline; font-size: 19px; }
.ticks li::before { content: "•"; color: var(--ornament); font-family: var(--font-display); }

/* Visit / info cards */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.info { background: var(--surface-raised); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: var(--space-2); }
.info__head { display: flex; align-items: center; gap: var(--space-2); color: var(--ornament); }
.info__head .t-eyebrow { color: var(--accent); }
.info p { font-size: 18px; line-height: 1.5; }
.hours { width: 100%; border-collapse: collapse; font-size: 18px; }
.hours td { padding: var(--space-1) 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr:last-child td { border-bottom: 0; }
.note { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-200); font-size: 18px; color: var(--ink); }
.note .icon { color: var(--focus); margin-top: 3px; }

/* Map placeholder (replaced by a Google Maps embed on the live site) */
.map { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); min-height: 420px; background: #efe3cc; }
.map svg.map__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__pin { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.map__label { background: var(--espresso); color: var(--gold-highlight); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); white-space: nowrap; }
.map__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 3px solid var(--espresso); }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.form-card { background: var(--surface-raised); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-soft); outline: 1px solid var(--line); outline-offset: -8px; }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label, .field legend { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); padding: 0; }
.field .hint { font-size: 16px; color: var(--ink-muted); }
.input { width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-100);
  font-family: var(--font-serif); font-size: 19px; font-weight: 500; color: var(--ink); }
.input::placeholder { color: var(--ink-muted); opacity: 0.8; }
textarea.input { min-height: 120px; resize: vertical; }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
  background: var(--surface-raised); color: var(--ink); font-size: 18px; font-weight: 600; cursor: pointer; }
.choice.is-on { background: var(--action); color: var(--on-action); border-color: var(--action); }
.stepper { align-self: flex-start; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); }
.stepper button { width: 48px; height: 48px; border: 0; background: transparent; font-size: 24px; color: var(--accent); }
.stepper output { min-width: 64px; text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-4); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); }
.steps__n { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.steps strong { display: block; font-size: 19px; }
.steps span { font-size: 17px; color: var(--ink-muted); }
.steps .steps__n { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--accent); }
.order-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-6); align-items: start; }
.aside { display: flex; flex-direction: column; gap: var(--space-5); }

/* Long-form story (About) */
.prose { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-4); }
.prose p { font-size: 21px; line-height: 1.65; }
.pull { text-align: center; padding: var(--space-6) var(--space-5); max-width: 760px; margin: 0 auto; }
.pull p { font-family: var(--font-display); font-size: 26px; line-height: 1.35; font-weight: 600; letter-spacing: 0.02em; }
.pleasures { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.pleasure { text-align: center; padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: var(--space-2); }
.pleasure .glyph { color: var(--ornament); font-family: var(--font-display); font-size: 22px; }
.pleasure p { font-size: 18px; line-height: 1.45; color: var(--ink-muted); }

/* Page title band */
.page-title { padding: var(--space-8) 0 var(--space-7); text-align: center; }
.page-title .wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.page-title .t-lead { max-width: 640px; color: var(--ink-muted); }

/* Footer */
.site-foot { background: var(--night); color: var(--sky-cream); padding: var(--space-7) 0 var(--space-6); }
.site-foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); }
.site-foot img.mark { width: 56px; border-radius: var(--radius-sm); }
.site-foot h4 { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-3); }
.site-foot a, .site-foot p { color: #e8d9b8; font-size: 17px; line-height: 1.7; text-decoration: none; display: block; }
.site-foot .t-script { color: var(--gold); }
.site-foot__base { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid #3a3129; display: flex; justify-content: space-between; gap: var(--space-4); font-size: 15px; color: #b9a684; }

/* Phone tab bar: menu, order, visit and alerts one tap away */
.tabbar { display: none; }

/* ---------- Phone (container ≤ 760px) ---------- */
@container (max-width: 760px) {
  .wrap { padding: 0 var(--space-4); }
  .section { padding: var(--space-7) 0; }
  .t-display { font-size: 34px; }
  .t-heading { font-size: 24px; }
  .t-lead { font-size: 20px; }
  .site-head__inner { justify-content: center; padding-top: var(--space-3); padding-bottom: var(--space-3); }
  .site-head__logo img { width: 240px; }
  .site-nav, .site-head .btn-alerts { display: none; }
  .hero { grid-template-columns: 1fr; gap: var(--space-5); padding: var(--space-5) 0 var(--space-7); }
  .hero__photo { order: -1; aspect-ratio: 4 / 3; }
  .hero__copy { align-items: center; text-align: center; }
  .hero .dk-ribbon { font-size: 28px; }
  .actions { justify-content: center; width: 100%; }
  .actions .dk-btn { flex: 1 1 100%; justify-content: center; }
  .oven { grid-template-columns: auto 1fr; padding: var(--space-5); }
  .oven .dk-btn { grid-column: 1 / -1; justify-content: center; }
  .oven__steam { width: 52px; height: 52px; }
  .dk-moments { grid-template-columns: 1fr; }
  .menu-grid, .split, .order-layout, .row-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .gallery figcaption { font-size: 15px; padding: var(--space-2) var(--space-3); }
  .info-grid { grid-template-columns: 1fr; }
  .pleasures { grid-template-columns: 1fr 1fr; }
  .pull p { font-size: 22px; }
  .prose p { font-size: 20px; }
  .map { min-height: 300px; }
  .form-card { padding: var(--space-5); }
  .page-title { padding: var(--space-7) 0 var(--space-6); }
  .site-foot { padding-bottom: 104px; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; }
  .site-foot__grid > :first-child { grid-column: 1 / -1; }
  .site-foot__base { flex-direction: column; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--espresso);
    padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom)); border-top: 1px solid #3a3129; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; color: #cdb98f; text-decoration: none;
    font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--gold); }
}

/* ---------- Freshly Baked ---------- */
.batches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.batch { background: var(--surface-raised); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.batch--latest { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; box-shadow: var(--shadow-glow); }
.batch__photos { display: grid; gap: 4px; aspect-ratio: 4 / 3; background: var(--surface-200); }
.batch__photos img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.batch__photos.n2 { grid-template-columns: 1fr 1fr; }
.batch__photos.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.batch__photos.n3 img:first-child { grid-row: 1 / 3; }
.batch__photos.n4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); }
.batch__photos.n4 img:first-child { grid-row: 1 / 4; }
.batch--latest .batch__photos { aspect-ratio: auto; min-height: 420px; }
.batch__body { padding: var(--space-5) var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.batch--latest .batch__body { padding: var(--space-6); justify-content: center; }
.batch__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.batch__time { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 17px; font-weight: 600; color: var(--accent); }
.batch__time .icon { width: 18px; height: 18px; }
.batch__title { font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: 0.02em; }
.batch--latest .batch__title { font-size: 32px; }
.batch__desc { font-size: 19px; line-height: 1.55; color: var(--ink); }
.batch__date { font-size: 16px; color: var(--ink-muted); }
.just-out { font-family: var(--font-script); font-size: 26px; color: var(--accent); }
.alert-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-200); margin-bottom: var(--space-6); }
.alert-cta p { display: flex; align-items: center; gap: var(--space-3); font-size: 19px; }
.alert-cta .icon { color: var(--ornament); }
.empty-note { text-align: center; padding: var(--space-6) var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); margin-bottom: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); align-items: center; }

@container (max-width: 760px) {
  .batches { grid-template-columns: 1fr; gap: var(--space-4); }
  .batch--latest { grid-template-columns: 1fr; }
  .batch--latest .batch__photos { min-height: 0; aspect-ratio: 4 / 3; }
  .batch--latest .batch__body { padding: var(--space-5); }
  .batch--latest .batch__title { font-size: 26px; }
  .alert-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .alert-cta .dk-btn { justify-content: center; }
}

/* Form feedback + spam trap */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-200); font-size: 18px; }
.form-status.is-error { outline: 1px solid var(--crust); }
.form-status.is-ok { outline: 1px solid var(--line-strong); }

/* Bottom sheet for install + oven alerts (built by app.js) */
.dk-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.dk-sheet[hidden] { display: none; }
.dk-sheet__scrim { position: absolute; inset: 0; background: rgba(22, 17, 14, 0.55); }
.dk-sheet__panel { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--surface-100); color: var(--ink);
  border-radius: 24px 24px 0 0; padding: var(--space-3) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--space-4);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); font-family: var(--font-serif); }
.dk-sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; }
.dk-sheet .full { width: 100%; justify-content: center; }
.dk-sheet .app-row { display: flex; gap: var(--space-4); align-items: center; }
.dk-sheet .app-row img { width: 64px; height: 64px; border-radius: 16px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 600; cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; transition: background .2s ease-out; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s ease-out; }
.toggle-row input:checked + .toggle { background: var(--espresso); }
.toggle-row input:checked + .toggle::after { left: 23px; background: var(--gold-highlight); }
.toggle-row input:focus-visible + .toggle { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (min-width: 761px) { .dk-sheet { align-items: center; } .dk-sheet__panel { border-radius: 24px; } }
