/* ===== Honeywheel Bakery ===== */
:root {
  --paper:      #fbf5e9;
  --paper-warm: #f4e9d4;
  --paper-deep: #ecdcc0;
  --crust:      #2b1a10;   /* ink */
  --crust-soft: #5c4433;
  --crust-mute: #8a7256;
  --honey:      #cf861f;
  --honey-deep: #b06d12;
  --berry:      #9a3b52;
  --sage:       #6f7a52;
  --line:       #e0cfae;
  --card:       #fffdf8;
  --shadow:     28px 28px 60px -30px rgba(74, 46, 20, .35);

  --f-display: "Fraunces", Georgia, serif;
  --f-body:    "Manrope", system-ui, sans-serif;

  --wrap: 1180px;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--crust);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--honey-deep); }
p { margin: 0; }
a { color: inherit; }

.eyebrow {
  font-family: var(--f-body);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--honey-deep);
  margin-bottom: 18px;
}

.visually-hidden, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto;
  background: var(--crust); color: var(--paper); padding: 10px 16px; border-radius: 10px; z-index: 200;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-body); font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--crust); color: var(--paper); }
.btn-primary:hover { background: var(--honey-deep); transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(176,109,18,.7); }
.btn-ghost { background: transparent; color: var(--crust); border-color: var(--crust); }
.btn-ghost:hover { background: var(--crust); color: var(--paper); transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--honey); outline-offset: 3px;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--crust); }
.brand-mark { color: var(--honey-deep); display: inline-flex; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 25px; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--crust-soft); transition: color .18s; }
.nav a:hover { color: var(--crust); }
.nav-cta { background: var(--honey); color: var(--crust) !important; padding: 9px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--honey-deep); color: var(--paper) !important; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--crust); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-menu a { padding: 13px 4px; text-decoration: none; font-weight: 600; color: var(--crust-soft); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu .nav-cta { margin-top: 12px; text-align: center; border-radius: 999px; color: var(--crust) !important; }

/* ---- Hero ---- */
.hero { padding: 74px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(52px, 8vw, 92px); margin-bottom: 22px; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--crust-soft); max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-note { font-size: 14.5px; color: var(--crust-mute); }
.hero-art { position: relative; }
.hero-art img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 24px; box-shadow: var(--shadow); display: block;
}
.hero-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--berry); color: #fdeef1; border-radius: 18px;
  padding: 16px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 16px 30px -16px rgba(154,59,82,.8);
}
.hero-badge-num { font-family: var(--f-display); font-size: 40px; font-weight: 600; line-height: 1; }
.hero-badge-num span { font-size: 17px; }
.hero-badge-label { font-size: 13px; font-weight: 600; line-height: 1.25; }

/* ---- Marquee ---- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-warm); padding: 16px 0; margin-top: 40px; }
.marquee-track { display: inline-flex; align-items: center; gap: 24px; white-space: nowrap; animation: scroll 40s linear infinite; font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--crust-soft); }
.marquee-track .dot { color: var(--honey); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Sections ---- */
.section { padding: 104px 0; }
.section-head { margin-bottom: 52px; max-width: 640px; }
.section-head.center { margin: 0 auto 52px; text-align: center; }
.section-head h2, .allergen-head h2, .visit-hours h2 { font-size: clamp(34px, 5vw, 52px); }
.section-sub { margin-top: 18px; font-size: 18px; color: var(--crust-soft); }
.section-sub strong { color: var(--crust); }

/* ---- Bakes ---- */
.bakes { background: var(--paper); }
.bake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bake-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.bake-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.bake-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
.bake-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bake-card:hover .bake-media img { transform: scale(1.05); }
.bake-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.bake-body h3 { font-size: 27px; margin-bottom: 10px; }
.bake-body > p { color: var(--crust-soft); font-size: 15.5px; margin-bottom: 18px; }
.bake-list { list-style: none; margin: 0 0 4px; padding: 0; }
.bake-list li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.bake-list li span:last-child { font-weight: 700; color: var(--honey-deep); font-variant-numeric: tabular-nums; }
.bake-order-link { margin-top: 18px; font-weight: 700; text-decoration: none; color: var(--berry); font-size: 15px; transition: color .18s, transform .18s; }
.bake-order-link:hover { color: var(--honey-deep); }

/* ---- Visit ---- */
.visit { background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.visit-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.visit-addr { font-family: var(--f-display); font-size: 22px; margin: 22px 0 8px; line-height: 1.3; }
.visit-contact { margin-bottom: 26px; color: var(--crust-soft); }
.visit-contact a { color: var(--honey-deep); text-decoration: none; font-weight: 600; }
.visit-contact a:hover { text-decoration: underline; }
.hours { width: 100%; border-collapse: collapse; max-width: 420px; }
.hours th, .hours td { text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.hours th { font-weight: 600; color: var(--crust-soft); }
.hours td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hours td.closed { color: var(--berry); }
.visit-tip { margin-top: 22px; font-size: 14.5px; color: var(--crust-mute); font-style: italic; }
.visit-card { display: flex; }
.visit-card-inner {
  background: var(--crust); color: var(--paper); border-radius: var(--r);
  padding: 40px; box-shadow: var(--shadow);
}
.visit-card-inner svg { color: var(--honey); margin-bottom: 20px; }
.visit-card blockquote { margin: 0 0 18px; font-family: var(--f-display); font-size: 24px; font-style: italic; line-height: 1.4; }
.visit-card cite { font-style: normal; font-size: 15px; color: var(--paper-deep); font-weight: 600; }

/* ---- Allergens ---- */
.allergens { background: var(--paper); }
.allergen-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: start; }
.allergen-lede { margin-top: 20px; color: var(--crust-soft); }
.allergen-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.allergen-list li {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--honey);
  border-radius: 12px; padding: 18px 22px;
}
.allergen-list li:nth-child(2) { border-left-color: var(--berry); }
.allergen-list li:nth-child(4) { border-left-color: var(--crust-mute); }
.allergen-list strong { display: block; font-family: var(--f-display); font-size: 18px; margin-bottom: 5px; }
.allergen-list span { color: var(--crust-soft); font-size: 15px; }

/* ---- Chat ---- */
.chat-section { background: var(--paper-warm); border-top: 1px solid var(--line); }
.chat {
  max-width: 780px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  height: min(72vh, 680px);
}
.chat-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.chat-id { display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--crust); color: var(--honey); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-id-text { display: flex; flex-direction: column; line-height: 1.25; }
.chat-id-text strong { font-family: var(--f-display); font-size: 18px; }
.chat-status { font-size: 12.5px; color: var(--crust-mute); display: inline-flex; align-items: center; gap: 6px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); display: inline-block; box-shadow: 0 0 0 0 rgba(111,122,82,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111,122,82,.5); } 70% { box-shadow: 0 0 0 7px rgba(111,122,82,0); } 100% { box-shadow: 0 0 0 0 rgba(111,122,82,0); } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }
.chat-clear { background: none; border: 1px solid var(--line); color: var(--crust-soft); font-family: var(--f-body); font-weight: 600; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .18s; }
.chat-clear:hover { background: var(--crust); color: var(--paper); border-color: var(--crust); }

.chat-thread { flex: 1; overflow-y: auto; padding: 24px 22px 12px; scroll-behavior: smooth; position: relative; }
@media (prefers-reduced-motion: reduce) { .chat-thread { scroll-behavior: auto; } }

/* empty state */
.chat-empty { text-align: center; padding: 22px 8px; }
.chat-empty-mark { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--paper-warm); color: var(--honey-deep); display: flex; align-items: center; justify-content: center; }
.chat-empty h3 { font-size: 25px; margin-bottom: 8px; }
.chat-empty p { color: var(--crust-soft); font-size: 15px; max-width: 40ch; margin: 0 auto 22px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 480px; margin: 0 auto; }
.suggestion { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; font-family: var(--f-body); font-size: 14px; font-weight: 600; color: var(--crust-soft); cursor: pointer; transition: all .18s; }
.suggestion:hover { border-color: var(--honey); color: var(--crust); transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(176,109,18,.6); }
.suggestion span { display: block; font-weight: 400; font-size: 12.5px; color: var(--crust-mute); margin-top: 3px; }

/* messages */
.msg { display: flex; gap: 12px; margin-bottom: 22px; max-width: 100%; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.msg.assistant .msg-avatar { background: var(--crust); color: var(--honey); }
.msg-body { min-width: 0; }
.msg.assistant .msg-body { padding-top: 4px; }
.msg.user { justify-content: flex-end; }
.msg.user .msg-body {
  background: var(--crust); color: var(--paper); padding: 12px 17px;
  border-radius: 18px 18px 4px 18px; max-width: 80%;
}
.msg.user .msg-avatar { display: none; }
.msg-content { font-size: 15.5px; line-height: 1.62; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.assistant .msg-content { color: var(--crust); }
.msg-content p { margin: 0 0 10px; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content ul, .msg-content ol { margin: 8px 0; padding-left: 20px; }
.msg-content li { margin: 3px 0; }
.msg-content strong { font-weight: 700; }
.msg-content a { color: var(--honey-deep); }
.msg-content h3, .msg-content h4 { font-family: var(--f-body); font-weight: 700; font-size: 16px; margin: 12px 0 6px; }
.msg-content code { background: var(--paper-warm); padding: 1px 6px; border-radius: 5px; font-size: .9em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.msg-content pre { background: var(--crust); color: var(--paper); padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 10px 0; font-size: 13.5px; }
.msg-content pre code { background: none; padding: 0; color: inherit; }

/* order confirmation card */
.order-card {
  margin-top: 14px; border: 1.5px solid var(--sage); background: #f4f6ec;
  border-radius: 14px; padding: 18px 20px;
}
.order-card-head { display: flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 600; font-size: 17px; margin-bottom: 12px; color: #3f4a26; }
.order-card-head svg { color: var(--sage); flex-shrink: 0; }
.order-rows { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 14.5px; }
.order-rows dt { color: var(--crust-mute); font-weight: 600; }
.order-rows dd { margin: 0; font-weight: 700; color: var(--crust); }
.order-card-note { margin-top: 13px; font-size: 13px; color: var(--crust-soft); border-top: 1px dashed var(--sage); padding-top: 11px; }

/* typing indicator */
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--crust-mute); animation: bob 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.jump-latest { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; background: var(--crust); color: var(--paper); border: 0; border-radius: 999px; padding: 8px 16px; font-family: var(--f-body); font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); z-index: 5; transition: transform .18s; }
.jump-latest:hover { transform: translateX(-50%) translateY(-2px); }

/* composer */
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 14px 16px 6px; border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea {
  flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 13px 16px; font-family: var(--f-body); font-size: 15.5px; line-height: 1.45;
  background: var(--card); color: var(--crust); max-height: 168px; overflow-y: auto;
  transition: border-color .18s;
}
.composer textarea:focus { outline: none; border-color: var(--honey); }
.composer textarea::placeholder { color: var(--crust-mute); }
.send-btn {
  width: 46px; height: 46px; flex-shrink: 0; border: 0; border-radius: 14px;
  background: var(--crust); color: var(--paper); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s, transform .18s, opacity .18s;
}
.send-btn:hover:not(:disabled) { background: var(--honey-deep); transform: translateY(-1px); }
.send-btn:disabled { opacity: .38; cursor: not-allowed; }
.send-btn.stopping { background: var(--berry); }
.send-btn.stopping:hover { background: var(--berry); }
.composer-hint { max-width: 780px; margin: 0 auto; padding: 4px 18px 2px; font-size: 12px; color: var(--crust-mute); text-align: center; }

/* ---- Footer ---- */
.site-footer { background: var(--crust); color: var(--paper-deep); padding: 66px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: var(--paper); margin-bottom: 16px; }
.footer-brand .brand-mark { color: var(--honey); }
.footer-brand p { color: var(--crust-mute); max-width: 34ch; font-size: 15px; }
.footer-col h4 { font-family: var(--f-body); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--honey); margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; text-decoration: none; color: var(--paper-deep); font-size: 15px; margin-bottom: 10px; transition: color .18s; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; color: var(--crust-mute); }
.footer-colophon { font-family: var(--f-display); font-style: italic; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-menu[data-open] { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { order: -1; }
  .visit-grid, .allergen-grid { grid-template-columns: 1fr; gap: 40px; }
  .bake-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 44px 0 24px; }
  .hero h1 { font-size: clamp(44px, 13vw, 62px); }
  .hero-badge { left: 12px; bottom: -14px; padding: 12px 15px; }
  .hero-badge-num { font-size: 32px; }
  .bake-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .marquee-track { font-size: 18px; }
  .chat { height: min(78vh, 620px); border-radius: 18px; }
  .suggestions { grid-template-columns: 1fr; }
  .msg.user .msg-body { max-width: 88%; }
  .section-head, .section-head.center { margin-bottom: 38px; }
}
