/* Layout: logo badge beside the wordmark over a river line; coffees shown as bag labels — one full-width horizontal row each. */
/* Brand palette taken from the Flat River Roasters logo and current site: navy ground, cream type, badge blue, cup copper. Single theme by design. */
:root {
  --bg: #DADADA;         /* light grey ground */
  --surface: #F4F5F7;
  --ink: #23304A;        /* site navy */
  --muted: #4A556E;
  --line: #B2B5BC;
  --river: #23304A;      /* navy: primary buttons on grey */
  --river-ink: #F6F2EB;
  --accent: #8F6131;     /* cup copper, a touch deeper for the grey ground */
  --ore: #8A5A2A;
  --blue: #3F588F;       /* site button blue */
  --on-band: #F6F2EB;
  --band-1: #304F6B; --band-2: #5A3E2B; --band-3: #996938; --band-4: #18233A; --band-5: #3F588F; --band-6: #7B2D30;
  --display: "Outfit", "Avenir Next", "Century Gothic", "Trebuchet MS", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light;
}
/* Cream surfaces (coffee cards, story band) flip the tokens to navy-on-cream, like the logo's centre. */
.coffee, .story { --bg: #F6F2EB; --surface: #F6F2EB; --ink: #23304A; --muted: #56617A; --line: #D9D2C1; --river: #304F6B; --river-ink: #F6F2EB; --ore: #8A5A2A; --accent: #996938; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tag { font: 500 0.75rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.btn { font: 600 0.95rem/1 var(--body); border: 0; border-radius: 4px; padding: 0.85rem 1.2rem; background: var(--river); color: var(--river-ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.08); }
.btn.drip { background: #996938; color: #FFFFFF; }  /* cup copper, so the merch button stands apart */
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1rem; padding-block: 0.5rem; flex-wrap: wrap; }
.brand { font: 700 1.1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 44px; height: 44px; display: block; }
.brand span { color: var(--accent); }
.top nav { display: flex; gap: 1.25rem; font-size: 0.92rem; }
.top nav a { text-decoration: none; }
.top nav { align-items: center; }
.top nav a.drip-link { background: #996938; color: #FFFFFF; font-weight: 600; padding: 0 0.75rem; height: 36px; display: inline-flex; align-items: center; border-radius: 4px; text-decoration: none; }
.top nav a.drip-link:hover { filter: brightness(1.1); text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cart-btn { white-space: nowrap; font: 600 0.85rem/1 var(--body); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; text-transform: uppercase; background: var(--ink); color: var(--bg); border: 0; border-radius: 4px; padding: 0 0.8rem; height: 36px; display: inline-flex; align-items: center; cursor: pointer; }
.top nav a { white-space: nowrap; }
@media (max-width: 560px) { .top nav a[href$="#story"], .top nav a[href$="#passion"] { display: none; } }
@media (max-width: 560px) { .top nav { order: 3; width: 100%; gap: 0.5rem 0.9rem; font-size: 0.82rem; flex-wrap: wrap; } .brand { font-size: 0.95rem; letter-spacing: 0.03em; } .brand img { width: 36px; height: 36px; } }

/* Hero */
.hero .wrap { padding-block: clamp(2rem, 5vw, 4rem) 0; display: grid; gap: 1.5rem; }
.hero-top { display: flex; flex-wrap: wrap-reverse; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.hero-top > div { display: grid; gap: 1.25rem; min-width: 0; flex: 1 1 420px; }
.hero-logo { flex: 0 0 auto; }
.hero-logo { width: clamp(200px, 30vw, 360px); height: auto; display: block; }
.hero h1 { font-size: clamp(2.7rem, 9vw, 6.5rem); line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--accent); display: block; }
.lede { max-width: 34rem; font-size: 1.15rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.river { display: block; width: 100%; height: clamp(48px, 8vw, 96px); margin-top: 1.5rem; }
.river path { fill: none; stroke: var(--blue); stroke-linecap: round; }
.river path + path { stroke: var(--river); }

/* Sections */
section { scroll-margin-top: 5rem; }
.sec .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); display: grid; gap: 2rem; }
.sec-head { display: grid; gap: 0.6rem; }
.sec-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.sec-head p { max-width: 40rem; color: var(--muted); }

/* Coffee cards */
.four { display: grid; gap: 1.25rem; }
.coffee { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.band { background: var(--bandc); color: var(--on-band); padding: 1.25rem 1.25rem 1.4rem; display: grid; gap: 1.6rem; align-content: space-between; min-height: 11rem; }
/* A coffee with a photo: the photo fills the middle of the box, with a colored strip above and below for the words */
.band.has-photo { padding: 0; gap: 0; grid-template-rows: auto 1fr auto; align-content: stretch; }
.band.has-photo .tag { padding: 0.9rem 1.25rem; background: var(--bandc); opacity: 1; }
.band.has-photo .photo { min-height: 120px; background-size: cover; background-position: center; }
.band.has-photo h3 { padding: 0.9rem 1.25rem 1rem; background: var(--bandc); }
.band .tag { color: var(--on-band); opacity: 0.8; }
.band h3 { font-size: clamp(1.45rem, 2.2vw, 1.7rem); overflow-wrap: anywhere; }
.info { padding: 1.25rem; display: grid; gap: 1rem; flex: 1; align-content: start; }
.info > p { font-size: 0.95rem; }
.notes { font: 400 0.8rem/1.5 var(--mono); color: var(--muted); }
.roast { display: flex; align-items: center; gap: 0.6rem; }
.pips { display: flex; gap: 3px; }
.pips i { width: 18px; height: 8px; border-radius: 1px; background: var(--line); }
.pips i.on { background: var(--ink); }
.buy { display: grid; gap: 0.75rem; margin-top: auto; padding-top: 0.25rem; }
.opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg label { font-size: 0.82rem; padding: 0.4rem 0.65rem; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + label { outline: 2px solid var(--river); outline-offset: -3px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.buy-row .btn { white-space: nowrap; padding-inline: 1rem; }
.price { font: 700 1.6rem/1 var(--display); color: var(--ore); font-variant-numeric: tabular-nums; }
.flag { flex-direction: row; flex-wrap: wrap; }
.flag .band { flex: 2 1 300px; min-height: 12rem; }
.flag .band h3 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.flag .info { flex: 3 1 320px; padding: clamp(1.25rem, 3vw, 2rem); }
.flag .info > p { font-size: 1.05rem; }

/* Merch page */
.page-title { font-size: clamp(2.4rem, 7vw, 4.5rem); }
.three { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.art { background: #DCE1E9; display: grid; place-items: center; padding: 1rem; }
.art svg { width: 100%; max-width: 270px; height: auto; display: block; }
.art.photo { padding: 0; }
.art.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.art .pc { fill: var(--pc); stroke: rgb(24 35 58 / 0.28); stroke-width: 1; }
.art .pd { fill: var(--pc); filter: brightness(0.78); }
.art .ps { fill: none; stroke: var(--pc); stroke-width: 12; stroke-linecap: round; }
.art .ps.thin { stroke-width: 8; }
.art .sh { fill: rgb(24 35 58 / 0.14); }
.art .rim { fill: #AEB6C4; }
.art .lid { fill: #18233A; }
.art .ln { fill: none; stroke: rgb(140 146 160 / 0.7); stroke-width: 2; stroke-linejoin: round; }
.art .glass { fill: #F6F2EB; stroke: rgb(24 35 58 / 0.3); stroke-width: 1; }
.art .wick { stroke: #18233A; stroke-width: 2; fill: none; }
.art .flame { fill: #E0A04A; }
.merch .info { display: flex; flex-direction: column; }  /* pins options, price and button to the card bottom so rows line up */
.merch .info .buy { margin-top: auto; }
.merch .info h3 { font-size: 1.3rem; margin-top: 0.3rem; }

/* Grind + brew */
.split { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.split > div { display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.split h3 { font-size: 1.4rem; }
.spec { border-top: 2px solid var(--ink); }
.spec div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font: 500 0.9rem/1.6 var(--mono); text-align: right; }
dl { margin: 0; }

/* Story */
.story { background: var(--bg); color: var(--ink); }
.story .tag, .story .sec-head p { color: inherit; opacity: 0.75; }
.story-body { display: grid; gap: 1.1rem; max-width: 42rem; font-size: 1.08rem; }
.towns { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font: 700 clamp(1.3rem, 3vw, 2rem)/1.1 var(--display); text-transform: uppercase; }
.towns span:nth-child(even) { color: var(--accent); }

/* Newsletter: navy band, as on the original coming-soon page */
.news { --bg: #23304A; --ink: #F6F2EB; --muted: #B9C2D3; --line: #405072; --river: #F0E7CD; --river-ink: #23304A; --accent: #D7A066; background: var(--bg); color: var(--ink); }
.news .wrap { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; gap: 2rem 4rem; }
.news form { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; min-width: 0; }
.news .field { display: grid; gap: 0.35rem; min-width: 0; }
.news .field.full, .news form .btn, .news .form-msg { grid-column: 1 / -1; }
.news .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.news label { font-size: 0.85rem; font-weight: 500; }
.news input { font: 400 1rem var(--body); height: 48px; padding: 0 0.8rem; border: 1.5px solid var(--line); border-radius: 4px; background: #F6F2EB; color: #23304A; width: 100%; }
.news form .btn { justify-self: start; }
.news .form-msg { font-size: 0.95rem; }
.news .form-msg strong { user-select: all; }
@media (max-width: 420px) { .news form { grid-template-columns: 1fr; } }

/* Footer */
footer .wrap { padding-block: 2rem 3rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: 0.9rem; color: var(--muted); }
.story-body .addr { font-family: var(--mono); font-weight: 500; user-select: all; }
footer .addr { font-family: var(--mono); user-select: all; color: var(--ink); }

/* Cart drawer */
dialog.cart { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(420px, 100%); max-width: 100%; border: 0; padding: 0; background: var(--surface); color: var(--ink); }
dialog.cart::backdrop { background: rgb(0 0 0 / 0.45); }
.cart-in { height: 100%; display: flex; flex-direction: column; padding: calc(1.25rem + env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) calc(1.25rem + env(safe-area-inset-bottom, 0px)) 1.25rem; gap: 1rem; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { font-size: 1.6rem; }
.x { background: none; border: 0; color: inherit; font: 500 0.8rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; padding: 0.5rem; }
.lines { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; align-content: start; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.lines strong { font-weight: 600; }
.lines small { color: var(--muted); font: 400 0.78rem var(--mono); }
.qty { display: inline-flex; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.qty button { width: 28px; height: 28px; border: 1.5px solid var(--ink); background: none; color: inherit; border-radius: 4px; cursor: pointer; font-size: 1rem; line-height: 1; }
.lt { font-variant-numeric: tabular-nums; text-align: right; }
.empty { color: var(--muted); padding: 1rem 0; }
.total { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.checkout-note { font-size: 0.9rem; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0.8rem; display: grid; gap: 0.6rem; }
.checkout-note pre { margin: 0; font: 400 0.78rem/1.5 var(--mono); white-space: pre-wrap; user-select: all; }


/* Larger email address (info@flatriverroasters.com) */
.story-body .addr { font-size: 1.3rem; }
footer .addr { font-size: 1.1rem; }
.checkout-note strong { font-size: 1.05rem; }
