/* Kafe Cero homepage: sales-first.
   Palette: terracotta #A6533D (accent only), sage #87927A, cream #E9DCC8. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"); }

:root {
  --terra: #A6533D;
  --terra-deep: #8E4532;
  --sage: #87927A;
  --sage-text: #4F5A45;
  --cream: #E9DCC8;
  --paper: #F3EBDD;
  --ink: #201E1C;
  --white: #FFFFFF;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --wrap: 1312px;
  --pad: 100px; /* side margin */
}
/* Element rules are scoped to this template so the active theme's styles cannot override them. */
body.kafecero-design-b { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.kcb, .kcb * { box-sizing: border-box; margin: 0; padding: 0; }
.kcb img { display: block; max-width: 100%; height: auto; }
.kcb a { color: inherit; text-decoration: none; }
.kcb button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.kcb h1, .kcb h2, .kcb h3 { font-weight: 400; letter-spacing: normal; }
/* Formerly set by the theme stylesheet and global styles, which the homepage no longer loads. */
.kcb h1, .kcb h2, .kcb h3 { color: #000; }
.kcb h1, .kcb h2, .kcb h3, .kcb p { text-wrap: pretty; }
.kcb :focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.kcb .wrap { max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.kcb .icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kcb .skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 12px 18px; border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 600; }
.kcb .skip:focus { top: 16px; }
.kcb .menu-panel { z-index: 9; }
/* Holly for the Christmas season (owner, November 12: "a little more festive. Use our product labels as an
   example"). Like the garlands on the bags' holiday labels: one in each corner (top of the shop section,
   bottom of the footer) and a bow garland on the footer rule. Shown only while the body has .kc-holly,
   which the plugin adds from November 1 to January 6. */
.kcb .holly { display: none; }
.kc-holly .kcb .holly { display: block; position: absolute; width: clamp(170px, 14vw, 280px); height: auto; aspect-ratio: 1; pointer-events: none; }
.kc-holly .kcb #shop, .kc-holly .kcb .footer, .kc-holly .kcb .footer-bottom { position: relative; }
.kc-holly .kcb .holly--tl { top: 0; left: 0; }
.kc-holly .kcb .holly--tr { top: 0; right: 0; }
.kc-holly .kcb .holly--bl { bottom: 0; left: 0; }
.kc-holly .kcb .holly--br { bottom: 0; right: 0; }
/* The swag's stem sits on the footer rule, centred above the logo. */
.kc-holly .kcb .holly--bow { top: 0; left: 50%; width: 260px; aspect-ratio: 340 / 96; transform: translate(-50%, -55%); }
.kc-holly .kcb .footer-bottom { padding-top: 56px; }
@media (max-width: 760px) {
  .kc-holly .kcb .holly { width: clamp(96px, 30vw, 120px); }
  .kc-holly .kcb .holly--bow { width: 200px; }
}

/* ---------- header ---------- */
/* The header floats over the landing photo in paper colour. Above 760px the large cream logo sits in its
   centre cell (owner, 0.9.2: "align it with the rest of the header", desktop only). The logo is taller
   than the row, so negative margins centre it on the same line as the links and buttons. Phones keep the
   logo in the landing sky instead (see .landing-logo) and hide this one, keeping its cell. */
.kcb { position: relative; }
.kcb .header { --row: 104px; --logo-w: clamp(180px, 22vw, 340px); position: absolute; top: 0; left: 0; right: 0; z-index: 7; padding-top: 52px; color: var(--paper); }
.kcb .header :focus-visible { outline-color: var(--paper); }
.kcb .header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--row); }
.kcb .nav { display: flex; gap: 36px; font-size: 15px; font-weight: 500; }
.kcb .nav a { padding: 10px 0; }
.kcb .logo { display: block; margin-block: calc((var(--row) - var(--logo-w) * .5017) / 2); }
.kcb .logo img { width: var(--logo-w); filter: drop-shadow(0 4px 24px rgba(18,38,56,.28)); }
.kcb .header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.kcb .header .kc-bag-trigger { color: inherit; }
.kcb .contact-pill { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border: 1px solid currentColor; border-radius: 99px; font-size: 14px; font-weight: 600; }
.kcb .menu-btn { display: none; width: 46px; height: 46px; border-radius: 99px; border: 1px solid currentColor; place-items: center; }
.kcb .menu-panel { display: none; color: var(--ink); }
.kcb .menu-panel :focus-visible { outline-color: var(--ink); }

/* ---------- buttons ---------- */
.kcb .btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 56px; padding: 0 30px; border-radius: 99px; font-weight: 600; font-size: 16px; white-space: nowrap; }
.kcb .btn .icon { width: 18px; height: 18px; }
.kcb .btn--terra { background: var(--terra); color: var(--white); }
.kcb .btn--terra:hover { background: var(--terra-deep); }
.kcb .btn--ink { background: var(--ink); color: var(--paper); }
.kcb .btn--ink:hover { background: #3a3530; }
.kcb .btn--block { width: 100%; }
/* Small text links get a touch-sized hit area without moving anything. */
.kcb .footer-bottom nav a, .kcb .social { position: relative; }
.kcb .footer-bottom nav a::after, .kcb .social::after { content: ""; position: absolute; inset: -12px -8px; }

/* ---------- landing ---------- */
/* The owner's photo of Cotopaxi above Quito fills the first screen (0.9.0). Two cloud layers drift
   right to left: the far one passes behind the summit and ridges (the ridge cutout sits on top of it),
   the near one crosses in front. The scene keeps the photo's proportions and covers the screen, so the
   layers stay locked to the mountain at every size. Clouds only move by transform.
   Above 760px (0.9.4) the mountain's centre line (x 717 of 1568, 45.73%) sits on the page's centre line,
   under the header logo; the scene is wide enough (100vw / (2 × .4573)) to still cover both sides. The
   summit (row 420 of 1045, 40.19%) sits 42% down the screen as far as the photo allows, instead of
   dropping lower on wide screens. Phones keep the 0.9.1 framing (see the phone rules). */
.kcb .landing { --landing-h: max(100svh, 560px); --scene-w: max(100vw * 1.0934, var(--landing-h) * 1.5005); position: relative; height: var(--landing-h); overflow: hidden; background: #4a97c4;
  /* Holds its strength through the header row (links at 93–115px), so the paper-coloured links reach 4.5:1 on the sky. */
  --veil: linear-gradient(rgba(24,40,52,.5) 0, rgba(24,40,52,.4) 130px, rgba(24,40,52,0) 270px); }
.kcb .landing-scene { position: absolute; left: 50%; width: var(--scene-w); aspect-ratio: 1568 / 1045; transform: translateX(-45.73%);
  top: clamp(var(--landing-h) - var(--scene-w) / 1.5005, var(--landing-h) * .42 - var(--scene-w) / 1.5005 * .4019, 0px); }
.kcb .landing-photo, .kcb .landing-ridge { position: absolute; left: 0; width: 100%; height: auto; }
.kcb .landing-photo { top: 0; }
.kcb .landing-ridge { top: 36.36%; }
.kcb .cloud { position: absolute; left: 0; width: 200%; background-repeat: repeat-x; background-size: 50% 100%; will-change: transform; animation: kc-drift var(--drift) linear infinite; }
/* ?v= changes whenever asset-sources/landing-clouds.py regenerates the strips (browsers keep them a day). */
.kcb .cloud--back { top: 25.84%; height: 38.28%; background-image: url(img/clouds-back.webp?v=2); --drift: 150s; }
.kcb .cloud--front { top: 33.49%; height: 28.71%; background-image: url(img/clouds-front.webp?v=2); --drift: 85s; animation-delay: -30s; }
@keyframes kc-drift { to { transform: translateX(-50%); } }
.kcb .landing.is-away .cloud { animation-play-state: paused; }
/* A dark veil under the header for the paper-coloured navigation; paper rises from the bottom into the next section. */
.kcb .landing::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--veil), linear-gradient(rgba(243,235,221,0) 80%, rgba(243,235,221,.75) 93%, var(--paper) 100%); }
/* Phones only: the logo sits in the sky 90px above the summit (40.2% down the scene) but never climbs into
   the header row (--clear). Its height is half its width. */
.kcb .landing-logo { display: none; }
.kcb .landing-foot { position: absolute; z-index: 1; left: 0; right: 0; bottom: 44px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.kcb .landing-scroll { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 99px; border: 1px solid rgba(32,30,28,.5); }
.kcb .landing-scroll .icon { width: 18px; height: 18px; transform: rotate(90deg); }
.kcb .landing-caption { position: absolute; z-index: 1; left: max(var(--pad), (100% - var(--wrap)) / 2); bottom: 28px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--sage-text); }
@media (prefers-reduced-motion: reduce) { .kcb .cloud { animation: none; } }

/* ---------- shop intro ---------- */
/* The page's headline opens the shop section (0.9.9); the coffees come straight after the landing.
   Facts all four coffees share are said once here, and each card keeps what differs. */
/* Centred since 0.9.11 (owner): eyebrow, headline, the two lines under it, then the filters. The headline
   takes one line where it fits and splits into even lines where it does not. */
.kcb .intro { max-width: 100%; }
.kcb .intro .eyebrow { margin-bottom: 10px; }
.kcb .intro h1 { font-family: var(--serif); font-size: 112px; line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
.kcb .intro h1 em { font-style: italic; color: var(--terra); }
.kcb .intro-sub { margin-top: 14px; font-size: 20px; line-height: 1.45; color: #2b2724; }
.kcb .intro-facts { margin-top: 6px; font-size: 14px; color: #5f554c; }
/* Offers (owner, November 14: "small… discrete, non overpowering"): outlined pills under the intro lines, in the
   quiet grey of the line above them. The store adds them only while an offer is running. */
.kcb .offers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; list-style: none; }
.kcb .offers li { padding: 6px 14px; border: 1px solid rgba(32, 30, 28, .18); border-radius: 17px; font-size: 13px; line-height: 1.5; color: #5f554c; text-wrap: balance; }
.kcb .offers strong { font-weight: 700; letter-spacing: .04em; color: var(--ink); }
/* The bags' blurred drop shadows are costly to repaint on phones. Their own layers keep the
   painted result while scrolling instead of redrawing the filters. */
.kcb .tile { will-change: transform; }

/* ---------- sections ---------- */
.kcb .section { padding: 72px 0 80px; }
.kcb .section-head { display: flex; flex-direction: column; align-items: center; gap: 28px; margin-bottom: 48px; text-align: center; }
.kcb .h2 { font-family: var(--serif); font-size: 76px; line-height: .95; letter-spacing: -.015em; }
.kcb .h2 em { font-style: italic; color: var(--sage-text); }
.kcb .eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--sage-text); margin-bottom: 18px; }

/* ---------- product cards ---------- */
.kcb .filters { display: flex; gap: 10px; flex: none; }
.kcb .filter { height: 42px; padding: 0 18px; border-radius: 99px; background: var(--cream); font-size: 15px; font-weight: 500; white-space: nowrap; }
.kcb .filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
/* Columns may shrink below their content (minmax(0, …)), so a card can never push the page sideways.
   Rows are spaced by the cards' own margin, leaving the grid's row tracks free for the shared rows below. */
.kcb .grid-4 { --row-gap: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; margin-bottom: calc(-1 * var(--row-gap)); }
.kcb .card { display: flex; flex-direction: column; margin-bottom: var(--row-gap); }
.kcb .card[hidden] { display: none; }
.kcb .tile { position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--sage); }
/* The four bag photos differ in proportion; fitting each inside the same box keeps the bags within 4% of one size. */
.kcb .tile img { position: absolute; left: 50%; bottom: 44px; width: 58%; height: 72%; object-fit: contain; object-position: 50% 100%; transform: translateX(-50%); filter: drop-shadow(0 18px 16px rgba(30,20,10,.32)); }
.kcb .tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(#efe4d2, #e2d3bb); box-shadow: 0 -1px 0 rgba(255,255,255,.6) inset; }
.kcb .badge { position: absolute; top: 16px; left: 16px; z-index: 2; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; }
.kcb .card-body { padding: 20px 2px 0; display: flex; flex-direction: column; flex: 1; }
/* Scales down on narrow desktops so "Typica Nacional &" still fits a line of its column. */
.kcb .card-name { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 34px); line-height: 1; }
.kcb .notes { margin-top: 10px; font-size: 15px; color: #4a433d; }
.kcb .meta { margin-top: 4px; font-size: 13px; color: #6a5f55; }
.kcb .card .btn { margin-top: auto; height: 50px; }
.kcb .card .meta { margin-bottom: 20px; }
/* Lot information (owner, November 14) is in every card's markup and shows in the enlarged card only. */
.kcb .lot { display: none; }
/* "Learn More" (owner, November 23) opens the enlarged card, as the photo does; site.js leaves it out of the enlarged copy. */
.kcb .learn-more { align-self: center; justify-self: center; height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(32, 30, 28, .35); display: inline-flex; align-items: center; }
.kcb .learn-more:hover { text-decoration-color: currentColor; }
/* Cards in a row share their rows (photo, name, notes, details, button, Learn More): a name that wraps onto a
   second line keeps its neighbours' notes and buttons level with its own. */
@supports (grid-template-rows: subgrid) {
  .kcb .card { display: grid; grid-template-rows: subgrid; grid-row: span 6; }
  .kcb .card-body { display: grid; grid-template-rows: subgrid; grid-row: span 5; }
}
.kcb .order-note { margin-top: 28px; font-size: 14px; color: #5f554c; }
.kcb .order-note a, .kcb .origin p a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Gesha feature ---------- */
.kcb .feature-wrap { padding-bottom: 80px; }
.kcb .feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--cream); border-radius: 8px; overflow: hidden; }
.kcb .feature-img { position: relative; min-height: 440px; }
.kcb .feature-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; }
.kcb .feature-body { padding: 48px 64px 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.kcb .feature-body .h2 { font-size: 88px; }
.kcb .origin-line { margin-top: 12px; font-size: 16px; color: #4a433d; }
.kcb .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.kcb .chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 99px; background: var(--paper); font-size: 15px; font-weight: 500; }
.kcb .chip .icon { width: 20px; height: 20px; color: var(--sage-text); }
.kcb .fine { margin-top: 16px; font-size: 14px; color: #5f554c; }

/* ---------- cherry to cup ---------- */
.kcb .making { background: var(--sage); }
.kcb .making .wrap { padding-top: 96px; padding-bottom: 96px; }
.kcb .making .h2 { margin-bottom: 56px; }
/* White, not paper: 3.3:1 on sage (paper was 2.8:1). */
.kcb .making .h2 em { color: var(--white); }
.kcb .steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.kcb .steps::before { content: ""; position: absolute; left: 46px; right: 0; top: 45px; height: 2px; background: var(--paper); }
.kcb .step { position: relative; }
.kcb .step-dot { width: 92px; height: 92px; border-radius: 99px; background: var(--paper); display: grid; place-items: center; position: relative; z-index: 1; }
.kcb .step-dot svg { width: 46px; height: 46px; stroke: var(--sage-text); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.kcb .step h3 { margin-top: 22px; font-family: var(--serif); font-size: 40px; line-height: 1; }
.kcb .step p { margin-top: 6px; font-size: 15px; }

/* ---------- family story ---------- */
/* Owner, November 26: the family heritage as an overview, in order: Dora and Luis, their three children,
   the family today. "Our story" links land here. Photos keep their own proportions; only the collage's
   main photo may lose a few pixels at its sides so it matches the two snapshots beside it.
   Headings are centred, not left-aligned (owner, November 26, 0.9.28): each chapter opens with its label
   set into a rule, the name large under it with its last words in italic, then the text.
   Since the spacing pass (0.9.32) the centred text sits beside its photos on wide screens, the sides
   alternating, so a chapter is only as tall as its photos; below 900px the photos follow the text. */
.kcb .family { background: var(--cream); }
.kcb .family > .wrap { padding-top: 72px; padding-bottom: 80px; }
.kcb .family-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.kcb .family-head > p:last-child { margin-top: 14px; font-size: 19px; }
.kcb .gens { display: grid; gap: 64px; list-style: none; }
.kcb .gen { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; align-items: center; text-align: center; }
.kcb .gen:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.kcb .gen:nth-child(even) .gen-text { order: 2; }
.kcb .gen-step { display: flex; align-items: center; gap: 24px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--terra-deep); }
.kcb .gen-step::before, .kcb .gen-step::after { content: ""; flex: 1; height: 1px; background: rgba(32,30,28,.2); }
.kcb .gen h3 { margin-top: 22px; font-family: var(--serif); font-size: 60px; line-height: .98; letter-spacing: -.015em; text-wrap: balance; }
.kcb .gen h3 em { font-style: italic; color: var(--sage-text); }
.kcb .gen-text p:not(.gen-step) { margin: 16px auto 0; max-width: 42ch; font-size: 17px; color: #4a433d; }
.kcb .family-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.kcb .family-more .icon { width: 18px; height: 18px; }
.kcb .gen-photos--one { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; }
.kcb .gen-photos img { width: 100%; border-radius: 6px; background: #d9cbb4; }
.kcb .gen-photos figcaption { margin-top: 10px; font-size: 14px; color: #5f554c; }
/* Photos side by side at one height: each takes width in proportion to its aspect ratio (--a). */
.kcb .photo-row { display: flex; gap: 16px; align-items: flex-start; }
.kcb .photo-row > figure { flex: var(--a) 1 0; min-width: 0; }
/* One large photo with two snapshots stacked beside it, about the same height. */
.kcb .collage { display: grid; grid-template-columns: minmax(0, 2.96fr) minmax(0, 1fr); gap: 16px; }
.kcb .collage-main { height: 100%; object-fit: cover; }
.kcb .collage-side { display: flex; flex-direction: column; gap: 16px; }
.kcb .collage figcaption { grid-column: 1 / -1; margin-top: -6px; }

/* ---------- farm stories (spacing only) ---------- */
/* The farm stories (#kc-farms) come from the teammate's kafe-cero-lot-galleries plugin, which swaps them in
   for "From cherry to cup" on the live page; its own farms.css styles them. The owner asked for less
   scrolling after the cards (November 26, 0.9.32), so these rules only tighten that section's padding,
   heading sizes and photo height. Nothing else about it is set here; delete this block to get its own
   spacing back. */
.kcb #kc-farms .kcfs-intro { padding: clamp(32px, 4vw, 56px) 6vw 28px; }
.kcb #kc-farms .kcfs-intro h2 { font-size: clamp(44px, 5.4vw, 80px); }
.kcb #kc-farms .kcfs-intro p { font-size: clamp(16px, 1.3vw, 19px); }
.kcb #kc-farms .kcfs-inner { padding-block: clamp(28px, 3.6vw, 52px); gap: clamp(24px, 4.5vw, 72px); }
.kcb #kc-farms .kcfs-farm h3 { font-size: clamp(38px, 4.2vw, 62px); margin: 8px 0 14px; }
.kcb #kc-farms .kcfs-lead { font-size: clamp(20px, 1.8vw, 27px); margin-bottom: 12px; }
.kcb #kc-farms .kcfs-bodycopy { line-height: 1.6; }
.kcb #kc-farms .kcfs-lots { margin-top: 18px; padding-top: 14px; }
.kcb #kc-farms .kcfs-captionrow { min-height: 48px; padding-top: 8px; }
@media (min-width: 821px) {
  .kcb #kc-farms .kcfs-inner, .kcb #kc-farms .kcfs-comarca .kcfs-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kcb #kc-farms .kcfs-frame { aspect-ratio: 1.5; }
}

/* ---------- origin ---------- */
/* The owner's photos drift right to left in a strip. Each is shown at or below its own pixel size,
   never stretched (0.7.9). */
.kcb .origin { position: relative; background: var(--ink); color: var(--paper); padding: 64px 0; }
.kcb .origin :focus-visible { outline-color: var(--paper); }
.kcb .origin .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.kcb .origin .h2, .kcb .origin .h2 em { font-size: 80px; color: var(--paper); }
.kcb .origin p { margin-top: 14px; font-size: 18px; }
.kcb .origin-toggle { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(243,235,221,.5); border-radius: 99px; }
.kcb .origin-toggle[hidden] { display: none; }
.kcb .origin-toggle:hover { border-color: var(--paper); }
.kcb .origin-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.kcb .origin-toggle[aria-pressed="true"] .is-pause, .kcb .origin-toggle[aria-pressed="false"] .is-play { display: none; }
/* Without the loop (no script, reduced motion) the row simply scrolls sideways. */
.kcb .origin-reel { margin-top: 40px; overflow-x: auto; scrollbar-width: none; }
.kcb .origin-reel::-webkit-scrollbar { display: none; }
.kcb .origin-track { display: flex; width: max-content; padding: 0 var(--pad); }
.kcb .origin-set { display: flex; gap: 20px; list-style: none; }
.kcb .origin-set img { max-width: none; width: auto; height: 320px; border-radius: 6px; background: #2e2a27; }
/* The loop: the row is repeated past the screen's width and doubled (site.js), so sliding it by half
   its width brings it back exactly where it started. Hovering or the pause button stops it. */
.kcb .origin-reel.is-rolling { overflow: hidden; }
.kcb .origin-reel.is-rolling .origin-track { padding: 0; will-change: transform; animation: kc-reel var(--reel-time, 40s) linear infinite; }
.kcb .origin-reel.is-rolling .origin-set { padding-right: 20px; }
.kcb .origin-reel:hover .origin-track, .kcb .origin-reel.is-paused .origin-track, .kcb .origin-reel.is-away .origin-track { animation-play-state: paused; }
@keyframes kc-reel { to { transform: translateX(-50%); } }

/* ---------- footer ---------- */
.kcb .footer { background: var(--cream); }
.kcb .footer .wrap { padding-top: 64px; padding-bottom: 84px; }
.kcb .footer-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; }
.kcb .footer h2 { font-family: var(--serif); font-size: 68px; line-height: .95; }
.kcb .footer h2 em { font-style: italic; color: var(--sage-text); }
.kcb .write label, .kcb .write p { display: block; font-size: 15px; margin-bottom: 12px; }
.kcb .write .btn { width: auto; }
/* The logo sits in the centre, above the links, with the copyright line under them (owner, November 10). */
.kcb .footer-bottom { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(32,30,28,.18); display: flex; flex-direction: column; align-items: center; gap: 18px; font-size: 14px; text-align: center; }
.kcb .footer-bottom nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.kcb .socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
.kcb .social { display: inline-flex; align-items: center; gap: 8px; }
.kcb .social .icon { width: 20px; height: 20px; }
.kcb .footer-logo img { width: 128px; }

/* ---------- tablets ---------- */
/* Tablets use a smaller side margin. With 100px margins four cards did not fit: the fourth ran off the
   screen and the page scrolled sideways (fixed in 0.9.8). */
@media (max-width: 1100px) {
  :root { --pad: 64px; }
  .kcb .landing-foot { bottom: 52px; gap: 14px; }
  .kcb .landing-caption { left: 0; right: 0; text-align: center; bottom: 18px; }
  .kcb .intro h1 { font-size: 96px; }
  .kcb .h2 { font-size: 64px; }
  .kcb .grid-4 { column-gap: 20px; }
  .kcb .card-name { font-size: clamp(26px, 2.9vw, 30px); }
  .kcb .card .btn { padding: 0 12px; font-size: 15px; }
  .kcb .feature-img { min-height: 420px; }
  .kcb .feature-body { padding: 44px 40px 40px; }
  .kcb .feature-body .h2 { font-size: 76px; }
  .kcb .gen { gap: 28px 44px; }
  .kcb .gen h3 { font-size: 50px; }
}
/* Small tablets: two cards a row, and the Gesha photo above its text instead of a sliver beside it. */
@media (max-width: 899px) {
  /* Three header links (Shop, Our story, Account) keep clear of the centred logo. */
  .kcb .nav { gap: 22px; }
  .kcb .grid-4 { --row-gap: 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kcb .card-name { font-size: 34px; }
  .kcb .card .btn { padding: 0 30px; font-size: 16px; }
  .kcb .feature { grid-template-columns: minmax(0, 1fr); }
  .kcb .feature-img { min-height: 0; aspect-ratio: 16 / 9; }
  .kcb .feature-body { padding: 36px 48px 40px; }
  .kcb .step h3 { font-size: 34px; }
  .kcb .gens { gap: 56px; }
  .kcb .gen, .kcb .gen:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .kcb .gen:nth-child(even) .gen-text { order: 0; }
  .kcb .gen h3 { font-size: 56px; }
  .kcb .gen-text p:not(.gen-step) { max-width: 58ch; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --pad: 34px; }
  .kcb .header { padding-top: 24px; }
  .kcb .header .wrap { height: 76px; }
  .kcb .nav { display: none; }
  .kcb .header { --row: 76px; --logo-w: 118px; }
  .kcb .header .logo { visibility: hidden; }
  .kcb .landing { --clear: 112px; --landing-logo-w: clamp(200px, 64vw, 260px); --veil: linear-gradient(rgba(24,40,52,.42) 0, rgba(24,40,52,0) 190px); }
  .kcb .landing-scene { top: 0; width: max(100%, var(--landing-h) * 1.5005); transform: translateX(-50%); }
  .kcb .landing-logo { display: block; position: absolute; z-index: 1; left: 50%; top: max(var(--clear), max(100vw / 1.5005, var(--landing-h)) * .402 - 90px - var(--landing-logo-w) * .5017); width: var(--landing-logo-w); transform: translateX(-50%); }
  .kcb .landing-logo img { width: 100%; filter: drop-shadow(0 4px 24px rgba(18,38,56,.28)); }
  .kcb .contact-pill, .kcb .hide-sm { display: none; }
  .kcb .menu-btn { display: inline-grid; }
  .kcb .menu-panel { position: absolute; left: var(--pad); right: var(--pad); top: 100%; padding: 8px 20px; border-radius: 10px; background: var(--paper); box-shadow: 0 20px 40px -18px rgba(32,30,28,.45); }
  .kcb .menu-panel.is-open { display: block; }
  .kcb .menu-panel a { display: block; padding: 14px 0; font-size: 18px; font-weight: 500; border-bottom: 1px solid rgba(32,30,28,.12); }
  .kcb .menu-panel a:last-child { border-bottom: 0; }
  .kcb .landing-caption { letter-spacing: .06em; }
  /* Two lines down to 320 px wide: "has a Legacy" is 4.07 em long. */
  .kcb .intro h1 { font-size: min(62px, 17.5vw); }
  .kcb .intro-sub { font-size: 16px; margin: 12px auto 0; max-width: 300px; }
  .kcb .intro-facts { font-size: 13px; }
  .kcb .offers { gap: 6px; margin-top: 14px; }
  .kcb .offers li { padding: 5px 12px; font-size: 12px; }
  .kcb .section { padding: 48px 0 52px; }
  .kcb .section-head { gap: 20px; margin-bottom: 28px; }
  .kcb .h2 { font-size: 52px; }
  .kcb .filter { height: 38px; padding: 0 14px; font-size: 14px; }
  .kcb .grid-4 { --row-gap: 28px; column-gap: 12px; }
  .kcb .tile img { bottom: 32px; width: 62%; height: 74%; }
  .kcb .tile::after { height: 36px; }
  .kcb .badge { top: 10px; left: 10px; height: 24px; letter-spacing: .04em; padding: 0 8px; }
  .kcb .card-name { font-size: 26px; }
  .kcb .notes { font-size: 13px; margin-top: 6px; }
  .kcb .meta { display: none; }
  @supports (grid-template-rows: subgrid) {
    .kcb .card { grid-row: span 5; }
    .kcb .card-body { grid-row: span 4; }
  }
  .kcb .learn-more { height: 40px; font-size: 13px; }
  .kcb .card .notes { margin-bottom: 12px; }
  /* 13 px keeps "Bean Me Up · $35" on one line down to 360 px screens. */
  .kcb .card .btn { height: 44px; font-size: 13px; padding: 0 8px; }
  .kcb .feature-wrap { padding-bottom: 48px; }
  .kcb .feature { border-radius: 0; margin: 0 calc(-1 * var(--pad)); }
  .kcb .feature-img { min-height: 260px; aspect-ratio: auto; }
  .kcb .feature-body { padding: 28px var(--pad) 32px; }
  .kcb .feature-body .h2 { font-size: 64px; }
  .kcb .feature-body .btn { width: 100%; }
  .kcb .chips { margin: 18px 0; gap: 8px; }
  .kcb .chip { height: 38px; font-size: 14px; }
  .kcb .making .wrap { padding-top: 64px; padding-bottom: 64px; }
  .kcb .making .h2 { margin-bottom: 36px; }
  .kcb .steps { grid-template-columns: 1fr 1fr; gap: 36px 12px; }
  .kcb .steps::before { display: none; }
  .kcb .step-dot { width: 72px; height: 72px; }
  .kcb .step-dot svg { width: 36px; height: 36px; }
  .kcb .step h3 { font-size: 32px; margin-top: 14px; }
  .kcb .family > .wrap { padding-top: 48px; padding-bottom: 52px; }
  .kcb .family-head { margin-bottom: 36px; }
  .kcb .family-head > p:last-child { font-size: 17px; }
  .kcb .gens { gap: 48px; }
  .kcb .gen { gap: 22px; }
  .kcb .gen-step { gap: 14px; }
  .kcb .gen h3 { margin-top: 16px; font-size: 40px; }
  .kcb .gen-text p:not(.gen-step) { margin-top: 12px; font-size: 16px; }
  .kcb .family-more { margin-top: 14px; }
  .kcb .collage-side { gap: 10px; }
  /* Phones: photos one under the other, so the group photo is not shrunk to a strip. The portrait is
     narrower than the screen: at full width it alone filled half of it. */
  .kcb .photo-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .kcb .photo-row > figure { flex: none; }
  .kcb .photo-row > figure:first-child { width: 68%; align-self: center; }
  /* The large photo on top, the two snapshots side by side under it at one height. */
  .kcb .collage { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kcb .collage-main { height: auto; }
  .kcb .collage-side { flex-direction: row; align-items: flex-start; }
  .kcb .collage-side img { flex: var(--a) 1 0; min-width: 0; }
  .kcb .collage figcaption { margin-top: 0; }
  .kcb .origin { padding: 48px 0; }
  .kcb .origin .h2, .kcb .origin .h2 em { font-size: 52px; }
  .kcb .origin-reel { margin-top: 28px; }
  .kcb .origin-set { gap: 14px; }
  .kcb .origin-reel.is-rolling .origin-set { padding-right: 14px; }
  .kcb .origin-set img { height: 240px; }
  /* Phones have no room beside the heading: the pause button sits on the strip's lower right. */
  .kcb .origin-toggle { position: absolute; z-index: 1; right: calc(var(--pad) + 8px); bottom: 60px; width: 42px; height: 42px; background: rgba(32,30,28,.6); border-color: rgba(243,235,221,.75); }
  .kcb .footer .wrap { padding-top: 48px; padding-bottom: 48px; }
  .kcb .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .kcb .footer h2 { font-size: 50px; }
  .kcb .footer-bottom { margin-top: 36px; }
  .kcb .footer-bottom nav { gap: 12px 20px; }
}

/* ---------- enlarged card ---------- */
/* Clicking a card's photo opens a larger copy of the card over the dimmed page (0.9.9; site.js builds it
   and animates it out of the photo, hence the top-left transform origin). It comes after every card rule,
   phones included, so its sizes win. Wide screens set the photo beside the text; phones stack them. */
/* No tap-highlight box over the photo on phones: the card opening is the feedback. */
.kcb .tile { -webkit-tap-highlight-color: transparent; }
.kcb .grid-4 .tile { cursor: zoom-in; }
.kcb .zoom-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(30,27,24,.55); }
/* Its height is 0.625 of its width (two columns, a 4:5 photo), so the last width limit keeps it inside short windows. */
.kcb .zoom { --zoom-w: min(1040px, 100vw - 48px, (100dvh - 48px) * 1.6); position: fixed; inset: 0; z-index: 901; margin: auto; width: var(--zoom-w); height: fit-content; max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-radius: 10px; background: var(--paper); box-shadow: 0 30px 80px -20px rgba(20,16,12,.6); transform-origin: 0 0; }
/* Sticky, so it stays in view when a tall card scrolls; the negative margin keeps it from taking up a row. */
.kcb .zoom-close { position: sticky; top: 14px; z-index: 3; display: block; width: 44px; height: 44px; margin: 14px 14px -58px auto; border: 1px solid currentColor; border-radius: 50%; background: var(--paper); font-size: 30px; line-height: 1; }
.kcb .zoom .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; grid-row: auto; margin: 0; }
/* The photo keeps its 4:5 shape as a minimum (half the card wide) and grows with the text beside it when
   the lot information makes that side the taller one. */
.kcb .zoom .tile { border-radius: 0; cursor: zoom-out; aspect-ratio: auto; min-height: calc(var(--zoom-w) * .625); }
.kcb .zoom .tile img { bottom: 9%; width: 68%; height: 80%; }
.kcb .zoom .tile::after { height: 11%; }
.kcb .zoom .badge { top: 20px; left: 20px; }
.kcb .zoom .card-body { display: flex; flex-direction: column; justify-content: center; grid-row: auto; padding: 48px; }
.kcb .zoom .card-name { font-size: clamp(36px, 4.6vw, 56px); }
.kcb .zoom .notes { margin: 16px 0 0; font-size: 18px; }
.kcb .zoom .meta { display: block; margin: 8px 0 18px; font-size: 15px; }
.kcb .zoom .lot { display: block; margin-bottom: 24px; }
.kcb .zoom .lot p { font-size: 15px; line-height: 1.5; color: #4a433d; }
.kcb .zoom .lot dl { margin-top: 16px; border-top: 1px solid rgba(32, 30, 28, .14); }
.kcb .zoom .lot dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgba(32, 30, 28, .14); }
.kcb .zoom .lot dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-text); }
.kcb .zoom .lot dd { font-size: 14px; }
.kcb .zoom .card .btn { margin-top: 0; height: 56px; padding: 0 30px; font-size: 16px; }
/* Short screens (a 1366 x 768 laptop leaves about 650 px): tighter, so the button stays in view. */
@media (min-width: 761px) and (max-height: 720px) {
  .kcb .zoom .card-body { padding: 28px 48px; }
  .kcb .zoom .card-name { font-size: clamp(34px, 4vw, 44px); padding-right: 16px; }
  .kcb .zoom .notes { margin-top: 12px; font-size: 17px; }
  .kcb .zoom .lot { margin-bottom: 18px; }
  .kcb .zoom .lot p { font-size: 14px; }
  .kcb .zoom .lot dl { margin-top: 12px; }
  .kcb .zoom .lot dl div { padding: 6px 0; }
  .kcb .zoom .card .btn { height: 50px; }
}
@media (max-width: 760px) {
  .kcb .zoom { width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .kcb .zoom .card { grid-template-columns: minmax(0, 1fr); }
  .kcb .zoom .tile { aspect-ratio: 10 / 11; min-height: 0; }
  .kcb .zoom .card-body { padding: 22px 22px 24px; }
  .kcb .zoom .card-name { font-size: 40px; }
  .kcb .zoom .notes { margin-top: 10px; font-size: 16px; }
  .kcb .zoom .meta { margin: 6px 0 20px; font-size: 14px; }
  /* On phones the button stays in view under the photo; the lot information follows it. */
  .kcb .zoom .lot { order: 1; margin: 20px 0 0; }
  .kcb .zoom .lot p { font-size: 14px; }
  .kcb .zoom .card .btn { height: 52px; }
}
@media (prefers-reduced-motion: no-preference) { html:has(body.kafecero-design-b) { scroll-behavior: smooth; } }

/* ---------- coffee pages ---------- */
/* Each coffee's own page (product.php) is its enlarged card laid into the page: the photo beside the text on
   wide screens, stacked on phones, with the order panel (bag.css) before the lot information. The header
   and footer are the store pages' (pages.css), so the page lines up with their 1200px column. */
.kcb.kcp { display: block; }
.kcb .kcp-wrap { box-sizing: content-box; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.kcb .kcp-crumbs { margin: 28px 0 24px; font-size: 13px; color: #5f554c; }
.kcb .kcp-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.kcb .kcp-main .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; grid-row: auto; column-gap: 56px; align-items: start; margin: 0; }
/* The photo box and its row of lot photos stay in view beside the longer text. */
.kcb .kcp-media { position: sticky; top: 24px; min-width: 0; }
/* Square, so the photo and its row of thumbnails fit the first screen of a laptop, and the farm photos
   (mostly landscape) are not lost in a tall box. */
.kcb .kcp-main .tile { aspect-ratio: 1; border-radius: 10px; }
.kcb .kcp-main .tile img { bottom: 9%; width: 68%; height: 80%; }
.kcb .kcp-main .tile::after { height: 11%; }
.kcb .kcp-main .badge { top: 20px; left: 20px; }
/* A lot photo fills the box whole, uncropped, on the light ground the enlarged card uses. */
.kcb .kcp-main .tile.is-photo { background: #e5dfd3; }
.kcb .kcp-main .tile.is-photo::after, .kcb .kcp-main .tile.is-photo .badge { display: none; }
.kcb .kcp-main .tile img.kcp-photo { inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; transform: none; filter: none; }
.kcb .kcp-photos { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.kcb .kcp-step { flex: 0 0 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; }
.kcb .kcp-step:hover { background: var(--cream); }
.kcb .kcp-rail { flex: 1; display: flex; gap: 6px; min-width: 0; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
.kcb .kcp-rail button { flex: 0 0 56px; height: 56px; padding: 2px; border: 2px solid transparent; border-radius: 7px; }
.kcb .kcp-rail button[aria-pressed="true"] { border-color: var(--terra-deep); }
.kcb .kcp-rail img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.kcb .kcp-rail .kcp-bag-thumb img { object-fit: contain; background: var(--sage); }
.kcb .kcp-main .card-body { display: flex; flex-direction: column; grid-row: auto; padding: 24px 0 0; }
.kcb .kcp-main .card-name { font-size: clamp(44px, 5vw, 64px); }
.kcb .kcp-main .notes { margin: 16px 0 0; font-size: 18px; }
.kcb .kcp-main .meta { display: block; margin: 8px 0 28px; font-size: 15px; }
.kcb .kcp-main .lot { display: block; margin-top: 36px; }
.kcb .kcp-main .lot p { font-size: 15px; line-height: 1.6; color: #4a433d; }
.kcb .kcp-main .lot dl { margin-top: 16px; border-top: 1px solid rgba(32, 30, 28, .14); }
.kcb .kcp-main .lot dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgba(32, 30, 28, .14); }
.kcb .kcp-main .lot dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-text); }
.kcb .kcp-main .lot dd { font-size: 14px; }
/* The other coffees: homepage cards whose photo and button open their own pages. */
.kcb .kcp-more { margin-top: 96px; }
.kcb .kcp-more-title { margin-bottom: 28px; font-family: var(--serif); font-size: 44px; line-height: 1; }
.kcb .kcp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kcb a.tile { display: block; }
@media (max-width: 899px) {
  .kcb .kcp-main .card { column-gap: 32px; }
  .kcb .kcp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .kcb .kcp-grid .card-name { font-size: 26px; }
  .kcb .kcp-grid .card .btn { padding: 0 10px; font-size: 14px; }
}
@media (max-width: 760px) {
  .kcb .kcp-wrap { padding: 0 20px; }
  .kcb .kcp-crumbs { margin: 16px 0; }
  .kcb .kcp-main .card { grid-template-columns: minmax(0, 1fr); }
  .kcb .kcp-media { position: static; }
  /* Wider than tall on phones, so the Whole bean / Ground choice is in the first screen under the thumbnails. */
  .kcb .kcp-main .tile { aspect-ratio: 5 / 4; }
  .kcb .kcp-photos { margin-top: 6px; }
  .kcb .kcp-step { flex-basis: 36px; height: 36px; font-size: 24px; }
  .kcb .kcp-rail button { flex-basis: 48px; height: 48px; }
  .kcb .kcp-main .card-body { padding: 22px 0 0; }
  .kcb .kcp-main .card-name { font-size: 44px; }
  .kcb .kcp-main .notes { margin-top: 10px; font-size: 16px; }
  .kcb .kcp-main .meta { margin: 6px 0 22px; font-size: 14px; }
  .kcb .kcp-main .lot { margin-top: 28px; }
  .kcb .kcp-main .lot p { font-size: 14px; }
  .kcb .kcp-more { margin-top: 64px; }
  .kcb .kcp-more-title { font-size: 36px; }
}
@media (max-width: 599px) {
  .kcb .kcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
}
