/* ==========================================================================
   style.css — Integrale Yoga
   Banded layout per spec §8: the page is a vertical stack of full-width
   color bands.

   FONT: "Google Sans Flex" — self-hosted variable font, see @font-face
   below (matches spec §8.2: self-hosted only, no external font CDNs).
   ========================================================================== */

@font-face {
  font-family: "Google Sans Flex";
  src: url("../fonts/GoogleSansFlex-Variable.ttf") format("truetype-variations");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

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

/* Photo framing, see the "photo frames" section below. --frame-mat is the
   fallback for photos outside a coloured band; each band overrides it with a
   colour from its own palette (see the .band--N rules). */
:root {
  --frame-mat: var(--surface);
  --frame-mat-width: clamp(0.5rem, 1.2vw, 0.9rem);
  --frame-radius: 18px;
}

/* The [hidden] attribute must beat component display rules (.btn is
   inline-block, .cart-bar is flex) — without this, hiding such an element in
   JS silently does nothing and it stays clickable. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Google Sans Flex", "Google Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  background: var(--surface);
  color: var(--surface-ink);
}

h1, h2, h3, .poem, .tagline, .logo__name {
  font-family: "Google Sans Flex", "Google Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 500;
}

h1 { font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 0 0 1.25rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; display: block; }

a { color: inherit; }

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

/* ---- skip link ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--surface-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--band-1-bg);
  color: var(--band-1-ink);
  /* The header is band 1, and it floats over every band as you scroll — over a
     band 1 section it would otherwise dissolve into the page. The hairline
     plus a soft drop shadow keep its lower edge readable on all five bands. */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.site-header__inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  padding: 0.8rem clamp(1rem, 3vw, 2rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo__img { width: 46px; height: 46px; flex: none; object-fit: contain; }

.logo__name {
  display: flex;
  flex-direction: column;
  font-size: 1.05rem;
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.site-nav { margin-inline: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.25rem, 2.5vw, 2.25rem);
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.3rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 1.5px;
}

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 9px;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn:hover { filter: brightness(0.93); }

/* The amber pill needs a mid-toned ground to sit on. It has none on band 5
   (its own colour), on band 2 (1.1:1 — same warm family) or on band 3, where
   cream is so much lighter that the pill washes out at 1.8:1. On those three
   the CTA switches to the darker clay, which reads at 7.4:1 on cream. Same
   shape, same type — just burnt in far enough to separate.

   Band 3 also covers the booking UI: buttons on the white cards and in the
   cart panel inherit this, and the clay separates on white where amber does
   not. */
.band--2, .band--3, .band--5 {
  --accent: var(--accent-alt);
  --accent-ink: var(--accent-alt-ink);
}

/* ---- bands (spec §8.1) --------------------------------------------------

   COLOUR SYSTEM — the order of the bands differs per page, but never at
   random: every page is built from the same roles and the same adjacency
   rules, so the pages feel like one site without being carbon copies.

   Roles:
     band 3  cream, lightest   READ    — long body copy, practical info, legal
     band 1  light blue        AIR     — secondary reading, functional UI
                                         (it is also the header colour)
     band 5  amber             MASTHEAD— the page title band and the closing
                                         CTA band on every page: the gold caps
     band 2  terracotta        PUNCT   — poems, short lists, accents. Never a
                                         long read: it is the loudest tone.
     band 4  sage, darkest     GROUND  — hero panel, photo bands, footer.
                                         Top and bottom of the site.

   Adjacency (backgrounds only differ by ~1.2:1 in places, so a seam has to be
   earned by value OR by hue, and preferably both):
     - never 2 next to 5   — terracotta and amber are one hue family and
                             0.1 apart in luminance: the seam turns to mud.
                             The closing poem band on the home page is the one
                             deliberate exception (see index.html).
     - 2 next to 4 at most once per page — the two darkest, most saturated
                             tones, only 1.2:1 apart. The seam carries on hue
                             (orange against green) rather than on value, so
                             it holds, but it is loud: never between two long
                             text blocks, and never twice on one page.
     - no A-B-A: a band may not return with only one band in between. Two
                             tones taking turns stops being a rhythm and turns
                             into wallpaper, especially once a single band
                             fills the viewport.
     - 1 next to 3 is the "soft seam": both are pale, so the boundary is a
       temperature shift rather than a value step. Allowed once per page,
       between two reading sections, never twice in a row.
     - the first band of a page is never band 1: the sticky header is band 1
       and would dissolve into it.
     - the last two content bands are never both band 4. The footer is always
       band 4, so a sage band two steps from the end turns whatever sits
       between them into a stripe wedged between two greens — the end of a
       page has to descend into the footer, not sandwich something in it.

   Fixed across every page: the footer is band 4, the page title band is
   band 5, and a poem is always the .band--poem treatment (centred, italic,
   large) — that treatment, not one fixed colour, is what marks a poem, since
   poezie.html has to run poems across every band in the palette. */

.band { min-height: 50vh; display: flex; align-items: center; }
.band--third { min-height: 33vh; }
.band--hero { min-height: 70vh; }
.band--auto { min-height: 0; }

/* The title band is a masthead, not a content band: it carries an h1 and one
   line of text, so it takes its height from that instead of the 33vh a short
   content band gets. At 33vh it read as an empty amber field you had to
   scroll past before the page started. */
.band--title { min-height: 0; }
.band--title .band__inner { padding-block: clamp(1.75rem, 4.5vh, 2.75rem); }

.band__inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 4vw, 3rem);
}

.band__inner--narrow { max-width: 50rem; }

/* wider band: schedule + selection panel side by side (rooster.html) */
.band__inner--wide { max-width: 76rem; }

.band--1 { background: var(--band-1-bg); color: var(--band-1-ink); }
.band--2 { background: var(--band-2-bg); color: var(--band-2-ink); }
.band--3 { background: var(--band-3-bg); color: var(--band-3-ink); }
.band--4 { background: var(--band-4-bg); color: var(--band-4-ink); }
.band--5 { background: var(--band-5-bg); color: var(--band-5-ink); }

/* The photo mat borrows a second colour from the same palette so the frame
   belongs to the band it sits in. Band 3 is the warm mid tone that separates
   well from every other band; on band 3 itself it would vanish, so there the
   mat takes the lightest tint (band 1) instead. */
.band--1, .band--2, .band--4, .band--5, .band--hero { --frame-mat: var(--band-3-bg); }
.band--3 { --frame-mat: var(--band-1-bg); }

/* split band: text + photo side by side */
.band--split .band__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.band--split img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: cover;
}

/* ---- photo frames -------------------------------------------------------- */

/* Every content photo sits in a "mat": a band-coloured inlay with the same
   hairline as a .card. The mat is painted as a thick border (not
   padding) so the photo itself gets a rounded inner edge too — a replaced
   element clips to its padding box, which padding would not round. The
   hairline is a box-shadow ring because it has to follow the same radius
   without eating into the mat. */
.hero__media img,
.band--split img {
  border: var(--frame-mat-width) solid var(--frame-mat);
  border-radius: var(--frame-radius);
  box-shadow: 0 0 0 1px var(--line);
}

/* poem band: centered, generous, keeps the poem's own line breaks */
.band--poem .band__inner {
  max-width: 46rem;
  text-align: center;
}

.band--poem h2 {
  font-style: normal;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

.poem {
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.9;
  white-space: pre-line;
  margin: 0;
}

.poem-note {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.band--poem .btn { margin-top: 2rem; }

/* ---- hero: color panel + photo ------------------------------------------ */

.band--hero { padding: 0; align-items: stretch; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  min-height: 70vh;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: var(--band-4-bg);
  color: var(--band-4-ink);
  padding: clamp(3rem, 9vh, 6rem) clamp(1.5rem, 5vw, 5rem);
}

/* the gutter around the framed photo carries the panel colour, so the hero
   still reads as one green band rather than a photo floating on the page */
.hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: clamp(1rem, 2.5vw, 2rem);
  background: var(--band-4-bg);
}

/* The hero photo is never cropped: it keeps its own aspect ratio and is
   scaled down to fit whichever of the two limits it hits first. The height
   cap is what keeps the band on one screen — the grid row is content-sized,
   so without it a portrait photo sets the row height from its own ratio and
   the hero swallows the fold. Whatever is left over stays panel-coloured, so
   the band still reads as one green field. */
.hero__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.tagline {
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.7;
  white-space: pre-line;
  margin: 0 0 0.75rem;
  opacity: 0.95;
}

.tagline-note {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.8;
  margin: 0 0 2rem;
}

/* ---- session cards ------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-block: 2rem;
}

/* Cards are near-white, so they separate least on the palest bands — on band 3
   the fill is only ~1.3:1 against its background. The hairline does the real
   work there; the shadow gives it a little lift so the card edge does not
   depend on that one line alone. */
.card {
  background: var(--surface);
  color: var(--surface-ink);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card__program { font-weight: 600; }

.card__when {
  font-weight: 600;
  font-size: 1.15rem;
}

.card__where { font-size: 0.95rem; opacity: 0.85; }

.pill {
  align-self: flex-start;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
}

.pill--ext { font-style: italic; }

.hint { font-size: 0.9rem; opacity: 0.8; }

.note {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.85;
}

/* "Opleiding in het kort" with the federation badge alongside */
.credentials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem 3rem;
}

.credentials > div { flex: 1 1 22rem; }

.federation-badge {
  width: 160px;
  height: auto;
  flex: 0 0 auto;
  margin-inline: auto;
}

/* simple lists (meebrengen, credentials) */
.checklist {
  margin: 0;
  padding-left: 1.2rem;
}

.checklist li { margin-bottom: 0.45rem; }

/* schedule location heading */
.schedule-loc {
  margin-top: 2.5rem;
}

.schedule-loc:first-of-type { margin-top: 0; }

.schedule-loc h3 {
  font-family: "Google Sans Flex", "Google Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.schedule-loc .loc-note {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}

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

.site-footer {
  background: var(--band-4-bg);
  color: var(--band-4-ink);
}

.site-footer .band__inner {
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  /* the row gap is what sets the space above the rule, so it stays tight */
  gap: 1rem 3.5rem;
  justify-content: space-between;
  font-size: 0.95rem;
}

.site-footer h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.site-footer a { text-underline-offset: 4px; }

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

/* Full-width row under the two columns. */
.site-footer__legal {
  flex-basis: 100%;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  font-size: 0.85rem;
  opacity: 0.72;
  text-align: center;
}

/* ---- placeholder pages -------------------------------------------------- */

.placeholder .band__inner { text-align: center; max-width: 44rem; }
.placeholder { min-height: 72vh; }

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 920px) {
  .site-nav { margin-inline: 0; order: 3; width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .hero__media { min-height: 44vh; }
  .hero__media img { max-height: 50vh; }
  .band--split .band__inner { grid-template-columns: 1fr; }
  .band--split img { max-height: 380px; }
  .cards { grid-template-columns: 1fr; }
}

/* ---- booking UI (rooster) ----------------------------------------------- */

.card--full { opacity: 0.75; }

.badge-full {
  align-self: flex-start;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: var(--band-5-bg);
  color: var(--band-5-ink);
}

/* extra info on cards that are not booked via the site (e.g. sportdienst) */
.card__note {
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.85;
  margin: 0.6rem 0 0;
}

/* week pagination on the rooster */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.pager button:disabled { opacity: 0.4; cursor: default; }

.pager__info { font-size: 0.9rem; opacity: 0.8; }

.booking-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field { display: flex; flex-direction: column; gap: 0.25rem; }

.field label { font-size: 0.88rem; font-weight: 600; }

.field input,
.field select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.form-error {
  color: #8C1D18;
  font-size: 0.92rem;
  margin: 0;
}

.form-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.btn--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
}

.week-title {
  font-family: "Google Sans Flex", "Google Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin: 2.5rem 0 1rem;
}

.week-title:first-child { margin-top: 0; }

/* ---- selection panel (multi-session booking) ---------------------------- */

.rooster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

/* the schedule column is narrower than a full band, so let the cards flow */
.rooster-layout .cards {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  margin-block: 1.25rem 0;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;      /* keeps the buttons aligned across a row of cards */
  padding-top: 0.9rem;
}

.card__actions .btn { padding-inline: 1.1rem; }

.card__drop { font-size: 0.9rem; padding: 0.55rem 1rem; }

/* the ring uses the ink colour, not the accent: in some palettes the accent is
   the same colour as the band this card sits on */
.card--picked {
  border-color: var(--surface-ink);
  box-shadow: inset 0 0 0 1px var(--surface-ink);
}

.cart {
  position: sticky;
  top: 5.5rem;
  background: var(--surface);
  color: var(--surface-ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.cart__title {
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.cart__empty,
.cart__status {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
}

.cart__status:not(:empty) { margin-top: 0.75rem; }

.cart__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.cart-item:first-child { border-top: none; padding-top: 0; }

.cart-item__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item__when { font-weight: 600; font-size: 0.95rem; }

.cart-item__what { font-size: 0.85rem; opacity: 0.85; }

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
}

.cart-item__spots {
  font: inherit;
  font-size: 0.85rem;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  width: 3.5rem;
}

.cart-item__remove {
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  opacity: 0.7;
}

.cart-item__remove:hover { opacity: 1; border-color: var(--line); }

.cart__total {
  margin: 0.75rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.cart__form {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.cart__form .btn { width: 100%; text-align: center; }

/* sticky summary on phones, where the panel sits below the schedule */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 1.5rem);
  background: var(--band-4-bg);
  color: var(--band-4-ink);
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.18);
}

.cart-bar__text { font-size: 0.95rem; font-weight: 600; }

.cart-bar .btn { padding: 0.6rem 1.2rem; }

@media (max-width: 920px) {
  .rooster-layout { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .cart-bar { display: flex; }
  body.has-cart-bar { padding-bottom: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
