/* PLNT Cafe menu — C3 Bold Brand Chapters. Mobile first. Colours and type from the PLNT Brand Kit. */

/* Self-hosted brand fonts (SIL Open Font License 1.1; licences in fonts/). Afacad Flux is variable: one file covers 400–700. */
@font-face { font-family: 'Afacad Flux'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/afacad-flux-v4-latin.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: 'Afacad Flux'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/afacad-flux-v4-latin-ext.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: 'La Belle Aurore'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/la-belle-aurore-v23-latin.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: 'La Belle Aurore'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/la-belle-aurore-v23-latin-ext.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; }

:root {
  --white: #FFFFFF;
  --cream: #FFF9F2;
  --brown: #6C3A2B;
  --green: #3E4323;
  --red: #94302E;
  --gold: #F0BE8C;
  --soft-on-dark: #EDE3CF;
  --soft-on-gold: #5A2F22;
  --ink: #2E1E18;
  --line-cream: #EADBCB;

  --ui: 'Afacad Flux', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --script: 'La Belle Aurore', 'Segoe Script', 'Brush Script MT', cursive;

  --head-h: 68px;
  --dock-h: 72px;
  --gutter: 16px;
  --slot-w: 96px;
  --slot-h: 84px;
  --wave: url("assets/wave.svg");
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: calc(var(--dock-h) + 20px + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .price, .icount { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.c-gold :focus-visible, .site-head :focus-visible, .dock :focus-visible, .index :focus-visible { outline-color: var(--brown); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--brown); color: var(--white); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

/* Header: permanent cream bar carrying the approved logo */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--cream);
  padding-top: env(safe-area-inset-top, 0px);
}
.head-in { height: var(--head-h); max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding-inline: 12px var(--gutter); }
.brand { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; }
.logo { display: block; width: 52px; height: 52px; }
.logo-pic { display: block; flex: none; }

/* Chapters */
.chapter { position: relative; padding: 18px 0 30px; }
.chapter + .chapter { padding-top: 22px; }
.chapter + .chapter::before {
  content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 12px;
  background: inherit;
  -webkit-mask: var(--wave) repeat-x 0 0 / 40px 12px; mask: var(--wave) repeat-x 0 0 / 40px 12px;
}
.chapter:last-child { padding-bottom: 40px; min-height: calc(100vh - var(--head-h) - var(--dock-h) - 20px); min-height: calc(100dvh - var(--head-h) - var(--dock-h) - 20px); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }

.c-brown { background: var(--brown); --fg: var(--white); --accent: var(--gold); --soft: var(--soft-on-dark); }
.c-green { background: var(--green); --fg: var(--white); --accent: var(--gold); --soft: var(--soft-on-dark); }
.c-red   { background: var(--red);   --fg: var(--white); --accent: var(--gold); --soft: var(--soft-on-dark); }
.c-gold  { background: var(--gold);  --fg: var(--brown); --accent: var(--brown); --soft: var(--soft-on-gold); }
.chapter { color: var(--fg); }

.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ch-title {
  font-family: var(--script); font-weight: 400; color: var(--accent);
  font-size: clamp(40px, 13vw, 60px); line-height: 1.08; margin-top: 4px;
  text-wrap: balance; overflow-wrap: anywhere;
}
.meta { font-size: 13px; color: var(--soft); margin-top: 2px; }

/* Product rows: transparent cutouts directly on the chapter colour */
.products { display: grid; gap: 4px; margin-top: 10px; }
.product {
  position: relative;
  display: grid; grid-template-columns: var(--slot-w) minmax(0, 1fr) auto;
  align-items: end; gap: 4px 14px; padding: 10px 0;
}
.slot { width: var(--slot-w); height: var(--slot-h); display: flex; align-items: flex-end; justify-content: center; }
.slot picture { display: contents; }
.slot img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.txt { min-width: 0; padding-bottom: 2px; }
.name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.plink { text-decoration: none; }
.plink::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.plink:focus-visible { outline: none; }
.plink:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.desc { font-size: 13.5px; line-height: 1.38; color: var(--soft); margin-top: 3px; }
.tags { font-size: 12.5px; color: var(--accent); margin-top: 4px; letter-spacing: .01em; }
.price { font-size: 18px; font-weight: 600; color: var(--accent); padding-bottom: 2px; white-space: nowrap; }
.product:active .slot img { transform: scale(.97); }
.slot img { transition: transform .18s var(--ease); }
@media (hover: hover) { .product:hover .slot img { transform: translateY(-3px); } }

/* Bottom chapter dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.dock-in {
  pointer-events: auto;
  max-width: 560px; margin: 0 auto; min-height: 60px;
  background: var(--cream); color: var(--brown);
  border-radius: 16px; padding: 10px 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 6px 24px rgba(36, 23, 18, .22);
}
.dock-cur { flex: 1; min-width: 0; }
.dock-cur b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticks { display: flex; gap: 3px; margin-top: 5px; }
.tick { height: 6px; flex: 1; border-radius: 3px; transition: transform .2s var(--ease); }
.tick.on { outline: 2px solid var(--brown); outline-offset: 1px; }
.t-brown { background: var(--brown); } .t-green { background: var(--green); } .t-red { background: var(--red); } .t-gold { background: var(--gold); }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--brown); background: transparent; font-size: 14px; white-space: nowrap; cursor: pointer; }
.pill:active { background: var(--line-cream); }

/* Dialog base */
dialog { padding: 0; border: 0; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(36, 23, 18, .55); }
body.locked { overflow: hidden; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }

/* Chapter index */
.index { width: 100%; height: 100%; margin: 0; background: var(--cream); color: var(--brown); }
.index-head { position: sticky; top: 0; background: var(--cream); display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 8px; }
.index-head h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: var(--soft-on-gold); }
.index-list { padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
.index-list a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line-cream); text-decoration: none; font-size: 19px; }
.index-list .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.index-list .t-gold { box-shadow: inset 0 0 0 1px rgba(108, 58, 43, .35); }
.index-list .iname { flex: 1; }
.index-list .icount { font-size: 14px; color: var(--soft-on-gold); }
.index-list a[aria-current="true"] { font-weight: 600; }

/* Product detail */
.detail { width: 100%; height: 100%; margin: 0; color: var(--fg); overflow-y: auto; overscroll-behavior: contain; }
.detail .d-head { position: sticky; top: 0; z-index: 2; background: var(--cream); color: var(--brown); padding-top: env(safe-area-inset-top, 0px); }
.detail .d-head-in { height: var(--head-h); display: flex; align-items: center; justify-content: space-between; padding-inline: 12px var(--gutter); }
.d-sub { display: flex; justify-content: space-between; align-items: center; padding: 6px var(--gutter) 0; font-size: 14px; color: var(--accent); }
.d-back { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 15px; }
.d-pos { color: var(--soft); font-size: 13px; }
.d-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px var(--gutter) 24px; }
.d-media { width: min(86vw, 420px); height: calc(min(86vw, 420px) * .8); display: flex; align-items: flex-end; justify-content: center; }
.d-media img { min-height: 0; }
.d-media picture { display: contents; }
.d-media img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.d-name { font-size: 30px; font-weight: 600; line-height: 1.1; margin-top: 18px; text-wrap: balance; }
.d-desc { font-size: 16px; color: var(--soft); margin-top: 8px; max-width: 34ch; }
.d-tags { font-size: 14px; color: var(--accent); margin-top: 8px; }
.d-price { font-size: 26px; font-weight: 600; color: var(--accent); margin-top: 12px; }
.d-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); }
.d-nav button { min-height: 52px; background: none; border: 0; border-top: 1px solid color-mix(in srgb, var(--soft) 35%, transparent); color: var(--soft); font-size: 14px; cursor: pointer; padding: 10px 0 0; text-align: start; }
.d-nav button:last-child { text-align: end; }
.d-nav button[hidden] { display: block !important; visibility: hidden; }
.detail.c-gold .d-nav button { border-top-color: rgba(90, 47, 34, .3); }

.detail[open] .d-body { animation: rise .32s var(--ease); }
.index[open] { animation: fade .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Tablet */
@media (min-width: 768px) {
  :root { --gutter: 32px; --slot-w: 128px; --slot-h: 108px; }
  .chapter { padding: 30px 0 46px; }
  .chapter + .chapter { padding-top: 36px; }
  .ch-title { font-size: clamp(56px, 8vw, 84px); }
  .meta { font-size: 14px; }
  .products { grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 10px; margin-top: 18px; }
  .name { font-size: 19px; }
  .desc { font-size: 14.5px; }
  .price { font-size: 19px; }
  .index, .detail { width: min(560px, 92vw); height: auto; max-height: 92vh; margin: auto; border-radius: 22px; }
  .detail .d-head { border-radius: 22px 22px 0 0; }
}

/* Desktop */
@media (min-width: 1100px) {
  :root { --slot-w: 150px; --slot-h: 124px; }
  .chapter .wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 48px; align-items: start; }
  .chapter .ch-title { position: relative; }
  .chapter .kicker, .chapter .ch-title, .chapter .meta { grid-column: 1; }
  .chapter .products { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  .ch-title { font-size: 76px; }
}

/* 404 page */
.nf { padding-bottom: 0; }
.nf-main { min-height: calc(100vh - var(--head-h)); min-height: calc(100dvh - var(--head-h)); padding-top: 40px; }
.nf-link { margin-top: 28px; }
.nf .pill { display: inline-flex; align-items: center; text-decoration: none; color: var(--gold); border-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
