/* Millrace Coffee — the bag label is the design system.
   Kraft paper ground, ink, and burnt orange in exactly three jobs:
   prices, the roast-day line, and the buy button. Everything else
   is ink on paper, set the way it's printed on the bag. */
:root {
  --ink: #2a2019;
  --ink-soft: #5a5044;
  --orange: #c2531f;
  --orange-dark: #9c4218;
  --paper: #f3ede3;
  --label: #fbf8f1;
  --kraft: #d8c3a5;
  --kraft-deep: #c2a276;
  --line: #dcd0ba;
  --wash: #ece2cf;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif; font-size: 16.5px; line-height: 1.55;
}
h1, h2, h3, .slab { font-family: "Zilla Slab", Georgia, serif; line-height: 1.12; margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.num, td, .price, input, select { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px }

/* one warm grade for every process photograph, so the photography
   reads as one system instead of a download folder */
.graded img { filter: sepia(.26) saturate(.85) contrast(1.05); }

/* top strip + header (injected by app.js) */
.topstrip { background: var(--ink); color: #f3ede3; font-size: 13.5px; }
.topstrip .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topstrip a { color: #f3ede3; }
.site-header { border-bottom: 2px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.wordmark { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 30px; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.wordmark .dot { color: var(--ink); }
.wordmark small { display: block; font-family: "Archivo", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .24em; color: var(--ink-soft); margin-top: 1px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.main-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.cart-link { border: 2px solid var(--ink); padding: 6px 14px; }
.cart-link:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* buttons — the primary is the buy button, and it is the orange one */
.btn { display: inline-block; background: var(--orange); color: #fff; border: 0; cursor: pointer;
  font: 600 16px "Archivo", sans-serif; padding: 13px 24px; text-decoration: none; border-radius: 3px; }
.btn:hover { background: var(--orange-dark); }
.btn.ink { background: var(--ink); }
.btn.ink:hover { background: #171310; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.ghost:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn.small { padding: 8px 14px; font-size: 14.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- hero: the roast-day line, then the bags ---------- */
.hero { padding: 48px 0 10px; }
.hero h1 { font-size: clamp(3.25rem, 8vw, 7rem); font-weight: 700; line-height: .95; letter-spacing: -0.015em; }
.hero h1 .stamp { color: var(--orange); }
.hero .lede { font-size: 19px; color: var(--ink-soft); max-width: 36em; margin: 22px 0 0; }
.hero .lede b { color: var(--ink); font-weight: 600; }
.hero-bags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- the bag ----------
   A flat render of the pack on the plain ground: kraft body, a folded
   top, and the printed label carrying every fact. The label is the
   design — name, ruled fields, notes, price. */
.bag-card { display: block; text-decoration: none; color: var(--ink); }
.bag { display: block; position: relative; background: var(--kraft); padding-bottom: 20px; }
.bag::before { content: ''; display: block; height: 24px; background: var(--kraft-deep);
  border-bottom: 2px solid rgba(42,32,25,.35); }
.bag::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 10px;
  background: rgba(42,32,25,.08); }
.bag-label { display: block; background: var(--label); border: 1px solid rgba(42,32,25,.25);
  margin: 20px 18px 0; padding: 16px 16px 13px; }
.bag-brand { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); text-align: center; }
.bag-name { display: block; font-family: "Zilla Slab", Georgia, serif; font-weight: 700; font-size: 24px;
  line-height: 1.08; text-align: center; margin-top: 6px; text-wrap: balance; }
.bag-card.big .bag-name { font-size: 31px; }
.bag-notes { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 10px; }
.bag-card.big .bag-notes { font-size: 15px; }
.bag-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; }
.bag-price { font-weight: 700; font-size: 20px; color: var(--orange); font-variant-numeric: tabular-nums; }
.bag-card.big .bag-price { font-size: 24px; }
.bag-size { font-size: 12.5px; color: var(--ink-soft); }
.bag-stamp { position: absolute; top: 46px; right: 14px; transform: rotate(6deg);
  border: 2px solid var(--ink); color: var(--ink); padding: 2px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* the label fields — origin / process / altitude / roast, ruled */
.label-fields { display: block; margin-top: 12px; border-top: 1.5px solid var(--ink); }
.lf { display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.lf i { font-style: normal; text-transform: uppercase; letter-spacing: .06em;
  font-size: 11px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.lf b { font-weight: 600; text-align: right; }
.label-fields.big .lf { font-size: 15.5px; padding: 8px 0; }
.label-fields.big .lf i { font-size: 12px; }

/* ---------- the roast board ----------
   Chalkboard logic on ink: the week's seven days with real dates.
   Today's row is simply lit when you arrive — a board doesn't
   animate. The board's spoken line and the TODAY stamp carry the
   roast-day orange. */
.board { background: var(--ink); color: #f3ede3; margin: 42px 0 8px; }
.board .wrap { padding-top: 26px; padding-bottom: 30px; }
.board-head { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.board-head h2 { font-size: 30px; color: #fff; }
.board-head a { color: #f3ede3; font-weight: 600; margin-left: auto; white-space: nowrap; }
.board-line { font-family: "Zilla Slab", Georgia, serif; font-size: 20.5px; color: var(--orange);
  margin: 12px 0 0; max-width: 52em; }
.board-facts { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 10px; font-size: 15px; color: #cfc6b8; }
.board-facts b { font-family: "Zilla Slab", serif; color: #f3ede3; }
.board-week { display: grid; grid-template-columns: repeat(7, 1fr);
  border-top: 1.5px solid rgba(243,237,227,.4); margin-top: 20px; }
.board-day { padding: 14px 14px 16px; border-left: 1px solid rgba(243,237,227,.22); }
.board-day:first-child { border-left: 0; padding-left: 0; }
.board-day.today { background: rgba(243,237,227,.07); }
.bd-day { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kraft); }
.bd-date { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 22px; color: #fff; margin-top: 2px; }
.bd-today { display: inline-block; background: var(--orange); color: #fff; font-size: 10.5px;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; margin-top: 7px; }
.bd-events { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13.5px; line-height: 1.45; color: #e8e0d0; }
.bd-events li { margin-bottom: 6px; }
.bd-coffees { margin-top: 8px; font-size: 13px; line-height: 1.5; color: #cfc6b8; }
.bd-coffees b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--kraft); margin-bottom: 3px; }

/* home's strip is the same board, folded down to its spoken line */
.board.strip { margin-top: 44px; }
.board.strip .wrap { padding-top: 20px; padding-bottom: 22px; }
.board.strip .board-line { margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding: 30px 0 44px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 32px; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* shop: orchestrated grid, two zoom levels — large and small bags
   alternating the way a shelf is faced, not a uniform card wall */
.grid-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 26px; }
.grid-labels .bag-card { grid-column: span 12; }
.grid-labels .w7 { grid-column: span 7; }
.grid-labels .w5 { grid-column: span 5; }
.grid-labels .w6 { grid-column: span 6; }
.batch-note { background: var(--wash); border-left: 4px solid var(--ink); padding: 12px 16px; margin: 22px 0; font-size: 15.5px; }

/* roastery story — graded photo collage + dated beats */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col-photo { background: var(--kraft); padding: 10px 10px 30px; margin: 0; }
.col-photo img { width: 100%; height: 225px; object-fit: cover; }
.col-photo figcaption { font-family: "Zilla Slab", serif; font-size: 14.5px; padding-top: 8px; color: var(--ink); }
.col-photo:nth-child(1) { transform: rotate(-1.1deg); }
.col-photo:nth-child(2) { transform: translateY(36px) rotate(1.3deg); }
.col-photo:nth-child(3) { transform: rotate(0.8deg); }
.col-photo:nth-child(4) { transform: translateY(36px) rotate(-0.9deg); }
.story-beats { list-style: none; margin: 0; padding: 0; }
.beat { display: grid; grid-template-columns: 96px 1fr; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.beat:first-child { padding-top: 2px; }
.beat-year { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 19px; color: var(--ink); }
.beat h3 { font-size: 20px; margin-bottom: 5px; }
.beat p { margin: 0; color: var(--ink-soft); }

/* quotes — one email at a time, on a slow rotation */
blockquote { margin: 0; border-left: 4px solid var(--ink); padding: 4px 0 4px 18px; font-family: "Zilla Slab", serif; font-size: 22px; }
blockquote footer { font-family: "Archivo", sans-serif; font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.carousel { max-width: 44em; }
.carousel .slide { display: none; }
.carousel .slide.is-active { display: block; animation: quote-in 0.45s cubic-bezier(0.23,1,0.32,1); }
@keyframes quote-in { from { opacity: 0; transform: translateY(8px); } }
.carousel-nav { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.car-btn { width: 38px; height: 38px; border: 2px solid var(--ink); background: var(--label); border-radius: 2px;
  font: 700 16px "Archivo", sans-serif; color: var(--ink); cursor: pointer; line-height: 1; }
.car-btn:hover { background: var(--ink); color: var(--paper); }
.car-count { font-size: 14px; font-weight: 600; color: var(--ink-soft); }

/* faq */
.faq-list { border-top: 2px solid var(--ink); max-width: 52em; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0; }
.faq-q { width: 100%; background: none; border: 0; padding: 16px 4px; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font: 600 18.5px "Zilla Slab", Georgia, serif; color: var(--ink); }
.faq-x { font-family: "Archivo", sans-serif; font-weight: 700; color: var(--ink);
  transition: transform 0.25s cubic-bezier(0.23,1,0.32,1); }
.faq-item.open .faq-x { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s cubic-bezier(0.23,1,0.32,1); }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { margin: 0; padding: 0 4px 18px; color: var(--ink-soft); max-width: 44em; }

/* ---------- product page: the bag, big ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0; }
.product .bag { max-width: 480px; }
.product-photo { background: var(--kraft); padding: 12px 12px 34px; margin: 26px 0 0; max-width: 480px; }
.product-photo img { width: 100%; height: 300px; object-fit: cover; }
.product-photo figcaption { font-family: "Zilla Slab", serif; font-size: 14.5px; padding-top: 8px; color: var(--ink); }
.product h1 { font-size: clamp(2.4rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1; }
.opt-label { font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 20px 0 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { border: 2px solid var(--line); padding: 8px 14px; cursor: pointer; border-radius: 3px; font-weight: 600; font-size: 15px; background: var(--label); }
.pills input { position: absolute; opacity: 0; }
.pills label:has(input:checked) { border-color: var(--ink); color: var(--ink); background: var(--wash); }
.qty { width: 74px; padding: 10px; font-size: 16px; border: 2px solid var(--line); border-radius: 3px; background: var(--label); }
.big-price { font-family: "Zilla Slab", serif; font-size: 30px; color: var(--orange); }

/* tables (cart / orders) */
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); padding: 10px 8px; border-bottom: 2px solid var(--ink); }
table.data td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data .thumb { width: 64px; height: 64px; object-fit: cover; }
.qty-btn { border: 1.5px solid var(--ink); background: var(--label); width: 28px; height: 28px; cursor: pointer; font-weight: 700; border-radius: 2px; }
.link-btn { background: none; border: 0; color: var(--orange-dark); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.ship-line { background: var(--wash); padding: 12px 16px; margin: 16px 0; font-size: 15.5px; }
.ship-bar { height: 8px; background: var(--line); margin-top: 8px; }
.ship-bar i { display: block; height: 100%; background: var(--orange); }
.totals { max-width: 360px; margin-left: auto; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals .row.grand { font-family: "Zilla Slab", serif; font-size: 22px; border-bottom: 0; }

/* forms */
form .field { margin-bottom: 16px; }
form label.fl { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 5px; }
form input[type=text], form input[type=email], form input[type=tel], form select, form textarea {
  width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 3px; font: inherit; font-size: 16px; background: var(--label); }
form input:focus, form select:focus, form textarea:focus { border-color: var(--ink); outline: none; }
.err { color: #b3261e; font-size: 14px; margin-top: 4px; display: none; }
.field.bad input { border-color: #b3261e; }
.field.bad .err { display: block; }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }
.summary-box { border: 2px solid var(--ink); padding: 20px; background: var(--label); }
.summary-box h3 { margin-bottom: 12px; }

/* subscription band */
.sub-band { background: var(--kraft); margin: 40px 0; }
.sub-band .wrap { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.sub-band h2 { font-size: 28px; }

/* footer */
.site-footer { border-top: 2px solid var(--ink); margin-top: 50px; padding: 34px 0 26px; background: var(--wash); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.site-footer h4 { font-family: "Zilla Slab", serif; margin: 0 0 10px; font-size: 17px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }

/* assistant chat */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; background: var(--ink); color: #fff;
  border: 0; border-radius: 999px; padding: 13px 20px; font: 600 15.5px "Archivo", sans-serif; cursor: pointer;
  box-shadow: 0 6px 18px rgba(42,32,25,.28); }
.chat-fab:hover { background: #171310; }
.chat-panel { position: fixed; right: 20px; bottom: 78px; z-index: 60; width: 360px; max-width: calc(100vw - 32px);
  background: var(--label); border: 2px solid var(--ink); border-radius: 6px; display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 14px 40px rgba(42,32,25,.25); }
.chat-panel.open { display: flex; }
.chat-head { background: var(--ink); color: #fff; padding: 12px 16px; font-family: "Zilla Slab", serif; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.chat-head button { background: none; border: 0; color: #fff; font-size: 19px; cursor: pointer; }
.chat-log { padding: 14px; height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; background: var(--paper); }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 10px; font-size: 15px; line-height: 1.45; }
.msg.bot { background: var(--label); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.me { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--label); }
.chips button { border: 2px solid var(--ink); background: var(--label); border-radius: 999px; padding: 6px 13px; font: 600 14px "Archivo", sans-serif; cursor: pointer; }
.chips button:hover { background: var(--ink); color: #fff; }
.chat-rec { border: 2px solid var(--ink); background: var(--label); padding: 10px; display: flex; gap: 10px; align-items: center; }
.chat-rec img { width: 54px; height: 54px; object-fit: cover; }
.chat-rec .n { font-family: "Zilla Slab", serif; font-size: 16.5px; }

/* status pills on owner view */
.status { font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 2px; border: 1.5px solid var(--ink); }
.status.Packed { background: var(--kraft); }
.status.Shipped { background: var(--ink); color: #fff; }

.confirm-box { border: 2px solid var(--ink); padding: 28px; max-width: 640px; background: var(--label); }
.confirm-box h1 { font-size: 34px; margin-bottom: 8px; }
.order-num { font-family: "Zilla Slab", serif; font-size: 26px; color: var(--orange-dark); }

@media (max-width: 900px) {
  .product, .two-col, .sub-band .wrap, .story-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .hero-bags { grid-template-columns: 1fr; max-width: 480px; }
  .grid-labels .w7, .grid-labels .w5, .grid-labels .w6 { grid-column: span 6; }
  .board-week { grid-template-columns: 1fr; }
  .board-day { border-left: 0; border-top: 1px solid rgba(243,237,227,.22); padding-left: 0; }
  .board-day:first-child { border-top: 0; }
  .board-head a { margin-left: 0; }
}
@media (max-width: 560px) {
  .grid-labels .w7, .grid-labels .w5, .grid-labels .w6 { grid-column: span 12; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 3.25rem); }
}
