/* ==========================================================================
   Saulīte — Jūrmalas pirmsskola
   Warm, hand-made, rounded. The children's drawings are the stars; type,
   shape and motion stay calm around them.

   RULES THAT KEEP THE PAGE CONSISTENT
   • Type: every size is rem. The ONLY thing that changes between viewports is
     the root font-size on <html>. Display sizes are clamp() in rem+vw. Never
     add per-breakpoint font-size overrides.
   • Source Serif 4 (headlines, 400–600 + italic; Iowan Old Style as the look-alike fallback) over Nunito (text/UI). No weight above 700 outside the notepad.
   • Motion: one ease-out curve for entrances/UI, one soft spring for playful
     hovers. UI transitions ≤ 300ms. Press = scale(.96–.97). Hover effects only
     on real pointers. Nothing grows from scale(0).
   • Tilts use the `rotate` property and lifts use `translate`, so GSAP's
     `transform` (scroll reveals) never fights hover styles.
   • Shapes: radii --r-sm / --r-md / --r-lg / pill. Shadows: --shadow-1/2/3.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* colour (kept from the original site) */
  --cream:  #fdfcf6;
  --paper:  #ffffff;
  --yellow: #f7d462;
  --note:   #fae298;
  --purple: #935fdf;
  --pink:   #e5bdd6;
  --sky:    #aeecfd;
  --mint:   #6ff1d4;
  --green:  #54b58a;
  --red:    #ef5b4c;
  --ink:    #2d2630;      /* soft warm plum-black instead of near-black */
  --muted:  #5a5360;

  /* type families */
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text:    "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale — named by role, descending with heading level */
  --text-caption: 0.8125rem;                                  /* labels, captions */
  --text-body:    1rem;
  --text-lead:    1.25rem;
  --text-quote:   clamp(1.5rem, 0.9rem + 1.4vw, 1.9rem);     /* quotes, h3 */
  --text-h2:      clamp(2.05rem, 1.3rem + 2.5vw, 3.15rem);
  --text-display: clamp(3rem, 1.7rem + 6vw, 4.8rem);       /* hero, contact */
  --step--1: var(--text-caption);                             /* aliases (notepad uses --step-2) */
  --step-0:  var(--text-body);
  --step-1:  var(--text-lead);
  --step-2:  var(--text-quote);
  --step-3:  var(--text-h2);
  --step-4:  var(--text-display);

  --lh-tight: 1.08;
  --lh-snug:  1.25;
  --lh-body:  1.6;

  /* shape */
  --r-sm: 0.875rem;
  --r-md: 1.5rem;
  --r-lg: 2.25rem;
  --pill: 999px;

  /* elevation */
  --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.05), 0 10px 22px -14px rgba(40, 25, 70, 0.5);
  --shadow-2: 0 1px 0 rgba(0, 0, 0, 0.05), 0 22px 34px -26px rgba(30, 20, 60, 0.55);
  --shadow-3: 0 8px 28px -10px rgba(40, 20, 80, 0.28), 0 1px 0 rgba(0, 0, 0, 0.04);

  /* space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-section: clamp(4.5rem, 10vw, 8.5rem);

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);                 /* entrances, UI */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);             /* on-screen movement */
  --ease: cubic-bezier(0.34, 1.4, 0.5, 1);                    /* soft spring: playful hovers */
  --dur-press: 140ms;
  --dur-hover: 200ms;
  --dur-move: 320ms;

  --arrow-img: none;
}

/* The one place type scales: the root. */
html { font-size: clamp(16px, 15px + 0.25vw, 18px); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;                        /* every weight/style we use is a real face */
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--text-body)/var(--lh-body) var(--font-text);
  font-optical-sizing: auto;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, figure, blockquote, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
section[id] { scroll-margin-top: 5.5rem; }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 0.6rem 1rem; border-radius: var(--pill); text-decoration: none;
  transition: top var(--dur-move) var(--ease-out);
}
.skip:focus { top: 1rem; }

/* Lenis (smooth scroll) housekeeping */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Type ---------- */
.display, .h2, .contact__title, .ecard h3 { font-family: var(--font-display); }
.footer__h, .eyebrow, .btn, .times li { font-family: var(--font-text); }
.display {
  font-size: var(--text-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;                     /* big type: slightly tight */
  text-wrap: balance;
}
.h2 {
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h2--center { text-align: center; }
.lead { font-size: var(--text-lead); line-height: 1.5; font-weight: 500; text-wrap: pretty; }
.measure { max-width: 38em; text-wrap: pretty; }   /* ≈ 62–68 characters */
p { text-wrap: pretty; }
time, .tnum { font-variant-numeric: tabular-nums; }

.eyebrow {                                     /* small caps-style label: tracked */
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* word-split headings (see main.js) */
.w { display: inline-block; white-space: pre; }
.w-wrap { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }

/* ---------- Layout ---------- */
.section {
  position: relative;
  isolation: isolate;
  padding: var(--space-section) var(--gutter);
}
.section > * { max-width: 72rem; margin-inline: auto; }
.section > .blob { max-width: none; margin: 0; }

/* soft colour shapes behind sections (they drift slowly on scroll) */
.blob {
  position: absolute; z-index: -1; pointer-events: none;
  aspect-ratio: 1;
  border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%;
}
.blob--sky  { background: var(--sky);  opacity: 0.5;  width: min(34rem, 72vw); right: -12%; top: 12%; }
.blob--mint { background: var(--mint); opacity: 0.3;  width: min(30rem, 66vw); left: -14%; bottom: -6%; }
.blob--pink { background: var(--pink); opacity: 0.42; width: min(32rem, 68vw); right: -12%; top: 6%; }

/* ---------- Pressable things share one press feel ---------- */
.nav__item, .btn, .tile, .media-play, .hero__cue, .footer a { -webkit-tap-highlight-color: transparent; }
.nav__item:active, .btn:active, .tile:not(.is-playing):active, .media-play:active, .hero__cue:active { scale: 0.96; }

/* ---------- Marker highlight on the keyword of a heading ---------- */
.hl {
  --hl: var(--yellow);
  background-image: linear-gradient(transparent 52%, var(--hl) 52% 90%, transparent 90%);
  background-repeat: no-repeat; background-size: 100% 100%;
  padding-inline: 0.1em; margin-inline: -0.1em;
  border-radius: 0.2em;
}
.hl--pink { --hl: #f2a7cf; }     /* marker tones are a notch stronger than the pastel fills so they read on cream */
.hl--mint { --hl: #5fe8c8; }
.hl--sky  { --hl: #8bdcf6; }

/* ---------- Wavy tinted bands ---------- */
.wavy {
  --tint: color-mix(in oklab, var(--pink) 30%, var(--cream));
  --wave-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 22C33 -2 66 -2 100 22S167 46 200 22V40H0Z' fill='black'/%3E%3C/svg%3E");
  --wave-bot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0H200V18C167 42 133 42 100 18S33 -6 0 18Z' fill='black'/%3E%3C/svg%3E");
  padding-block: calc(var(--space-section) * 0.95);
}
.wavy--sky { --tint: color-mix(in oklab, var(--sky) 42%, var(--cream)); }
.wavy--lilac { --tint: color-mix(in oklab, var(--purple) 15%, var(--cream)); }
.wavy::before {
  content: ""; position: absolute; z-index: -1; inset: -1.2rem 0; background: var(--tint);
  -webkit-mask: var(--wave-top) left top / 14rem 2.8rem repeat-x, linear-gradient(#000, #000) 0 2.7rem / 100% calc(100% - 5.4rem) no-repeat, var(--wave-bot) left bottom / 14rem 2.8rem repeat-x;
          mask: var(--wave-top) left top / 14rem 2.8rem repeat-x, linear-gradient(#000, #000) 0 2.7rem / 100% calc(100% - 5.4rem) no-repeat, var(--wave-bot) left bottom / 14rem 2.8rem repeat-x;
}

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed; inset: 0.9rem 0 auto; z-index: 50;
  display: flex; justify-content: center;
  padding-inline: 0.75rem;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 0.15rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: var(--pill);
  box-shadow: var(--shadow-3);
}
.nav__item {
  position: relative;
  display: grid; place-items: center;
  width: clamp(2.1rem, 9.2vw, 2.9rem); aspect-ratio: 1;
  border-radius: 50%;
  text-decoration: none;
  transition: translate var(--dur-hover) var(--ease), rotate var(--dur-hover) var(--ease), scale var(--dur-press) var(--ease-out), background-color var(--dur-hover), box-shadow var(--dur-hover);
}
.nav__item img { width: 82%; height: 82%; object-fit: contain; }
.nav__item[aria-current="true"] { background: #fff; box-shadow: inset 0 0 0 3px var(--yellow); }   /* white inside, yellow frame */
.nav__item::after {                            /* label bubble */
  content: attr(data-label);
  position: absolute; top: calc(100% + 0.6rem); left: 50%;
  translate: -50% -4px; scale: 0.97;
  transform-origin: top center;
  padding: 0.25rem 0.7rem;
  background: var(--ink); color: var(--cream);
  font: 700 var(--text-caption)/1.3 var(--font-text);
  border-radius: var(--pill); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 125ms var(--ease-out), translate 125ms var(--ease-out), scale 125ms var(--ease-out);
}
.nav__item:focus-visible::after { opacity: 1; translate: -50% 0; scale: 1; }
.nav__item--text {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; aspect-ratio: auto;
  padding: 0.4rem 0.7rem;
  margin-inline: 0.15rem;
  background: var(--purple); color: var(--cream);
  font: 700 0.8rem/1 var(--font-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__item--text[aria-current="true"] { background: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .nav__item:hover { translate: 0 -3px; rotate: -6deg; scale: 1.08; }
  .nav__item--text:hover { rotate: 3deg; }
  .nav__item:hover::after { opacity: 1; translate: -50% 0; scale: 1; }
  .nav.is-warm .nav__item::after { transition-duration: 0ms; }   /* once one label is open, neighbours open instantly */
}

/* ---------- Hero: an arched window ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 4.5rem;
  padding: 7.5rem var(--gutter) 8.5rem;
}
@media (min-width: 56em) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; padding-bottom: 9rem; }
}
.hero__copy { position: relative; z-index: 2; max-width: 46rem; }
.hero h1 { max-width: 15.5em; text-wrap: balance; font-family: var(--font-display); font-size: clamp(1.5rem, 0.95rem + 1.9vw, 2.55rem); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.hero__small { display: inline; text-wrap: balance; }
.hero__big {                                   /* the school's name is the loudest thing on the page */
  display: block; margin-top: 0.15em;
  font-size: clamp(3.9rem, 1.6rem + 9.2vw, 8.6rem);
  font-style: italic; font-weight: 500; line-height: 0.98; letter-spacing: -0.025em;
  --hl: var(--yellow);
}
.hero__sub { display: flex; align-items: center; gap: 0.9rem; margin-top: 2rem; font-size: var(--text-lead); font-weight: 600; }
.hero__bus { width: clamp(4rem, 7vw, 5.5rem); height: auto; flex: none; }

.hero__arch {
  position: relative; width: min(100%, 28rem); justify-self: center;
  margin-block: 4.5rem 1.5rem;                 /* room for the rainbow rings above and below */
}
@media (min-width: 56em) { .hero__arch { justify-self: end; margin-right: clamp(2rem, 5.5vw, 6rem); margin-block: 2rem 1rem; } }
.hero__photo { position: relative; z-index: 2; margin: 0; }
.hero__photo :is(img, .ph) {
  width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 66% 40%;
  border: 0.6rem solid #fff; background-color: #fff;
  border-radius: 999px 999px var(--r-md) var(--r-md);
  box-shadow: 0 30px 50px -28px rgba(40, 25, 70, 0.55);
}
.hero__ring {                                  /* the school's colours as an arched rainbow */
  position: absolute; z-index: 0; border-radius: 999px 999px 2.4rem 2.4rem; transform-origin: 50% 100%;
}
.hero__ring--1 { inset: -1.3rem; background: var(--yellow); }
.hero__ring--2 { inset: -2.7rem; background: var(--pink); }
.hero__ring--3 { inset: -4.1rem; background: var(--purple); }
.hero__sun {                                   /* the crayon sun rising behind the arch */
  position: absolute; z-index: 1; right: -4.6rem; top: -5.8rem;
  width: clamp(7rem, 15vw, 11rem); aspect-ratio: 1;
}
.hero__sun-img { width: 100%; height: 100%; object-fit: contain; animation: spin 90s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.hero__doodle { position: absolute; z-index: 3; pointer-events: none; height: auto; }
.hero__doodle--butterfly { width: clamp(3.4rem, 6vw, 5rem);   left: -3.4rem;  bottom: 22%; }
.hero__doodle--tulip { width: clamp(4rem, 7vw, 6rem);     right: -2.6rem; top: 36%; }
.hero__doodle--apple { width: clamp(3.6rem, 6.5vw, 5.4rem); right: -3.2rem; bottom: 4%; }
@media (max-width: 39.99em) {
  .hero__doodle--butterfly { left: -0.8rem; }
  .hero__doodle--tulip, .hero__doodle--apple { right: -0.8rem; }
  .hero__sun { right: -1.6rem; top: -4.6rem; }
}

/* die-cut stickers: the children's drawings with a white edge, like real stickers */
.sticker {
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 12px 14px rgba(40, 25, 70, 0.2));
}
.sticker--paper { filter: none; mix-blend-mode: multiply; border-radius: 0.6rem; }   /* the bus has its own paper: let it blend into the page */
.nav__item img.paper { mix-blend-mode: multiply; }
.nav__item img.wide { width: 84%; height: 84%; }   /* the wide flag drawing sits fully inside the yellow ring */

/* ---------- Ticker ribbon ---------- */
.ticker {
  position: relative; z-index: 6;
  margin: -2.2rem -4vw 0;
  padding: 0.85rem 0;
  background: var(--yellow);
  rotate: -1.6deg;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.ticker__track { display: flex; width: max-content; will-change: transform; }
.ticker__group { display: flex; align-items: center; flex: none; gap: clamp(1.25rem, 3vw, 2.5rem); padding-right: clamp(1.25rem, 3vw, 2.5rem); }
.ticker__group span { font: italic 500 clamp(1.5rem, 0.8rem + 2.2vw, 2.6rem)/1.15 var(--font-display); letter-spacing: -0.005em; white-space: nowrap; }
.ticker__group img { width: clamp(2rem, 4vw, 3rem); height: auto; flex: none; }

/* ---------- Tilted photo frames (taped-in snapshots) ---------- */
.frame {
  --tilt: 0deg;
  --plate: 1;
  position: relative;
  isolation: isolate;
}
.frame::before {                               /* the yellow plate behind */
  content: ""; position: absolute; inset: 1.5% 1.5%;
  z-index: -1;
  background: var(--yellow);
  border-radius: var(--r-lg);
  opacity: var(--plate);
  transform: rotate(calc(var(--tilt) * -1.7)) translate(-3.5%, 3.5%) scale(1.02);
  transition: transform 600ms var(--ease-out);
}
.frame :is(img, .ph, .map):not(.sticker) {
  width: 100%; height: auto;
  border: 0.6rem solid #fff;                   /* snapshot border */
  border-radius: var(--r-sm);
  background-color: #fff;
  rotate: var(--tilt);
  transition: rotate 600ms var(--ease-out), scale 600ms var(--ease-out);
  box-shadow: 0 18px 40px -22px rgba(60, 40, 0, 0.5);
}
.frame::after {                                /* washi tape */
  content: ""; position: absolute; z-index: 3;
  top: -0.8rem; left: 50%; width: 6.5rem; height: 1.9rem; margin-left: -3.25rem;
  background: rgba(247, 212, 98, 0.82);
  rotate: calc(var(--tilt) * -1 - 2deg);
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}
.frame--right::after { background: rgba(229, 189, 214, 0.9); }
.frame--wide::after  { background: rgba(174, 236, 253, 0.9); }
.frame--tall :is(img, .ph):not(.sticker) { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; }
.frame .sticker { position: absolute; z-index: 4; width: clamp(4rem, 9vw, 6.5rem); height: auto; pointer-events: none; }
.frame .sticker { transition: rotate 260ms var(--ease); }
.sticker--tr { right: -1.4rem; top: -1.6rem; rotate: 12deg; }
.sticker--bl { left: -1.6rem; bottom: -1.2rem; rotate: -10deg; width: clamp(4.5rem, 10vw, 7rem) !important; }
@media (hover: hover) and (pointer: fine) {
  .frame:hover :is(img, .ph, .map):not(.sticker) { rotate: 0deg; scale: 1.01; }
  .frame:hover .sticker--tr { rotate: 19deg; }
  .frame:hover .sticker--bl { rotate: -17deg; }
  .frame:hover::before { transform: rotate(calc(var(--tilt) * -3)) translate(-4.5%, 4.5%) scale(1.02); }
}
.tilt-l { --tilt: -2.4deg; }
.tilt-r { --tilt: 2.2deg; }

/* ---------- About ---------- */
.about, .adapt {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.about > *, .adapt > * { max-width: none; margin: 0; }
.about { max-width: 76rem; margin-inline: auto; }
.about__text, .adapt__text { display: grid; gap: 1.25rem; align-content: center; }

@media (min-width: 52em) {
  .about { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .adapt { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr); align-items: start; }
  .adapt .frame { position: sticky; top: 6.5rem; }        /* the photo stays with you while you read */
}
.adapt { max-width: 76rem; margin-inline: auto; }
.adapt .frame { max-width: 26rem; justify-self: center; width: 100%; }
@media (max-width: 51.99em) { .adapt .frame { order: -1; } }

/* hand-drawn arrow bullets */
.arrows { display: grid; gap: 0.7rem; margin-top: 0.5rem; }
.arrows li { position: relative; padding-left: 2.6rem; font-weight: 500; }
.arrows li::before, .times li::before {
  content: ""; position: absolute; left: 0; top: 0.15em;
  width: 2rem; height: 1.45rem;
  background: var(--arrow-img) center/contain no-repeat;
  transition: translate var(--dur-hover) var(--ease);
}
@media (hover: hover) and (pointer: fine) { .arrows li:hover::before { translate: 0.3rem 0; } }
.no-arrow .arrows li::before, .no-arrow .times li::before {   /* only if the drawn arrow file is missing */
  width: 1.1rem; height: 0.8rem; top: 0.45em; left: 0.4rem;
  background: var(--purple); clip-path: polygon(0 20%, 60% 20%, 60% 0, 100% 50%, 60% 100%, 60% 80%, 0 80%);
}

/* start times as chips */
.times { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.times li {
  position: relative;
  padding: 0.5rem 1.15rem 0.5rem 2.8rem;
  background: var(--paper);
  border-radius: var(--pill);
  box-shadow: inset 0 0 0 2px var(--yellow);
  font-size: 1.15rem; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.times li::before { left: 0.6rem; top: 50%; translate: 0 -50%; }
.no-arrow .times li::before { top: 50%; translate: 0 -50%; }

/* ---------- Quotes (speech bubbles) ---------- */
.quotes {
  display: grid; grid-template-columns: minmax(0, 52rem); justify-content: center;
  gap: 1.75rem;
  padding-block: 2rem var(--space-section);
}
.quotes > * { margin-inline: 0; }
.quote {
  position: relative;
  width: min(100%, 33rem);
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.quote::after {                                /* the bubble's tail */
  content: ""; position: absolute; bottom: -1.05rem; width: 2.4rem; height: 1.5rem; background: inherit;
}
.quote blockquote { font-family: var(--font-display); font-size: var(--text-quote); font-weight: 400; line-height: var(--lh-snug); text-wrap: balance; }
.quote figcaption {
  margin-top: 1rem;
  font: 700 var(--text-caption)/1 var(--font-text);
  letter-spacing: 0.24em; text-transform: uppercase;    /* small caps label: tracked */
  color: var(--muted);
}
.quote--sky  { background: var(--sky);  justify-self: start; rotate: -0.8deg; }
.quote--sky::after  { left: 3rem;  clip-path: polygon(0 0, 100% 0, 14% 100%); }
.quote--mint { background: var(--mint); justify-self: end;   rotate: 0.9deg; }
.quote--mint::after { right: 3rem; clip-path: polygon(0 0, 100% 0, 86% 100%); }
.quotes__rays  { position: absolute; width: clamp(3.5rem, 8vw, 5.5rem); right: max(0.5rem, calc(50% - 31rem)); top: 0.75rem; max-width: none; margin: 0; }
.quotes__cloud { position: absolute; width: clamp(3.5rem, 8vw, 5.5rem); left: max(0.5rem, calc(50% - 31rem)); top: 52%; max-width: none; margin: 0; }

/* ---------- Team notepad ---------- */
.team { padding-top: 2rem; }
.notepad {
  position: relative;
  max-width: 62rem !important;
  background: var(--note);
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.1rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.75rem) clamp(2.6rem, 7vw, 5rem);
  box-shadow: 0 2px 0 rgba(120, 80, 0, 0.18), 0 28px 50px -30px rgba(120, 80, 0, 0.55);
}
.notepad::before {                         /* margin rule + binder holes */
  content: ""; position: absolute; top: 0; bottom: 0; left: clamp(1.7rem, 4.8vw, 3.4rem);
  border-left: 2px solid rgba(190, 120, 20, 0.32);
}
.notepad::after {
  content: ""; position: absolute; left: clamp(0.5rem, 1.6vw, 1.1rem); top: 1.6rem; bottom: 1.6rem; width: 0.85rem;
  background: radial-gradient(circle, var(--cream) 0 0.4rem, transparent 0.42rem) top/100% 5rem repeat-y;
}
.notepad__title {
  font: italic 800 var(--step-2)/1.25 var(--font-text);
  text-wrap: balance; margin-bottom: 1.25rem;
}
.roster li {
  display: grid; grid-template-columns: 4.75rem 1fr; align-items: center; gap: 0 1.1rem;
  padding: 0.65rem 0;
  border-top: 1.5px dashed rgba(60, 40, 0, 0.45);
  font: italic 700 1.0625rem/1.3 var(--font-text);
  transition: background-color 0.2s;
}
.roster li:hover { background: rgba(255, 255, 255, 0.28); }
.roster img, .roster .ph {
  width: 4.75rem; height: 4.75rem; object-fit: contain;
  background: #fff; border-radius: var(--r-sm); padding: 0.2rem;
  transition: transform 0.4s var(--ease);
}
.roster li:hover img { transform: rotate(-5deg) scale(1.07); }

/* the group drawings are pinned like the rest of the site's artwork: white card, soft shadow, a little tilt */
.roster li > img, .roster li > .ph {
  padding: 0.4rem; box-shadow: var(--shadow-1);
  rotate: var(--tilt, -2deg);
  transition: transform 0.4s var(--ease), rotate var(--dur-move) var(--ease), scale var(--dur-move) var(--ease);
}
.roster li:nth-child(even) > img, .roster li:nth-child(even) > .ph { --tilt: 2deg; }
.roster__item.is-open > img { rotate: 0deg; scale: 1.05; }

/* the rows are dropdowns: a click opens the people who work in that group */
.roster__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; min-height: 4.75rem; padding: 0; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.roster__toggle::after {                       /* little chevron */
  content: ""; flex: none; width: 0.7rem; height: 0.7rem; margin-right: 0.5rem;
  border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  rotate: 45deg; translate: 0 -0.15rem;
  transition: rotate var(--dur-move) var(--ease-out), translate var(--dur-move) var(--ease-out);
}
.roster__item.is-open .roster__toggle::after { rotate: 225deg; translate: 0 0.15rem; }
.roster__panel {
  grid-column: 1 / -1; display: grid; grid-template-rows: 0fr;
  font-style: normal;
  transition: grid-template-rows var(--dur-move) var(--ease-out);
}
.roster__item.is-open .roster__panel { grid-template-rows: 1fr; }
html:not(.js) .roster__panel { grid-template-rows: 1fr; }          /* without JavaScript everything stays open */
.roster__inner { overflow: hidden; min-height: 0; }
/* the children's speech bubbles float in the notepad's right margin: opened text keeps clear of them */
.notepad__bubble { pointer-events: none; }
@media (min-width: 62.01em) {
  .roster__inner { padding-right: calc(clamp(11rem, 22vw, 17rem) + 2.5rem); }
}
.people { display: grid; gap: 2rem; padding: 1.1rem 0 1.7rem; }
.person { display: grid; grid-template-columns: clamp(6.2rem, 22vw, 9.5rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }

/* each drawn portrait is "taped" to the page and settles in after the row opens (closed → quick fade; open → staggered) */
.roster__item .person { opacity: 0; translate: 0 14px; transition: opacity 180ms var(--ease-out), translate 180ms var(--ease-out); }
.roster__item.is-open .person { opacity: 1; translate: 0 0; transition: opacity 480ms var(--ease-out) calc(var(--i, 0) * 90ms + 140ms), translate 480ms var(--ease-out) calc(var(--i, 0) * 90ms + 140ms); }
html:not(.js) .roster__item .person { opacity: 1; translate: none; }

.person__fig { position: relative; margin: 0; --tape: rgba(242, 167, 207, 0.92); }
.person:nth-child(3n+2) .person__fig { --tape: rgba(174, 236, 253, 0.95); }
.person:nth-child(3n) .person__fig { --tape: rgba(111, 241, 212, 0.9); }
.person__fig::after {                          /* washi tape */
  content: ""; position: absolute; z-index: 2; top: -0.6rem; left: 50%; width: 3.8rem; height: 1.25rem; margin-left: -1.9rem;
  background: var(--tape); rotate: -4deg;
  clip-path: polygon(0 0, 100% 0, 96% 25%, 100% 50%, 96% 75%, 100% 100%, 0 100%, 4% 75%, 0 50%, 4% 25%);
}
.person:nth-child(even) .person__fig::after { rotate: 3deg; }
.roster .person__photo, .roster .ph.person__photo {
  width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; object-position: 50% 50%;   /* the whole drawing, no crop */
  padding: 0; border: 0.35rem solid #fff; border-radius: 0.4rem; background: #fff;
  box-shadow: 0 10px 22px -12px rgba(90, 55, 0, 0.55); rotate: -1.4deg;
  transition: rotate var(--dur-hover) var(--ease), scale var(--dur-hover) var(--ease);
}
.person:nth-child(even) .person__photo { rotate: 1.2deg; }
@media (hover: hover) and (pointer: fine) { .roster .person:hover .person__photo { rotate: 0deg; scale: 1.03; } }
.roster li:hover .person__photo { transform: none; }

.roster .ph.person__photo { font-size: 0; border-style: dashed; border-color: rgba(147, 95, 223, 0.45); }     /* a missing drawing waits politely */
.roster .ph.person__photo::after { content: "Portrets drīzumā"; font: 700 0.9rem/1.3 var(--font-text); color: var(--muted); padding: 0.5rem; }
.person__who { margin: 0 0 0.55rem; font: inherit; }
.person__role { display: block; margin-bottom: 0.2rem; font: 700 var(--text-caption)/1.3 var(--font-text); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(60, 40, 0, 0.72); }
.person__name { display: block; font: 500 clamp(1.5rem, 1.15rem + 1.1vw, 2.1rem)/1.08 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.person__quote { font: 400 1.0625rem/1.65 var(--font-text); max-width: 38em; text-wrap: pretty; color: #3b3138; }

.notepad__bubble { width: clamp(11rem, 22vw, 17rem); height: auto; }
.notepad__bubble--a { position: absolute; right: 1.5rem; top: 14rem; }
.notepad__bubble--b { position: absolute; right: 1.5rem; bottom: 1.25rem; }
@media (max-width: 62em) {
  .notepad__bubble { position: static !important; margin: 1.25rem auto 0; }
}
.team__squiggle { position: absolute; width: clamp(3rem, 6vw, 5rem); max-width: none !important; margin: 0 !important; }
.team__squiggle--top { right: clamp(0rem, 3vw, 3rem); top: 0.25rem; }
.team__squiggle--bottom { left: clamp(0rem, 3vw, 3rem); bottom: 2rem; }

/* ---------- Trips ---------- */
.trips { text-align: left; }
.trips > * { max-width: 62rem; }
.trips__head { display: grid; gap: 1.25rem 3rem; margin-bottom: 3rem; align-items: end; }
@media (min-width: 56em) { .trips__head { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.trips__intro { font-size: 1.125rem; max-width: 30em; text-wrap: pretty; }
.frame--wide { max-width: 60rem; }
.media-play { position: relative; display: block; text-decoration: none; transition: scale var(--dur-press) var(--ease-out); }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 5rem; height: 5rem; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 10px 24px -8px rgba(30, 90, 60, 0.6);
  transition: scale var(--dur-hover) var(--ease), rotate var(--dur-hover) var(--ease);
}
.play::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -35% -50%;
  border-left: 1.6rem solid #fff; border-top: 1.05rem solid transparent; border-bottom: 1.05rem solid transparent;
}
@media (hover: hover) and (pointer: fine) {
  .media-play:hover .play, .tile:hover .play { scale: 1.1; rotate: -4deg; }
}

.trips__cta { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
@media (min-width: 52em) { .trips__cta { justify-content: flex-end; } }
.trips__arrow { width: 5.5rem; }

/* one button style for the whole site */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--pill);
  background: var(--purple); color: var(--cream);
  font-size: 1.15rem; font-weight: 700; line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: translate var(--dur-hover) var(--ease), scale var(--dur-press) var(--ease-out), background-color var(--dur-hover);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { translate: 0 -2px; background: #8450d6; } }

/* ---------- The map (MapHub iframe) ---------- */
.map { position: relative; overflow: hidden; aspect-ratio: 16 / 9; }
.map.is-active { rotate: 0deg; }               /* straightens once someone is using the live map */
@media (max-width: 39.99em) { .map { aspect-ratio: 4 / 5; } }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #e9e6df; }   /* MapHub shows a still + play button; the live map (with its destination list) loads on click */
.map__open { margin-right: auto; font-weight: 700; text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 0.2em; text-decoration-color: var(--purple); transition: color var(--dur-hover); }
@media (hover: hover) and (pointer: fine) { .map__open:hover { color: var(--purple); } }

/* ---------- Clubs: a big typographic list, not pastel cards ---------- */
.clubs { padding-block: 1rem var(--space-section); }
.clubs > .clubs__inner { max-width: 76rem; display: grid; gap: 3rem 5rem; align-items: start; }
@media (min-width: 56em) {
  .clubs > .clubs__inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .clubs__head { position: sticky; top: 7rem; }
}
.clubs__head .h2 { font-size: var(--text-display); line-height: 1.05; letter-spacing: -0.02em; }
.clubs__intro { margin-top: 1.5rem; display: grid; gap: 1rem; max-width: 30em; }
.clubs__grid { display: grid; }
.club {
  --tint: var(--sky);
  position: relative;
  padding: 1.5rem 0 1.7rem;
  border-top: 2px dashed rgba(20, 16, 13, 0.32);
  font-size: 1.1rem; line-height: 1.5; color: #3b3540; text-wrap: pretty;
}
.club:last-child { border-bottom: 2px dashed rgba(20, 16, 13, 0.32); }
.club strong {
  display: block; width: fit-content; margin-bottom: 0.35rem; color: var(--ink);
  font: 500 clamp(2.2rem, 1.4rem + 2.7vw, 3.6rem)/1.05 var(--font-display); letter-spacing: -0.02em;
  background: linear-gradient(transparent 55%, var(--tint) 55% 92%, transparent 92%) no-repeat 0 0 / 0% 100%;
  transition: background-size 420ms var(--ease-out), translate var(--dur-hover) var(--ease-out);
}

/* ----- clubs: quick facts + "Sīkāk" fold-out ----- */
.chips { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.28rem 0.8rem; border-radius: 99px; font-size: 0.86rem; font-weight: 700; line-height: 1.35; color: var(--ink); background: color-mix(in oklab, var(--tint) 55%, #fff); box-shadow: 0 0 0 2px #fff; }
.more { margin-top: 0.8rem; }
.more summary { list-style: none; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.2rem; cursor: pointer; font-size: 0.95rem; font-weight: 800; color: var(--purple); border-radius: 99px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); font-size: 1.1rem; line-height: 1; transition: rotate 260ms var(--ease), background-color 200ms; }
.more[open] summary::before { rotate: 45deg; background: var(--yellow); }
.more summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.more__body { margin-top: 0.7rem; padding: 1.1rem 1.25rem 1.25rem; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-1); font-size: 1rem; animation: more-in 380ms var(--ease-out) both; transform-origin: top left; }
@keyframes more-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
.more__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.more__list li { position: relative; padding-left: 1.35rem; line-height: 1.5; }
.more__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(45,38,48,.14); }
.more__cta { display: inline-block; margin-top: 1rem; padding: 0.5rem 1.05rem; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 800; font-size: 0.92rem; text-decoration: none; transition: translate var(--dur-hover) var(--ease), background-color 200ms; }
@media (hover: hover) and (pointer: fine) { .more__cta:hover { translate: 0 -2px; background: var(--purple); } }
.more__cta:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .more__body { animation: none; } .more summary::before { transition: none; } }
.sep { display: none; }                                       /* the dash/semicolon of the original list; the layout carries the structure */
.club:nth-child(1) { --tint: #8bdcf6; }
.club:nth-child(2) { --tint: #f2a7cf; }
.club:nth-child(3) { --tint: #5fe8c8; }
.club:nth-child(4) { --tint: #cdb3f2; }
.club:nth-child(5) { --tint: var(--yellow); }
.club:nth-child(6) { --tint: #ffb59e; }
@media (hover: hover) and (pointer: fine) { .club:hover strong { background-size: 100% 100%; translate: 0.5rem 0; } }
@media (hover: none) { .club strong { background-size: 100% 100%; } }

/* ---------- Learn grid ---------- */
.learn > * { max-width: 62rem; }
.learn__grid {
  position: relative; isolation: isolate;
  display: grid; gap: clamp(0.9rem, 2.4vw, 1.5rem); margin-top: 3rem; align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.learn__grid::before {
  content: ""; position: absolute; inset: 8% 4% 0; z-index: -1;
  background: var(--yellow); border-radius: var(--r-lg); rotate: -2deg;
}
@media (min-width: 40em) { .learn__grid { padding-bottom: 2.5rem; } .learn__grid .tile:nth-child(even) { margin-top: 2.5rem; } }
.learn__grid--single { grid-template-columns: minmax(0, 1fr); padding: clamp(1.25rem, 4vw, 2.5rem) clamp(0.9rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem); }
.learn__grid--single::before { inset: 0 0 0; rotate: -1.4deg; }
.video { margin: 0; }
.video__frame {
  position: relative; rotate: 0.8deg; padding: clamp(0.4rem, 1.2vw, 0.7rem);
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-3, var(--shadow-2));
  transition: rotate 500ms var(--ease-out);
}
.video__frame::after {                                   /* washi tape */
  content: ""; position: absolute; z-index: 2; top: -0.9rem; left: 50%; width: 6.5rem; height: 1.9rem; margin-left: -3.25rem; rotate: -2deg;
  background: rgba(242, 167, 207, 0.92);
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: calc(var(--r-md) - 0.4rem); background: #14100d; }
.video__alt { margin-top: 1.1rem; text-align: center; font-size: var(--text-caption); font-weight: 700; }
.video__alt a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.video__alt a:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
.video__local { position: relative; display: grid; place-items: end center; aspect-ratio: 16 / 9; border-radius: calc(var(--r-md) - 0.4rem); background: linear-gradient(135deg, #3a2c52, #14100d); color: #fff; text-decoration: none; padding-bottom: 1.2rem; }
.video__local-text { font-weight: 800; }
@media (hover: hover) and (pointer: fine) { .video__frame:hover { rotate: 0deg; } }
.tile {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  rotate: var(--r, 0deg);
  box-shadow: var(--shadow-2);
  transition: rotate 500ms var(--ease-out), scale var(--dur-press) var(--ease-out);
}
.tile__link { position: relative; display: block; text-decoration: none; }
.tile img, .tile .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 700ms var(--ease-out); }
.tile iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #14100d; }
.tile.is-playing { rotate: 0deg; }
.tile .play { width: 3.4rem; height: 3.4rem; background: rgba(20, 16, 13, 0.62); box-shadow: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tile .play::after { border-left-width: 1.05rem; border-top-width: 0.7rem; border-bottom-width: 0.7rem; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { rotate: 0deg; }
  .tile:hover img, .tile:hover .ph { transform: scale(1.05); }
}
.tilt-a { --r: -1.2deg; }
.tilt-b { --r: 1.1deg; }

/* ---------- Erasmus+: postcards on a dotted road ---------- */
.erasmus > * { max-width: 72rem; }
.erasmus__head { display: grid; gap: 1.25rem 3rem; align-items: end; margin-bottom: 3.75rem; }
@media (min-width: 56em) { .erasmus__head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); } }
.erasmus__head { position: relative; }
.erasmus__head .eyebrow { color: var(--purple); margin-bottom: 0.75rem; }
.erasmus__flag { position: absolute; z-index: 2; right: 0; top: -3.2rem; width: clamp(5.5rem, 13vw, 9rem); height: auto; rotate: 6deg; pointer-events: none; }
.erasmus__head .lead, .erasmus__when .lead { max-width: 30em; }
.erasmus__cards {
  display: grid; gap: 2.75rem 1.5rem; max-width: none !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.ecard {
  --tape: rgba(174, 236, 253, 0.92);
  position: relative;
  padding: 2.1rem 1.7rem 1.9rem;
  background: #fff; color: var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
  transition: translate var(--dur-hover) var(--ease), rotate var(--dur-hover) var(--ease);
}
.ecard::after {                                /* washi tape */
  content: ""; position: absolute; z-index: 2; top: -0.8rem; left: 50%; width: 5.6rem; height: 1.75rem; margin-left: -2.8rem;
  background: var(--tape); rotate: -2deg;
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}
.ecard--pink { --tape: rgba(242, 167, 207, 0.92); }
.ecard--sun  { --tape: rgba(247, 212, 98, 0.92); }
.erasmus__cards > .ecard:nth-child(1) { rotate: -1.2deg; }
.erasmus__cards > .ecard:nth-child(2) { rotate: 0.9deg; }
.erasmus__cards > .ecard:nth-child(3) { rotate: -0.7deg; }
.ecard h3 { font-size: var(--text-quote); font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; margin-bottom: 0.9rem; padding-right: 3.2rem; }
.erasmus__ref { margin-top: 1rem; max-width: 34rem; font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.3; }
.erasmus__no { display: block; margin-bottom: 0.4rem; font-family: var(--font-text); font-style: normal; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.partners { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 2px dashed rgba(45,38,48,.18); display: grid; gap: 0.9rem; }
.partners li { display: grid; grid-template-columns: 2.4rem minmax(0,1fr); gap: 0.8rem; align-items: start; line-height: 1.45; }
.partners .flag { width: 2.4rem; height: auto; margin-top: 0.15rem; border-radius: 0.3rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(45,38,48,.18), var(--shadow-1); rotate: -3deg; flex: none; }
.partners li:nth-child(2) .flag { rotate: 2deg; }
.ecard p {                                     /* ruled lines, like the notepad */
  color: var(--muted); padding-block: 0.6rem 0.2rem;
  border-top: 2px dashed rgba(45, 38, 48, 0.22);
}
.ecard .sticker { position: absolute; z-index: 3; right: -0.9rem; top: -1.5rem; width: 4.4rem; height: auto; rotate: 10deg; pointer-events: none; transition: rotate 260ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .ecard:hover { rotate: 0deg; translate: 0 -4px; }
  .ecard:hover .sticker { rotate: 18deg; }
}

/* ----- Erasmus+ content: timeline, goal, numbers, ticks, facts, activities ----- */
.erasmus__when { display: grid; gap: 1.5rem; }
.span { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1.6rem 1rem; max-width: 30rem; }
.span__end { display: grid; font-size: var(--text-caption); line-height: 1.3; color: var(--muted); }
.span__end b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.span__end { grid-row: 1; } .span__end:last-child { text-align: right; }
.span__bar { grid-row: 2; grid-column: 1 / -1; margin-inline: 0.4rem; position: relative; height: 0; border-top: 3px dotted rgba(147, 95, 223, 0.6); }
.span__bar::before, .span__bar::after { content: ""; position: absolute; top: -0.5rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 3px #fff; }
.span__bar::before { left: -0.4rem; } .span__bar::after { right: -0.4rem; }
.span__bar i { position: absolute; left: 50%; top: -0.95rem; translate: -50% 0; padding: 0.15rem 0.7rem; background: #fff; border-radius: 99px; box-shadow: var(--shadow-1); font-style: normal; font-size: var(--text-caption); font-weight: 700; color: var(--purple); white-space: nowrap; }

.goal { max-width: 52rem; margin: 0 0 3.5rem; }
.goal__text { font-family: var(--font-display); font-size: clamp(1.4rem, 1rem + 1.6vw, 2.15rem); line-height: 1.3; font-weight: 400; letter-spacing: -0.005em; text-wrap: pretty; }
.goal__sub { margin-top: 1.1rem; max-width: 36rem; color: var(--muted); font-size: var(--text-lead); line-height: var(--lh-body); }

.stats { list-style: none; margin: 0 0 4rem; padding: 0; max-width: none !important; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.stat { --bg: var(--note); position: relative; padding: 1.4rem 1.3rem 1.3rem; background: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-1); border: 0.3rem solid #fff; display: grid; gap: 0.4rem; align-content: start; transition: translate var(--dur-hover) var(--ease), rotate var(--dur-hover) var(--ease); }
.stat strong { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 1.7rem + 2.4vw, 3.4rem); line-height: 1; letter-spacing: -0.02em; }
.stat span { font-size: 0.95rem; line-height: 1.4; color: var(--ink); }
.stat--sun { --bg: color-mix(in oklab, var(--yellow) 55%, #fff); rotate: -1.4deg; }
.stat--pink { --bg: color-mix(in oklab, var(--pink) 60%, #fff); rotate: 1.1deg; }
.stat--mint { --bg: color-mix(in oklab, var(--mint) 38%, #fff); rotate: -0.8deg; }
.stat--sky { --bg: color-mix(in oklab, var(--sky) 55%, #fff); rotate: 1.5deg; }
@media (hover: hover) and (pointer: fine) { .stat:hover { rotate: 0deg; translate: 0 -4px; } }

.ecard--mint { --tape: rgba(111, 241, 212, 0.9); }
.benefits { max-width: 52rem; margin: 0 0 4.5rem; rotate: 0.5deg; }
.benefits h3 { padding-right: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.ticks li { position: relative; padding: 0.85rem 0 0.85rem 2.3rem; border-top: 2px dashed rgba(45, 38, 48, 0.2); line-height: 1.5; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }

.facts { margin: 0; display: grid; gap: 0; border-top: 2px dashed rgba(45, 38, 48, 0.22); }
.facts > div { padding: 0.75rem 0; border-bottom: 2px dashed rgba(45, 38, 48, 0.14); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--purple); margin-bottom: 0.2rem; }
.facts dd { margin: 0; line-height: 1.45; color: var(--ink); }

.acts { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 2px dashed rgba(45, 38, 48, 0.22); display: grid; gap: 0.9rem; counter-reset: act; }
.acts li { counter-increment: act; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.8rem; align-items: start; line-height: 1.45; }
.acts li::before { content: counter(act); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px #fff, var(--shadow-1); font-family: var(--font-display); font-weight: 600; }
.acts li:nth-child(2)::before { background: var(--sky); } .acts li:nth-child(3)::before { background: var(--pink); }
.erasmus__road { position: relative; height: 0; margin-top: 6rem; border-top: 3px dotted rgba(147, 95, 223, 0.5); }
.erasmus__ticket {                             /* the bus postcard that rides along as you scroll */
  position: absolute; left: 0.5rem; bottom: -0.3rem;
  width: clamp(4.5rem, 9vw, 6.5rem); aspect-ratio: 1; padding: 0.35rem;
  background: #fbfaf7; border-radius: var(--r-sm); box-shadow: var(--shadow-1);
}
.erasmus__ticket img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; rotate: -3deg; }

/* ---------- Contact: a taped paper note ---------- */
.contact { padding-block: 0 var(--space-section); }
.contact__card {
  position: relative;                          /* no isolation: the plate (z-index -1) must sit behind the white paper */
  max-width: 62rem !important;
  background: #fff; border-radius: var(--r-sm);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 18px 40px -22px rgba(60, 40, 0, 0.5);
}
.contact__card::before {                       /* the yellow plate behind, like the photos */
  content: ""; position: absolute; inset: 1.5%; z-index: -1;
  background: var(--yellow); border-radius: var(--r-lg);
  transform: rotate(1.4deg) translate(2.2%, 3.4%) scale(1.02);
}
.contact__card::after {                        /* washi tape */
  content: ""; position: absolute; top: -0.8rem; left: 50%; width: 6.5rem; height: 1.9rem; margin-left: -3.25rem;
  background: rgba(242, 167, 207, 0.9); rotate: 2deg;
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}
.contact__sticker { position: absolute; z-index: 3; right: clamp(-0.5rem, -1vw, 0rem); top: -2rem; width: clamp(4.2rem, 8vw, 6rem); height: auto; rotate: 12deg; pointer-events: none; transition: rotate 260ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .contact__card:hover .contact__sticker { rotate: 20deg; } }
.contact__title { font-size: var(--text-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; margin-bottom: 1.75rem; }
.contact__list { display: grid; gap: 1.75rem 3rem; }
@media (min-width: 52em) { .contact__list { grid-template-columns: 1fr 1fr; } }
.contact__group { display: grid; gap: 0.35rem; align-content: start; padding-top: 1rem; border-top: 2px dashed rgba(45, 38, 48, 0.25); }
.contact__group dt { font-size: var(--text-lead); font-weight: 700; }
.contact__group dd { overflow-wrap: anywhere; }
.contact a { text-decoration: underline; text-decoration-thickness: from-font; text-underline-position: from-font; text-underline-offset: 0.18em; text-decoration-skip-ink: auto; text-decoration-color: rgba(45, 38, 48, 0.4); transition: text-decoration-color var(--dur-hover); }
@media (hover: hover) and (pointer: fine) { .contact a:hover { text-decoration-color: var(--ink); } }

/* ---------- News ---------- */
.news > * { max-width: 62rem; }
.news__grid {
  display: grid; gap: 2.75rem clamp(1.25rem, 4vw, 3rem); margin-top: 3.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  align-items: start;
}
@media (min-width: 40em) { .news__grid > li:nth-child(even) { margin-top: 3rem; } }
.note {
  position: relative;
  background: #f6f6f7;
  border-radius: var(--r-sm);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-2);
  transition: translate var(--dur-hover) var(--ease), rotate var(--dur-hover) var(--ease);
}
.news__grid--single { grid-template-columns: minmax(0, 30rem); justify-content: center; }
.news__grid--single > li { margin-top: 0 !important; }
.note__more { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-weight: 800; color: var(--purple); text-decoration: none; }
.note__more::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-sm); }   /* whole card is the click target */
.note__more::after { content: "→"; transition: translate var(--dur-hover) var(--ease); }
@media (hover: hover) and (pointer: fine) { .note:hover .note__more::after { translate: 0.35rem 0; } }
.note:has(.note__more:focus-visible) { outline: 3px solid var(--purple); outline-offset: 4px; }
.note:nth-child(odd)  { rotate: -0.6deg; }
.note:nth-child(even) { rotate: 0.7deg; }
@media (hover: hover) and (pointer: fine) { .note:hover { rotate: 0deg; translate: 0 -5px; } }
.note__photo, .note .ph--photo { width: 100%; aspect-ratio: 25 / 16; object-fit: cover; border-radius: 0.5rem; margin-top: 1.1rem; }
.note p { margin-top: 1.1rem; font-weight: 600; line-height: 1.45; }
.note__badge, .note .ph--icon { position: absolute; left: calc(var(--gutter) * -0.5); top: -1.2rem; width: 6rem; height: 6rem; border-radius: 50%; background: #fff; object-fit: contain; padding: 0.4rem; box-shadow: var(--shadow-1); z-index: 2; }
.pin {
  position: absolute; top: -1.6rem; left: 50%; translate: -50% 0; z-index: 2;
  width: 1.7rem; height: 2.1rem; border-radius: 0.55rem 0.55rem 0.3rem 0.3rem;
  rotate: 18deg;
}
.pin::after { content: ""; position: absolute; left: 50%; bottom: -0.55rem; translate: -50% 0; width: 0.28rem; height: 0.7rem; background: rgba(0,0,0,.28); border-radius: 0 0 0.2rem 0.2rem; }
.note--red .pin    { background: var(--red); }
.note--purple .pin { background: #9c5ee8; }

/* ---------- Footer ---------- */
.footer { display: grid; background: var(--yellow); }
.footer__purple {
  position: relative; background: var(--purple);
  padding: 3rem var(--gutter) 2rem;
  display: grid; gap: 2.5rem; align-content: space-between;
}
.footer__sun { width: 5.5rem; height: auto; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 2.5rem 3rem; }
.footer__h { font-size: 1.2rem; font-weight: 700; padding-bottom: 0.4rem; margin-bottom: 0.7rem; border-bottom: 1px solid rgba(20, 16, 13, 0.45); }
.footer ul { display: grid; gap: 0.35rem; }
.footer a { font: 700 1.05rem/1.4 var(--font-text); text-decoration: none; display: inline-block; transition: translate var(--dur-hover) var(--ease-out), scale var(--dur-press) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .footer a:hover { translate: 0.3rem 0; text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 0.2em; } }
.footer__credit { font-size: 0.9375rem; font-weight: 500; max-width: 30rem; }
.footer__yellow { position: relative; overflow: hidden; padding: 1.25rem var(--gutter); display: flex; justify-content: flex-end; align-items: flex-end; }
.footer__bigsun { display: none; position: absolute; right: 8%; top: 50%; translate: 0 -50%; width: min(26rem, 62%); height: auto; pointer-events: none; animation: spin 120s linear infinite; }
.footer__handle { position: relative; z-index: 1; }
@media (min-width: 52em) { .footer__bigsun { display: block; } }
.footer__handle { font-size: 0.9375rem; font-weight: 600; }
@media (min-width: 52em) {
  .footer { grid-template-columns: 1fr 1fr; min-height: 30rem; }
  .footer__purple {
    margin-right: -14%; padding-right: 14%;
    clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
    z-index: 1;
  }
  .footer__yellow { padding: 2.5rem var(--gutter); }
}

/* ---------- Placeholders for assets that haven't been dropped in yet ---------- */
.ph {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, rgba(147, 95, 223, 0.10) 0 10px, rgba(147, 95, 223, 0.04) 10px 20px), #fff;
  color: var(--muted);
  font: 700 var(--text-caption)/1.3 var(--font-text);
  border: 2px dashed rgba(147, 95, 223, 0.45);
  padding: 0.5rem;
}
.ph--icon { border-radius: var(--r-sm); font-size: 0.6rem; overflow: hidden; }

/* ---------- Scroll reveals (see main.js: IntersectionObserver + Web Animations) ----------
   The hidden start state only exists when JS runs and motion is allowed (.motion is set in <head>). */
.motion .rv { opacity: 0; }
.motion .rv-frame :is(img, .ph, .map):not(.sticker) { clip-path: inset(0 0 100% 0 round 0.875rem); }
.motion .rv-frame::before, .motion .rv-frame::after { opacity: 0; }
.motion .rv:is(.ecard, .contact__card)::after { opacity: 0; }
.motion .rv.note .pin { opacity: 0; }
.motion .rv-frame .sticker { opacity: 0; }
.reveal-failsafe .rv-frame .sticker { opacity: 1 !important; }
.reveal-failsafe .rv { opacity: 1 !important; }
.reveal-failsafe .rv-frame :is(img, .ph, .map):not(.sticker) { clip-path: none !important; }
.reveal-failsafe .rv-frame::before, .reveal-failsafe .rv-frame::after, .reveal-failsafe .rv:is(.ecard, .contact__card)::after, .reveal-failsafe .rv.note .pin { opacity: 1 !important; }

/* ---------- Reduced motion: keep colour/opacity changes, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sun-img, .footer__bigsun, .hero__cue svg { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
