/* Origin Roasting Co. — coffee subscription (fictional demo shop)
   BATCH C FORMAT: build-a-box subscription flow — pick a box size, pick
   exactly N roasts, pick a delivery frequency, see a live price summary,
   then add the whole custom box as one cart line. Genuinely different
   centerpiece from Batch A (lookbook+variant) and Batch B (spec-compare).
   Warm espresso brown + amber accent, slab serif display type. */

:root {
  --bg: #201510;
  --bg-2: #2a1c14;
  --panel: #2f2018;
  --line: #4a3a2c;
  --paper: #f6efe2;
  --muted: #b3a08c;
  --amber: #e0a458;
  --amber-ink: #c2853c;
  --danger: #ff6b56;
  --r: 12px;
  --wrap: 1200px;
  --display: "Zilla Slab", Georgia, serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--paper); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 14.5px; padding: 13px 26px; border-radius: 100px; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.btn-accent { background: var(--amber); color: #2a1908; }
.btn-accent:hover { transform: translateY(-2px); background: var(--amber-ink); }
.btn-outline { background: transparent; color: var(--paper); border-color: var(--line); }
.btn-outline:hover { border-color: var(--paper); transform: translateY(-2px); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(32,21,16,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 21px; display: flex; align-items: center; gap: 9px; }
.brand .bean { width: 16px; height: 20px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--amber); position: relative; }
.brand .bean::after { content: ""; position: absolute; top: 10%; bottom: 10%; left: 50%; width: 1.5px; background: #2a1908; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--paper); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.cart-btn { position: relative; background: none; border: 0; color: var(--paper); cursor: pointer; padding: 8px; display: flex; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--amber); color: #2a1908; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--paper); margin: 5px 0; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.announce { background: var(--amber); color: #2a1908; text-align: center; font-size: 12.5px; font-weight: 700; padding: 9px; }

.hero { position: relative; height: 78vh; min-height: 520px; display: flex; align-items: center; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(32,21,16,.96) 0%, rgba(32,21,16,.55) 55%, rgba(32,21,16,.12) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 620px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); }
.hero h1 em { font-style: italic; color: var(--amber); }
.hero-lead { font-size: 17px; color: var(--muted); max-width: 46ch; margin: 20px 0 26px; }

section { padding: 76px 0; }
.sec-head { text-align: center; max-width: 46ch; margin: 0 auto 40px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 48px); }
.sec-head h2 em { font-style: italic; color: var(--amber); }
.sec-head p { color: var(--muted); margin: 14px 0 0; }

.value-strip { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; padding: 20px 0; }
.value-row span { font-size: 13px; color: var(--muted); }
.value-row b { color: var(--amber); }

/* ---------- Box builder (centerpiece) ---------- */
.builder { background: var(--bg-2); }
.builder-steps { display: grid; gap: 40px; }
.step-block .step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.step-block .step-num { font-family: var(--display); font-size: 22px; color: var(--amber); }
.step-block h3 { font-size: 22px; }
.step-block .step-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0 34px; }

.size-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.size-opt { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 20px; cursor: pointer; text-align: center; transition: border-color .15s, transform .15s; }
.size-opt:hover { border-color: var(--amber); transform: translateY(-2px); }
.size-opt.active { border-color: var(--amber); background: rgba(224,164,88,.08); }
.size-opt .sz-name { font-family: var(--display); font-size: 19px; margin-bottom: 4px; }
.size-opt .sz-count { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.size-opt .sz-price { font-family: var(--display); color: var(--amber); font-size: 22px; }

.roast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.roast-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; position: relative; transition: border-color .15s, transform .15s; }
.roast-card:hover { transform: translateY(-2px); }
.roast-card.selected { border-color: var(--amber); }
.roast-card .rc-media { aspect-ratio: 4/3; position: relative; }
.roast-card .rc-media img { width: 100%; height: 100%; object-fit: cover; }
.roast-card .rc-check { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(32,21,16,.7); border: 2px solid var(--paper); display: grid; place-items: center; color: transparent; font-size: 14px; }
.roast-card.selected .rc-check { background: var(--amber); border-color: var(--amber); color: #2a1908; }
.roast-card .rc-body { padding: 14px 16px; }
.roast-card h4 { font-family: var(--display); font-size: 16px; margin: 0 0 4px; }
.roast-card p { font-size: 12.5px; color: var(--muted); margin: 0; }
.roast-card.disabled { opacity: .4; cursor: not-allowed; }

.freq-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.freq-opt { background: var(--panel); border: 2px solid var(--line); border-radius: 100px; padding: 12px 22px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .15s; }
.freq-opt:hover { border-color: var(--amber); }
.freq-opt.active { background: var(--amber); color: #2a1908; border-color: var(--amber); }
.freq-opt .fq-save { display: block; font-size: 11px; font-weight: 700; opacity: .8; margin-top: 2px; }

/* Summary panel */
.summary-panel { position: sticky; bottom: 20px; background: var(--panel); border: 2px solid var(--amber); border-radius: var(--r); padding: 22px 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; box-shadow: 0 20px 50px -24px rgba(0,0,0,.6); margin-top: 10px; }
.summary-info .prog { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.summary-info .prog b { color: var(--amber); }
.summary-info .sel-list { font-size: 13.5px; color: var(--paper); }
.summary-price { text-align: right; }
.summary-price .amt { font-family: var(--display); font-size: 30px; color: var(--amber); display: block; }
.summary-price .per { font-size: 12px; color: var(--muted); }

/* Singles shop */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--amber); }
.card-media { aspect-ratio: 1/1; background: #241811; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.card-body h3 { font-size: 15.5px; font-family: var(--sans); font-weight: 600; }
.card-body .price { font-family: var(--display); color: var(--amber); font-weight: 600; }

.lifestyle img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--r); }

.site-footer { background: #180f0a; padding: 52px 0 28px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.foot-brand { max-width: 30ch; } .foot-brand .brand { margin-bottom: 12px; } .foot-brand p { color: var(--muted); font-size: 13.5px; margin: 0; }
.foot-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col h5 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 9px; }
.foot-col a:hover { color: var(--paper); }
.foot-bottom { padding-top: 18px; font-size: 12px; color: #6e5c4a; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Overlay shell (singles quick-view, cart, checkout) ---------- */
.overlay-scrim { position: fixed; inset: 0; background: rgba(20,13,9,.72); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.overlay-scrim.open { opacity: 1; pointer-events: auto; }

.quickview { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(820px, calc(100% - 40px)); max-height: 86vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 101; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.quickview.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.qv-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r) 0 0 var(--r); }
.qv-body { padding: 32px; position: relative; }
.qv-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.qv-close:hover { color: var(--paper); }
.qv-body h3 { font-size: 24px; margin: 6px 0 6px; }
.qv-price { font-family: var(--display); font-size: 21px; color: var(--amber); margin-bottom: 14px; }
.qv-desc { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 100px; }
.qty-stepper button { width: 36px; height: 36px; background: none; border: 0; color: var(--paper); font-size: 16px; cursor: pointer; }
.qty-stepper span { min-width: 30px; text-align: center; font-weight: 700; }

.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 101; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 18px; }
.cart-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.cart-close:hover { color: var(--paper); }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-empty { color: var(--muted); text-align: center; padding: 60px 20px; font-size: 14px; }
.cart-line { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; background: #241811; }
.cart-line .cl-name { font-size: 14px; font-weight: 600; }
.cart-line .cl-variant { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-line .cl-price { font-family: var(--display); color: var(--amber); font-size: 14px; margin-top: 8px; }
.cart-line .cl-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line .qty-stepper button { width: 26px; height: 26px; font-size: 13px; }
.cart-line .remove-btn { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.cart-line .remove-btn:hover { color: var(--danger); }
.cart-foot { padding: 22px 24px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.cart-subtotal b { color: var(--amber); font-family: var(--display); }

.checkout { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(720px, calc(100% - 32px)); max-height: 88vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 102; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.checkout.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.checkout-inner { padding: 36px; position: relative; }
.checkout-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; }
.checkout-close:hover { color: var(--paper); }
.steps-track { display: flex; gap: 8px; margin-bottom: 30px; }
.steps-track span { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps-track span::after { content: ""; display: block; height: 100%; width: 0; background: var(--amber); transition: width .3s ease; }
.steps-track span.done::after, .steps-track span.active::after { width: 100%; }
.co-step { display: none; }
.co-step.active { display: block; }
.co-step h3 { font-size: 22px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--paper); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); }
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.co-actions { display: flex; gap: 12px; margin-top: 26px; }
.demo-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }
.review-list { border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin-bottom: 14px; }
.review-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-line:last-child { border-bottom: 0; }
.upsell-row { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 13.5px; }
.upsell-row input { accent-color: var(--amber); width: 16px; height: 16px; }
.upsell-row b { color: var(--amber); }
.review-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; padding-top: 14px; }
.review-total b { color: var(--amber); font-family: var(--display); }
.confirm { text-align: center; padding: 20px 0; }
.confirm .check { width: 64px; height: 64px; border-radius: 50%; background: var(--amber); color: #2a1908; display: grid; place-items: center; margin: 0 auto 20px; font-size: 30px; font-weight: 800; }
.confirm h3 { font-size: 26px; margin-bottom: 10px; }
.confirm .order-no { font-family: var(--display); color: var(--amber); font-size: 15px; margin-bottom: 18px; }
.confirm p { color: var(--muted); max-width: 40ch; margin: 0 auto 24px; }

html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .size-opts { grid-template-columns: 1fr; }
  .roast-grid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .summary-panel { grid-template-columns: 1fr; text-align: center; }
  .summary-price { text-align: center; }
  .qv-grid { grid-template-columns: 1fr; }
  .qv-media img { border-radius: var(--r) var(--r) 0 0; max-height: 280px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 16px 24px 22px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 59; }
  .nav-links.open a { padding: 10px 0; font-size: 14px; }
  .roast-grid, .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .checkout-inner, .qv-body { padding: 22px; }
  .step-block .step-sub { margin-left: 0; }
}
