/* Le Petit Chalet — site styles (hand-written, no build step). v1.0.0 */

/* ---------- Fonts (self-hosted, latin + latin-ext; CJK uses system fonts) ---------- */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/playfair-display-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/playfair-display-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --cream: #FAF3E7;
  --cream-deep: #F2E6D2;
  --white: #FFFDF8;
  --wood: #6B4423;
  --wood-dark: #4A2E17;
  --ink: #33210F;
  --ink-soft: #6A5643;
  --gold: #D4A24C;
  --gold-soft: #F3DFB4;
  --forest: #2F4F3E;
  --forest-soft: #DDE7E0;
  --crimson: #9B2D20;
  --line: #E6D6BD;

  --cjk-sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-head: "Playfair Display", Georgia, "Times New Roman", var(--cjk-sans), serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, var(--cjk-sans), sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(74, 46, 23, .06), 0 8px 24px rgba(74, 46, 23, .08);
  --shadow-hover: 0 2px 4px rgba(74, 46, 23, .08), 0 14px 36px rgba(74, 46, 23, .14);
  --header-h: 64px;
  --container: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 72px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--cream); color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.lang-zh-tw { line-height: 1.75; letter-spacing: .01em; }
main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wood); text-underline-offset: 3px; }
a:hover { color: var(--wood-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--wood-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-soft); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }
.js .js-hide { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--forest); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn--primary { background: var(--forest); color: #fff; box-shadow: 0 6px 18px rgba(47, 79, 62, .28); }
.btn--primary:hover { background: #243e30; color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--wood); border-color: var(--wood); }
.btn--ghost:hover { background: var(--wood); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 243, 231, .92); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wood-dark); margin-right: auto; min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; }
.brand-name { font: 700 1.2rem/1.1 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a, .linklike {
  white-space: nowrap; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.main-nav a:hover, .linklike:hover { background: var(--cream-deep); color: var(--wood-dark); }
.main-nav a[aria-current="page"] { color: var(--wood-dark); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.lang-switch { display: flex; background: var(--cream-deep); border-radius: 999px; padding: 3px; }
.lang-switch a { white-space: nowrap; padding: 5px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); line-height: 1.3; }
.lang-switch a:hover { color: var(--wood-dark); }
.lang-switch a[aria-current="true"] { background: var(--white); color: var(--wood-dark); box-shadow: 0 1px 3px rgba(74,46,23,.15); }
@media (max-width: 520px) {
  .brand-name { font-size: 1.02rem; }
  .brand img { width: 36px; height: 36px; }
  .main-nav a { padding: 8px; }
  .header-inner { gap: 8px; }
}
@media (max-width: 560px) { body:not(.admin) .main-nav { display: none; } } /* single page for now: brand links to the menu */

/* ---------- Hero ---------- */
.menu-hero {
  position: relative; padding: 48px 0 32px; text-align: center; overflow: hidden;
  background:
    radial-gradient(1200px 300px at 50% -40px, rgba(212, 162, 76, .22), transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream) 100%);
}
.menu-hero::after { /* subtle wood-grain rule */
  content: ""; position: absolute; left: 50%; bottom: 10px; width: 120px; height: 4px; margin-left: -60px;
  border-radius: 4px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.eyebrow { font: 600 .78rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--forest); margin-bottom: .6em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 38em; margin: 0 auto; }

.notice {
  margin: 8px 0 0; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--gold-soft); color: var(--wood-dark); border-left: 4px solid var(--gold);
}

/* ---------- Section titles ---------- */
.section-title { position: relative; display: inline-block; margin-bottom: .35em; }
.section-desc { color: var(--ink-soft); margin: -.1em 0 0; }

/* ---------- Highlights ---------- */
.highlights { padding: 28px 0 8px; }
.highlights-track { position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 78%); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; padding-top: 4px;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.highlights-track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .highlights-track { grid-auto-columns: minmax(260px, 42%); } }
@media (min-width: 1000px) { .highlights-track { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; } }

/* ---------- Toolbar (search / sort / chips) ---------- */
.menu-toolbar {
  position: sticky; top: var(--header-h); z-index: 40; padding: 10px 0 0;
  background: rgba(250, 243, 231, .95); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.menu-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.field { position: relative; display: flex; align-items: center; }
.field--search { flex: 1 1 220px; }
.field--search svg { position: absolute; left: 14px; color: var(--ink-soft); pointer-events: none; }
.field--search input {
  width: 100%; min-height: 44px; padding: 10px 14px 10px 42px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font: inherit;
}
.field--search input:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px rgba(47,79,62,.18); }
.field--sort { gap: 8px; }
.field--sort label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field--sort select {
  min-height: 44px; padding: 8px 36px 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B4423' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none; appearance: none; color: var(--ink); font: inherit; cursor: pointer;
}
.field--sort select:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px rgba(47,79,62,.18); }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 12px; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 15px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line);
  color: var(--wood-dark); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--gold); color: var(--wood-dark); }
.chip.is-active { background: var(--wood); border-color: var(--wood); color: var(--white); }

/* ---------- Menu sections & grid ---------- */
.menu-sections { padding-top: 28px; }
.menu-section { padding: 8px 0 28px; }
.menu-section-head { margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; } }
.grid--compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 560px) { .grid--compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

/* ---------- Card ---------- */
.card { min-width: 0; }
.card-link {
  position: relative; display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .25s, transform .25s;
}
.card-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); color: inherit; }
.card-link:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--cream-deep); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-media img.is-placeholder { object-fit: cover; }
.card-link:hover .card-media img:not(.is-placeholder) { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
@media (min-width: 560px) { .card-body { padding: 14px 18px 18px; } }
.card-title { font-size: 1.02rem; margin: 0 0 .3em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 560px) { .card-title { font-size: 1.12rem; } }
.card-desc { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin: auto 0 0; font: 700 1.05rem/1.2 var(--font-body); color: var(--forest); }
.card--highlight .card-link { border: 2px solid var(--gold-soft); }
.card--compact .card-title { font-size: .98rem; }

.badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.badge { padding: 4px 10px; border-radius: 999px; font: 600 .74rem/1.2 var(--font-body); letter-spacing: .02em; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.badge--featured { background: var(--gold); color: var(--wood-dark); }
.badge--house { background: var(--forest); color: #fff; }
.badges--inline { position: static; margin: 0 0 14px; }
.badges--inline .badge { box-shadow: none; font-size: .8rem; padding: 5px 12px; }

/* ---------- Empty / no results ---------- */
.empty-state { text-align: center; padding: 56px 20px 72px; max-width: 640px; }
.empty-state img { margin: 0 auto 20px; border-radius: var(--radius); opacity: .9; }
.empty-state .order-box { text-align: left; margin-top: 28px; }
.no-results { text-align: center; padding: 32px 0 48px; color: var(--ink-soft); }

/* ---------- Order box & notes ---------- */
.menu-footer-note { padding: 12px 20px 56px; }
.order-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px; border-radius: var(--radius); background: var(--forest); color: #F3F1EA;
  box-shadow: var(--shadow);
}
.order-box p { margin: 0 0 .3em; }
.order-title { font: 700 1.25rem/1.2 var(--font-head); color: #fff; }
.order-box .btn--primary { background: var(--gold); color: var(--wood-dark); box-shadow: none; }
.order-box .btn--primary:hover { background: #E2B464; color: var(--wood-dark); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #9BD3A9; box-shadow: 0 0 0 3px rgba(155,211,169,.25); }
.status--closed .dot { background: #E9A99F; box-shadow: 0 0 0 3px rgba(233,169,159,.25); }
.allergens { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--ink-soft); font-size: .92rem; text-align: center; }

/* ---------- Item page ---------- */
.item-page { padding: 20px 20px 56px; }
.breadcrumb { margin-bottom: 18px; }
.breadcrumb a { font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.item { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .item { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.item-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream-deep); aspect-ratio: 4 / 3; }
.item-media img { width: 100%; height: 100%; object-fit: cover; }
.item-info h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); overflow-wrap: anywhere; }
.item-price { font: 700 1.6rem/1.2 var(--font-body); color: var(--forest); margin-bottom: .8em; }
.item-desc { font-size: 1.05rem; margin-bottom: 1.4em; overflow-wrap: anywhere; }
.item-info .order-box { margin-top: 8px; }
.item-info .allergens { justify-content: flex-start; text-align: left; }
.related { margin-top: 56px; }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 760px; padding: 40px 20px 64px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wood-dark); color: #EADBC4; margin-top: auto; font-size: .95rem; }
.site-footer a { color: #F6E7CC; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-name { font: 700 1.5rem/1.2 var(--font-head); color: #fff; margin-bottom: .3em; }
.footer-tagline { font-style: italic; color: #D8C4A5; }
.footer-title { font: 600 .8rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1em; }
.footer-social { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer address { font-style: normal; margin-bottom: .8em; }
.site-footer p { margin-bottom: .5em; }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px dashed rgba(234,219,196,.22); max-width: 320px; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(234,219,196,.18); font-size: .85rem; color: #CDB797; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: 18px; }
.credit a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; opacity: .85; }
.credit a:hover { opacity: 1; }
.credit img { width: 20px; height: 20px; border-radius: 4px; }

/* ---------- Reveal on scroll (JS adds .reveal only to off-screen elements) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .menu-toolbar, .highlights, .site-footer .credit { display: none; }
  .card-link { box-shadow: none; border: 1px solid #ccc; }
}
