/* Asili Coffee, direction t-b "Cobalt on sand": the page's own CSS.
   Only what the kit has no class for: the labelled placeholder frames (the user's decision: no stand-in
   photographs), the product hero's head row and stage around a placeholder (layout.css 3b keys them on an img),
   the FR / EN switcher, the logo as the close's wordmark, and the frames of each section.
   Colours and spacing come from the kit's tokens (--p-*, --s-*) and the custom properties below. */

:root {
  --ph-field: var(--p-surface);     /* the placeholder's flat field: one step off the sand */
  --ph-rule: var(--p-ink);          /* its 1px rule and its label: the logo's cobalt-navy */
  --ph-ink: var(--p-ink);
  --ph-pad: var(--s-4);
  --tap: 44px;                      /* the switcher's tap target */
  --logo-h: 26px;
}
.ground-inverse {
  --ph-field: var(--p-inv-surface); /* on the cobalt band: one step off the navy, the rule and label in sand */
  --ph-rule: var(--p-inv-ink);
  --ph-ink: var(--p-inv-ink);
}
/* selected text on the band: sand on navy, 8.91:1 (the kit's 30% accent tint gave 4.46:1, merge table 7 "Contrast") */
.ground-inverse ::selection { background: var(--p-inv-ink); color: var(--p-inv-bg); }
@media (min-width: 1024px) { :root { --ph-pad: var(--s-5); } }
@media (max-width: 639px) { :root { --logo-h: 22px; } }
/* a phone sets the display face narrower on Archivo's own width axis (110% on a desktop), so a headline of 40
   characters, and the longer French and Dutch ones, hold in two lines on 342px */
@media (max-width: 639px) { :root { --display-stretch: 85%; } }

/* ------------------------------------------------ the placeholder frame
   A flat field, a 1px rule, square corners, one translated label at the top-left in the text face. */
.ph {
  position: relative; display: block; min-width: 0; overflow: clip;
  background: var(--ph-field); color: var(--ph-ink);
  border: 1px solid var(--ph-rule); border-radius: 0;
}
.ph__label {
  position: absolute; top: var(--ph-pad); left: var(--ph-pad); right: var(--ph-pad); max-width: 40ch;
  font: 500 var(--t-small)/1.4 var(--font-text); letter-spacing: 0; color: var(--ph-ink); text-wrap: pretty;
}
/* a stand-in stock photograph (the user's decision, img/PLACEHOLDER-credits.md): things and places only, the
   photograph filling its frame, the label kept on a chip of the frame's field so "PLACEHOLDER" reads on every one
   (AGENTS.md). The kit's guard (system.js) outlines that word in red for screenshots; here it is meant, so the
   outline is lifted on the frames, and the guard's console count still lists them. */
.ph--stock > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ph--stock > .ph__label, .ph-stage > .ph__label {
  right: auto; width: max-content; max-width: min(44ch, calc(100% - 2 * var(--ph-pad)));
  padding: var(--s-1) var(--s-2); background: var(--ph-field); color: var(--ph-ink);
}
:is(.ph, .ph-stage) [data-placeholder], .ph[data-placeholder] { outline: none; }

/* ------------------------------------------------ the logo */
.nav__logo { color: var(--p-ink); }
.nav__logo svg.logo { height: var(--logo-h); width: auto; }

/* ------------------------------------------------ nav-centre with the switcher
   1024-1279: the words sit between the logo and the actions, so the switcher and a longer French
   button never reach them */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav--centre .nav__bar { grid-template-columns: auto minmax(0, 1fr) auto; }
}
.lang { display: flex; align-items: center; }
.lang__btn {
  position: relative; display: inline-grid; place-items: center; min-width: var(--tap); height: var(--tap);
  padding: 0 var(--s-2); border: 0; border-radius: var(--r-sm); background: none; cursor: pointer;
  color: var(--muted); font: 500 15px/1 var(--font-text);
  transition: color var(--dur) var(--ease);
}
.lang__btn::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: var(--s-2); height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--dur) var(--ease);
}
.lang__btn:hover, .lang__btn[aria-pressed="true"] { color: var(--ink); }
.lang__btn:hover::after, .lang__btn:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.lang__btn[aria-pressed="true"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .lang__btn::after { transition: none; } }
/* a tablet keeps the switcher in the bar beside the main button; a phone has it in the sheet, over the button */
@media (min-width: 640px) and (max-width: 1023px) { .nav:not(.is-open) .nav__actions > .lang { display: flex; } }
@media (max-width: 1023px) { .nav.is-open .nav__actions > .lang { justify-content: center; } }

/* ------------------------------------------------ the product hero: the stage holds an img (a flat placeholder
   file until the photograph lands), so layout.css 3b sets the head row and runs it edge to edge to the fold; the
   translated label lies on it, on the page's left line */
.ph-stage > .ph__label { left: calc((100% - min(100% - 2 * var(--gut), var(--container, 1280px))) / 2); right: auto; }
/* a phone: the stage takes what the words leave, down to the fold */
@media (max-width: 639px) {
  .hero--product > .wrap .hero__stage.ph-stage { flex: 1 1 auto; aspect-ratio: auto; min-height: 200px; margin-bottom: calc(0px - var(--hpadb, 24px)); }
}

/* ------------------------------------------------ #fork: the two paths (merge table 4), side by side down to the
   screen's foot from 640, one over the other on a phone. Each path is one link: its name, one line on who it is
   for, and the drawn arrow at its foot (motion.css grows its stem on hover and focus). No fill at rest, so it never
   reads as a placeholder frame; the surface step and an ink edge on hover. */
.fork__paths { grid-template-rows: minmax(0, 1fr); }
@media (min-width: 640px) and (max-width: 1023px) { .fork__paths > .fork__path { grid-column: auto / span 6; } }
@media (max-width: 639px) { .fork__paths { grid-template-rows: repeat(2, minmax(200px, 1fr)); } }
.fork__path {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); min-height: 0;
  padding: var(--s-5) var(--s-5) var(--s-6);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink);
  transition: background-color var(--m-out, 120ms) var(--ease), border-color var(--m-out, 120ms) var(--ease);
}
.fork__path:hover { background: var(--surface); border-color: var(--ink); transition-duration: var(--m-in, 150ms); }
.fork__name { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking); }
.fork__text { max-width: 36ch; font-size: var(--t-lead); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.fork__path > .fork__arrow { width: 24px; height: 24px; margin-top: auto; stroke-width: 1.2; }

/* ------------------------------------------------ pages/particuliers.html */
/* #people: the two workers' frames, as #grind's pair; #owner: the portrait beside the owner's words */
:is(#people .pair, .proof, .owner) { grid-template-rows: minmax(0, 1fr); }
@media (min-width: 640px) and (max-width: 1023px) {
  :is(#people .pair, .proof, .owner) { flex: none; grid-template-rows: auto; }
  :is(#people .pair, .proof, .owner) > * { grid-column: auto / span 6; }
  :is(#people .pair, .owner) > .ph, .proof .ph { aspect-ratio: 4 / 5; }
}
@media (max-width: 639px) {
  #people .pair { grid-template-rows: repeat(2, minmax(180px, 1fr)); flex: 1 0 auto; }
  .owner { grid-template-rows: auto minmax(160px, 1fr); flex: 1 0 auto; }
  .owner > .ph:first-child { aspect-ratio: 1 / 1; }
}
.owner__words { margin: 0; min-height: 160px; }
/* #community: the words left, the tasting photograph right, down to the screen's foot */
#community .split { grid-template-rows: minmax(0, 1fr); }
#community .split > .ph { align-self: stretch; min-height: 240px; }
@media (max-width: 1023px) {
  #community .split { display: flex; flex-direction: column; gap: var(--s-6); }
  #community .split > .ph { flex: 1 0 auto; min-height: 320px; }
}

/* ------------------------------------------------ pages/professionnels.html */
/* #stages: the green coffee before and after washing, each frame named under it */
.proof__item { display: flex; flex-direction: column; gap: var(--s-3); min-height: 0; margin: 0; }
.proof__item > .ph { flex: 1 1 0; min-height: 160px; }
.proof__item > figcaption { font: 500 var(--t-lead)/1.3 var(--font-text); }
@media (max-width: 639px) { .proof { grid-template-rows: repeat(2, minmax(240px, 1fr)); flex: 1 0 auto; } }
/* #request: the head left, the form right. Ten fields, a list of coffees and the consent are more than one
   screen holds at 1440x800, so this section grows with its form at every width rather than run into the footer */
main > section#request { height: auto; min-height: 100vh; min-height: 100svh; }
.request > .section-head { margin-bottom: 0; }
@media (max-width: 1023px) { .request > .section-head { margin-bottom: var(--head-gap); } }
.request .form { row-gap: var(--s-4); column-gap: var(--gutter); }
/* a field keeps its input under its label when the field beside it grows an error line */
.request .field { align-content: start; }
.request .field textarea { min-height: 96px; }
.field--choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.field--choices > legend { padding: 0; margin-bottom: var(--s-1); }
.choices { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.check { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; font-size: var(--t-body); font-weight: 400; cursor: pointer; }
.field .check > input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 0; padding: 0; accent-color: var(--action); }
.field--consent { justify-items: start; gap: 0; }
.field--consent .check { align-items: flex-start; padding-top: var(--s-3); }
.field--consent .check > input[type="checkbox"] { margin-top: 2px; }
.request .btn-row { margin-top: var(--s-2); }

/* ------------------------------------------------ #coffees: the spec sheet (comparison-table). The head beside one
   photograph of the line-up, then one table across the .wrap: the coffees as rows, six columns on the column
   lines (span-2 each), each row closed by a hairline */
.spec-top { align-items: start; }
#coffees .spec-top > .section-head { margin-bottom: 0; }
.spec-top > .ph { aspect-ratio: 5 / 3; }
.spec { position: relative; margin-top: var(--s-8); }
.spec__row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start;
  padding-block: var(--s-4); border-bottom: 1px solid var(--line);
}
/* one 26px line for the names (20px) and the values (16px): every cell of a row starts on one top line */
.spec__row:not(.spec__head) > .spec__cell { line-height: 26px; }
.spec__head { padding-top: 0; border-bottom: 0; }
.spec__label { display: none; }
.spec__head > .spec__cell { font: 500 var(--t-label)/1.4 var(--font-text); color: var(--muted); }
.spec__name { font: 500 var(--t-lead)/1.3 var(--font-text); }
@media (min-width: 1024px) and (max-width: 1279px) {
  .spec-top > .ph { aspect-ratio: 2 / 1; }
  .spec { margin-top: var(--s-7); }
  .spec__name { font-size: var(--t-body); }
}
/* a tablet: the three coffees side by side as blocks, each field a line with its name (data-label, translated);
   a phone stacks them. The header row stays for screen readers (the cells keep their column names) and leaves the
   layout */
@media (max-width: 1023px) {
  .spec-top { row-gap: var(--head-gap); }
  .spec-top > .ph { aspect-ratio: 3 / 1; }
  .spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); margin-top: var(--s-7); }
  .spec__head { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .spec__row { grid-template-columns: minmax(0, 1fr); align-content: start; padding-block: 0; border-bottom: 0; }
  .spec__cell { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
  .spec__cell.spec__name { padding-top: 0; border-bottom: 0; }
  .spec__cell:not(.spec__name) { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
  .spec__label { display: block; min-width: 0; font-weight: 500; }
  .spec__value { flex: none; text-align: right; }
}
@media (max-width: 639px) {
  .spec-top > .ph { aspect-ratio: 6 / 5; }
  .spec { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); margin-top: var(--s-6); }
}
/* ------------------------------------------------ #grind: the pair, two frames down to the screen's foot */
#grind .pair { grid-template-rows: minmax(0, 1fr); }
/* a tablet: two 4:5 frames side by side; the screen's foot stays air, as in the sections round it */
@media (min-width: 640px) and (max-width: 1023px) { #grind .pair { flex: none; grid-template-rows: auto; } #grind .pair > .ph { grid-column: auto / span 6; aspect-ratio: 4 / 5; } }
@media (max-width: 639px) { #grind .pair { grid-template-rows: repeat(2, minmax(160px, 1fr)); } }

/* ------------------------------------------------ #asili: the statement (word-highlight) */
#asili > .wrap { gap: var(--head-gap); }
#asili .mo-wh__text { font-stretch: var(--display-stretch); }

/* ------------------------------------------------ #origin: the cobalt band, the Rwanda frame across the .wrap;
   the same space inside its foot as outside it, so the band's two edges read as one gap */
#origin { padding-bottom: max(var(--padt), calc(var(--padb) + var(--bar))); }
#origin .ph.fill { min-height: 240px; }

/* ------------------------------------------------ #subscribe: the split (split-text-left): the words and the steps
   left, the 5:4 frame right, top-aligned */
#subscribe .split > .ph { aspect-ratio: 5 / 4; align-self: start; }
#subscribe .split-col > .section-head { margin-bottom: 0; }
#subscribe .split-col { gap: var(--s-7); }
.steps > li {
  display: grid; grid-template-columns: var(--s-7) minmax(0, 1fr); align-items: baseline; gap: var(--s-3);
  padding-block: var(--s-4); border-bottom: 1px solid var(--line);
  font: 500 var(--t-lead)/1.4 var(--font-text);
}
.steps > li:first-child { padding-top: 0; }
.steps__n { font: var(--display-weight) var(--t-lead)/1.4 var(--font-display); font-stretch: var(--display-stretch); font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 1023px) {
  #subscribe .split { display: flex; flex-direction: column; gap: var(--s-7); }
  #subscribe .split-col { gap: var(--s-6); }
  #subscribe .split > .ph { aspect-ratio: auto; align-self: stretch; flex: 1 1 0; min-height: 200px; }
}
@media (min-width: 640px) and (max-width: 1023px) { #subscribe .split { flex: none; } #subscribe .split > .ph { flex: none; aspect-ratio: 16 / 9; } }

/* a phone: a section grows with what it holds (system.css), so the frames that take the rest of the screen grow
   from their content up and never shrink under it: nothing runs into the next section */
@media (max-width: 639px) { #grind .pair, #subscribe .split { flex: 1 0 auto; } }
@media (max-width: 1023px) { #origin .ph.fill { flex: 1 0 auto; } }

/* ------------------------------------------------ #faq: two groups (two screens on a phone, g2m), one list on
   the right from 640 up */
.faq-head { display: grid; gap: var(--s-4); align-content: start; justify-items: start; }
.faq-head > p { font-size: var(--t-lead); line-height: 1.5; }
@media (max-width: 1023px) { .faq-head { margin-bottom: var(--head-gap); } .faq-a { align-content: start; } }
/* a phone: each of the two screens holds its group from top to foot, the answers spread down it, so the gap to
   the band below is the page's one gap */
@media (max-width: 639px) {
  #faq .faq-a, #faq .faq-b { display: flex; flex-direction: column; }
  #faq .faq-a > .faq, #faq .faq-b > .faq { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
}
@media (min-width: 640px) { .faq-b .faq > .faq__item:first-child { padding-top: var(--s-5); } }
/* a small laptop: the answers' rows a step closer, so the five fit one 768px screen */
@media (min-width: 1024px) and (max-width: 1279px) {
  #faq .faq > .faq__item { padding-block: var(--s-4); }
  #faq .faq-a .faq > .faq__item:first-child { padding-top: 0; }
  #faq .faq-b .faq > .faq__item:first-child { padding-top: var(--s-4); }
}

/* ------------------------------------------------ footer.closing: close-word with the logo across the .wrap */
.close__word { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; line-height: 0; color: var(--p-ink); }
.close__word > svg { display: block; width: 100%; height: auto; max-height: 100%; }
/* a small laptop's short screen: the wordmark a little lower, so the close and the links keep one screen */
@media (min-width: 1024px) and (max-width: 1279px) { .close__word > svg { max-height: 20svh; } }
.footer__lede { font-stretch: var(--display-stretch); }
/* a phone keeps the close and the links on one screen, so the phone bar steps away for the close's button: the
   company line goes (the wordmark above names the company) and the two rows sit a step closer */
@media (max-width: 639px) {
  .closing__links .grid > .span-4:has(> .footer__lede) { display: none; }
  footer.closing > .wrap { row-gap: var(--s-6); }
}
/* a phone keeps the close and the links on one screen (so the phone bar steps away for the close's button): the
   company line goes, since the wordmark above already names it, and the rows sit a step closer */
@media (max-width: 639px) {
  .closing__links .grid > .span-4:has(> .footer__lede) { display: none; }
  footer.closing > .wrap { row-gap: var(--s-6); }
}
