/* Rotterdam Language Cafe
   Fonts are self-hosted, deliberately not loaded from Google Fonts: their CDN
   leaks every visitor's IP to a US server. Nothing here calls out to a third
   party. Both faces are SIL OFL 1.1 — see fonts/OFL.md and fonts/OFL-Sniglet.md,
   which must ship alongside the font files. */

/* Raleway: one variable file covers weights 100–900, so the range goes in the
   @font-face rule rather than one file per weight. */
@font-face {
  font-family: "Raleway";
  src: url("fonts/Raleway-VF.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Sniglet: display face, only ever used for the h1. Subset to Latin. */
@font-face {
  font-family: "Sniglet";
  src: url("fonts/Sniglet.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette sampled from the reference image. */
  --flag-green: #00853f;  /* Rotterdam flag green */
  --green-dark: #0b3d1e;  /* header background, headings */
  --red:        #8c1f1f;  /* accent + call to action */
  --cream:      #f1efea;  /* page background */
  --mint:       #cfe0d3;  /* muted text on dark green */

  --ink:        #23241f;
  --ink-soft:   #5b615a;
  --rule:       #ddd9d0;
  --measure:    36rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 4rem;
  background: var(--cream);
  color: var(--ink);
  font-family: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Content column. The header sits outside it so its green background can run
   the full width of the viewport while the text inside stays aligned. */
.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---- Rotterdam flag ---- */

/* Three equal vertical bands. A hard-stop gradient does this in one element —
   no extra markup, no image request. */
.flag {
  height: 10px;
  background: linear-gradient(
    to right,
    var(--flag-green) 0 33.333%,
    #fff              33.333% 66.667%,
    var(--flag-green) 66.667% 100%
  );
}

/* ---- header ---- */

header {
  background: var(--green-dark);
  color: #fff;
  padding: 2.75rem 0 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: "Sniglet", "Raleway", sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* "Language Cafe" on its own second line. Inherits Sniglet from the h1 —
   the whole title is one typeface, just two sizes. */
h1 span {
  display: block;
  font-size: 0.52em;
  line-height: 1.1;
  margin-top: 0.1em;
  color: var(--mint);
}

.tagline {
  margin: 1.35rem 0 0;
  font-size: 1.1rem;
  color: var(--mint);
  text-wrap: balance;
}

/* ---- sections ---- */

section { margin-bottom: 2.75rem; }

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--green-dark);
  text-wrap: balance;
}

p { margin: 0 0 0.9rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--red);
  text-underline-offset: 0.15em;
}
a:hover { text-decoration: none; }

/* ---- next event: the single most important thing on the page ---- */

.next-event {
  padding: 1.4rem 1.5rem;
  background: var(--red);
  color: #fff;
  border-radius: 6px;
}

.next-event h2 {
  margin: 0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Raleway, not Sniglet — Sniglet is reserved for the title alone. */
.next-event .date {
  margin: 0.4rem 0 0;
  font-size: clamp(1.6rem, 5.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.next-event .time {
  margin: 0.3rem 0 0;
  font-size: 1.05rem;
  opacity: 0.92;
}

/* ---- lists ---- */

ul {
  margin: 0 0 0.9rem;
  padding-left: 1.15rem;
}

li { margin-bottom: 0.35rem; }

/* ---- practical details ---- */

.practical dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
}

.practical dt {
  font-weight: 600;
  color: var(--green-dark);
}

.practical dd { margin: 0; }

/* Narrow screens: stack the term above its value rather than squeezing
   two columns into 320px. */
@media (max-width: 26rem) {
  .practical dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .practical dd { margin-bottom: 0.7rem; }
}

/* ---- english block ---- */

.english {
  padding: 1.25rem 1.4rem;
  background: #e4e9e0;
  border-left: 4px solid var(--flag-green);
  border-radius: 4px;
}

.english h2 { margin-top: 0; }

/* ---- footer ---- */

footer {
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

footer p { margin: 0; }
