/* Dreizehn Grad — every coffee is a bag label: one flat colour, one loud name. The page stays black on paper. */
@font-face { font-family: "Anton"; src: url("fonts/anton-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-vf.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --paper: #FBFAF6;
  --ink: #000000;
  --muted: #55524B;
  --sun: #FFD400;
  --line: rgba(0, 0, 0, .16);
  --danger: #B3261E;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); }
h1, h2, h3, p, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-underline-offset: .2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2747D8; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: .5rem; }

h1, h2, .card h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .95; letter-spacing: .005em; }
/* Each sentence is one poster line: 10.4vw keeps the longer one (about 8.3em wide) inside the page. */
h1 { font-size: min(10.4vw, 9.6rem); }
h1 span { display: block; white-space: nowrap; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .5rem 1.3rem; border: 2px solid var(--ink); border-radius: 0; font: 700 1rem/1.2 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s; }
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--sun); color: var(--ink); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 2rem; padding: .5rem var(--pad); background: var(--paper); border-bottom: 2px solid var(--ink); }
.brand { margin-right: auto; font: 400 2.1rem/1 var(--display); text-decoration: none; }
.top nav { display: flex; gap: 1.6rem; }
.top nav a { font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: var(--ink); }
.cart-button { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.6rem; padding: .3rem .5rem .3rem 1rem; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 700 1rem/1 var(--text); cursor: pointer; }
.cart-button:hover { background: #2B2B2B; }
.count { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding-inline: .35rem; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.count.has { background: var(--sun); }

/* ---------- hero ---------- */
.hero { padding: clamp(1.5rem, 4vw, 3rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem); max-width: calc(var(--wrap) + 12rem); margin-inline: auto; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1.5rem clamp(2rem, 6vw, 5rem); align-items: end; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.lede { max-width: 32em; font-size: 1.1875rem; }
.roast { padding: 1.1rem 1.3rem; background: var(--ink); color: #fff; font-size: 1.0625rem; }
.roast strong { display: block; color: var(--sun); font-size: 1.1875rem; }

/* ---------- shop ---------- */
.shop { padding: 0 var(--pad) clamp(3.5rem, 8vw, 6rem); max-width: calc(var(--wrap) + 12rem); margin-inline: auto; }
.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.4rem; border-top: 2px solid var(--ink); margin-bottom: 1.6rem; }
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; }
.seg { display: inline-flex; border: 2px solid var(--ink); }
.seg button { min-height: 2.6rem; padding: .3rem 1rem; border: 0; background: none; color: var(--ink); font: 700 1rem/1 var(--text); cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button:hover { background: rgba(0, 0, 0, .08); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sort { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; }
select { min-height: 2.6rem; padding: .3rem 2.2rem .3rem .8rem; border: 2px solid var(--ink); border-radius: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") right .5rem center/1.2rem no-repeat; color: var(--ink); font: 600 1rem/1.2 var(--text); appearance: none; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.2vw, 1.8rem); }
.card { display: grid; grid-template-rows: 1fr auto; border: 2px solid var(--ink); background: #fff; }
.label { display: grid; align-content: start; gap: .5rem; min-height: 17rem; padding: 1.3rem 1.3rem 1.5rem; background: var(--c); color: var(--on); border-bottom: 2px solid #000; }
.origin { font-weight: 700; font-size: .9375rem; }
.card h3 { font-size: clamp(2.6rem, 4.4vw, 4rem); margin-top: .3rem; overflow-wrap: anywhere; }
.notes { font-size: 1.0625rem; font-weight: 500; }
.meta { display: flex; align-items: center; gap: .9rem; margin-top: auto; padding-top: 1rem; font-weight: 700; font-size: .9375rem; }
.roastmeter { display: inline-flex; gap: .25rem; }
.roastmeter i { width: .8rem; height: .8rem; border: 2px solid currentColor; border-radius: 50%; }
.roastmeter i.on { background: currentColor; }
.buy { display: grid; gap: .8rem; padding: 1.1rem 1.3rem 1.3rem; }
.sizes { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.sizes label { position: relative; display: grid; place-items: center; min-height: 2.6rem; font-weight: 700; cursor: pointer; }
.sizes label + label { border-left: 2px solid var(--ink); }
.sizes input { position: absolute; opacity: 0; }
.sizes label:has(input:checked) { background: var(--ink); color: #fff; }
.sizes label:has(input:focus-visible) { outline: 3px solid #2747D8; outline-offset: 3px; }
.buy select { width: 100%; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.price { font: 400 1.9rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.add { flex: 1; min-width: 0; padding-inline: .8rem; }
.noscript { padding: 1.2rem; border: 2px solid var(--ink); font-weight: 600; }

/* ---------- sections ---------- */
.how { padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--ink); color: #fff; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.how h2 { font-size: clamp(2.2rem, 5.4vw, 4.6rem); color: var(--sun); }
.how-copy { display: grid; gap: 1.1rem; font-size: 1.125rem; }
.how :focus-visible { outline-color: var(--sun); }

.ship { padding-block: clamp(3rem, 7vw, 5rem); }
.ship-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.ship-list li { padding-top: 1rem; border-top: 2px solid var(--ink); }
.ship-list p { margin-top: .5rem; color: var(--muted); font-size: .9688rem; }

/* ---------- footer ---------- */
.foot { padding-block: 2rem; border-top: 2px solid var(--ink); font-size: .9688rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.foot-row a { margin-left: 1.2rem; }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.demo-note { margin-top: 1.4rem; font-size: .8438rem; color: var(--muted); }

/* ---------- cart drawer ---------- */
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(27rem, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 2px solid var(--ink); background: var(--paper); color: var(--ink); overflow-y: auto; }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.3rem; background: var(--paper); border-bottom: 2px solid var(--ink); }
.drawer-head h2 { font-size: 2.2rem; }
.icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 2px solid var(--ink); background: none; color: var(--ink); cursor: pointer; }
.icon:hover { background: var(--ink); color: #fff; }
.view { display: grid; gap: 1.1rem; padding: 1.3rem; }
.empty { color: var(--muted); }
.lines { display: grid; }
.lines:empty { display: none; }
.lines li { display: grid; grid-template-columns: .9rem 1fr auto; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.swatch { align-self: stretch; border: 1px solid rgba(0, 0, 0, .5); }
.line-main { display: grid; gap: .15rem; }
.line-main b { font: 400 1.5rem/1.1 var(--display); text-transform: uppercase; }
.line-main small { color: var(--muted); font-size: .9063rem; }
.qty { display: inline-grid; grid-template-columns: 2.6rem 2.6rem 2.6rem; align-items: center; width: max-content; margin-top: .6rem; border: 2px solid var(--ink); }
.qty button { height: 2.5rem; border: 0; background: none; color: var(--ink); font: 700 1.25rem/1 var(--text); cursor: pointer; }
.qty button:hover { background: rgba(0, 0, 0, .08); }
.qty button:disabled { color: #A09D95; cursor: default; background: none; }
.qty output { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.line-side { display: grid; align-content: space-between; justify-items: end; }
.line-side strong { font-variant-numeric: tabular-nums; }
.remove { padding: .3rem 0; border: 0; background: none; color: var(--muted); font: 600 .9063rem/1.2 var(--text); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.remove:hover { color: var(--danger); }

.totals { display: grid; gap: 1.1rem; }
.free { font-size: .9375rem; font-weight: 600; }
.bar { height: .6rem; margin-top: .45rem; border: 2px solid var(--ink); background: #fff; }
.bar span { display: block; height: 100%; background: var(--sun); transition: width .25s; }
.totals dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.totals dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.totals .grand { margin-top: .4rem; padding-top: .8rem; border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.1875rem; }
.totals .grand dd { font-weight: 800; }

.back { justify-self: start; padding: 0; border: 0; background: none; color: var(--ink); font: 600 .9688rem/1.2 var(--text); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.field { display: grid; gap: .3rem; align-content: start; }
.field label, .pay legend { font-weight: 700; font-size: .9375rem; }
.field input { width: 100%; min-height: 2.9rem; padding: .5rem .75rem; border: 2px solid #6F6C64; border-radius: 0; background: #fff; color: var(--ink); font: 400 1rem/1.3 var(--text); }
.field input:hover { border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--danger); background: #FDF2F1; }
.field-row { display: grid; grid-template-columns: 7rem 1fr; gap: .8rem; }
.err { font-size: .875rem; font-weight: 600; color: var(--danger); }
.err:empty { display: none; }
.pay { display: grid; gap: .5rem; }
.pay legend { margin-bottom: .5rem; }
.pay label { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.pay input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: #000; }
.due { display: flex; justify-content: space-between; padding-top: .9rem; border-top: 2px solid var(--ink); font-size: 1.1875rem; }
.due strong { font-variant-numeric: tabular-nums; }
.fineprint { font-size: .875rem; color: var(--muted); }
#view-done h3 { font: 400 2.2rem/1 var(--display); text-transform: uppercase; }
#view-done:focus { outline: none; }

.modal { width: min(32rem, calc(100vw - 2rem)); padding: 1.8rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.modal h2 { font-size: 2.2rem; }
.modal p { margin-top: 1rem; }
.modal .btn { margin-top: 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-row, .how-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  h1 { font-size: clamp(3rem, 17vw, 6rem); }
  h1 span { white-space: normal; }
  .top nav { display: none; }
  .ship-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .label { min-height: 0; }
  .foot-row a { display: block; margin: .4rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .bar span { transition: none; }
}
