/* t-c "Flour and terracotta": page CSS. Only what the kit lacks: the labelled placeholder frames (the
   user's binding: CSS frames instead of photographs), the logo, the language switcher, the hero's dark
   foot, the coffee cards' tablet and phone rows, the subscription steps and the chapters' fields. Every
   colour and space is a token: the kit's --p-*, --s-*, --r-* and the few new ones below. */
:root {
  /* the placeholder fields: flat warm colours from the palette, never a gradient or a pattern */
  --ph-flour: var(--p-surface);
  --ph-dark: var(--p-inv-bg);
  --ph-clay: color-mix(in oklab, var(--p-accent) 22%, var(--p-bg));
  --ph-page: var(--p-bg);
  --ph-pill-bg: var(--p-bg);
  --ph-pill-ink: var(--p-ink);
  --ph-pill-line: color-mix(in oklab, var(--p-ink) 14%, transparent);
  --ph-inset: var(--s-4);
  /* the client's wordmark (img/asili-logo.svg, 880 x 240) */
  --logo-h: 24px;
  --logo-h-foot: 48px;
  --logo-ratio: 3.6667;
  --lang-size: 44px;
}
@media (min-width: 1024px) { :root { --ph-inset: var(--s-5); } }
@media (max-width: 639px) { :root { --logo-h: 20px; --logo-h-foot: 32px; } }

/* ---------------------------------------------------------------- the logo, in ink */
.logo { display: block; height: var(--logo-h); width: calc(var(--logo-h) * var(--logo-ratio)); color: var(--p-ink); fill: currentColor; }
.nav__logo .logo { height: var(--logo-h); width: calc(var(--logo-h) * var(--logo-ratio)); }
.footer__mark .logo { height: var(--logo-h-foot); width: calc(var(--logo-h-foot) * var(--logo-ratio)); color: var(--ink); }
.logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------- the language switcher: FR NL EN
   44px targets; in the bar from 1024, in the sheet's foot below (system.css moves .nav__actions there) */
.lang { display: inline-flex; align-items: center; gap: 0; }
.lang__btn {
  position: relative; display: inline-grid; place-items: center; width: var(--lang-size); height: var(--lang-size); padding: 0;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer;
  font: 500 var(--t-small)/1 var(--font-text); letter-spacing: 0;
  transition: color var(--dur) var(--ease);
}
.lang__btn:hover { color: var(--ink); }
.lang__btn[aria-pressed="true"] { color: var(--ink); }
/* the current language: a 2px bar under it, as the nav marks a current word (never colour alone) */
.lang__btn[aria-pressed="true"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 6px; height: 2px; border-radius: 2px; background: currentColor; }
@media (max-width: 1023px) {
  .nav.is-open .nav__actions .lang { justify-content: center; gap: var(--s-2); }
  .nav.is-open .nav__actions .lang__btn { font-size: var(--t-body); }
}

/* ---------------------------------------------------------------- the placeholder frame
   One flat field from the palette, round corners, the label in a small pill at its top left, translated.
   <div class="ph" role="img" aria-label="Placeholder for ..."><span class="ph__label" aria-hidden="true">..</span></div> */
.ph { position: relative; overflow: clip; background: var(--ph-field, var(--ph-flour)); border-radius: var(--r-lg); }
.ph--flour { --ph-field: var(--ph-flour); }
.ph--dark { --ph-field: var(--ph-dark); }
.ph--clay { --ph-field: var(--ph-clay); }
.ph--page { --ph-field: var(--ph-page); }
/* a flour field on the flour page keeps a hairline, so its edge reads */
main .ph--flour { box-shadow: inset 0 0 0 1px var(--line); }
.ph > .ph__label, .ph .ph__label {
  position: absolute; z-index: 1; top: var(--ph-inset); left: var(--ph-inset);
  display: inline-flex; align-items: center; min-height: 32px; max-width: calc(100% - 2 * var(--ph-inset));
  padding: var(--s-1) var(--s-3); border-radius: 16px; border: 1px solid var(--ph-pill-line);
  background: var(--ph-pill-bg); color: var(--ph-pill-ink); font: 500 var(--t-label)/1.35 var(--font-text); letter-spacing: 0;
}

/* the nav's menu card: a small 16:9 slot (hidden in the phone sheet, as the kit hides a card's panel) */
.menu-card__ph { aspect-ratio: 16 / 9; border-radius: var(--r-md); }
@media (max-width: 1023px) { .nav.is-open .menu-card__ph { display: none; } }

/* ---------------------------------------------------------------- hero: the cinema frame, its foot dark
   The poster is the Rwanda photograph's slot (a flat flour field, img/rwanda-01.svg, with its label); the words
   stand on the frame's dark foot (--p-inv-bg), which runs the frame's full width */
.hero--film .hero__media { background: var(--ph-flour); }
.hero--film .hero__over { padding: 0; background: var(--p-inv-bg); }
.hero--film .hero__over > .hero__words { max-width: none; justify-self: stretch; border-radius: 0; }
.hero--film .hero__words h1 { max-width: 16ch; }
@media (min-width: 1024px) { .hero--film .hero__words h1 { max-width: 24ch; } }
/* one primary look on the page: the terracotta pill, on the dark foot and in the dark close too (its focus ring
   stays the light ink there); the secondary keeps the page's light tint, so it stands off the dark foot */
:is(.hero--film .hero__words, footer.closing .closing__cta) .btn--primary { --action: var(--p-action); --action-ink: var(--p-action-ink); }
:is(.hero--film .hero__words, footer.closing .closing__cta) .btn--primary:focus-visible { outline-color: var(--p-inv-ink); }
.hero--film .hero__words .btn--secondary { --bg: var(--p-bg); --ink: var(--p-ink); color: var(--p-ink); }

/* ---------------------------------------------------------------- the coffees: tall-small
   The head row on the left line; under it one row filling the screen: the tall slot on columns 1 to 6, and from the
   split line (column 7) the ruled list of coffees with the small slot at its foot, level with the tall one's (it
   is square, and gives up height first when the screen is short). Below 1024 the list comes first, then the two
   slots side by side: the tall one on seven columns (six on a phone), the small one at its foot */
#coffees .coffees { grid-template-rows: minmax(0, 1fr); }
#coffees .coffees__tall { grid-column: 1 / span 6; min-height: 200px; }
#coffees .coffees__side { grid-column: 7 / -1; display: flex; flex-direction: column; gap: var(--s-6); min-height: 0; }
#coffees .coffees__small { width: calc(50% - var(--gutter) / 2); aspect-ratio: 1; flex: 0 1 auto; min-height: 120px; margin-top: auto; }
#coffees .rows > li { padding-block: var(--s-3); }
#coffees .rows > li:first-child { padding-top: 0; }
#coffees .rows > li > p { grid-column: 1 / -1; color: var(--muted); }
@media (max-width: 1023px) {
  /* stacked, the grid holds what it needs and takes the rest of the screen (a narrow phone wraps the list longer) */
  #coffees .wrap > .fill { flex: 1 0 auto; }
  #coffees .coffees { grid-template-rows: auto minmax(0, 1fr); }
  #coffees .coffees__side { display: contents; }
  #coffees .coffees__list { grid-row: 1; grid-column: 1 / -1; }
  #coffees .coffees__tall { grid-row: 2; grid-column: 1 / span 7; }
  #coffees .coffees__small { grid-row: 2; grid-column: 8 / -1; align-self: end; width: auto; min-height: 0; margin: 0; }
}
@media (max-width: 639px) {
  #coffees .coffees__tall { grid-column: 1 / span 6; min-height: 160px; }
  #coffees .coffees__small { grid-column: 7 / -1; }
}

/* ---------------------------------------------------------------- origin: the split's facts */
#origin .rows .rows__name { font-weight: 400; color: var(--muted); }
#origin .frame.ph { min-height: 200px; }
/* a phone: a value keeps its line (the kit wraps it at 11ch under 480px; these values are short words) */
@media (max-width: 479px) { :is(#origin, #coffees) .rows__value { max-width: none; } }

/* ---------------------------------------------------------------- questions: the h2 at the column's top, the line and
   the link at its foot; stacked, the list follows the h2 and the line and link close the section */
#faq .faq__ask { display: grid; gap: var(--s-3); }
/* the grid takes the rest of the screen (so the column's foot is the section's last line), never less than it holds */
#faq .wrap > .fill { flex: 1 0 auto; }
@media (max-width: 1023px) {
  #faq .split-col { display: contents; }
  #faq .grid.fill { grid-template-rows: auto auto 1fr; }
  #faq .split-col > * { grid-column: 1 / -1; }
  #faq .section-head { order: 1; margin-bottom: 0; }
  #faq .faq { order: 2; margin-top: var(--s-5); }
  #faq .faq__ask { order: 3; align-self: end; margin-top: var(--s-6); }
}
@media (max-width: 639px) {
  #faq .faq { margin-top: var(--s-4); }
  #faq .faq__ask { margin-top: var(--s-2); gap: var(--s-2); }
  #faq .faq__ask .t-lead { font-size: var(--t-body); }
}

/* ---------------------------------------------------------------- the chapters (photo-chapters)
   Each chapter's photograph slot is the moment's own figure, its field the figure's ground; the inner .ph__shot
   (role="img") takes the size the moment gives its image: at rest 4:3 (4:5 under 44svh from 640, 16:10 on a phone),
   live the whole stage. The moment's settle zoom is left off: on a flat field it shows nothing but would carry the
   label out of its corner (the client's photograph, an image element, takes the zoom again) */
[data-moment="photo-chapters"] .mo-ph__pic > .ph__shot { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; }
@media (min-width: 640px) {
  [data-moment="photo-chapters"]:not(.is-live) .mo-ph__pic > .ph__shot { aspect-ratio: 4 / 5; max-height: 44svh; }
}
@media (max-width: 639px) {
  [data-moment="photo-chapters"]:not(.is-live) .mo-ph__pic > .ph__shot { aspect-ratio: 16 / 10; }
}
[data-moment="photo-chapters"].is-live .mo-ph__stage > .mo-ph__pic > .ph__shot {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; max-height: none;
}

/* ---------------------------------------------------------------- subscription: the brand band
   The h2 and its line, the three steps on the grid's thirds, then the photograph slot down to the foot */
#subscription .steps { margin: 0 0 var(--s-7); padding: 0; list-style: none; row-gap: var(--s-4); }
#subscription .steps > li { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
#subscription .steps h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
#subscription .step-num { flex: none; }
#subscription .ph { min-height: 200px; }
#subscription .ph--page { --ph-pill-line: color-mix(in oklab, var(--p-ink) 14%, transparent); }
@media (max-width: 639px) { #subscription .steps { margin-bottom: var(--s-6); } }

/* ---------------------------------------------------------------- the close's photograph slot */
footer.closing .close__media.ph { background: var(--ph-field, var(--ph-flour)); }
