/* Cait's Bakes — styles */
:root {
  --cream: #f5f0e6;
  --paper: #fcfaf5;
  --white: #fffdf9;
  --peach: #fbe4ce;
  --ink: #1f1a16;
  --ink-2: #4a4038;
  --muted: #7b6f64;
  --line: #e4d9c7;
  --crust: #a35a23;
  --crust-dark: #83461a;
  --danger-bg: #fce8e4;
  --danger: #8a2c1b;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(31, 26, 22, 0.05), 0 12px 32px -16px rgba(31, 26, 22, 0.22);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--crust); outline-offset: 3px; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.95em 1.6em; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  font: 600 15px/1 var(--sans); letter-spacing: 0.02em; text-decoration: none;
  cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--crust-dark); border-color: var(--crust-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-small { padding: 0.7em 1.2em; font-size: 14px; }
.btn-block { width: 100%; padding: 1.1em; font-size: 16px; }
.btn:disabled { opacity: 0.65; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; margin-top: 14px; font: 600 14px var(--sans); color: var(--crust-dark); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 240, 230, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.site-header.scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.brand span { font-family: var(--script); font-size: 30px; line-height: 1; padding-top: 6px; white-space: nowrap; }
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 48px 0 96px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--crust); margin-bottom: 20px; }
.hero h1 { font-size: clamp(48px, 6.6vw, 88px); line-height: 0.98; }
.hero h1 em { display: block; font-style: italic; font-weight: 500; color: var(--crust-dark); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 36ch; margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero-facts li { display: flex; align-items: center; gap: 9px; }
.hero-facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--crust); }
.hero-media { position: relative; max-width: 480px; justify-self: end; width: 100%; }
.hero-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--radius) var(--radius); box-shadow: var(--shadow); }
.hero-stamp {
  position: absolute; left: -40px; bottom: -40px; width: clamp(120px, 14vw, 168px);
  border-radius: 50%; transform: rotate(-8deg);
  box-shadow: 0 0 0 6px var(--cream), 0 16px 32px -12px rgba(31, 26, 22, 0.4);
}

/* ── Sections ────────────────────────────────────────── */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.script { font-family: var(--script); font-size: 36px; line-height: 1.1; color: var(--crust); }
.section-head h2 { font-size: clamp(42px, 5.2vw, 64px); }
.sub { color: var(--ink-2); margin-top: 16px; }
.noscript { text-align: center; }

/* ── Menu ────────────────────────────────────────────── */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.menu-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.menu-photo { aspect-ratio: 5 / 4; overflow: hidden; background: var(--line); }
.menu-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.menu-card:hover .menu-photo img { transform: scale(1.04); }
.menu-body { padding: 26px 26px 18px; display: flex; flex-direction: column; flex: 1; }
.menu-body h3 { font-size: 31px; }
.menu-body > p { color: var(--ink-2); font-size: 15.5px; margin: 10px 0 20px; }
.options { list-style: none; margin: auto 0 0; padding: 0; border-top: 1px solid var(--line); }
.option { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 0; }
.option + .option { border-top: 1px solid var(--line); }
.option-label { font-weight: 500; font-size: 15.5px; }
.tag { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--crust-dark); background: var(--peach); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.price { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1; }

/* Quantity controls */
.qty { display: flex; justify-content: flex-end; min-width: 108px; }
.add-btn, .stepper { height: 40px; min-width: 108px; border-radius: 999px; font: 600 14px var(--sans); }
.add-btn { padding: 0 18px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.add-btn:hover { background: var(--ink); color: var(--paper); }
.stepper { display: inline-flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: 500 20px/1 var(--sans); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 20px; text-align: center; font-size: 15px; }

/* ── Photo strip ─────────────────────────────────────── */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strip img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* ── How it works ────────────────────────────────────── */
.band { background: var(--peach); padding: 96px 0; }
.band .section-head { margin-bottom: 56px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { text-align: center; padding: 0 12px; }
.step-num { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 600 26px/1 var(--serif); }
.step h3 { font-size: 30px; margin-bottom: 10px; }
.step p { color: var(--ink-2); max-width: 30ch; margin: 0 auto; }

/* ── Order ───────────────────────────────────────────── */
.panel { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.order-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; max-width: 1080px; margin: 0 auto; }
.order-main { display: grid; gap: 20px; min-width: 0; }
fieldset.panel { border: 0; margin: 0; min-width: 0; }
legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px; font: 600 28px/1.1 var(--serif); }
legend + * { clear: both; }
.legend-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 14px/1 var(--sans); }
.hint { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

.order-items { list-style: none; margin: 0; padding: 0; }
.order-group { padding: 14px 0; }
.order-group + .order-group { border-top: 1px solid var(--line); }
.order-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; }
.order-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.order-item-name { font-weight: 500; line-height: 1.3; }
.order-item-price { font-size: 14px; color: var(--muted); }
.order-suboptions { list-style: none; margin: 6px 0 0 66px; padding: 0; }
.order-suboptions .option { padding: 8px 0; }
.order-suboptions .price { font-size: 20px; }

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.chips.collapsed .chip.extra { display: none; }
.chip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 4px 9px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--white); cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--ink); }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip:has(input:focus-visible) { outline: 2.5px solid var(--crust); outline-offset: 2px; }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-wd { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.chip-day { font: 600 28px/1.1 var(--serif); }
.chip-mon { font-size: 12px; color: var(--muted); }
.chip:has(input:checked) .chip-mon { color: inherit; opacity: 0.75; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--ink); font: 400 16px/1.4 var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(163, 90, 35, 0.18); }
.field input[aria-invalid='true'] { border-color: var(--danger); }

.summary { position: sticky; top: 92px; }
.summary h3 { font-size: 30px; margin-bottom: 14px; }
.summary-lines { list-style: none; margin: 0; padding: 0; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; border-bottom: 1px dashed var(--line); }
.summary-lines li span:last-child { font-weight: 600; white-space: nowrap; }
.summary-empty { color: var(--muted); font-size: 15px; padding: 6px 0 10px; border-bottom: 1px dashed var(--line); }
.summary-pickup { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0 0; font-size: 15px; }
.summary-pickup dd { margin: 0; font-weight: 600; text-align: right; }
.summary-pickup dd.unset { font-weight: 400; color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 20px; padding-top: 16px; border-top: 1.5px solid var(--ink); font-weight: 600; }
.summary-total strong { font: 600 36px/1 var(--serif); }
.form-error { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; margin-bottom: 14px; }
.secure { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.secure svg { flex: none; margin-top: 2px; }
.notice { max-width: 1080px; margin: 0 auto 24px; padding: 14px 18px; border-radius: 14px; background: var(--peach); font-size: 15px; }
.closed { max-width: 560px; margin: 0 auto; text-align: center; }
.closed h3 { font-size: 32px; margin-bottom: 10px; }
.closed p { color: var(--ink-2); margin-bottom: 22px; }

/* ── Instagram ───────────────────────────────────────── */
.insta { padding-bottom: 80px; }
.insta-row {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 16px 24px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.insta-item { flex: 0 0 340px; max-width: calc(100vw - 40px); scroll-snap-align: center; }
.insta-item:first-child { margin-left: auto; }
.insta-item:last-child { margin-right: auto; }
.insta-row .instagram-media {
  margin: 0 !important; width: 100% !important; max-width: none !important;
  background: var(--paper) !important; border: 0 !important; border-radius: 16px !important;
  box-shadow: var(--shadow) !important;
}
blockquote.instagram-media { min-height: 420px; display: grid; place-items: center; padding: 24px; text-align: center; }
blockquote.instagram-media a { font-weight: 600; color: var(--crust-dark); }
.insta-cta { display: flex; justify-content: center; margin-top: 20px; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #e9e1d3; padding: 64px 0 32px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.footer-logo { width: 96px; height: 96px; border-radius: 50%; }
.footer-name { font-family: var(--script); font-size: 44px; line-height: 1; color: var(--paper); margin-bottom: 8px; }
.footer-meta { font-size: 14.5px; color: #bfb3a4; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.footer-links a { text-decoration: none; font-weight: 500; font-size: 15px; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; color: #a89c8d; }

/* ── Floating cart bar ───────────────────────────────── */
.cart-bar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  width: min(100% - 24px, 460px); display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--ink); color: var(--paper);
  box-shadow: 0 14px 32px -10px rgba(31, 26, 22, 0.55);
  transform: translate(-50%, 160%); visibility: hidden;
  transition: transform 0.35s ease, visibility 0s linear 0.35s;
}
.cart-bar.show { transform: translate(-50%, 0); visibility: visible; transition: transform 0.35s ease; }
.cart-bar-text { font-size: 15px; }
.cart-bar .btn { margin-left: auto; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cart-bar .btn:hover { background: var(--peach); border-color: var(--peach); }

/* ── Success page ────────────────────────────────────── */
.success-main { min-height: calc(100vh - 68px); padding: 56px 0 96px; }
.success-card { max-width: 560px; margin: 0 auto; text-align: center; }
.success-card .success-logo { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 20px; box-shadow: 0 0 0 1px var(--line); }
.success-card h1 { font-size: clamp(40px, 7vw, 56px); margin: 4px 0 12px; }
.success-card .lede { margin: 0 auto 28px; }
.success-details { text-align: left; margin: 0 0 24px; }
.pickup-callout { background: var(--peach); border-radius: 16px; padding: 18px 20px; margin-bottom: 20px; text-align: center; }
.pickup-callout span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--crust-dark); }
.pickup-callout strong { font: 600 30px/1.2 var(--serif); }
.next-steps { text-align: left; color: var(--ink-2); font-size: 15.5px; padding-left: 20px; margin: 0 0 28px; }
.next-steps li + li { margin-top: 8px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1000px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .order-form { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 860px) {
  .hero { padding: 28px 0 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-media { justify-self: center; max-width: 420px; width: calc(100% - 24px); }
  .hero-stamp { left: -16px; bottom: -28px; width: 120px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .section, .band { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .menu-grid { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 22px 18px; }
  .fields { grid-template-columns: 1fr; }
  .lede { font-size: 18px; }
  .order-item { grid-template-columns: 44px 1fr auto; gap: 12px; }
  .order-item img { width: 44px; height: 44px; border-radius: 10px; }
  .order-suboptions { margin-left: 0; }
  .qty, .add-btn, .stepper { min-width: 96px; }
}
@media (max-width: 400px) {
  .brand span { font-size: 26px; }
  .option { gap: 10px; }
  .menu-body { padding-inline: 20px; }
  .qty, .add-btn, .stepper { min-width: 88px; }
  .stepper button { width: 34px; }
  .tag { margin-left: 6px; padding: 2px 7px; }
}
@media (max-width: 340px) {
  .option { grid-template-columns: 1fr auto; }
  .option .qty { grid-column: 1 / -1; justify-content: stretch; }
  .option .qty > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
