/* Roca Bold is the brand font, but it needs a paid webfont licence. If one is bought,
   put the licensed file at assets/fonts/roca-bold.woff2 and it's used automatically.
   Until then the free Fraunces font (soft style) is used. Corben is kept as a backup.
   (The Roca demo copy must never go online.) */
@font-face { font-family: "Roca"; font-weight: 700; font-display: swap;
  src: url("assets/fonts/roca-bold.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600 900; font-display: swap;
  src: url("assets/fonts/fraunces-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: "Fraunces"; font-weight: 600 900; font-display: swap;
  src: url("assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Corben"; font-weight: 700; font-display: swap;
  src: url("assets/fonts/corben-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400 800; font-display: swap;
  src: url("assets/fonts/nunito-latin.woff2") format("woff2"); }

:root {
  /* the three logo colours */
  --cream: #F5EEE2;
  --sage: #899779;
  --blush: #E5C5BD;
  /* darker shades of the same sage, so text is readable */
  --sage-text: #5D6752;
  --sage-dark: #4E5844;
  --line: rgb(137 151 121 / .35);

  --display: "Roca", "Fraunces", "Corben", Georgia, serif;
  --body: "Nunito", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--cream); color: var(--sage-text);
  font: 400 1.0625rem/1.65 var(--body);
}
::selection { background: var(--blush); color: var(--sage-dark); }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; color: var(--sage); margin: 0; line-height: 1.1; text-wrap: balance; }
/* Fraunces "soft" style: rounded corners, closest free match to Roca */
h1, h2, h3, .brand__name, .item__name, .item--lead .item__price { font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144; }
p { margin: 0; }
a { color: var(--sage-dark); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 16px; top: -50px; background: var(--sage-dark); color: var(--cream); padding: .5rem .9rem; border-radius: 6px; z-index: 20; }
.skip:focus { top: 12px; }

/* header */
.top {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { text-decoration: none; display: block; }
.brand__logo { height: 64px; width: auto; }
.brand__name { font: 800 1.25rem/1 var(--display); color: var(--sage); white-space: nowrap; }
.dot { color: var(--blush); }
.top nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-size: .98rem; }
.top nav a { text-decoration: none; color: var(--sage-text); }
.top nav a:hover { color: var(--sage-dark); text-decoration: underline; }

/* buttons */
.btn {
  display: inline-block; font: 700 1rem/1 var(--body); color: #2F3628; text-decoration: none;
  background: var(--blush); border: 0; border-radius: 999px; padding: 1rem 1.6rem; cursor: pointer;
  transition: background-color .2s ease;
}
.btn:hover { background: #DDB6AC; }
.btn:disabled { background: rgb(137 151 121 / .18); color: #5D6752; cursor: not-allowed; }
.btn--full { width: 100%; }
.link { color: var(--sage-dark); font-weight: 600; }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem) var(--gutter) clamp(3rem, 6vw, 4.5rem);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center;
}
.hero h1 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); letter-spacing: -.01em; max-width: 17ch; }
.hero__sub { margin-top: 1.4rem; max-width: 38ch; font-size: 1.1rem; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.2rem; }
.hero__photo {
  aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--blush);
  display: grid; place-items: center; padding: 1.5rem;
}
.hero__photo.is-loaded { aspect-ratio: 4 / 5; padding: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
/* three photos: the first big on the left, two stacked on the right */
.hero__photo--group.is-loaded {
  display: grid; grid-template-columns: 3fr 2fr; grid-auto-rows: 1fr; gap: 10px;
  place-items: stretch; background: none; border-radius: 0; aspect-ratio: 5 / 4;
}
.hero__photo--group img { border-radius: 6px; min-height: 0; }
.hero__photo--group img:first-child { grid-row: span 2; }
.photo-empty { font-weight: 700; color: #2F3628; }

/* menu */
.menu {
  max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}
.menu__intro h2, .gallery h2, .order h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.menu__intro p { margin-top: 1rem; max-width: 30ch; font-size: .98rem; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
}
.item:not(.has-photo) { grid-template-columns: 1fr auto; }
.item:first-child { padding-top: 0; }
.item__thumb { width: 84px; height: 84px; border-radius: 4px; overflow: hidden; background: var(--blush); }
.item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.item__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.item__name { font: 800 1.4rem/1.2 var(--display); color: var(--sage); }
.item__price { font-weight: 700; color: var(--sage-dark); }
.item__price--ask { font-weight: 600; font-size: .92rem; color: var(--sage-text); }
.item--lead .item__name { font-size: clamp(1.8rem, 3vw, 2.2rem); }
.item--lead .item__price { font: 800 clamp(1.5rem, 2.4vw, 1.8rem)/1 var(--display); }
.item__about { font-size: .97rem; margin-top: .3rem; max-width: 48ch; }
.item__qty { display: flex; align-items: center; gap: .35rem; }
.round {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sage); background: transparent;
  color: var(--sage-dark); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background-color .2s ease;
}
.round:hover { background: var(--blush); border-color: var(--blush); }
.round svg { width: 14px; height: 14px; }
.round--add.is-on { background: var(--blush); border-color: var(--blush); color: #2F3628; }
.item__qty b { min-width: 1.6ch; text-align: center; color: var(--sage-dark); font-size: 1.05rem; }
.round--sm { width: 36px; height: 36px; }
.qty { display: inline-flex; align-items: center; gap: .5rem; }
.qty b { min-width: 1.5ch; text-align: center; }

/* gallery */
.gallery { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); border-top: 1px solid var(--line); }
.gallery__grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; max-width: 720px; }
.gallery__grid img { border-radius: 4px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery__grid p { font-size: .92rem; margin-top: .5rem; }

/* order */
.order {
  max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
  display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: clamp(2rem, 6vw, 5.5rem); align-items: start;
  border-top: 1px solid var(--line);
}
.steps { margin: 1.75rem 0 0; padding-left: 1.3rem; display: grid; gap: 1rem; max-width: 46ch; }
.steps li::marker { color: var(--sage-dark); font-weight: 700; }
.steps strong { color: var(--sage-dark); }
.order__soon { margin-top: 2rem; font-size: .95rem; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 46ch; }

.order__box { border: 1px solid var(--line); border-radius: 8px; padding: 1.75rem; }
.order__box h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.order__lines { list-style: none; margin: 0; padding: 0; }
.order__lines li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); color: var(--sage-dark); }
.order__empty { font-size: .95rem; }
.order__how-get { border: 0; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.order__how-get legend { font-weight: 700; color: var(--sage-dark); margin-bottom: .5rem; padding: 0; }
.order__how-get label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.order__how-get input { accent-color: var(--sage-dark); width: 18px; height: 18px; margin: 0; }
.order__note { margin-top: .6rem; font-size: .93rem; }
.order__when { display: block; margin-top: 1.25rem; font-weight: 700; color: var(--sage-dark); }
.order__when span { font-weight: 400; color: var(--sage-text); }
.order__when input { display: block; width: 100%; margin-top: .45rem; }
.order__when input {
  font: 400 1rem/1.3 var(--body); color: var(--sage-dark); background: var(--cream);
  border: 1px solid var(--sage); border-radius: 6px; padding: .7rem .8rem;
}
.order__when input::placeholder { color: #66705C; }
.order__when input:focus { outline: 2px solid var(--sage-dark); outline-offset: 1px; }
.order__msg { margin: 1.5rem 0; padding: 1rem; background: rgb(229 197 189 / .35); border-radius: 6px; white-space: pre-line; font-size: .97rem; color: var(--sage-dark); }
.order__msg.is-empty { color: var(--sage-text); font-style: italic; }

/* footer */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 3rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .95rem;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 12px); z-index: 30;
  background: var(--sage-dark); color: var(--cream); padding: .75rem 1.1rem; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: calc(100vw - 32px); text-align: center; font-size: .95rem;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.bar { display: none; }

/* ---------- Phones (the main audience) ---------- */
@media (max-width: 820px) {
  body { font-size: 1.0625rem; }
  .top { padding-top: 14px; padding-bottom: 14px; }
  .top nav a { padding: .6rem 0; }
  .hero { grid-template-columns: 1fr; gap: 1.75rem; padding-top: .75rem; padding-bottom: 3rem; }
  .hero h1 { font-size: clamp(2rem, 8.6vw, 2.6rem); }
  .hero__sub { margin-top: 1rem; }
  .hero__actions { margin-top: 1.6rem; gap: 1.25rem; }
  .btn { padding: 1.05rem 1.5rem; font-size: 1.05rem; }
  .hero__photo { aspect-ratio: auto; padding: 2.25rem var(--gutter); margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .hero__photo.is-loaded { aspect-ratio: 4 / 3; padding: 0; }
  .hero__photo--group.is-loaded { aspect-ratio: 3 / 2; margin: 0; gap: 8px; }
  .item--lead .item__name { font-size: 1.7rem; }
  .menu, .order { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 3rem; padding-bottom: 3rem; }
  .menu__intro p { max-width: none; }
  .item { gap: 1rem; padding: 1.25rem 0; }
  .item__name { font-size: 1.3rem; }
  .round { width: 46px; height: 46px; }
  .round--sm { width: 42px; height: 42px; }
  .order__box { margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; padding: 1.75rem var(--gutter); }
  .order__how-get label { padding: .35rem 0; }
  .order__how-get input { width: 22px; height: 22px; }
  .order__when input { font-size: 1rem; padding: .85rem .9rem; } /* 16px+ stops phones zooming in */
  .foot { padding-bottom: 6rem; }
  /* floats above the "Powered by Netlify" badge, which sits in the bottom corner */
  .bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 25;
    align-items: center; justify-content: space-between; gap: 1rem;
    padding: .65rem .65rem .65rem 1.1rem; border-radius: 999px;
    box-shadow: 0 6px 20px rgb(47 54 40 / .25);
    background: var(--sage-dark); color: var(--cream); font-weight: 700;
    transform: translateY(calc(100% + 90px)); visibility: hidden;
    transition: transform .3s ease, visibility 0s .3s;
  }
  .bar.is-on { transform: none; visibility: visible; transition: transform .3s ease; }
  .bar__go { background: var(--blush); color: #2F3628; text-decoration: none; padding: .75rem 1.05rem; border-radius: 999px; }
  .bar span, .bar__go { white-space: nowrap; font-size: .95rem; }
  .toast { bottom: 140px; }
  .foot { padding-bottom: 9rem; }
}
@media (max-width: 520px) {
  .brand__logo { height: 48px; }
  .brand__name { font-size: 1.1rem; }
  .top nav a:nth-child(2) { display: none; }
  .item, .item:not(.has-photo) { grid-template-columns: 1fr auto; gap: .75rem; }
  .item.has-photo .item__thumb + .item__text { grid-column: 1; }
  .item.has-photo .item__thumb { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 3 / 2; }
}
