/* Chilero Coffee: homepage prototype styles. Mobile first. */

/* ---------- Fonts (moved here from css/fonts.css: one less render-blocking request) ---------- */
/* Fonts hosted on chilero.coffee itself (no Google Fonts request, so Google never sees visitors).
   From Google Fonts (all SIL Open Font License); Latin and Latin Extended only. */

/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/dm-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/dm-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/dm-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/dm-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/press-start-2p-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/press-start-2p-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black: #08090B;
  --surface: #131519;
  --line: #2B2F36;
  --text: #F4F1EA;
  --muted: #A8ADB5;
  --red: #D42A26;
  /* Red behind button text: a touch darker than --red so #F4F1EA text reaches 4.81:1 (WCAG AA, also at 15px). */
  --red-btn: #CB2824;
  --dot: #E8432F;
  --yellow: #E3BE2A;
  --cyan: #14A9CC;
  --cyan-lt: #3FC6E6;
  --magenta: #B02A7E;

  --font-head: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-pixel: 'Press Start 2P', var(--font-mono);

  /* Signature offset shadow: solid yellow down-right, thin cyan edge on its left. */
  --shadow: 4px 4px 0 var(--yellow), 2px 4px 0 var(--cyan);
  --shadow-lg: 5px 5px 0 var(--yellow), 2px 5px 0 var(--cyan);
  --shadow-press: 1px 1px 0 var(--yellow), 0 1px 0 var(--cyan);
  --outline: 2px solid #000;

  --gutter: 16px;
  --bar-h: 68px;
  --nav-h: 44px;  /* menu row under the logo on phones */
  --header-h: calc(var(--bar-h) + var(--nav-h));
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --bar-h: 80px; }
}
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

html.no-scroll, html.no-scroll body { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
/* <picture> only picks the file (WebP or PNG/JPG); the <img> inside is laid out as if the wrapper weren't there. */
picture { display: contents; }
picture > source { display: none; } /* else Chromium gives the empty <source> a box, e.g. an extra flex gap */
a { color: var(--cyan-lt); text-underline-offset: 3px; }
a:hover { color: var(--text); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 62ch; }

:focus-visible {
  outline: 3px solid var(--cyan-lt);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--yellow); color: #000; font-weight: 700;
  padding: 10px 14px; border: var(--outline);
}
.skip-link:focus { top: 10px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono { font-family: var(--font-mono); }

/* ---------- Buttons, tags, panels ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 10px 20px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: var(--outline);
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); color: var(--btn-fg); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--shadow-press); }
.btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed; opacity: .6; transform: none; box-shadow: none;
}

/* Red buttons: --red-btn (not --red) so the text passes 4.5:1 contrast at every size, including .btn--small. */
.btn--red { --btn-bg: var(--red-btn); --btn-fg: var(--text); font-size: 1.1875rem; }
.btn--yellow { --btn-bg: var(--yellow); --btn-fg: #000; }
.btn--ghost { --btn-bg: transparent; }
.btn--small { min-height: 40px; padding: 6px 14px; font-size: .9375rem; }

.tag {
  display: inline-block;
  padding: 3px 8px;
  border: var(--outline);
  background: var(--yellow);
  color: #000;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.tag--cyan { background: var(--cyan); }
.tag--dark { background: var(--surface); color: var(--text); border-color: var(--line); }
.tag--sold { background: var(--magenta); color: var(--text); }

.panel {
  background: var(--surface);
  border: var(--outline);
  box-shadow: var(--shadow);
}

/* Red dot texture: reserved for the single most important thing (impact counter). */
.dot-panel {
  position: relative;
  background-color: var(--red);
  background-image: radial-gradient(circle, var(--dot) 2.2px, transparent 2.6px);
  background-size: 11px 11px;
  border: var(--outline);
  box-shadow: var(--shadow-lg);
}

/* Short red–yellow–cyan stripe marking each new section. */
.stripe {
  display: block;
  width: 84px;
  height: 10px;
  border: var(--outline);
  background: linear-gradient(90deg, var(--red) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--cyan) 66.66%);
  margin-bottom: 14px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}
.kicker__num {
  font-family: var(--font-pixel);
  font-size: .625rem;
  color: var(--yellow);
  letter-spacing: 0;
}

.bean {
  position: absolute;
  width: 30px;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(63, 198, 230, .25));
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  /* The faint grid from the current chilero.coffee page: in the navbar and the footer. */
  background-color: rgba(8, 9, 11, .92);
  background-image:
    linear-gradient(to right, rgba(20, 169, 204, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 169, 204, .09) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
}
.topbar__logo { display: flex; align-items: center; height: var(--bar-h); flex-shrink: 0; }
.topbar__logo img {
  /* chilero-c-192.png: the C mark with its blue glow removed, on a transparent background. */
  height: calc(var(--bar-h) - 10px);
  width: auto;
}
.topbar__nav a { color: var(--muted); text-decoration: none; font-weight: 700; white-space: nowrap; }
.topbar__nav a:hover { color: var(--text); }
.topbar__nav a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* Phones and tablets: the menu is a second row under the logo, scrolling sideways if it doesn't fit. */
.topbar__nav {
  order: 3;
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--nav-h);
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  font-size: .875rem;
  /* Soft fade on the right edge hints that the row scrolls on very narrow phones. */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
.topbar__nav::-webkit-scrollbar { display: none; }
.topbar__nav a { padding: 8px 0; }
/* Very narrow phones: "Lunches" instead of "School lunches" so the whole menu fits. */
.nav-short { display: none; }
@media (max-width: 419px) {
  .topbar__nav { gap: 14px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  /* Two dropdowns (Learn, Side quests): smaller carets so the row still fits. */
  .topbar__nav .nav-caret { margin-left: 3px; border-width: 4px; border-bottom: 0; }
}
@media (max-width: 379px) { .topbar__nav { gap: 11px; } }
.topbar__nav a[aria-current] { text-underline-offset: 6px; }

@media (min-width: 900px) {
  .topbar__nav {
    order: 0;
    flex: 0 1 auto;
    height: auto;
    gap: 24px;
    margin: 0 12px 0 auto;
    padding: 0;
    border-top: 0;
    overflow: visible;
    font-size: inherit;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* "Learn ▾" and "Side quests ▾" menus (js/nav.js).
   Phones: full width under the header, big rows. From 900px: a small dropdown under the link. */
.nav-caret {
  display: inline-block; margin-left: 6px; vertical-align: 2px;
  border: 5px solid transparent; border-bottom: 0; border-top-color: currentColor;
  transition: transform .12s var(--ease);
}
.topbar__nav a.is-open { color: var(--text); }
.topbar__nav a.is-open .nav-caret { transform: rotate(180deg); }
.menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 41;
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  padding: 6px var(--gutter) 10px;
}
.menu[hidden] { display: none; }
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; }
.menu__list li + li { border-top: 1px solid var(--line); }
.menu__item { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 4px; color: var(--text); text-decoration: none; }
.menu__item:hover, .menu__item:focus-visible { color: var(--text); background: rgba(255, 255, 255, .04); }
.menu__item b { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.0625rem; line-height: 1.2; }
.menu__item small { display: block; color: var(--muted); font-size: .875rem; }
/* Learn menu: the step number of the Coffee learning path (1 Plant, 2 Process, 3 Taste). */
.menu__num { display: inline-block; margin-right: 8px; padding: 3px 4px 2px; border: 2px solid #000; background: var(--yellow); color: #000; font-family: var(--font-pixel); font-size: .5rem; font-weight: 400; line-height: 1; vertical-align: 3px; }
.menu__item[aria-current] b { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.menu__img { width: 38px; height: 48px; object-fit: cover; border: var(--outline); flex: none; image-rendering: pixelated; }
.menu__img--icon { object-fit: contain; border: 0; }
/* Links that leave chilero.coffee (A word of HOPE): own section under a thicker divider, with a small label. */
.menu__list li.menu__outside { border-top: 3px solid var(--line); margin-top: 6px; padding-top: 2px; }
.menu__outside-label {
  margin: 8px 4px 0; max-width: none;
  font-family: var(--font-mono); font-size: .75rem; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 900px) {
  .menu {
    right: auto; width: 300px; top: calc(100% + 4px);
    padding: 6px 10px;
    border: var(--outline); box-shadow: var(--shadow);
  }
}

/* Links to #sections land below the sticky header. */
section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 32px 0 56px;
}
.hero__grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
/* Hero photo: text first on phones, photo on the right from 900px. */
.hero__photo { order: 2; }
.hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: var(--outline);
  box-shadow: var(--shadow-lg);
}
/* The slanted wordmark with its soft cyan glow, as in the brand guide. */
.hero__wordmark {
  display: block;
  width: min(320px, 72%);
  height: auto;
  margin: 0 0 22px;
  filter: drop-shadow(0 0 18px rgba(20, 169, 204, .45)) drop-shadow(0 0 4px rgba(20, 169, 204, .35));
}
.say {
  font-family: var(--font-mono);
  font-size: .9375rem;
  color: var(--muted);
  margin: 0 0 10px;
}
.say b { color: var(--cyan-lt); font-weight: 500; }
.hero h1 {
  font-size: clamp(2.25rem, 8.5vw, 4.25rem);
  text-transform: none;
}
.hero h1 .hl { color: var(--yellow); }
.hero__lead { font-size: 1.1875rem; color: var(--text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 20px; }
.order-note {
  font-size: .9375rem;
  color: var(--muted);
  border-left: 4px solid var(--cyan);
  padding-left: 12px;
  margin: 0 0 14px;
}
.now-roasting {
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--muted);
  margin: 0;
}
.now-roasting a { color: var(--text); }
.hero .bean--1 { top: 14px; right: 8%; transform: rotate(18deg); }
.hero .bean--2 { bottom: 20px; left: 4%; transform: rotate(-24deg); width: 24px; }

@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}

/* ---------- Sections ---------- */

.section { position: relative; padding: 56px 0; }
@media (min-width: 768px) { .section { padding: 88px 0; } }
.section h2 { font-size: clamp(2rem, 7vw, 3.5rem); }
.section__lead { font-size: 1.1875rem; color: var(--muted); }

/* ---------- IMA / impact ---------- */

.ima__grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .ima__grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 56px; }
}
.ima__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ima__links { display: flex; flex-direction: column; gap: 4px; }
.ima__logo {
  width: 104px; height: auto;
  background: #F7F7F7;
  border: var(--outline);
  box-shadow: var(--shadow);
}
.promise {
  font-size: 1.25rem;
  font-weight: 700;
  border-left: 4px solid var(--yellow);
  padding-left: 14px;
}
.placeholder-text {
  font-family: var(--font-mono);
  font-size: .9375rem;
  color: var(--yellow);
  border: 2px dashed var(--yellow);
  padding: 12px 14px;
  background: rgba(227, 190, 42, .06);
}

.impact { padding: 22px 18px 20px; color: var(--text); }
@media (min-width: 768px) { .impact { padding: 32px 30px 28px; } }
.impact__title {
  font-size: clamp(1.375rem, 4.6vw, 1.875rem);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 14px;
}
.impact__card {
  background: var(--black);
  border: var(--outline);
  padding: 16px;
}
.impact__kg {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--font-mono);
  margin: 0 0 12px;
}
.impact__kg-now { font-size: clamp(2.5rem, 12vw, 3.75rem); line-height: 1; color: var(--yellow); font-weight: 500; }
.impact__kg-goal { font-size: 1.25rem; color: var(--text); }
.impact__togo { font-family: var(--font-mono); font-size: .875rem; color: var(--muted); margin: 10px 0 0; }

/* Chunky pixel progress bar: 30 cells of 0.5 kg. */
.pixel-bar {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 2px;
  padding: 3px;
  background: #000;
  border: 2px solid var(--line);
  height: 30px;
}
.pixel-bar__cell { background: #1d2026; }
.pixel-bar__cell.is-on { background: var(--yellow); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .25); }
.pixel-bar__cell.is-on:nth-child(3n) { background: #EBCB45; }

.impact__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 0;
}
.impact__stat {
  background: var(--black);
  border: var(--outline);
  padding: 12px 14px;
  margin: 0;
}
.impact__stat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  line-height: 1.1;
  color: var(--cyan-lt);
}
.impact__stat dt { font-size: .9375rem; color: var(--text); margin-top: 4px; }
.impact__stat--wide { grid-column: 1 / -1; }
.impact__stats > div { display: flex; flex-direction: column-reverse; }
.impact__note {
  font-size: .9375rem;
  margin: 14px 0 0;
  background: var(--black);
  border: var(--outline);
  padding: 10px 14px;
  max-width: none;
}

.ima-gallery { margin-top: 48px; }
.ima-gallery__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.ima-gallery h3 { font-size: 1.5rem; margin: 0; }
.ima-gallery__credit { font-size: .875rem; color: var(--muted); margin: 0; }
.photo-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
/* Three photos: one wide + two side by side on phones, one row of three from tablet up. */
.photo-grid > li:first-child:nth-last-child(3) { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .photo-grid > li:first-child:nth-last-child(3) { grid-column: auto; }
}
.photo-grid__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: var(--outline);
  background: var(--surface);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.photo-grid__btn img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid__btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.photo-placeholder {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px dashed var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 10px, transparent 10px 20px),
    var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .8125rem;
  text-align: center;
  padding: 8px;
}
.photo-placeholder img { width: 22px; image-rendering: pixelated; opacity: .8; }

/* ---------- Coffees ---------- */

.coffees__head { display: grid; gap: 8px; align-items: center; }
.coffees__roaster { width: min(56%, 220px); margin: 0 auto; }
@media (min-width: 768px) {
  .coffees__head { grid-template-columns: 1fr minmax(200px, 270px); gap: 32px; }
  .coffees__roaster { width: 100%; }
}

.coffee-grid {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) { .coffee-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: start; } }

.coffee { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (min-width: 768px) { .coffee.is-open { grid-column: 1 / -1; } }

/* Card grid.
   Phone:  [img | body] / [actions] / [gallery] / [details]
   ≥520:   [media | body] / [media | actions] / [details]
   ≥768 open: [media | body] / [media | actions] / [media | details]  ← all text in the right column */
.coffee__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(124px, 42%) 1fr;
  grid-template-areas: "img body" "actions actions" "gallery gallery" "details details";
  column-gap: 14px;
  padding: 12px;
  cursor: pointer;
}
.coffee.is-open .coffee__card { cursor: default; }
.coffee__media { display: contents; }
.coffee__img { grid-area: img; }
.coffee__gallery { grid-area: gallery; }
.coffee__body { grid-area: body; }
.coffee__actions { grid-area: actions; margin-top: 14px; }
.coffee__details { grid-area: details; }

@media (min-width: 520px) {
  .coffee__card {
    grid-template-areas: "media body" "media actions" "details details";
    grid-template-rows: 1fr auto auto;
    column-gap: 20px;
    padding: 16px;
  }
  .coffee__media { display: block; grid-area: media; align-self: start; }
  .coffee__actions { margin-top: 12px; }
}
@media (min-width: 768px) {
  .coffee.is-open .coffee__card {
    grid-template-columns: 250px 1fr;
    grid-template-areas: "media body" "media actions" "media details";
    grid-template-rows: auto auto 1fr;
    column-gap: 28px;
    padding: 20px;
  }
}

.coffee__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
/* Real buttons sit above the stretched toggle so they stay clickable. */
.coffee__actions .btn, .coffee__gallery button { position: relative; z-index: 1; }

.coffee__toggle {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* Closed: the name button's click area covers the whole card. */
.coffee__toggle::after { content: ""; position: absolute; inset: 0; }
/* Open: it only covers the Close label in the top-right corner. */
.coffee.is-open .coffee__toggle::after { inset: 10px 10px auto auto; width: 112px; height: 44px; }
.coffee__toggle:focus-visible { outline: none; }
.coffee__toggle:focus-visible::after { outline: 3px solid var(--cyan-lt); outline-offset: -4px; }

.coffee__img {
  display: block;
  aspect-ratio: 4 / 5;
  border: var(--outline);
  overflow: hidden;
  background: var(--black);
}
.coffee__img img { width: 100%; height: 100%; object-fit: cover; }
.coffee__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.coffee__name { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1; }
.coffee__origin { display: block; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.coffee__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.coffee__notes { display: block; font-size: 1rem; line-height: 1.4; }
.coffee__price { display: block; font-family: var(--font-mono); font-size: 1.25rem; color: var(--yellow); margin-top: auto; }
.coffee.is-open .coffee__price { margin-top: 4px; }
.coffee__price small { color: var(--muted); font-size: .8125rem; }
.coffee__vat { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }

.coffee__more {
  /* Visual only: clicks fall through to the toggle underneath. */
  pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .875rem; color: var(--cyan-lt);
}
.coffee__more-icon {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border: 2px solid currentColor;
  line-height: 1;
}
.coffee__card:hover .coffee__more { color: var(--text); }
/* Open: the Details control becomes Close in the top-right corner. */
.coffee.is-open .coffee__more {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: var(--black);
  border: var(--outline);
  box-shadow: 3px 3px 0 var(--yellow), 1px 3px 0 var(--cyan);
  color: var(--text);
}
.coffee.is-open .coffee__more-icon { border: 0; width: auto; font-size: 1rem; }
/* Room for Close: above the content on phones, beside the name from 520px. */
.coffee.is-open .coffee__card { padding-top: 60px; }
@media (min-width: 520px) {
  .coffee.is-open .coffee__card { padding-top: 16px; }
  .coffee.is-open .coffee__body { padding-right: 110px; }
}
@media (min-width: 768px) {
  .coffee.is-open .coffee__card { padding-top: 20px; }
}

/* Gallery: hidden while closed. */
.coffee__gallery {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.coffee.is-open .coffee__gallery { display: grid; }
.coffee__gallery button { display: block; padding: 0; border: var(--outline); background: var(--black); cursor: zoom-in; aspect-ratio: 1; width: 100%; overflow: hidden; }
.coffee__gallery img { width: 100%; height: 100%; object-fit: cover; }
.coffee__gallery button:hover { box-shadow: var(--shadow); }
@media (min-width: 520px) { .coffee__gallery { margin-top: 10px; } }

/* Details: smooth expand that pushes the content below down. */
.coffee__details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.coffee.is-open .coffee__details { grid-template-rows: 1fr; }
.coffee__details-inner { min-height: 0; overflow: hidden; }
.coffee__details-body {
  padding-top: 18px;
  opacity: 0;
  transition: opacity .3s .1s;
}
.coffee.is-open .coffee__details-body { opacity: 1; }
.coffee__details-body > :last-child { margin-bottom: 0; }
.coffee__details h4 { font-size: 1.25rem; margin-bottom: .4em; }
.coffee__details h4:focus { outline: none; }
.coffee__details h4:focus-visible { outline: 3px solid var(--cyan-lt); }
.coffee__story { color: var(--muted); }
.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: .9375rem;
}
.specs dt { font-family: var(--font-mono); color: var(--muted); text-transform: uppercase; font-size: .8125rem; padding-top: 2px; }
.specs dd { margin: 0; }
.specs .num { font-family: var(--font-mono); }
/* Varietal → learn/varieties/: quiet, like the "How it's made" link. */
.specs__link { color: var(--text); text-decoration: underline dotted var(--cyan-lt); text-underline-offset: 4px; }
.specs__link:hover { color: var(--cyan-lt); }
/* "How washed coffee is made": link to the Learn page, under the specs. Quiet on purpose: DM to order is the main action. */
.coffee__learn {
  display: flex; align-items: center; gap: 14px;
  margin-top: 20px; padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: border-color .12s var(--ease);
}
.coffee__learn:hover { color: var(--text); border-color: var(--cyan-lt); }
.coffee__learn img { width: 36px; height: 45px; object-fit: cover; border: var(--outline); flex: none; image-rendering: pixelated; }
.coffee__learn b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1rem; line-height: 1.25; }
.coffee__learn small { display: block; color: var(--cyan-lt); font-size: .875rem; }
.coffee__learn + .coffee__learn { margin-top: 10px; }
.coffee__learn--taste img { object-fit: contain; background: #000; padding: 6px 4px; }
.coffee__card > .tag--sold { position: absolute; top: -12px; right: 12px; z-index: 2; }

/* ---------- Side quests (id "extras"): learn, wallpapers, game ---------- */

.extras { padding-top: 0; }
.extras__grid { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 22px; }
@media (min-width: 768px) { .extras__grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.extra {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px;
  height: 100%;
  color: var(--text);
  text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.extra:hover { color: var(--text); transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.extra:hover .extra__go { color: var(--yellow); }
.extra__img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; image-rendering: pixelated; }
.extra__img--phone { width: 48px; height: 86px; object-fit: cover; border: var(--outline); image-rendering: auto; }
.extra__img--card { width: 56px; height: 70px; object-fit: cover; border: var(--outline); }
.extra__text { display: flex; flex-direction: column; gap: 2px; }
.extra__title { font-family: var(--font-head); font-weight: 900; font-size: 1.375rem; line-height: 1.1; }
.extra__desc { color: var(--muted); }
.extra__go { font-family: var(--font-mono); font-size: .875rem; color: var(--cyan-lt); margin-top: 4px; }

/* ---------- Footer ---------- */

.footer {
  padding: 48px 0 40px;
  /* Same faint grid as the navbar */
  background-color: var(--black);
  background-image:
    linear-gradient(to right, rgba(20, 169, 204, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 169, 204, .09) 1px, transparent 1px);
  background-size: 24px 24px;
}
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer .footer__sub { margin-top: 22px; }
.footer__logo { width: 170px; }
.footer__delivery { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.footer__robot { width: 120px; flex-shrink: 0; }
.footer__tagline { color: var(--muted); margin-top: 10px; }
.footer h2 { font-size: 1rem; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer__legal { margin-top: 32px; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Order chat (retro terminal) ---------- */

.chat {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--black);
  border: var(--outline);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line), 0 0 40px rgba(20, 169, 204, .2);
  font-family: var(--font-mono);
  color: var(--text);
  overflow: hidden;
}
.chat[hidden] { display: none; }
.chat.is-animating {
  transition: top .34s var(--ease), left .34s var(--ease), width .34s var(--ease), height .34s var(--ease);
}
.chat__inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  opacity: 0;
  transition: opacity .18s;
}
.chat.is-ready .chat__inner { opacity: 1; }

@media (max-width: 639px) {
  .chat { border: 0; box-shadow: none; }
}

/* Desktop: full-height drawer on the right. Its yellow + cyan edge faces the page. */
.chat.is-drawer {
  border: 0;
  border-left: 2px solid #000;
  box-shadow: -4px 0 0 var(--yellow), -6px 0 0 var(--cyan), -24px 0 48px rgba(0, 0, 0, .45);
}
/* Wide screens: the page moves aside so the drawer covers nothing. */
body { transition: padding-right .34s var(--ease); }
html.chat-docked body { padding-right: var(--chat-w, 440px); }
/* With less room beside the drawer, the hero stacks instead of squeezing. */
html.chat-docked .hero__grid { grid-template-columns: 1fr; gap: 28px; }
html.chat-docked .hero h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
html.chat-docked .hero__photo img { max-width: 560px; }

.chat__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.chat__robot { width: 40px; height: auto; flex-shrink: 0; margin: -4px 0; }
.chat__lights { display: flex; gap: 6px; }
.chat__lights span { width: 10px; height: 10px; border: 2px solid #000; }
.chat__lights span:nth-child(1) { background: var(--red); }
.chat__lights span:nth-child(2) { background: var(--yellow); }
.chat__lights span:nth-child(3) { background: var(--cyan); }
.chat__title { font-size: .875rem; color: var(--muted); margin: 0; font-weight: 400; font-family: var(--font-mono); flex: 1; }
.chat__close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--black);
  color: var(--text);
  border: var(--outline);
  font-size: 1.25rem;
  cursor: pointer;
}
.chat__close:hover { background: var(--red); }

.chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 8px;
  font-size: .9375rem;
  line-height: 1.55;
  scrollbar-color: var(--line) transparent;
  /* faint scanlines */
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
.msg { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__prompt { color: var(--cyan-lt); margin-right: .6ch; }
.msg--you { color: var(--text); }
.msg--you .msg__prompt { color: var(--muted); }
.msg--bot .msg__text { color: #DCE9EE; }
.msg--system { color: var(--muted); }
.msg--error .msg__text { color: var(--text); }
.msg--error .msg__prompt::after { content: ' !'; color: var(--dot); }
.msg .ok { color: var(--cyan-lt); }
.price { color: var(--yellow); }
.cursor {
  display: inline-block;
  width: .62em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--cyan-lt);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-block { margin: 4px 0 14px; padding-left: 2ch; }
.term-products { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.term-product {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  cursor: pointer;
}
.term-product:hover:not([disabled]) { border-color: var(--cyan); }
.term-product[disabled] { cursor: not-allowed; color: var(--muted); }
.term-product small { display: block; color: var(--muted); font-size: .8125rem; }

.term-cart { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.term-cart caption { text-align: left; color: var(--muted); padding-bottom: 4px; }
.term-cart td, .term-cart th { padding: 3px 0; vertical-align: top; font-weight: 400; text-align: left; }
.term-cart td:last-child, .term-cart th:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.term-cart tbody tr { border-bottom: 1px dashed var(--line); }
.term-cart tfoot th, .term-cart tfoot td { padding-top: 8px; color: var(--yellow); font-weight: 500; }

.term-pay { margin: 6px 0 14px 2ch; }
.term-pay .btn { text-transform: none; font-family: var(--font-head); }

.term-thanks {
  margin: 8px 0 14px;
  padding: 14px;
  border: 2px solid var(--cyan);
  background: rgba(20, 169, 204, .08);
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 1rem;
}
.term-thanks { align-items: center; }
.term-thanks img { width: 72px; flex-shrink: 0; }

.chat__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px 10px;
  max-height: 40vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.chat__chips:empty { display: none; }
.chip {
  flex-shrink: 0;
  min-height: 40px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  border: var(--outline);
  box-shadow: 3px 3px 0 var(--yellow), 1px 3px 0 var(--cyan);
  font-family: var(--font-mono);
  font-size: .875rem;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: #1c1f25; }
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip[disabled] { opacity: .5; cursor: wait; }

.chat__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-top: 2px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.chat__form .msg__prompt { color: var(--muted); margin: 0; }
.chat__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  background: var(--black);
  color: var(--text);
  border: 2px solid var(--line);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 1rem; /* ≥16px stops iOS zooming in */
  caret-color: var(--cyan-lt);
  caret-shape: block;
}
.chat__input:focus-visible { outline: 2px solid var(--cyan-lt); outline-offset: 0; border-color: var(--cyan); }
.chat__send {
  min-height: 44px;
  padding: 6px 14px;
  background: var(--cyan);
  color: #000;
  border: var(--outline);
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 11, .96);
  color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox__inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 10px var(--gutter) 16px;
}
.lightbox__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lightbox__count { font-family: var(--font-mono); color: var(--muted); }
.lightbox__figure { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 10px; place-items: center; }
.lightbox__figure img {
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  border: var(--outline);
  box-shadow: var(--shadow-lg);
}
.lightbox__caption { text-align: center; color: var(--muted); font-size: .9375rem; max-width: 70ch; }
.lightbox__nav { display: flex; justify-content: center; gap: 16px; margin-top: 12px; }
.lightbox__close {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: var(--outline); font-size: 1.375rem; cursor: pointer;
}

/* ---------- Mock pay page ---------- */

.paypage { min-height: 100vh; display: grid; place-items: center; padding: 32px var(--gutter); }
.paypage__card { width: min(100%, 520px); padding: 24px; }
.test-banner {
  background: var(--yellow);
  color: #000;
  border: var(--outline);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 10px 12px;
  margin: 0 0 20px;
  text-align: center;
  max-width: none;
}
.paypage h1 { font-size: 1.75rem; }
.paypage__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }

/* ---------- Cookie banner (js/analytics.js) ---------- */

.cookie-banner {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 16px;
  z-index: 70;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 18px;
  background: var(--surface);
  border: var(--outline);
  box-shadow: var(--shadow-lg);
  font-size: .9375rem;
}
.cookie-banner p { margin: 0 0 12px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer__link {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.footer__link:hover { color: var(--text); }
