/* Tern Coffee House: Menu and Shop mockup.
   Palette and type follow tern.co.nz and Tern's Bustle brand colours.
   Jost stands in for Futura PT (an Adobe Fonts licence that cannot be self-hosted). */

@font-face { font-family: "Montserrat"; src: url("../assets/fonts/montserrat-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../assets/fonts/jost-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --cream: #fcf4eb;
  --sand: #f4e6d1;
  --olive: #5e6738;
  --olive-deep: #454c28;
  --ink: #353c2e;
  --mustard: #f0b323;
  --mustard-press: #dca20f;
  --rust: #a5522a;
  --on-olive: #fcf4eb;
  --on-olive-soft: rgba(252, 244, 235, 0.88);
  --hairline: rgba(53, 60, 46, 0.16);
  --hairline-olive: rgba(252, 244, 235, 0.26);
  --gutter: clamp(1.5rem, 6vw, 3rem);
  --wrap: 72rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --head: "Montserrat", "Arial Black", system-ui, sans-serif;
  --body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--olive) var(--cream); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.125rem/1.5 var(--body); caret-color: var(--olive); -webkit-font-smoothing: antialiased; }
body.has-order-bar { padding-bottom: 5.25rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--mustard); color: var(--ink); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 2px; }
.on-olive :focus-visible, .band--olive :focus-visible, .site-footer :focus-visible, .nav-open .site-header :focus-visible { outline-color: var(--mustard); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--mustard); color: var(--ink); padding: 0.75rem 1.25rem; z-index: 100; border-radius: 0 0 1rem 0; }
.skip:focus { left: 0; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* type */
h1, h2, h3 { font-family: var(--head); font-weight: 800; text-transform: uppercase; line-height: 1.16; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 8vw, 3.5rem); color: var(--olive); }
h2 { font-size: clamp(1.75rem, 6.4vw, 2.5rem); color: var(--olive); }
h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.02em; }
p { margin: 0; }
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 34rem; text-wrap: pretty; }
.band--olive h2, .band--olive h1 { color: var(--mustard); }

/* buttons: pills, like tern.co.nz */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3rem; padding: 0.8rem 2rem; border: 2px solid transparent; border-radius: 999px; font: 500 1.125rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn--sun { background: var(--mustard); color: var(--ink); }
.btn--sun:hover { background: var(--mustard-press); }
.btn--olive { background: var(--olive); color: var(--cream); }
.btn--olive:hover { background: var(--olive-deep); }
.btn--line { border-color: currentColor; color: inherit; background: transparent; }
.btn--line:hover { background: rgba(94, 103, 56, 0.09); }
.band--olive .btn--line:hover { background: rgba(252, 244, 235, 0.12); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

@media (max-width: 30rem) { .btn { padding-inline: 1.5rem; } }

/* header */
.site-header { position: relative; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem var(--gutter); max-width: var(--wrap); margin-inline: auto; }
.brand img { width: 9.75rem; }
.nav-toggle { width: 3rem; height: 3rem; display: grid; place-content: center; gap: 0.6rem; background: none; border: 0; cursor: pointer; color: var(--olive); }
.nav-toggle span { display: block; width: 2rem; height: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.nav-open .nav-toggle { color: var(--cream); }
.nav-open .nav-toggle span:first-child { transform: translateY(0.4rem) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-0.4rem) rotate(-45deg); }
.site-nav { display: none; }
.nav-open { overflow: hidden; }
.nav-open .site-nav { display: flex; position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 6rem var(--gutter) 3rem; background: var(--olive); }
.nav-open .brand { position: relative; z-index: 2; }
.nav-open .brand img { filter: brightness(0) invert(1) sepia(0.15); }
.site-nav a { font: 800 clamp(1.75rem, 8vw, 2.5rem)/1.3 var(--head); text-transform: uppercase; text-decoration: none; color: var(--cream); }
.site-nav a[aria-current="page"] { color: var(--mustard); }
.site-nav .btn { margin-top: 1.25rem; align-self: flex-start; font: 500 1.125rem/1 var(--body); text-transform: none; color: var(--ink); }
@media (min-width: 62rem) {
  .nav-toggle { display: none; }
  .site-nav, .nav-open .site-nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 2rem; padding: 0; background: none; z-index: auto; }
  .site-nav a:not(.btn) { font: 500 1.125rem/1 var(--body); text-transform: none; color: var(--ink); padding-block: 0.4rem; background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat; transition: background-size 0.3s var(--ease); }
  .site-nav a:not(.btn):hover { background-size: 100% 2px; }
  .site-nav a[aria-current="page"] { color: var(--olive); font-weight: 600; background-size: 100% 2px; background-image: linear-gradient(var(--mustard), var(--mustard)); }
  .site-nav .btn { margin: 0; align-self: center; padding: 0.8rem 1.75rem; }
  .nav-open .brand img { filter: none; }
  .nav-open { overflow: auto; }
}

/* bands: alternate cream and olive like tern.co.nz */
.band { padding-block: clamp(3rem, 9vw, 5.5rem); }
.band--olive { background: var(--olive); color: var(--on-olive); }
.band--sand { background: var(--sand); }
.band--olive .price { color: var(--on-olive); }
.band__head { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.band__head p { color: var(--on-olive-soft); max-width: 34rem; }

/* title */
.page-title { padding-block: clamp(1.5rem, 6vw, 3rem) clamp(1.75rem, 5vw, 3rem); }
.page-title .lede { margin-top: 1rem; }
.hero-photo { margin-left: var(--gutter); }
.hero-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 45%; }
@media (min-width: 62rem) { .hero-photo { margin-inline: auto; max-width: calc(var(--wrap) - 2 * var(--gutter)); } .hero-photo img { aspect-ratio: 21 / 9; } }

/* category chips */
.chips { position: sticky; top: 0; z-index: 40; background: var(--cream); border-bottom: 1px solid var(--hairline); }
.chips__row { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.7rem var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; max-width: var(--wrap); margin-inline: auto; }
.chips__row::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: center; min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0.5rem 1.15rem; border-radius: 999px; background: var(--sand); color: var(--ink); font-weight: 500; text-decoration: none; transition: background-color 0.25s var(--ease), color 0.25s; }
.chip:hover { background: #ecd9bd; }
.chip[aria-current="true"] { background: var(--olive); color: var(--cream); }
[id] { scroll-margin-top: 4.25rem; }

/* menu lists */
.menu-cols { display: grid; gap: clamp(2.5rem, 7vw, 4rem); }
.menu-cols--side .col-left { display: contents; }
.menu-cols--side { gap: 0.75rem; }
@media (min-width: 62rem) { .menu-cols--side { column-gap: 5rem; } }
.menu-cols--side .band__head { margin-bottom: 0; }
@media (min-width: 62rem) { .menu-cols--2 { grid-template-columns: 1fr 1fr; column-gap: 5rem; } .menu-cols--side { grid-template-columns: 0.8fr 1.2fr; column-gap: 5rem; align-items: start; } .menu-cols--side .col-left { display: block; } }
.a-head { order: 1; } .a-list { order: 2; } .a-photo { order: 3; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 1.25rem; padding-block: 0.7rem; }
.menu-list .name { font-weight: 500; font-size: 1.1875rem; }
.menu-list .note { grid-column: 1 / -1; font-size: 1rem; opacity: 0.82; margin-top: 0.05rem; }
.band--olive .menu-list .note { opacity: 1; color: var(--on-olive-soft); }
.price { font-weight: 600; font-size: 1.1875rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--olive); }
.menu-list--split { columns: 1; }
@media (min-width: 62rem) { .menu-list--split { columns: 2; column-gap: 5rem; } .menu-list--split li { break-inside: avoid; } }
.sub { margin-bottom: 0.35rem; color: var(--olive); }
.title2 { font-size: clamp(1.75rem, 6.4vw, 2.5rem); margin-bottom: 1rem; }
.band--olive .sub { color: var(--cream); }
.fine { font-size: 1rem; opacity: 0.85; margin-top: 1rem; max-width: 36rem; }
.side-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; margin-top: 1.75rem; }
@media (min-width: 62rem) { .side-photo { aspect-ratio: 4 / 5; margin-top: 2rem; } }
.blends { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.blends p { font-size: 1.0625rem; }

/* extras */
.extras { margin: 2.75rem 0 0; display: grid; gap: 0; }
.extras h3 { color: var(--cream); font-size: 1.125rem; margin-bottom: 0.75rem; }
.extras dl { display: grid; grid-template-columns: 1fr auto; margin: 0; column-gap: 1.5rem; }
.extras dt, .extras dd { margin: 0; padding-block: 0.55rem; }
.extras dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* to-confirm tags: an honest marker, not decoration */
.tbc { display: inline-block; font: 500 0.875rem/1 var(--body); padding: 0.35rem 0.7rem; border: 1.5px dashed currentColor; border-radius: 999px; color: var(--rust); white-space: nowrap; }
.band--olive .tbc { color: var(--on-olive); }

/* food */
.dish { display: grid; gap: 1.5rem; align-items: start; }
.dish img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 62rem) { .dish { grid-template-columns: 0.9fr 1.1fr; column-gap: 5rem; align-items: center; } }

/* footer */
.site-footer { background: var(--olive); color: var(--on-olive); padding-block: clamp(3rem, 8vw, 4.5rem) 2rem; }
.site-footer .wrap { display: grid; gap: 2.25rem; }
.site-footer img { width: 8rem; }
.site-footer h3 { color: var(--cream); margin-bottom: 0.6rem; font-size: 1rem; }
.site-footer p, .site-footer li { color: var(--on-olive-soft); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer a { text-decoration-color: rgba(252, 244, 235, 0.5); }
.foot-cols { display: grid; gap: 2rem; }
@media (min-width: 46rem) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
.mock-note { border-top: 1px solid var(--hairline-olive); padding-top: 1.25rem; font-size: 0.9375rem; }

/* order bar (phones) */
.order-bar { position: fixed; inset: auto 0 0 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--hairline); }
.order-bar p { font-size: 1rem; line-height: 1.25; }
.order-bar .btn { padding-inline: 1.75rem; }
@media (min-width: 62rem) { .order-bar { display: none; } body.has-order-bar { padding-bottom: 0; } }

/* notes for the owner */
.notes { background: var(--sand); }
.notes summary { cursor: pointer; padding: 1.1rem var(--gutter); max-width: var(--wrap); margin-inline: auto; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary .icon { transition: transform 0.3s var(--ease); }
.notes[open] summary .icon { transform: rotate(45deg); }
.notes ul { margin: 0; padding: 0 var(--gutter) 1.5rem calc(var(--gutter) + 1.25rem); max-width: var(--wrap); margin-inline: auto; display: grid; gap: 0.5rem; }
.notes .wrap { padding-bottom: 1.5rem; }
.notes li { max-width: 44rem; }

/* shop */
.product { display: grid; gap: 1.75rem; align-items: start; }
.product__photo { background: var(--sand); }
.product__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product__body { display: grid; gap: 1.25rem; align-content: start; }
.product__body h3 { font-size: clamp(1.5rem, 5.6vw, 2rem); color: var(--mustard); }
.product__facts { display: grid; gap: 0.15rem; color: var(--on-olive-soft); }
.opt { border: 0; padding: 0; margin: 0; }
.opt legend { font-weight: 600; margin-bottom: 0.6rem; padding: 0; }
.opt__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1.2rem; border-radius: 999px; border: 2px solid var(--hairline-olive); cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.opt label span:hover { border-color: var(--cream); }
.opt input:checked + span { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.opt input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 3px; }
.price-line { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (min-width: 62rem) { .product { grid-template-columns: 0.85fr 1.15fr; column-gap: 5rem; align-items: center; } .product__photo img { aspect-ratio: 1 / 1; } }
.voucher { display: grid; gap: 2rem; align-items: center; }
.voucher img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.field { display: grid; gap: 0.5rem; max-width: 20rem; }
.field label { font-weight: 600; }
.field input { font: 500 1.25rem/1 var(--body); min-height: 3.25rem; padding: 0.6rem 1.25rem; border: 2px solid var(--olive); border-radius: 999px; background: var(--cream); color: var(--ink); width: 100%; font-variant-numeric: tabular-nums; }
.field input::placeholder { color: #666b5c; opacity: 1; }
.field input:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.field .err { color: var(--rust); font-weight: 500; min-height: 1.5rem; }
@media (min-width: 62rem) { .voucher { grid-template-columns: 1.1fr 0.9fr; column-gap: 5rem; } }

/* home */
.split { display: grid; gap: 2rem; align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 62rem) { .split { grid-template-columns: 1fr 1fr; column-gap: 5rem; } .split--flip img { order: -1; } .split img { aspect-ratio: 5 / 4; } }
.visit dl { display: grid; gap: 1.5rem; margin: 0; }
.visit dt { font-weight: 600; color: var(--olive); }
.visit dd { margin: 0.15rem 0 0; }
@media (min-width: 46rem) { .visit dl { grid-template-columns: repeat(3, 1fr); } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 6.25rem; z-index: 90; transform: translate(-50%, 1rem); background: var(--olive-deep); color: var(--cream); padding: 0.85rem 1.5rem; border-radius: 999px; max-width: calc(100vw - 2rem); text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); font-weight: 500; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 62rem) { .toast { bottom: 2rem; } }

/* one authored moment: sections rise into place once. Content is visible by default. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* more beans */
.more { display: grid; gap: 2.5rem; margin-top: clamp(3rem, 8vw, 4.5rem); }
.more article { display: grid; gap: 0.75rem; align-content: start; }
.more img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--sand); }
.more h3 { font-size: 1.25rem; color: var(--mustard); margin-top: 0.5rem; }
.more p { color: var(--on-olive-soft); }
.more .price-line { margin-top: 0.5rem; }
@media (min-width: 46rem) { .more { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
