/* Site styles. Colours and fonts: tokens.css. Conventions: ../CONVENTIONS.md */

:root {
  /* Colours and fonts live in tokens.css. These are layout tokens. */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px; --s7: 120px;

  --max: 1240px;
  --margin: 24px;
  --measure: 66ch;
  --radius: 22px;

  /* Motion: colour fades, plus a springy pop for things you can touch */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fade: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
/* The tilted ticker bleeds past the edges on purpose; clip it so the page never scrolls sideways */
main { overflow-x: clip; }

a {
  color: var(--link);
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(48px, 7.4vw, 96px); letter-spacing: -0.04em; line-height: .98; }
h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2.2vw, 26px); }
p { margin: 0 0 var(--s3); }

.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--margin); padding-right: var(--margin); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 72px;
}
.name { color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 23px; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.name .mark { transition: transform 320ms var(--spring); }
.name:hover .mark { transform: rotate(-12deg) scale(1.08); }
.site-header nav { display: flex; gap: var(--s2); }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 16px; font-weight: 600; white-space: nowrap; padding: 6px 12px; border-radius: 999px; }
.site-header nav a:hover { color: var(--ink); background: var(--card); }
.site-header nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand); }
.site-header .right { display: flex; align-items: center; gap: var(--s3); }
.mark { display: block; flex: none; }
.mark .a { fill: var(--brand); }
.mark .i { fill: var(--ink); }
.mark .p { fill: var(--paper); }

/* Sections */
section { padding: var(--s7) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s5); }
.section-head p { margin: 0; }
.section-head .more { font-weight: 600; text-decoration: none; color: var(--accent); white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }
.section-intro { color: var(--muted); max-width: 52ch; margin: calc(-1 * var(--s4)) 0 var(--s5); }
.note { color: var(--muted); font-size: 16px; max-width: 60ch; margin-top: var(--s4); }
/* Bold inside grey copy steps up to full ink */
.lede strong, .drink .desc strong, .section-intro strong, .note strong, .build-step p strong { color: var(--ink); }
.band .lede strong { color: inherit; }

/* Hero */
.hero { padding: var(--s6) 0 var(--s7); }
.hero .label { margin-bottom: var(--s4); color: var(--accent); }
.hero h1 { max-width: 12ch; }
.hero .lede { font-size: clamp(20px, 2.2vw, 24px); color: var(--muted); max-width: 40ch; margin: var(--s4) 0 var(--s5); line-height: 1.45; }
.page-hero { padding-bottom: var(--s6); }
.page-hero h1 { max-width: 16ch; }

.hero-grid { display: grid; grid-template-columns: 6fr 5fr; gap: var(--s5); align-items: center; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

/* Sticker photos: three drinks scattered at angles, straightening up when you point at them */
.stickers { position: relative; aspect-ratio: 1 / 1; max-width: 520px; width: 100%; justify-self: end; }
.sticker {
  position: absolute; width: 58%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); border: 8px solid #fffaf2;
  box-shadow: 0 18px 40px rgba(20, 10, 0, .28);
  transition: transform 360ms var(--spring);
}
.s1 { left: 0; top: 4%; transform: rotate(-8deg); }
.s2 { right: 0; top: 0; transform: rotate(6deg); z-index: 2; }
.s3 { left: 22%; bottom: 0; transform: rotate(-2deg); z-index: 3; }
@media (hover: hover) {
  .stickers:hover .sticker { transform: rotate(0deg) scale(1.02); }
  .stickers:hover .s1 { transform: rotate(-3deg) translate(-4%, -2%); }
  .stickers:hover .s2 { transform: rotate(3deg) translate(4%, -2%); }
}
.badge {
  position: absolute; z-index: 4; right: 2%; bottom: 10%;
  display: grid; place-items: center; text-align: center; width: 116px; height: 116px; border-radius: 50%;
  background: var(--band-mango); color: var(--on-mango);
  font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.05; letter-spacing: -0.01em;
  transform: rotate(12deg); box-shadow: 0 10px 24px rgba(20, 10, 0, .22);
}

/* Status pill: filled in by site.js */
.status { display: inline-flex; align-items: center; gap: 10px; margin: var(--s5) 0 0; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.status strong { color: var(--ink); }
.status .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.is-open .dot { background: #3fbf6b; box-shadow: 0 0 0 4px color-mix(in srgb, #3fbf6b 25%, transparent); }
.where .status { margin: 0 0 var(--s4); }

/* Buttons: one accent fill; quiet is an outline; light and dark sit on coloured bands */
.button {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 600 17px/1 var(--sans); color: var(--on-brand); background: var(--brand); text-decoration: none;
  border: 2px solid var(--brand); border-radius: 999px; padding: 15px 24px; cursor: pointer;
  transition: transform 220ms var(--spring), filter var(--fade) var(--ease), border-color var(--fade) var(--ease), background-color var(--fade) var(--ease);
}
.button:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.06); }
.button:active { transform: scale(.97); }
.button:disabled { opacity: .6; cursor: default; transform: none; }
.button.quiet { background: none; color: var(--ink); border-color: var(--line); }
.button.quiet:hover { border-color: var(--brand); filter: none; }
.button.dark { background: #1d1206; border-color: #1d1206; color: #fff7ec; }
.button.light { background: #fff; border-color: #fff; color: #1d1206; }

/* Ticker: drink names rolling across an orange band. Stops for reduced motion and on hover. */
.ticker { overflow: hidden; background: var(--band-tea); color: var(--on-tea); padding: 14px 0; transform: rotate(-1.2deg); margin: 0 -2%; }
.ticker-track { display: flex; width: max-content; gap: 28px; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.01em; white-space: nowrap; animation: ticker 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker .star { opacity: .55; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Drink cards: photo with a price sticker, then the words */
.drinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.drinks.four { grid-template-columns: repeat(4, 1fr); }
.drink {
  --tone: var(--brand);
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 300ms var(--spring), box-shadow 300ms var(--ease), border-color var(--fade) var(--ease);
}
.drink:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--tone); box-shadow: 0 18px 40px color-mix(in srgb, var(--tone) 28%, transparent); }
.drink:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }
.tone-tea { --tone: var(--band-tea); }
.tone-ube { --tone: var(--band-ube); }
.tone-pink { --tone: var(--band-pink); }
.tone-pea { --tone: var(--band-pea); }
.tone-mango { --tone: var(--band-mango); }
.drink .photo { position: relative; aspect-ratio: 1; overflow: hidden; background: color-mix(in srgb, var(--tone) 20%, var(--card)); }
.drink .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.drink:hover .photo img { transform: scale(1.05); }
.price-tag {
  position: absolute; right: 14px; top: 14px;
  font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em;
  background: #fffaf2; color: #1d1206; padding: 6px 14px; border-radius: 999px; transform: rotate(4deg);
  box-shadow: 0 6px 14px rgba(20, 10, 0, .22);
}
.drink .body { padding: var(--s4); display: flex; flex-direction: column; flex: 1; }
.drink .label { margin-bottom: var(--s2); color: var(--muted); }
.drink .label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); margin-right: 8px; vertical-align: 1px; }
.drink h3 { margin-bottom: var(--s2); }
.drink .desc { color: var(--muted); font-size: 16px; margin-bottom: var(--s3); }
.drink .tags { margin-top: auto; }
/* Drinks without a photo yet get the illustrated cup (clipped to the #cup shape at the top of each page) */
.drink .photo.is-art { display: grid; place-items: center; }
.drink .photo.is-art .cup { width: 44%; height: auto; overflow: visible; }
.cup .glass { fill: none; stroke: var(--ink); stroke-opacity: .22; stroke-width: 2; }
.cup .lid { fill: #fff; fill-opacity: .6; stroke: var(--ink); stroke-opacity: .22; stroke-width: 2; }
.cup .straw { fill: var(--ink); fill-opacity: .82; }
.cup .shine { fill: #fff; opacity: .2; }
.drink.is-soon .photo img { filter: saturate(.85); }
.drink.is-soon .price-tag { background: var(--band-mango); }

.tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* Coloured bands */
.band { position: relative; }
.band .label { color: inherit; opacity: .8; margin-bottom: var(--s3); }
.band h2 { max-width: 16ch; margin-bottom: var(--s4); }
.band .lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.45; max-width: 44ch; margin-bottom: var(--s5); }
.band a:not(.button) { color: inherit; }
.band-tea { background: var(--band-tea); color: var(--on-tea); }
.band-ube { background: var(--band-ube); color: var(--on-ube); }
.band-mango { background: var(--band-mango); color: var(--on-mango); }
.band-pink { background: var(--band-pink); color: var(--on-pink); }
.band-pea { background: var(--band-pea); color: var(--on-pea); }
.band-split { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: center; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.facts li { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: 16px; background: rgba(255, 255, 255, .45); }
.facts strong { font-family: var(--display); font-weight: 600; font-size: 36px; letter-spacing: -0.03em; line-height: 1; min-width: 3.4ch; }

/* The butterfly-pea demo */
.magic-stage { display: grid; place-items: center; }
.magic-cup { width: min(240px, 60vw); height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 20, .3)); }
.magic-cup .glass { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 2.5; }
.magic-cup .lid { fill: #fff; fill-opacity: .22; stroke: #fff; stroke-opacity: .55; stroke-width: 2.5; }
.magic-cup .straw { fill: #fff; fill-opacity: .9; }
.magic-cup .shine { fill: #fff; opacity: .22; }
.magic-cup .jelly rect { fill: #fff; opacity: .55; }
.magic-cup .tea.blue { fill: #1f3fa8; }
.magic-cup .tea.purple { fill: var(--pea-turned); opacity: 0; transform-origin: 50% 0; transform: scaleY(.05); transition: opacity 900ms var(--ease), transform 1100ms var(--ease); }
.magic-stage.is-purple .tea.purple { opacity: 1; transform: scaleY(1); }
.magic-stage.is-purple .magic-cup { animation: wobble 600ms var(--spring); }
@keyframes wobble { 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }

/* Three reasons */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5) var(--s4) var(--s4); }
.points .num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--tone); color: #1d1206; font-family: var(--display); font-weight: 600; font-size: 18px; margin-bottom: var(--s4); }
.points .tone-ube .num, .points .tone-pea .num { color: #fff; }
.points h3 { margin-bottom: var(--s3); }
.points p { color: var(--muted); margin: 0; }

/* Where: schedule and map */
.split { display: grid; grid-template-columns: 6fr 5fr; gap: var(--s6); align-items: start; }
.where .section-head { margin-bottom: var(--s4); }
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.stops li {
  display: grid; grid-template-columns: 120px 1fr auto; gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s4); border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  transition: border-color var(--fade) var(--ease);
}
.stops li.is-next { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.stops .when { display: grid; line-height: 1.3; }
.stops .when strong { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.stops .when span { font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; }
.stops .where { display: grid; line-height: 1.35; }
.stops .place { font-weight: 600; }
.stops .detail { color: var(--muted); font-size: 15px; }
.stops .directions { font-size: 15px; font-weight: 600; white-space: nowrap; }

.area-map { margin: 0; position: sticky; top: 96px; }
.area-map svg { display: block; width: 100%; height: auto; }
.area-map .land { fill: var(--card); stroke: var(--line); }
.area-map .lake { fill: #6fb7e8; opacity: .55; }
.area-map .river { fill: none; stroke: #6fb7e8; stroke-width: 4; stroke-linecap: round; opacity: .6; }
.area-map .road { fill: none; stroke: var(--line); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.area-map .road.major { stroke-width: 12; }
.area-map text { font-family: var(--mono); font-size: 13px; fill: var(--muted); text-transform: uppercase; }
.area-map .lake-label { font-size: 12px; }
.area-map .pin circle { fill: color-mix(in srgb, var(--brand) 30%, transparent); }
.area-map .pin .core { fill: var(--brand); stroke: var(--paper); stroke-width: 3; }
.area-map .pin text { font-family: var(--display); font-weight: 600; font-size: 20px; fill: var(--ink); text-transform: none; letter-spacing: -0.01em; }

/* Build your cup */
.build { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin-top: var(--s5); }
.build-step { background: rgba(255, 255, 255, .5); border-radius: var(--radius); padding: var(--s4); }
.build-step .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #1d1206; color: #fff7ec; font-family: var(--display); font-weight: 600; margin-bottom: var(--s3); }
.build-step h3 { margin-bottom: var(--s3); }
.build-step p { font-size: 16px; margin: 0; }
.band .build-step p strong { color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0 0 var(--s3); padding: 0; }
.chips li { font-weight: 600; font-size: 15px; background: #fffaf2; border-radius: 999px; padding: 6px 14px; }
.addons { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.addons li { display: flex; justify-content: space-between; gap: var(--s3); padding: 8px 0; border-bottom: 1px dashed rgba(29, 18, 6, .3); }
.addons li:last-child { border-bottom: 0; }
.addons li span:last-child { font-weight: 600; }

/* Contact */
.contact-cards { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.contact-cards li { display: grid; gap: 4px; padding: var(--s4); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--tone); }
.contact-cards a { font-family: var(--display); font-weight: 600; font-size: clamp(19px, 1.8vw, 23px); letter-spacing: -0.01em; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-cards a:hover { color: var(--accent); }

/* Contact form (contact.js): stacked fields, one accent button, the result announced beside it */
.contact-form { display: grid; gap: var(--s4); align-content: start; }
.contact-form h2, .faq h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: var(--s2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field { display: grid; gap: var(--s2); align-content: start; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0; }
.field legend { margin-bottom: var(--s2); }
.field label .opt { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.field input, .field textarea {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 50px;
  transition: border-color var(--fade) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.was-submitted .field :invalid { border-color: var(--error); }
.event-fields { display: grid; gap: var(--s4); }
.event-fields[hidden] { display: none; }
.chip-group { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 600;
  color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px;
  transition: transform 220ms var(--spring), background-color var(--fade) var(--ease), border-color var(--fade) var(--ease), color var(--fade) var(--ease);
}
.chip:hover span { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); transform: scale(1.04); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.form-status { margin: 0; font-size: 16px; color: var(--muted); }
.form-status.is-ok { color: var(--accent); }
.form-status.is-error { color: var(--error); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: var(--s3); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--accent); transition: transform 240ms var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 var(--s3); max-width: 56ch; }

/* Footer */
.site-footer { padding: var(--s6) 0 var(--s5); color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); }
.site-footer .label { margin-bottom: var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .name { color: var(--ink); text-decoration: none; margin-bottom: var(--s3); }
.site-footer .foot-brand p { max-width: 32ch; }
.site-footer .small { grid-column: 1 / -1; font-size: 13px; margin: 0; }

/* Draft markers: remove before publishing */
.todo {
  background: #fff3bf; color: #5c4400;
  padding: 1px 6px; border-radius: 4px; font-size: 0.85em; font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: 0;
}

/* Colour fades on hover */
a {
  transition: color var(--fade) var(--ease), background-color var(--fade) var(--ease),
    border-color var(--fade) var(--ease), text-decoration-color var(--fade) var(--ease);
}
.mark path, .mark .a, .mark .i { transition: fill var(--fade) var(--ease), stroke var(--fade) var(--ease); }

/* Browsers with View Transitions: whole-page crossfade */
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 240ms; animation-timing-function: ease-out; }

/* Page-to-page: the header stays put while the page underneath fades and lifts slightly. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 140ms ease-out both vt-fade-out; }
::view-transition-new(root) { animation: 280ms var(--ease) 60ms both vt-rise-in; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .ticker-track { flex-wrap: wrap; width: auto; justify-content: center; row-gap: 4px; }
  .ticker-track > :nth-child(n+19) { display: none; }
  .drink:hover, .drink:nth-child(even):hover, .button:hover, .stickers:hover .sticker { transform: none; }
  .stickers:hover .s1 { transform: rotate(-8deg); }
  .stickers:hover .s2 { transform: rotate(6deg); }
  .stickers:hover .s3 { transform: rotate(-2deg); }
}

/* Responsive */
@media (max-width: 1040px) {
  .drinks.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --margin: 16px; --s7: 80px; }
  body { font-size: 17px; }
  .hero-grid, .split, .band-split { grid-template-columns: 1fr; }
  .hero-grid { gap: var(--s6); }
  .stickers { justify-self: center; max-width: 440px; }
  .split, .band-split { gap: var(--s5); }
  .drinks, .points, .build, .contact-cards { grid-template-columns: 1fr; }
  .drinks { max-width: 520px; }
  .area-map { position: static; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .drinks.four { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .stops li { grid-template-columns: 1fr auto; padding: var(--s3); }
  .stops .when { grid-column: 1 / -1; display: flex; gap: var(--s2); align-items: baseline; }
  .stops .when strong { font-size: 18px; }
  .site-header .wrap { gap: var(--s2); }
  .site-header .right { gap: var(--s1); }
  .site-header nav { gap: 2px; }
  .site-header nav a { font-size: 15px; padding: 6px 9px; }
  .badge { width: 92px; height: 92px; font-size: 14px; }
}
@media (max-width: 400px) {
  .site-header .name .word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-footer .name .word { position: static; width: auto; height: auto; clip: auto; }
}

/* Site chat (chat.js): launcher bottom right, panel above it; a bottom sheet on phones */
.chat-launcher {
  position: fixed; right: var(--margin); bottom: var(--margin); z-index: 20;
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 600 16px/1 var(--sans); color: var(--on-brand); background: var(--brand);
  border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: filter var(--fade) var(--ease);
}
.chat-launcher:hover { filter: brightness(1.08); }
.chat-launcher:focus-visible, .chat-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.chat-launcher[hidden], .chat-panel[hidden] { display: none; }

.chat-panel {
  position: fixed; right: var(--margin); bottom: var(--margin); z-index: 20;
  width: 380px; max-width: calc(100vw - 2 * var(--margin)); height: min(560px, calc(100vh - 2 * var(--margin) - 72px));
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 48px rgba(20, 20, 30, .14);
  font-size: 16px; line-height: 1.5;
}
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) 20px; border-bottom: 1px solid var(--line); }
.chat-head .label { font-size: 12px; margin-bottom: 2px; }
.chat-head h2 { font-size: 18px; letter-spacing: -0.01em; }
.chat-actions { flex: none; display: flex; align-items: center; gap: var(--s1); margin: -2px -4px 0 0; }
.chat-reset { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: color var(--fade) var(--ease), border-color var(--fade) var(--ease); }
.chat-reset:hover { color: var(--ink); border-color: var(--brand); }
.chat-reset[hidden] { display: none; }
.chat-close { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: color var(--fade) var(--ease); }
.chat-close:hover { color: var(--ink); }

.chat-log { flex: 1; overflow-y: auto; padding: var(--s3) 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chat-msg { max-width: 88%; border-radius: 10px; padding: 10px 14px; }
.chat-msg p { margin: 0; }
.chat-msg p + p { margin-top: var(--s2); }
.chat-msg.from-bot { align-self: flex-start; background: var(--card); }
.chat-msg.from-visitor { align-self: flex-end; background: none; border: 1px solid var(--line); }
.chat-msg.is-typing { color: var(--muted); }
.chat-msg.is-error { color: var(--muted); }
.chat-msg.from-visitor.is-error { opacity: .7; }

.chat-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.chat-suggestions button {
  font: inherit; font-size: 15px; text-align: left; color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  transition: border-color var(--fade) var(--ease), color var(--fade) var(--ease),
    background-color var(--fade) var(--ease), transform var(--fade) var(--ease);
}
/* Hover: accent edge, a faint accent wash and a 2px nudge toward the text; hover-capable pointers only so taps don't stick */
@media (hover: hover) {
  .chat-suggestions button:hover { border-color: var(--brand); background-color: color-mix(in srgb, var(--brand) 9%, transparent); transform: translateX(2px); }
}
.chat-suggestions button:active { transform: translateX(2px) scale(.98); }

.chat-form { display: flex; align-items: flex-end; gap: var(--s2); margin: 0 var(--s3); padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); transition: border-color var(--fade) var(--ease); }
.chat-form:focus-within { border-color: var(--accent); }
.chat-form textarea { flex: 1; min-width: 0; resize: none; font: inherit; color: var(--ink); background: none; border: 0; padding: 6px 0; outline: none; max-height: 120px; }
.chat-form textarea::placeholder { color: var(--muted); }
.chat-send { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-brand); cursor: pointer; transition: filter var(--fade) var(--ease); }
.chat-send:hover { filter: brightness(1.08); }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-note { font-size: 12px; color: var(--muted); margin: var(--s2) 20px 12px; line-height: 1.4; }

/* Open/close (chat.js adds these classes on click only, never on page load).
   The panel grows out of the launcher's corner; the launcher pops back as the panel fades. */
.chat-panel { transform-origin: bottom right; }
.chat-panel.is-entering { animation: chat-in 240ms var(--ease) both; }
.chat-panel.is-leaving { animation: chat-out 180ms cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
.chat-launcher.is-returning { animation: chat-launcher-in 240ms var(--ease) both; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes chat-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes chat-launcher-in { from { opacity: 0; transform: scale(.92); } }
@keyframes chat-sheet-in { from { transform: translateY(100%); } }
@keyframes chat-sheet-out { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  .chat-suggestions button:hover, .chat-suggestions button:active { transform: none; }
}

@media (max-width: 480px) {
  /* Phones: a bottom sheet that slides up and back down */
  .chat-panel.is-entering { animation: chat-sheet-in 300ms var(--ease) both; }
  .chat-panel.is-leaving { animation: chat-sheet-out 220ms cubic-bezier(.4, 0, 1, 1) both; }
  .chat-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat-launcher { padding: 14px; }
  .chat-panel { right: 0; bottom: 0; width: 100%; max-width: none; height: min(85vh, 640px); border-radius: 12px 12px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media print { .chat-launcher, .chat-panel { display: none !important; } }
