/* Gather & Graze
   Layout: Swiss, left-aligned, generous air. Cream paper, black type, one grotesk,
   and stippled line drawings as the only imagery. Deliberately one theme: cream and black. */
:root {
  --cream: #F2F1EC;
  --cream-2: #E9E7E0;
  --cream-3: #DEDBD2;
  --ink: #1B1B19;
  --ink-2: #4E4D48;
  --ink-3: #6A6862;
  --rule: rgba(27, 27, 25, .16);
  --rule-2: rgba(27, 27, 25, .08);
  --font: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --t-hero: clamp(2.75rem, 6vw, 5.5rem);
  --t-1: clamp(2.125rem, 4vw, 3.5rem);
  --t-2: clamp(1.625rem, 2.4vw, 2.125rem);
  --t-3: 1.375rem;
  --t-4: 1.125rem;
  --t-body: 1rem;
  --t-small: .875rem;
  --t-micro: .75rem;

  --side: 20px;
  --hdr: 64px;
  --sec: clamp(104px, 13vw, 200px);
  color-scheme: light;
}
@media (min-width: 720px) { :root { --side: 48px; } }
@media (min-width: 1200px) { :root { --side: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: var(--t-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream); }
img, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--cream); }
[hidden] { display: none !important; }

.wrap {
  max-width: 1400px; margin-inline: auto;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px));
  padding-right: max(var(--side), env(safe-area-inset-right, 0px));
}
.label { font-size: var(--t-micro); font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); }
.num { font-variant-numeric: tabular-nums; }
.lead { font-size: var(--t-4); line-height: 1.55; max-width: 36em; color: var(--ink-2); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 28px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--cream); font-size: .9375rem; font-weight: 500; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .3; cursor: not-allowed; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: var(--ink); }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font-size: inherit; color: inherit; }
.link:hover { text-decoration-thickness: 2px; }

.qty { display: inline-grid; grid-template-columns: 40px 40px 40px; height: 40px; border: 1px solid var(--ink); }
.qty button { border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.qty button:hover:not([disabled]) { background: var(--ink); color: var(--cream); }
.qty button[disabled] { opacity: .3; cursor: not-allowed; }
.qty output { display: grid; place-items: center; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--rule); }

.chip {
  display: inline-flex; align-items: center; gap: .5em; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--rule); background: transparent; border-radius: 999px; cursor: pointer; font-size: var(--t-small);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.field { display: grid; gap: 8px; }
.field label, .field .label { color: var(--ink); }
.input, .textarea {
  width: 100%; border: 1px solid var(--rule); background: transparent; padding: 14px; border-radius: 0; font-size: var(--t-body);
}
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.field__foot { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-micro); color: var(--ink-3); }

/* ---------- notice & header ---------- */
.notice { background: var(--ink); color: var(--cream); font-size: var(--t-micro); letter-spacing: .04em; }
.notice__in { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 34px; flex-wrap: wrap; text-align: center; }
.notice__sep { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: .6; }
@media (max-width: 560px) { .notice__in > span:nth-child(n+2) { display: none; } }

.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--cream); border-bottom: 1px solid var(--rule); }
.hdr__in { display: flex; align-items: center; gap: 32px; height: var(--hdr); }
.brand { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand__amp { font-weight: 300; }
.nav { display: flex; gap: 28px; margin-left: 24px; }
.nav a, .bagbtn { text-decoration: none; font-size: .9375rem; position: relative; padding-block: 6px; }
.nav a::after, .bagbtn::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav a:hover::after, .nav a[aria-current="page"]::after, .bagbtn:hover::after, .bagbtn[aria-current="page"]::after { transform: scaleX(1); }
.hdr__end { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.bagbtn { display: inline-flex; align-items: center; gap: 8px; }
.bagbtn__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--cream); font-size: .75rem; font-variant-numeric: tabular-nums; }
.menubtn { display: none; border: 1px solid var(--ink); background: none; height: 36px; padding: 0 14px; cursor: pointer; font-size: var(--t-small); }
.mnav { border-top: 1px solid var(--rule); background: var(--cream); }
.mnav .wrap { display: grid; padding-block: 8px 20px; }
.mnav a { padding: 14px 0; border-bottom: 1px solid var(--rule-2); text-decoration: none; font-size: var(--t-3); letter-spacing: -.01em; }
@media (max-width: 900px) { .nav { display: none; } .menubtn { display: inline-block; } }
@media (min-width: 901px) { .mnav { display: none !important; } }

/* ---------- sections: one idea each, a rule, a label, a heading, a sentence ---------- */
.section { padding-block: var(--sec) 0; }
.section:last-child { padding-bottom: 0; }
.section__head { display: grid; gap: 18px; justify-items: start; margin-bottom: clamp(48px, 6vw, 88px); }
.section__head h2 { font-size: var(--t-1); max-width: 16em; }
.section__head p:not(.label) { font-size: var(--t-4); color: var(--ink-2); max-width: 36em; }
.section__head .link { margin-top: 4px; }

.pagehead { padding-block: clamp(48px, 7vw, 104px) clamp(32px, 4vw, 56px); }
.pagehead__grid { display: grid; gap: 18px; justify-items: start; }
.pagehead__grid > * { max-width: 54rem; }
.pagehead h1 { font-size: var(--t-hero); letter-spacing: -.04em; line-height: .98; }

/* ---------- product card ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 80px 32px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 24px; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; gap: 48px; } }
.card { display: grid; gap: 18px; text-decoration: none; min-width: 0; align-content: start; }
.card__media { position: relative; background: var(--cream-2); aspect-ratio: 4 / 3.4; max-width: 100%; overflow: hidden; }
.card__media canvas { width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__media canvas { transform: scale(1.04); }
.card__tag { position: absolute; left: 16px; top: 14px; font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card__name { font-size: var(--t-3); font-weight: 500; letter-spacing: -.015em; }
.card__price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.card__line { color: var(--ink-2); font-size: .9375rem; margin-top: -10px; max-width: 30em; }
.card:hover .card__name { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* ---------- tiles: the one choice component, used by the builder and product pages ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles, .tiles--4, .tiles--2 { grid-template-columns: 1fr; } }
.tile {
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; align-content: start; min-width: 0;
  padding: 18px 18px 16px; text-align: left; background: transparent; border: 1px solid var(--rule); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s; min-height: 132px;
}
.tile:hover { border-color: var(--ink); }
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tile__name { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.tile__mark { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--ink); display: grid; place-items: center; margin-top: 1px; }
.tile[role="radio"] .tile__mark { border-radius: 50%; }
.tile__mark svg { width: 12px; height: 12px; opacity: 0; }
.tile__meta { font-size: var(--t-small); color: var(--ink-2); }
.tile__note { font-size: var(--t-small); color: var(--ink-2); line-height: 1.45; }
.tile__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 10px; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.tile__tags { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tile__why { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; }
.tile[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.tile[aria-checked="true"] .tile__meta, .tile[aria-checked="true"] .tile__note, .tile[aria-checked="true"] .tile__tags { color: rgba(242, 241, 236, .72); }
.tile[aria-checked="true"] .tile__mark { border-color: var(--cream); background: var(--cream); color: var(--ink); }
.tile[aria-checked="true"] .tile__mark svg { opacity: 1; }
.tile[role="radio"][aria-checked="true"] .tile__mark { background: transparent; }
.tile[role="radio"][aria-checked="true"] .tile__mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cream); }
.tile[aria-disabled="true"] { cursor: not-allowed; opacity: .4; }
.tile[aria-disabled="true"]:hover { border-color: var(--rule); }
.tile.is-dim:not([aria-checked="true"]) { opacity: .5; }
.tile--short { min-height: 0; grid-template-rows: auto auto; }

/* size cards, drawn to scale */
.szrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.szc { display: grid; grid-template-rows: 96px auto auto auto; gap: 4px; align-content: start; text-align: left; padding: 18px; min-width: 0;
  border: 1px solid var(--rule); background: transparent; cursor: pointer; transition: border-color .15s, background .15s; }
.szc:hover { border-color: var(--ink); }
.szc[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--cream-2); }
.szc__art { display: flex; align-items: flex-end; height: 96px; margin-bottom: 14px; }
.szc__art canvas { width: calc(var(--w) / 80 * 100%); aspect-ratio: var(--w) / var(--h); max-width: 100%; }
.szc__name { font-size: var(--t-3); font-weight: 500; letter-spacing: -.015em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.szc__name::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.szc[aria-checked="true"] .szc__name::after { background: radial-gradient(circle, var(--ink) 0 4px, transparent 4.5px); }
.szc__serves { font-size: .9375rem; }
.szc__price { font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .szrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .szrow { grid-template-columns: 1fr; gap: 8px; }
  .szc { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 16px; row-gap: 0; align-items: center; padding: 14px 16px; }
  .szc__art { grid-row: 1 / span 2; height: 48px; margin: 0; align-items: center; }
  .szc__art canvas { width: calc(var(--w) / 80 * 88px); }
  .szc__name { grid-column: 2; font-size: var(--t-4); }
  .szc__name::after { display: none; }
  .szc__serves { grid-column: 2; font-size: var(--t-small); color: var(--ink-2); }
  .szc__price { grid-column: 3; grid-row: 1 / span 2; color: var(--ink); }
}

/* ---------- bottom bar: price and the one action, on the builder and product pages ---------- */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--cream); border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.tray.is-away { transform: translateY(110%); }
.tray__in { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; min-height: 80px; }
.tray__info { display: grid; gap: 2px; min-width: 0; }
.tray__p { font-size: var(--t-3); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tray__s { font-size: var(--t-small); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray__act { display: flex; align-items: center; gap: 10px; flex: none; }
.tray__act .btn { min-height: 48px; }
body.has-tray { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 560px) { .tray__back { display: none; } .tray__act .btn { padding: 0 20px; } }

/* ---------- footer ---------- */
.ftr { margin-top: var(--sec); border-top: 1px solid var(--ink); padding-block: 56px 28px; }
.ftr__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; }
.ftr__lead { grid-column: 1 / span 5; }
.ftr__big { font-size: var(--t-3); line-height: 1.25; letter-spacing: -.015em; max-width: 18em; }
.ftr__col { display: grid; align-content: start; gap: 10px; grid-column: span 2; font-size: .9375rem; }
.ftr__col:nth-child(2) { grid-column: 7 / span 2; }
.ftr__col:last-child { grid-column: 11 / span 2; }
.ftr__col a { text-decoration: none; }
.ftr__col a:hover { text-decoration: underline; }
.ftr__col .label { margin-bottom: 6px; }
.ftr__col p { color: var(--ink-2); }
.ftr__mark { margin-top: clamp(56px, 8vw, 112px); font-size: clamp(3.4rem, 12.6vw, 13.5rem); font-weight: 500; letter-spacing: -.055em; line-height: .82; white-space: nowrap; }
.ftr__mark span { font-weight: 200; }
.ftr__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; margin-top: 26px; border-top: 1px solid var(--rule); font-size: var(--t-micro); color: var(--ink-2); }
@media (max-width: 900px) {
  .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ftr__lead { grid-column: 1 / -1; }
  .ftr__col, .ftr__col:nth-child(2), .ftr__col:last-child { grid-column: span 1; }
  .ftr__col:last-child { grid-column: 1 / -1; }
}

/* ---------- drawer & toast ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(27, 27, 25, .28); opacity: 0; transition: opacity .2s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--cream);
  border-left: 1px solid var(--ink); display: grid; align-content: start; gap: 20px;
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 24px;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .7, .2, 1); outline: none; overflow-y: auto;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.xbtn { background: none; border: 0; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font-size: var(--t-small); }
.drawer__item { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: start; }
.drawer__art { width: 112px; height: 112px; background: var(--cream-2); }
.drawer__title { font-size: var(--t-4); font-weight: 500; letter-spacing: -.01em; }
.drawer__price { margin-top: 8px; font-variant-numeric: tabular-nums; }
.drawer__sum { display: flex; justify-content: space-between; padding-block: 14px; border-block: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.drawer__actions { display: grid; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 160%);
  z-index: 90; display: flex; gap: 18px; align-items: center; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--cream); padding: 14px 18px; font-size: var(--t-small); transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.toast.is-on { transform: translate(-50%, 0); }
.toast__btn { background: none; border: 0; color: var(--cream); text-decoration: underline; cursor: pointer; font-size: inherit; }
body.has-tray .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

/* ---------- pop-up (board calculator) ---------- */
.modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal__scrim { position: absolute; inset: 0; background: rgba(27, 27, 25, .36); opacity: 0; transition: opacity .2s; }
.modal__panel { position: relative; width: min(980px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--cream); padding: clamp(24px, 4vw, 48px); display: grid; gap: 22px; outline: none; transform: translateY(16px); opacity: 0; transition: transform .25s cubic-bezier(.2, .7, .2, 1), opacity .2s; }
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { transform: none; opacity: 1; }
.modal__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal__h { font-size: var(--t-1); letter-spacing: -.035em; margin-top: 10px; }
.modal__lead { max-width: 36em; font-size: var(--t-4); }
body.has-modal { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .modal__panel, .drawer__panel { transition: none; } }
