/* English Community in Moldova: the logo's three colours.
   Bottle green, ivory, and the flame's gold only on green or for booking. */

/* Fonts are served from this site, so visitors' browsers never contact Google (OFL licences in assets/fonts/).
   Split by alphabet like Google Fonts does: each page downloads only the files its letters need. */
@font-face {
  font-family: "Alegreya"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-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;
}
@font-face {
  font-family: "Alegreya"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-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;
}
@font-face {
  font-family: "Alegreya"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-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;
}
@font-face {
  font-family: "Alegreya"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../fonts/alegreya-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;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-text-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;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/golos-text-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;
}

/* Local stand-ins scaled to the web fonts' letter widths (measured on these pages), one per weight and style,
   so lines wrap the same and nothing moves when the fonts arrive. No font-size-adjust anywhere:
   while a web font loads, from-font reads the stand-in's own ratio and undoes size-adjust. */
@font-face { font-family: "Alegreya Fallback"; font-weight: 400; src: local("Georgia"); size-adjust: 92.3%; ascent-override: 110.1%; descent-override: 37.4%; line-gap-override: 0%; }
@font-face { font-family: "Alegreya Fallback"; font-weight: 600; src: local("Georgia Bold"), local("Georgia-Bold"); size-adjust: 80.1%; ascent-override: 126.8%; descent-override: 43%; line-gap-override: 0%; }
@font-face { font-family: "Alegreya Fallback"; font-weight: 700; src: local("Georgia Bold"), local("Georgia-Bold"); size-adjust: 81.3%; ascent-override: 125%; descent-override: 42.4%; line-gap-override: 0%; }
@font-face { font-family: "Alegreya Fallback"; font-style: italic; font-weight: 400; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 80.6%; ascent-override: 126.1%; descent-override: 42.8%; line-gap-override: 0%; }
@font-face { font-family: "Alegreya Fallback"; font-style: italic; font-weight: 500; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 82.4%; ascent-override: 123.3%; descent-override: 41.9%; line-gap-override: 0%; }
@font-face { font-family: "Alegreya Fallback"; font-style: italic; font-weight: 600; src: local("Georgia Bold Italic"), local("Georgia-BoldItalic"); size-adjust: 72.8%; ascent-override: 139.5%; descent-override: 47.4%; line-gap-override: 0%; }
@font-face { font-family: "Golos Fallback"; font-weight: 400 500; src: local("Arial"), local("ArialMT"); size-adjust: 107.1%; ascent-override: 91.5%; descent-override: 20.5%; line-gap-override: 0%; }
@font-face { font-family: "Golos Fallback"; font-weight: 600 700; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 100.8%; ascent-override: 97.2%; descent-override: 21.8%; line-gap-override: 0%; }

:root {
  color-scheme: light dark;

  --paper: #fbf6ec;        /* ivory page, like the E */
  --linen: #f2ede1;        /* hover backgrounds */
  --card: #fffdf8;
  --line: #e2dccf;
  --line-strong: #a9a08f;
  --ink: #24302a;          /* green-black text */
  --ink-soft: #56615a;
  --heading: #163f31;
  --green: #1d5c47;        /* the logo's green: links, labels, buttons */
  --band: #1d5c47;         /* green header, hero and bands, like the logo tile */
  --on-band: #fbf6ec;
  --on-band-soft: #d5e3da;
  --gold: #e3b964;         /* the logo's flame: Book buttons, accents on green */
  --gold-hover: #f0cf8a;
  --on-gold: #12392c;
  --gold-text: #f0cf8a;    /* gold light enough for text on green */
  --btn-green: #1d5c47;
  --btn-green-hover: #154635;
  --focus: #1d5c47;
  --shadow: 0 1px 2px rgb(20 40 30 / 0.08), 0 22px 44px -18px rgb(20 40 30 / 0.38);

  --serif: "Alegreya", "Alegreya Fallback", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", "Golos Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 1rem;
  --wrap: 72rem;
  --space-section: clamp(4.5rem, 3.5rem + 2.5vw, 5.5rem);

  accent-color: var(--green);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a15;
    --linen: #17241e;
    --card: #14211b;
    --line: #283a30;
    --line-strong: #5f7066;
    --ink: #ece6da;
    --ink-soft: #b8bfb7;
    --heading: #ece6da;
    --green: #a8d8bf;
    --band: #173f32;
    --btn-green: #2f7a5f;
    --btn-green-hover: #276a52;
    --focus: #e3b964;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 22px 44px -18px rgb(0 0 0 / 0.7);
  }
}

@media (min-width: 48em) {
  :root { --gutter: 2rem; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

/* Room for the sticky header when focus or an anchor jump scrolls the page.
   Not scroll-padding on html: that also applies to the header's own links and makes focus jump up. */
main, main :is([id], a, summary) { scroll-margin-block: 5.5rem 1.5rem; }
/* Focus target of the skip link, not a control */
main:focus { outline: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* Links like @alexa_enteacher and the Book buttons also wrap inside flex and grid items.
   Not in the header: its script measures whether the row fits. */
:where(main, footer) a { overflow-wrap: anywhere; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  color: var(--heading);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.75rem + 3.4vw, 4.5rem);
  letter-spacing: -0.012em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(2.125rem, 1.6rem + 2.2vw, 3.25rem);
  letter-spacing: -0.008em;
}

/* One sub-head size: steps, panels, join steps, topics and FAQ questions */
h3, .faq-list summary {
  font-size: clamp(1.5rem, 1.38rem + 0.5vw, 1.75rem);
  line-height: 1.15;
}

/* One secondary-heading size */
.menu-card h2, .more h3, .lessons h3 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }

p { margin: 0; text-wrap: pretty; }

img { display: block; max-inline-size: 100%; block-size: auto; }

a { color: var(--green); text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { text-decoration-thickness: 0.12em; }

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.wrap {
  inline-size: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  translate: 0 -200%;
}
.skip-link:focus-visible { translate: 0 0; }

/* Serif lede between headings and body text */
.lede, .hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.425rem, 1.3rem + 0.5vw, 1.65rem);
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 3.25rem;
  padding: 0.8em 1.7em;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

/* Gold on the page means "book a meetup", and nothing else. */
.btn-book {
  background: var(--gold);
  color: var(--on-gold);
}
.btn-book:hover { background: var(--gold-hover); }

.btn-green {
  background: var(--btn-green);
  color: #fff;
}
.btn-green:hover { background: var(--btn-green-hover); }

/* Lessons on the green bands: gold stays for meetups */
.btn-light {
  background: var(--on-band);
  color: var(--on-gold);
}
.btn-light:hover { background: #fff; }

.btn-small {
  min-block-size: 2.75rem;
  padding: 0.5em 1.15em;
  font-size: 1rem;
}

.btn-large {
  min-block-size: 3.75rem;
  padding-inline: 2.25em;
  font-size: 1.125em;
}

/* ---------- Header (sticky; slides away while scrolling down, back on any scroll up) ---------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: var(--band);
  color: var(--on-band);
  --focus: var(--gold-text);
}

html { container-type: scroll-state; }

/* (scrollable: top) keeps it shown at the very top, even after a jump such as the Home key */
/* An open menu keeps it shown too: Safari and Firefox don't focus a tapped button */
@container scroll-state((scrolled: bottom) and (scrollable: top)) {
  .site-header:not(:focus-within, :has(:popover-open)) { transform: translateY(-100%); }
}

/* Browsers without scroll-state queries: the script toggles .is-hidden */
.site-header.is-hidden:not(:focus-within, :has(:popover-open)) { transform: translateY(-100%); }

@media (prefers-reduced-motion: no-preference) {
  .site-header { transition: transform 0.25s ease-out; }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 4rem;
  padding-block: 0.5rem;
}

.is-measuring * { transition: none !important; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-end: auto;
  color: var(--on-band);
  text-decoration: none;
}

/* The E with the flame, without its tile (it sits on green). The header copy's viewBox is cropped
   to the drawing and capped in px, so the brand name still fits beside it at large text sizes. */
.logo {
  flex-shrink: 0;
  inline-size: min(1.5rem, 24px);
  block-size: min(1.5rem, 24px);
  fill: currentColor;
  .logo-flame { fill: var(--gold); }
}

.brand-text { display: grid; }

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  /* A little smaller on the narrowest phones, so the sticky header stays short */
  font-size: clamp(1rem, 0.25rem + 4vw, 1.2rem);
  line-height: 1.1;
  text-wrap: balance;
}

.brand-sub {
  display: none;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--on-band-soft);
}

.menu-button {
  display: inline-grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 1px solid rgb(251 246 236 / 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--on-band);
  cursor: pointer;
  anchor-name: --menu-button;

  svg {
    inline-size: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }
}

/* Collapsed: the menu is a popover under the menu button. */
.site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 4.5rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: var(--gutter);
  inline-size: min(80dvw, 19rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 6rem);
  margin: 0.5rem 0 0;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  /* An ivory card under the green header: the header's gold focus ring would not show on it */
  --focus: var(--green);

  &:is(:popover-open, .is-open) { display: grid; gap: 0.5rem; }

  ul { margin: 0; padding: 0; list-style: none; }

  .menu-links a {
    display: block;
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    &:hover { background: var(--linen); }
  }

  .menu-lang {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0.25rem 0.75rem;
    border-block-end: 1px solid var(--line);
  }
}

/* Browsers without popover: the menu button toggles .is-open instead. */
@supports not selector(:popover-open) {
  .site-header:not(.is-wide) .site-menu:not(.is-open) { display: none; }
}

.lang {
  display: none;
  ul { display: flex; margin: 0; padding: 0; list-style: none; }
}

:is(.lang, .menu-lang) a {
  display: inline-grid;
  place-items: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  padding-inline: 0.3rem;
  border-radius: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;

  &[aria-current="page"] {
    color: var(--heading);
    text-decoration: underline;
    text-decoration-color: var(--green);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.4em;
  }
  &:hover { color: var(--heading); background: var(--linen); }
}

/* The same links in the green header row */
.lang a {
  color: var(--on-band-soft);
  &[aria-current="page"] { color: var(--on-band); text-decoration-color: var(--gold); }
  &:hover { color: var(--on-band); background: rgb(255 255 255 / 0.1); }
}

/* Phones: a short "Book" label; screen readers still hear "Book your spot". */
.site-header:not(.is-wide, .is-mid) .book-rest {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  white-space: nowrap;
}

/* Tight (large OS text on a phone): only the logo shows; the link keeps its full name */
.site-header.is-tight .brand-text {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  white-space: nowrap;
}
.site-header.is-tight .header-book { padding-inline: 0.7em; }
/* The last step: if even that row is too wide, the Book button moves to a second row */
.site-header.is-tight .header-inner { flex-wrap: wrap; }

/* Mid: links in the menu, language links and the full Book button in the row. */
.site-header:is(.is-wide, .is-mid) {
  .header-inner { gap: 0.75rem; }
  .header-inner > * { flex-shrink: 0; white-space: nowrap; }
  .brand-sub { display: block; }
  .lang { display: block; }
  .menu-lang { display: none; }
}

/* Under its own button; browsers without anchor() keep the gutter */
.site-header.is-mid .site-menu { inset-inline-end: anchor(--menu-button end); }

/* Wide: the same list sits inline in the row. */
.site-header.is-wide {
  .menu-button { display: none; }

  /* Set the language switch apart from the section links */
  .lang { padding-inline-start: 0.75rem; border-inline-start: 1px solid rgb(251 246 236 / 0.25); }

  .site-menu {
    position: static;
    display: flex;
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    --focus: var(--gold-text);
  }

  .menu-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;

    a {
      padding: 0.5rem 0.65rem;
      color: var(--on-band);
      font-size: 1rem;
      &:hover { background: transparent; text-decoration: underline; }
    }
  }
}

/* ---------- Announcement (set at /admin) ---------- */

.announcement {
  margin: 0;
  padding: 0.65rem var(--gutter);
  /* Green like the header and hero around it; hairlines set it apart */
  border-block: 1px solid rgb(251 246 236 / 0.18);
  background: var(--band);
  color: var(--on-band);
  font-weight: 600;
  text-align: center;
  text-wrap: balance;

  /* Small phones: keep the hero's Book button as close to the first screen as possible */
  @media (max-width: 30em) { padding-block: 0.45rem; font-size: 0.95rem; font-weight: 500; }
}

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

/* Green, continuing the header, like the logo tile */
.hero {
  padding-block: 0.75rem clamp(3rem, 2rem + 3vw, 4.5rem);
  background: var(--band);
  color: var(--on-band);
  --focus: var(--gold-text);

  h1, .hero-sub { color: var(--on-band); }
  a:not(.btn) { color: var(--on-band); }
  .hint { color: var(--on-band-soft); }
}

.hero-grid {
  display: grid;
  /* minmax(0, …): with large text a long word wraps instead of widening the page */
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "photo" "text";
  gap: 1.25rem;

  /* Phones turned sideways and 200% zoom: heading and Book button first */
  @media (orientation: landscape) and (max-height: 32em) { grid-template-areas: "text" "photo"; }
}

.hero-text { grid-area: text; }

/* Phones show the name in the header right above it, so it shows from the split layout up */
.eyebrow {
  display: none;
  margin-block-end: 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.425rem;
  line-height: 1.2;
  color: var(--gold-text);
}

.hero-sub {
  margin-block-start: 1rem;
  max-inline-size: 26em;
}

/* Small dots between the facts; one line on a phone (from 360px), and a wrapped line never starts with a dot */
.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--gold-text);
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1.0625rem);
  font-weight: 600;

  li { display: flex; align-items: center; gap: 0.45rem; }
  li:not(:last-child)::after {
    content: "";
    inline-size: 0.3em;
    block-size: 0.3em;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-block-start: 1.4rem;
}

.link-down {
  padding-block: 0.5rem;
  font-weight: 600;
}

.hint {
  margin-block-start: 0.8rem;
  max-inline-size: 26em;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Alexa's face next to the button: you are writing to her */
.hint.host {
  display: flex;
  align-items: center;
  gap: 0.75rem;

  img {
    flex-shrink: 0;
    inline-size: 3rem;
    block-size: 3rem;
    border-radius: 50%;
  }

  /* Lets the @handle wrap with very large text */
  span { min-inline-size: 0; }
}

.hero-photo {
  grid-area: photo;

  /* 16:9 rather than the brief's 4:3, so the Book button fits on a phone's first screen */
  img {
    inline-size: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 50% 72%;
    border-radius: 50% 50% 1.25rem 1.25rem / 22% 22% 1.25rem 1.25rem;
  }
}

@media (min-width: 56em) {
  .hero { padding-block-start: clamp(2.5rem, 1rem + 3vw, 4rem); }

  .eyebrow { display: block; }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas: "text photo";
    align-items: center;
    gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  }

  /* An arched window, like the terrace windows in the photo */
  .hero-photo img {
    aspect-ratio: auto 1280 / 1181;
    border-radius: 50% 50% 1.75rem 1.75rem / 38% 38% 1.75rem 1.75rem;
  }
}

/* Lessons page: her face sits high in this photo */
.hero-photo-alexa img { object-position: 50% 30%; }

/* ---------- When and where ---------- */

.when { padding-block-start: clamp(2.5rem, 2rem + 2vw, 3.5rem); }

/* A framed card from tablets up; on phones the next-meetup card is the only box */
.menu-card {
  @media (min-width: 48em) {
    padding: clamp(1.75rem, 1rem + 3vw, 3rem) clamp(1.25rem, 0.5rem + 3vw, 3rem);
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--card);

    h2 { text-align: center; }
  }
}

.icon {
  flex-shrink: 0;
  inline-size: 1.4rem;
  block-size: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.when-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 1.5rem 0 0;

  > div {
    display: grid;
    gap: 0.2rem 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding-block: 1rem;
    border-block-start: 1px solid var(--line);
  }

  dt {
    /* Grid, not flex, so the label text (no element of its own) can wrap with large text */
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--green);
  }

  dd { margin: 0; }

  @media (min-width: 36em) {
    > div { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; }
  }

  /* Desktop: four columns at a glance, split by hairlines */
  @media (min-width: 60em) {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    margin-block-start: 2rem;
    border-block-start: 1px solid var(--line);

    > div {
      grid-template-columns: 1fr;
      gap: 0.6rem;
      padding: 1.5rem 1.5rem 0.5rem;
      border-block-start: 0;
    }
    > div + div { border-inline-start: 1px solid var(--line); }
    > div:first-child { padding-inline-start: 0.5rem; }
    > div:last-child { padding-inline-end: 0.5rem; }
  }
}

.next-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-block-start: 1.75rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: var(--band);
  color: var(--on-band);
  --focus: var(--gold-text);

  h3 { color: var(--gold-text); font-style: italic; }
  > div { min-inline-size: 0; }
  /* The date and time are joined by no-break spaces; with very large text they may still break */
  .next-date { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
  :is(.next-theme, .next-book) { color: var(--on-band-soft); }
}
.next-card[hidden] { display: none; }

.when-cta {
  display: grid;
  justify-items: center;
  margin-block-start: 1.75rem;
}
/* The next-meetup card has its own button */
.next-card:not([hidden]) ~ .when-cta { display: none; }

/* ---------- What happens at a meetup ---------- */

.meetup { padding-block-start: var(--space-section); }

.section-head {
  max-inline-size: 40rem;

  .lede { margin-block-start: 1rem; }
}

.meetup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-block-start: 2rem;

  @media (min-width: 60em) {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
    align-items: stretch;
    margin-block-start: 2.75rem;
  }
}

/* Warmed a little: the stage lights in this one are cool violet */
.meetup-photo {
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 35%;
  border-radius: 1.5rem;
  filter: sepia(0.18) saturate(0.85);

  /* Phones: the hero already shows the table, and the steps read fine on their own */
  @media (max-width: 47.99em) { display: none; }

  /* Fills the row from the first hairline to the last; the standing host stays in frame */
  @media (min-width: 60em) {
    aspect-ratio: auto;
    block-size: 100%;
    object-position: 12% 40%;
  }
}

/* The evening in four steps: a short numbered list with hairlines */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;

  > li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.9rem;
    padding-block: 1.25rem;
    border-block-start: 1px solid var(--line);
  }
  > li:last-child { border-block-end: 1px solid var(--line); }

  > li::before {
    content: counter(step);
    grid-row: span 2;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 2.55rem;
    line-height: 1;
    color: var(--green);
  }

  p { margin-block-start: 0.3rem; color: var(--ink-soft); }
}

/* Topics as place cards, like the name cards on her tables */
.topics {
  margin-block-start: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.topics-title {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}

/* A plain list on phones; two cards per row from tablets (one with large text), four on wide screens */
.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(13rem, 50% - 0.5rem)), 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;

  @media (min-width: 52em) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  @media (max-width: 47.99em) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;

    .place-card {
      justify-items: start;
      padding: 0.9rem 0;
      border-width: 1px 0 0;
      border-radius: 0;
      background: none;
      text-align: start;
    }
    .place-card:last-child { border-block-end-width: 1px; }
    .place-text { font-size: 1.25rem; }
  }
}

.topics-more { margin-block-start: 1.25rem; }

.meetup-cta {
  margin-block-start: clamp(2rem, 1.5rem + 2vw, 3rem);

  /* Phones: the header's Book button is always in reach */
  @media (max-width: 47.99em) { display: none; }
}

.place-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  text-align: center;
}

.place-kind {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.2;
  color: var(--green);
}

.place-text {
  max-inline-size: 100%;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.25;
  color: var(--heading);
  text-wrap: balance;
}

/* ---------- Past meetups page (filled in from /admin) ---------- */

.past { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) var(--space-section); }

.past-list {
  max-inline-size: 40rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.past-item {
  display: grid;
  gap: 0.3rem;
  padding-block: 1.25rem;
  border-block-start: 1px solid var(--line);

  &:last-child { border-block-end: 1px solid var(--line); }
}

.past-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--green);
}

/* List items, so the sub-head size rather than a section heading's */
.past-theme { font-size: clamp(1.5rem, 1.38rem + 0.5vw, 1.75rem); line-height: 1.15; }

.past-recap { color: var(--ink-soft); }

.past-next { margin-block-start: 2rem; }

/* More than a table: a green band */
.more {
  margin-block-start: var(--space-section);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--band);
  color: var(--on-band);
  --focus: var(--gold-text);

  h3 { color: var(--on-band); }
  p { margin-block-start: 1rem; max-inline-size: 30em; color: var(--on-band-soft); }
  a { color: var(--gold-text); }
}

.more-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

/* Same four columns as the photos, so the paragraph starts on the third photo's edge */
.more-text {
  @media (min-width: 52em) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 1rem;
    align-items: end;
    h3 { grid-column: 1 / 3; }
    p { grid-column: 3 / -1; margin-block-start: 0; }
  }
}

.more-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;

  figure { margin: 0; }

  img {
    inline-size: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1rem;
  }

  figcaption {
    margin-block-start: 0.6rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--on-band-soft);
  }

  /* Phones: two photos are enough to show the idea */
  @media (max-width: 39.99em) {
    li:nth-child(n + 3) { display: none; }
  }

  @media (min-width: 40em) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding-block-end: 2.5rem;
    li:nth-child(even) { translate: 0 2.5rem; }
  }
}

/* ---------- Who comes ---------- */

.who { padding-block: var(--space-section); }

.who-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;

  @media (min-width: 52em) {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-areas:
      "title title"
      "photo panels"
      "photo note";
    column-gap: clamp(2.5rem, 1rem + 4vw, 4.5rem);
    row-gap: 1.5rem;
    align-items: start;

    h2 { grid-area: title; }
    .who-photo { grid-area: photo; }
    .who-panels { grid-area: panels; }
    .who-note { grid-area: note; }
  }
}

.who-photo {
  inline-size: 100%;
  border-radius: 1.5rem;
}

.who-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.panel {
  p { margin-block-start: 0.6rem; }
}

.panel + .panel {
  padding-block-start: 2rem;
  border-block-start: 1px solid var(--line-strong);
}

.who-note {
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  line-height: 1.4;
  color: var(--heading);
}

/* ---------- How to join ---------- */

/* Heading centred only where the steps are centred too */
.join {
  padding-block: var(--space-section);

  h2 { @media (min-width: 48em) { text-align: center; } }
}

.join-steps {
  display: grid;
  gap: 2.5rem;
  max-inline-size: 64rem;
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) auto 0;
  padding: 0;
  list-style: none;
  counter-reset: join;

  > li {
    counter-increment: join;
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-content: start;
  }

  > li::before {
    content: counter(join);
    grid-row: span 3;
    display: grid;
    place-items: center;
    inline-size: 3.25rem;
    aspect-ratio: 1;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--card);
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--green);
  }

  h3 { padding-block-start: 0.6rem; }
  p { margin-block-start: 0.5rem; color: var(--ink-soft); }

  @media (min-width: 48em) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: center;

    > li { grid-template-columns: 1fr; justify-items: center; }
    > li::before { grid-row: auto; margin-block-end: 1rem; }
    h3 { padding-block-start: 0; }
    p { max-inline-size: 18em; }
  }
}

/* The word to send, as an outgoing message */
.join-steps .dm-bubble {
  justify-self: start;
  max-inline-size: 100%;
  margin-block-start: 0.9rem;
  padding: 0.45rem 1.1rem;
  border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;

  @media (min-width: 48em) { justify-self: center; }
}

.join-cta {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  margin-block-start: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  text-align: center;

  p { max-inline-size: 30em; text-wrap: balance; }
}

/* ---------- About Alexa ---------- */

/* Her name card pokes past the portrait; clip it at the page edge */
.about { padding-block: var(--space-section); overflow-x: clip; }

.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;

  @media (min-width: 46em) {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 1rem + 5vw, 6rem);
  }
}

.about-photo {
  position: relative;
  inline-size: 100%;
  max-inline-size: 26rem;

  img {
    inline-size: 100%;
    border-radius: 50% 50% 1.5rem 1.5rem / 38% 38% 1.5rem 1.5rem;
  }
}

/* Her place card, tucked on the corner of the portrait */
.name-card {
  position: absolute;
  inset-block-end: -1.1rem;
  inset-inline-end: 0.75rem;
  min-inline-size: 8.5rem;
  padding: 0.9rem 1.5rem;

  .place-text { font-style: italic; font-size: 1.825rem; }

  @media (min-width: 30em) { inset-inline-end: -1.25rem; }
}

.about-text {
  p { margin-block-start: 1.1rem; max-inline-size: 34em; }
  h2 + p { margin-block-start: 1.5rem; }
}

.about-text .pull {
  margin-block-start: 2rem;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--green);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 1.37rem + 0.9vw, 2rem);
  line-height: 1.35;
  color: var(--heading);

  em { font-style: normal; font-weight: 700; }
}

.lessons {
  margin-block-start: clamp(3.5rem, 2.5rem + 4vw, 5rem);
  padding: clamp(1.5rem, 1rem + 3vw, 3rem) clamp(1.25rem, 0.5rem + 3vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--card);
}

/* Lessons read like a short menu: hairline rows, not more cards */
.lesson-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;

  @media (min-width: 48em) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
  }

  li {
    padding-block: 1.25rem;
    border-block-start: 1px solid var(--line);
  }

  strong {
    font-family: var(--serif);
    font-size: 1.3em;
    line-height: 1;
    color: var(--heading);
  }
}

/* Serif, because Golos Text has no real italic */
.proof {
  margin-block: 1.5rem 1.75rem;
  max-inline-size: 27em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25em;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- Lessons page ---------- */

.formats { padding-block-start: var(--space-section); }

.formats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-block-start: 2rem;

  @media (min-width: 52em) {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
    align-items: center;
    margin-block-start: 2.75rem;
  }

  /* One column here: the photo takes the other */
  .lesson-list { grid-template-columns: minmax(0, 1fr); margin: 0 0 1.75rem; }
}

.formats-photo {
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 1.5rem;

  @media (min-width: 52em) { aspect-ratio: 4 / 5; }
}

/* The meetups, as a green band on the lessons page */
.bridge {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--band);
  color: var(--on-band-soft);
  --focus: var(--gold-text);

  h2 { color: var(--on-band); }
  p { margin-block-start: 1rem; max-inline-size: 32em; }
  a:not(.btn) { color: var(--on-band); font-weight: 600; }
  .hint { color: var(--on-band-soft); }
}

.bridge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;

  img { inline-size: 100%; border-radius: 1.5rem; }

  @media (min-width: 48em) {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  }
}

.bridge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-block-start: 1.5rem;
}

/* ---------- FAQ ---------- */

.faq {
  padding-block: var(--space-section);
  border-block-start: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;

  @media (min-width: 60em) {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
    gap: 4rem;
    align-items: start;
    h2 { position: sticky; inset-block-start: 6rem; }
  }
}

.faq-list details {
  border-block-end: 1px solid var(--line);
  &:first-child { border-block-start: 1px solid var(--line); }
}

.faq-list summary {
  /* Grid, not flex: the question text has no element of its own, and a grid column can still shrink it */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 1.1rem;
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
  text-wrap: balance;

  &::-webkit-details-marker { display: none; }

  &::before {
    content: "";
    inline-size: 0.9em;
    block-size: 0.9em;
    translate: 0 0.12em;
    background-color: var(--green);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
    rotate: -90deg;
  }

  &:hover { color: var(--green); text-decoration: underline; text-underline-offset: 0.2em; }

  details[open] > &::before { rotate: 0deg; }
}

@media (prefers-reduced-motion: no-preference) {
  .faq-list summary::before { transition: rotate 0.2s; }
}

.faq-list details p {
  max-inline-size: 36em;
  padding: 0 0 1.4rem calc(0.9em * 1.3 + 0.75rem);
  color: var(--ink-soft);
}

.faq-list details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.faq-list details:not([open])::details-content { block-size: 0; }

@media (prefers-reduced-motion: no-preference) {
  .faq-list details::details-content {
    transition: block-size, content-visibility;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

/* ---------- Closing ---------- */

.closing {
  padding-block: clamp(4rem, 3rem + 4vw, 6.5rem);
  background: var(--band);
  color: var(--on-band);
  text-align: center;
  --focus: var(--gold-text);
}

.closing-inner {
  display: grid;
  justify-items: center;
  gap: 1.75rem;

  h2 { max-inline-size: 14em; color: var(--on-band); }
  .hint { margin: 0; color: var(--on-band-soft); }
}

.logo-big { inline-size: 4.5rem; block-size: 4.5rem; }

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

/* The same green as the closing above it: one ending, split by a hairline */
.site-footer {
  padding-block: 3rem;
  border-block-start: 1px solid rgb(251 246 236 / 0.18);
  background: var(--band);
  color: var(--on-band-soft);
  font-size: 1rem;
  --focus: var(--gold-text);

  a { color: var(--on-band); }
  ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
  li a { display: inline-flex; align-items: center; min-block-size: 2.75rem; }
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;

  @media (min-width: 52em) {
    grid-template-columns: 1fr auto;
    align-items: center;
    .footer-links, .footer-lang { justify-content: end; }
  }
}

.footer-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--on-band);
}

.footer-tagline {
  margin-block-start: 0.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
}

.footer-lang a[aria-current="page"] {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

/* ---------- Forced colors ---------- */

@media (forced-colors: active) {
  .who-photo, .next-card { border: 1px solid CanvasText; }
  .site-header { border-block-end: 1px solid CanvasText; }
  .btn { border-color: ButtonText; }
  .faq-list summary::before { background-color: CanvasText; }
}
