:root {
  /* Palette drawn from the Ellby duck logo */
  --bg: #fcf9f2;        /* logo cream */
  --surface: #fffdf8;
  --tint: #f5ecda;      /* straw hat, light */
  --ink: #463e37;       /* logo lettering, deepened */
  --muted: #776b5f;
  --line: #ebe1cf;
  --accent: #8a6534;    /* toasted caramel (hat shade, deepened for contrast) */
  --accent-ink: #ffffff;
  --accent-soft: #f4e8cc;
  --butter: #f1dba1;    /* duck feet */
  --radius: 20px;
  --shadow: 0 1px 2px rgba(70, 62, 55, .04), 0 8px 24px rgba(70, 62, 55, .07);
  --serif: "Fredoka", "Nunito", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: 0; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 12px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(252, 249, 242, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: block; width: 52px; height: 52px; }
.brand img { width: 52px; height: 52px; }
.links { display: flex; gap: 28px; margin-left: auto; }
.links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--ink); }
.cart-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 10px 8px 16px; font-weight: 600; }
.count { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: .85rem; }

/* Event banner */
.event { background: var(--accent); color: #fff; font-size: .92rem; }
.event-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
.event-tag { background: rgba(255,255,255,.2); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.event a { color: #fff; font-weight: 700; margin-left: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #75552b; }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn.block { width: 100%; }
.grow { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-size: 1.05rem; line-height: 1; flex: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 18px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(460px, 100%); aspect-ratio: 1; }

/* Sections */
.section { padding: 72px 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.section-head p { color: var(--muted); }

/* Menu */
.chips { position: sticky; top: 68px; z-index: 10; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin-bottom: 12px; background: var(--bg); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.chip[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cat-title { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.3rem; margin: 18px 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cat-meta { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted); }
.item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: left; width: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.item:hover { border-color: #e0c9c6; box-shadow: var(--shadow); }
.item-img { width: 72px; height: 96px; border-radius: 14px; object-fit: cover; background: #f6f3ed; }
.sheet-img { width: 96px; height: 128px; border-radius: 16px; object-fit: cover; background: #f6f3ed; flex: none; }
.sheet-desc { font-size: .9rem; margin-top: 6px; }
.item-emoji { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.7rem; }
.item-name { font-weight: 700; }
.item-vn { font-size: .82rem; color: var(--muted); font-style: italic; }
.item-desc { font-size: .9rem; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-side { display: grid; justify-items: end; gap: 8px; }
.item-price { font-weight: 700; }
.add { width: 36px; height: 36px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; }

/* Story */
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.story-body p + p { margin-top: 14px; }
.story-body { color: #4b3d40; font-size: 1.05rem; }
.route { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.route li { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.route li + li::before { content: "→ "; color: var(--accent); }

/* Events */
.events { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.events-photo { margin: 0; }
.events-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.events-copy .lead { margin-top: 14px; max-width: 46ch; }
.services { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 12px; }
.services li { display: grid; gap: 2px; padding: 14px 16px 14px 44px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; }
.services li::before { content: "✓"; position: absolute; left: 16px; top: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--butter); color: var(--ink); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.services strong { font-weight: 700; }
.services span { color: var(--muted); font-size: .95rem; }
.event-form, .event-done { margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 14px; scroll-margin-top: 90px; }
.event-form h3, .event-done h3 { font-size: 1.5rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.event-form label { display: grid; gap: 4px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.event-form input, .event-form select, .event-form textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 16px; color: var(--ink); font-weight: 400; font-family: var(--sans); resize: vertical; }
.event-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.event-form input:focus, .event-form select:focus, .event-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.event-form .btn { justify-self: start; min-width: 200px; }
.event-done a { color: var(--accent); font-weight: 700; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--tint); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.section-head a { color: var(--accent); font-weight: 700; }

/* Menu tags */
.tag { display: inline-block; margin: 0 0 4px; padding: 2px 9px; border-radius: 999px; background: var(--butter); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.tag-new { background: var(--accent); color: #fff; }
.tag + .item-name::before { content: ""; display: block; }

/* Visit */
.visit { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.visit p { margin-top: 10px; }
.info { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.info dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.info dd { margin: 6px 0 0; font-weight: 500; }
.info a { text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Social links */
.info .follow, .info .pickup { grid-column: 1 / -1; }
.info .socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding: 0; border: 0; background: none; border-radius: 0; }
@media (max-width: 520px) { .info .socials { grid-template-columns: 1fr; } }
.social { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.info a.social { text-decoration: none; }
.social:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.social .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; }
.social-ig .ico { background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.social-fb .ico { background: #1877f2; }
.social svg, .footer-social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social svg .dot, .footer-social svg .dot { fill: currentColor; stroke: none; }
.social svg .fill, .footer-social svg .fill { fill: currentColor; stroke: none; }
.social strong { display: block; font-weight: 700; line-height: 1.2; }
.social small { display: block; color: var(--muted); font-size: .85rem; }
.footer-social { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--surface); transition: color .15s ease, border-color .15s ease; }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }

.footer { padding: 28px 0 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); text-align: center; }

/* Floating cart bar (mobile) */
.cart-bar { position: fixed; z-index: 15; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: none; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(42, 31, 34, .25); }

/* Sheets (dialogs) */
.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; color: var(--ink); }
.sheet::backdrop { background: rgba(42, 31, 34, .45); }
.sheet-inner { background: var(--surface); width: min(480px, 100vw); max-height: 88dvh; overflow-y: auto; border-radius: 24px; padding: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sheet-head h3 { font-size: 1.5rem; }
.cart .sheet-inner { width: min(440px, 100vw); }
.sheet[open] .sheet-inner { animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.seg, .tops { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: .92rem; font-weight: 500; }
.opt input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-foot { display: flex; gap: 12px; align-items: center; margin-top: 22px; position: sticky; bottom: -22px; background: var(--surface); padding: 12px 0 2px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper output { min-width: 20px; text-align: center; font-weight: 700; }

.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-name { font-weight: 700; }
.line-opts { grid-column: 1; font-size: .85rem; color: var(--muted); }
.line-price { font-weight: 700; text-align: right; }
.line .stepper { grid-column: 1 / -1; }
.line .icon-btn { width: 34px; height: 34px; }
.empty { padding: 28px 0; text-align: center; }
.checkout { display: grid; gap: 12px; margin-top: 16px; }
.sum { display: flex; justify-content: space-between; color: var(--muted); font-size: .95rem; }
.total { display: flex; justify-content: space-between; font-size: 1.1rem; padding: 4px 0 6px; }
.checkout label { display: grid; gap: 4px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.checkout input, .checkout textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 16px; color: var(--ink); font-weight: 400; resize: vertical; }
.checkout input:focus, .checkout textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fine { font-size: .8rem; text-align: center; }
.pay-choice { margin: 4px 0 0; }
.pay-choice legend { font-size: .85rem; color: var(--muted); }
.pay-choice .opt { flex: 1; }
.pay-choice .opt span { width: 100%; justify-content: center; }
.hint { font-weight: 500; color: var(--accent); }
.done { text-align: center; padding: 18px 0 4px; display: grid; gap: 12px; }
.done h4 { font-family: var(--serif); font-size: 1.4rem; margin: 0; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: .92rem; max-width: calc(100vw - 32px); text-align: center; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .events { grid-template-columns: 1fr; gap: 24px; }
  .events-photo img { aspect-ratio: 4 / 3; }
  .grid3 { grid-template-columns: 1fr; }
  .event-form, .event-done { padding: 22px 18px; border-radius: 22px; margin-top: 28px; }
  .event-form .btn { justify-self: stretch; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .links { display: none; }
  .cart-pill { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 40px; gap: 24px; text-align: center; }
  .hero-text { order: 2; }
  .hero-art img { width: 200px; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .section { padding: 52px 0; }
  .story, .visit { grid-template-columns: 1fr; gap: 20px; }
  .info { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .cart-bar.has-items { display: flex; }
  body.has-items { padding-bottom: 96px; }
  /* Dialogs become bottom sheets */
  .sheet { margin: auto 0 0; width: 100vw; }
  .sheet-inner, .cart .sheet-inner { width: 100vw; border-radius: 24px 24px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet-foot { bottom: calc(-22px - env(safe-area-inset-bottom)); padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (min-width: 821px) and (max-width: 1000px) { .grid3 { grid-template-columns: repeat(2, 1fr); } .gallery { grid-template-columns: repeat(2, 1fr); } }
