@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Caveat:wght@600;700&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

/* ============================================================
   Theme: skolka_svabovce — playful, pastel, rounded
   Swap the palette variables to re-skin for another site.
   ============================================================ */
:root {
    --pink:        #e5527f;
    --pink-soft:   #fce4ec;
    --pink-deep:   #c93c67;
    --blue:        #3f9dd6;
    --blue-soft:   #e4f2fb;
    --yellow:      #f7b32b;
    --green:       #6fb63f;
    --green-soft:  #ecf6e1;
    --purple:      #8a6fd4;
    --ink:         #3c3442;
    --ink-soft:    #7b7386;
    --paper:       #fffdf9;
    --paper-2:     #fff5ee;
    --line:        #f1e7dd;

    --radius:      22px;
    --radius-lg:   34px;
    --shadow:      0 22px 48px -20px rgba(94, 54, 74, .38);
    --shadow-sm:   0 10px 24px -12px rgba(94, 54, 74, .32);
    --wrap:        1160px;
    --font:        'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head:   'Baloo 2', var(--font);
    --font-hand:   'Caveat', 'Baloo 2', cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
/* Decorations that poke outside a section are clipped by that section
   (.hero and .section below), so the page never scrolls sideways —
   without turning <html>/<body> into a scroll container. */
body.nav-lock { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; position: relative; }

.section { padding: clamp(48px, 7vw, 96px) 0; position: relative; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem;
    padding: .8em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--pink); color: #fff; box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; background: var(--pink-deep); color: #fff; }
.btn__arrow { transition: transform .15s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn--lg { font-size: 1.1rem; padding: .95em 1.9em; }
.btn--sm { font-size: .9rem; padding: .55em 1.1em; }
.btn--ghost { background: #fff; color: var(--pink-deep); border: 2px solid var(--pink-soft); box-shadow: none; }
.btn--ghost:hover { background: var(--pink-soft); color: var(--pink-deep); }
.btn--blue { background: var(--blue); }
.btn--blue:hover { background: #2f88bd; }

/* ---------- Top bar ---------- */
.topbar { background: var(--pink-soft); color: var(--pink-deep); font-weight: 700; font-size: .92rem; }
.topbar .wrap { display: flex; gap: 18px; align-items: center; justify-content: center; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: var(--pink-deep); }

/* ---------- Header / nav ---------- */
/* The frosted-glass background lives on a ::before layer rather than
   directly on .site-header: backdrop-filter on an element establishes a new
   containing block for its position:fixed descendants (same as filter/
   transform), which would trap the mobile nav drawer's fixed positioning
   inside the header's own box instead of the viewport. */
.site-header {
    position: sticky; top: 0; z-index: 56;
    border-bottom: 1px solid var(--line);
}
.site-header::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--ink); line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand svg { width: 58px; height: 58px; flex-shrink: 0; }
.brand__logo-img { width: 58px; height: 58px; flex-shrink: 0; object-fit: contain; }
.brand small { display: block; font-weight: 700; font-size: .68rem; letter-spacing: .22em; color: var(--pink); text-transform: uppercase; }

.nav-toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: 15px; background: var(--pink-soft); cursor: pointer; position: relative; z-index: 60; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    position: absolute; left: 50%; width: 22px; height: 3px; background: var(--pink-deep); border-radius: 3px;
    transform: translateX(-50%); transition: .2s ease;
}
.nav-toggle__bar { top: 50%; margin-top: -1.5px; }
.nav-toggle__bar::before { content: ''; top: -7px; }
.nav-toggle__bar::after  { content: ''; top: 7px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-open .nav-toggle__bar::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

.nav-backdrop { display: none; }

.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.menu a {
    display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); white-space: nowrap;
    padding: .5em .72em; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
@media (min-width: 1181px) {
    .menu > li > a { font-size: 1.06rem; }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .site-header .wrap { gap: 12px; }
    .brand { font-size: 1rem; }
    .brand svg, .brand__logo-img { width: 50px; height: 50px; }
    .brand small { letter-spacing: .16em; }
    .menu > li > a { padding: .45em .58em; font-size: .95rem; }
}
.menu a:hover, .menu .current > a, .menu .current_ancestor > a { background: var(--pink-soft); color: var(--pink-deep); text-decoration: none; }
/* Desktop top level: the current item is pink with a rounded underline
   (::before — ::after already holds the dropdown caret). */
@media (min-width: 901px) {
    .menu > li > a { position: relative; }
    .menu > li > a::before {
        content: ''; position: absolute; left: .72em; right: .72em; bottom: .1em; height: 3px; border-radius: 3px;
        background: var(--pink); transform: scaleX(0); transition: transform .18s ease;
    }
    .menu > li > a:hover, .menu > .current > a, .menu > .current_ancestor > a { background: none; color: var(--pink); }
    .menu > li > a:hover::before, .menu > .current > a::before, .menu > .current_ancestor > a::before { transform: scaleX(1); }
    .menu > li:not(.current):not(.current_ancestor) > a:hover::before { background: var(--pink-soft); }
}
.menu .is-plain > a { cursor: default; }
.menu .is-plain:not(.current_ancestor) > a { color: var(--ink-soft); }
.menu .is-plain.menu-item--has-children:not(.current_ancestor) > a { color: var(--ink); }

.menu-item--has-children { position: relative; }
.menu-item--has-children > a::after { content: '▾'; margin-left: .3em; font-size: .75em; color: var(--pink); }
.menu .submenu {
    list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0;
    min-width: 220px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s ease;
}
.menu-item--has-children:hover > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu .submenu a { padding: .5em .8em; border-radius: 12px; }
.menu .submenu .submenu { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; opacity: 1; visibility: visible; transform: none; }
.nav-caret { display: none; }

/* ============================ HERO ============================ */
/* The hero is composed like an illustration on a 1810px-wide design canvas
   (the width the mockup was drawn at). --u is one design pixel: 1px on wide
   screens, shrinking proportionally below 1810px, so text, photo and
   decorations scale together and keep the composition. Decorations are
   placed in design pixels with .hs + inline --x/--y/--w (and optional
   --r rotation, --sx:-1 to mirror). */
.hero {
    --u: min(1px, 100vw / 1810);
    position: relative;
    overflow: clip;
    background: var(--paper);
    container-type: inline-size;
}
@supports (width: 1cqw) {
    /* cqw excludes the scrollbar, unlike vw */
    .hero { --u: min(1px, 100cqw / 1810); }
}
.hero__stage { position: relative; width: calc(1810 * var(--u)); height: 100%; margin: 0 auto; }
.hero__sky { position: absolute; z-index: 1; top: 0; bottom: 0; left: calc(50% - 905 * var(--u)); width: calc(1810 * var(--u)); }
.hs {
    position: absolute; height: auto;
    left: calc(var(--x, 0) * var(--u)); top: calc(var(--y, 0) * var(--u)); width: calc(var(--w, 100) * var(--u));
    transform: rotate(var(--r, 0deg)) scaleX(var(--sx, 1));
}

.hero__grid {
    position: relative; z-index: 3;
    display: grid; grid-template-columns: minmax(0, 434fr) minmax(0, 879fr); align-items: start;
    width: calc(1313 * var(--u)); margin-left: calc(50% - 650 * var(--u));
    padding-top: calc(36 * var(--u));
}

.hero__title {
    font-size: calc(104 * var(--u)); font-weight: 800; line-height: .85; letter-spacing: -.035em;
    margin: 0; transform: rotate(-3deg); transform-origin: 0 60%;
}
.hero__line { display: block; }
.hero__line--last { position: relative; }
.hero__title .w { display: inline-block; margin-right: .12em; }
.hero__title .w--0 { color: #2089d6; }
.hero__title .w--1 { color: #e84d86; }
.hero__title .w--2 { color: #64ae33; }
.hero__title .w--3 { color: #6c50cc; }
/* translate (not vertical-align) drops the heart below the baseline without
   making the last line taller */
.hero__title-heart { position: relative; display: inline-block; width: .62em; margin-left: .16em; transform: translateY(.22em); }
.hero__title-heart-shape { display: block; width: 100%; height: auto; transform: rotate(14deg); }
.hero__sparks { position: absolute; height: auto; }
.hero__sparks--right { width: .37em; left: calc(100% + .05em); top: -.2em; }
.hero__sparks--left { width: .3em; right: calc(100% + .2em); top: .06em; transform: scaleX(-1); }

.hero__text { padding-top: calc(22 * var(--u)); }
.hero__lead { margin: calc(16 * var(--u)) 0 0; max-width: 20em; font-size: max(17px, calc(20 * var(--u))); line-height: 1.65; color: #6e6773; }
.hero__cta {
    margin-top: calc(21 * var(--u)); font-size: max(17px, calc(22 * var(--u))); padding: .7em 1.55em;
    box-shadow: 0 calc(18 * var(--u)) calc(30 * var(--u)) calc(-14 * var(--u)) rgba(214, 64, 112, .55);
}

.hero__media { position: relative; margin-top: calc(35 * var(--u)); }
/* Soft, slightly uneven "cut-out" shape instead of a regular rounded box. */
.hero__frame {
    --shape: 13% 17% 15% 19% / 24% 28% 22% 26%;
    position: relative; z-index: 2; padding: calc(12 * var(--u)); background: #fff; border-radius: var(--shape);
    box-shadow: 0 calc(28 * var(--u)) calc(60 * var(--u)) calc(-24 * var(--u)) rgba(44, 64, 94, .4), 0 0 0 1px rgba(44, 64, 94, .05);
}
.hero__photo { position: relative; overflow: hidden; aspect-ratio: 855 / 486; border-radius: var(--shape); background: var(--blue-soft); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo-empty { display: grid; place-items: center; height: 100%; }
.hero__photo-sun { width: 120px; height: 120px; }

/* Crossfade hero slider (2-5 photos). The active slide stays in normal flow
   so it keeps giving .hero__photo its intrinsic size; only the inactive
   slides are pulled out with position:absolute to stack for the fade. */
.hero__photo--slider .hero__slide { opacity: 0; transition: opacity 1s ease; }
.hero__photo--slider .hero__slide:not(.is-active) { position: absolute; inset: 0; }
.hero__photo--slider .hero__slide.is-active { position: relative; opacity: 1; z-index: 1; }

.hero__slider-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero__slider-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); background: rgba(255,255,255,.35); padding: 0; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.hero__slider-dot.is-active { background: #fff; transform: scale(1.15); }

/* Cloud badges (one per DB line) sitting on the photo's top edge. The cloud
   is an SVG stretched to the label (see _deco/cloud_badge), coloured here. */
.hero__badges { position: absolute; z-index: 4; left: calc(-20 * var(--u)); top: calc(-54 * var(--u)); display: flex; flex-wrap: wrap; align-items: flex-start; }
.hero__badge {
    position: relative; display: grid; place-items: center;
    height: calc(110 * var(--u)); min-width: calc(142 * var(--u)); padding: 0 calc(33 * var(--u)); margin-right: calc(4 * var(--u));
    font-family: var(--font-head); font-weight: 800; font-size: calc(25 * var(--u)); line-height: 1; white-space: nowrap;
    color: var(--badge-ink); transform: translateY(var(--badge-dy, 0px)) rotate(var(--badge-tilt, 0deg));
}
.hero__badge-cloud { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; }
.hero__badge-cloud .cloud-rim { fill: var(--badge-rim); }
.hero__badge-cloud .cloud-wash { fill: var(--badge-wash); }
.hero__badge-text { position: relative; top: calc(3 * var(--u)); }
.hero__badge--0 { --badge-rim: #f7b0c6; --badge-wash: #fdd9e5; --badge-ink: #e0336a; --badge-tilt: -6deg; --badge-dy: calc(14 * var(--u)); }
.hero__badge--1 { --badge-rim: #a6cff0; --badge-wash: #d6ebfa; --badge-ink: #1f78c6; --badge-tilt: -4deg; --badge-dy: calc(2 * var(--u)); }
.hero__badge--2 { --badge-rim: #f8cf5c; --badge-wash: #feeba9; --badge-ink: #3a2c27; --badge-tilt: -5deg; --badge-dy: calc(-3 * var(--u)); }
.hero__badge--3 { --badge-rim: #a8da86; --badge-wash: #d6f1c3; --badge-ink: #3a8f2e; --badge-tilt: -3deg; --badge-dy: calc(2 * var(--u)); }

/* Tagline in a big cloud right of the photo, and the sun above it. */
.hero__script { position: absolute; z-index: 1; left: calc(100% - 8 * var(--u)); top: calc(38 * var(--u)); width: calc(290 * var(--u)); height: calc(256 * var(--u)); margin: 0; }
.hero__script-cloud { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__script-text {
    position: absolute; left: calc(46 * var(--u)); top: calc(128 * var(--u)); width: calc(200 * var(--u));
    font-family: var(--font-hand); font-weight: 700; font-size: calc(32 * var(--u)); line-height: 1.15; color: #1f6fb5;
    transform: rotate(-14deg); transform-origin: 0 0; text-wrap: balance;
}
.hero__script-heart { position: absolute; width: calc(34 * var(--u)); left: calc(150 * var(--u)); top: calc(178 * var(--u)); transform: rotate(-8deg); }
.hero-sun { left: calc(100% + 16 * var(--u)); top: calc(-69 * var(--u)); width: calc(185 * var(--u)); }
.hero-sun .sun__rays, .join-sun .sun__rays { transform-box: view-box; transform-origin: 50% 50%; animation: spin 60s linear infinite; }

.hero__meadow { position: relative; z-index: 2; height: calc(330 * var(--u)); margin-top: calc(-180 * var(--u)); pointer-events: none; }
.hero__cross { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; }
/* Same z-index as the .deco pieces, so DOM order decides: bushes behind the
   hills, flowers and the bunny in front. */
.hero__hills { position: absolute; z-index: 2; left: calc(-700 * var(--u)); top: 0; width: calc(3210 * var(--u)); height: calc(330 * var(--u)); }

/* ---------- Decorations ---------- */
.deco { position: absolute; pointer-events: none; z-index: 2; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ CARDS ============================ */
.card-grid { display: grid; gap: 24px; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: flex; flex-direction: column; transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 3 / 2; background: var(--blue-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta { font-size: .8rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.card__title { font-family: var(--font-head); font-size: 1.12rem; margin: 0; }
.card__excerpt { color: var(--ink-soft); font-size: .95rem; }
.card__more { margin-top: auto; font-weight: 700; color: var(--pink-deep); }

/* ============================ JOURNEY ============================ */
/* The homepage is a child's journey (home.html.twig): sections .jr joined by
   .jr-edge transitions, one stop (.jr-stop) per section, and a dashed trail
   with a flying butterfly drawn over them by assets/journey.js.
   Layers: section backgrounds < trail (z 2) < section content (.wrap, z 3)
   < the flying butterfly (z 5). The hero is a stacking context of its own
   (container-type), so there the trail passes over it, through its empty
   left margin. */
.journey { position: relative; }

.jr { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 56px) 0; }
.jr > .wrap { z-index: 3; }
.jr--smile { background: var(--paper); padding-top: clamp(6px, 1.4vw, 20px); }
.jr--discover { background: linear-gradient(180deg, #e2f0fa 0%, #eef7fd 100%); padding-top: clamp(8px, 1.4vw, 20px); }
.jr--heart { background: var(--paper); }
.jr--parents { background: #fdeef3; }
.jr--join { background: linear-gradient(180deg, var(--paper) 0%, #f2f8e8 100%); padding-top: clamp(20px, 3vw, 40px); padding-bottom: 0; }

/* Transitions: the artwork paints both backgrounds itself (see _deco/edge). */
.jr-edge { position: relative; height: clamp(64px, 8vw, 124px); margin: -1px 0; }
.jr-edge__art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.jr-edge--footer { height: clamp(56px, 7vw, 110px); margin: 0; }

/* ---- headings ---- */
.jr-heading { margin: 0 0 .45em; }
.jr-heading__eyebrow {
    display: block; margin-bottom: .45em;
    font-size: .8rem; font-weight: 800; line-height: 1.5; letter-spacing: .32em; text-transform: uppercase; color: var(--ink);
}
.jr-heading__title { display: block; font-size: clamp(2.7rem, 5vw, 4.4rem); font-weight: 800; line-height: .95; letter-spacing: -.02em; }
.jr-heading--pink .jr-heading__title { color: #e84d86; }
.jr-heading--blue .jr-heading__title { color: #2081cf; }
.jr-heading--green .jr-heading__title { color: #3f962d; }
.jr-heading--rose .jr-heading__title { color: #cf3d6f; }
.jr-lead { max-width: 32em; margin: 0 0 26px; font-size: 1.08rem; line-height: 1.7; color: #5f5866; }

/* ---- text + photo sections (smile, heart) ---- */
.jr-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.jr-split__media { position: relative; }
.jr--smile .jr-split__media { padding: 18px 0 64px; }
.jr--heart .jr-split__media { padding-top: 40px; }

/* centred heading of the grid sections (discover, parents) */
.jr-head { position: relative; max-width: 640px; margin: 0 auto clamp(22px, 2.6vw, 36px); text-align: center; }
.jr-head .jr-lead { margin: 0 auto; }

/* ---- value tiles and parent quick links ---- */
.jr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); max-width: 620px; margin: 0; padding: 0; list-style: none; }
.jr-tiles--links { grid-template-columns: repeat(5, minmax(0, 150px)); justify-content: center; max-width: none; }
.jr-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; padding: 20px 10px 18px;
    background: #fff; border-radius: 24px; text-align: center; color: var(--ink);
    box-shadow: 0 16px 34px -20px rgba(94, 54, 74, .38), 0 0 0 1px rgba(94, 54, 74, .04);
}
.jr-tile__icon { width: 42px; height: 42px; flex: none; }
.jr-tile__label { font-family: var(--font-head); font-weight: 700; font-size: .95rem; line-height: 1.18; }
a.jr-tile { transition: transform .16s ease, box-shadow .16s ease; }
a.jr-tile:hover { transform: translateY(-4px); text-decoration: none; box-shadow: var(--shadow); }

/* ---- blob-shaped photos ---- */
.jr-photo { position: relative; max-width: 450px; margin-left: auto; }
.jr-photo__blob { position: absolute; z-index: 0; left: -12%; top: -9%; width: 120%; height: 120%; }
.jr-photo__frame {
    position: relative; z-index: 1; aspect-ratio: 1.08; overflow: hidden;
    background: #fdf3dc; border: 10px solid #fff; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
    box-shadow: 0 28px 56px -30px rgba(94, 54, 74, .5);
}
.jr-photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.jr-photo__empty { display: grid; place-items: center; height: 100%; }
.jr-photo__empty svg { width: 34%; height: auto; }

/* "Každé dieťa je dar." in a cloud on the photo's corner */
.jr-cloudnote { position: absolute; z-index: 2; right: -10%; top: -14%; width: 56%; aspect-ratio: 260 / 230; }
.jr-cloudnote__cloud { position: absolute; inset: 0; width: 100%; height: 100%; }
.jr-cloudnote .jr-note { left: 12%; right: 10%; top: 40%; text-align: center; transform: rotate(-6deg); }

/* ---- discover: signpost + gallery cards ---- */
.jr-discover { display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 30px); }
.jr-discover__sign { position: relative; flex: 0 0 170px; width: 170px; margin-bottom: -8px; }
.jr-discover__post { display: block; width: 100%; height: auto; }
.jr-discover__via { position: absolute; left: 8%; bottom: 4px; }
.jr-cards { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); margin: 0; padding: 0; list-style: none; }
.jr-card {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
    background: #fff; border-radius: 20px; color: var(--ink);
    box-shadow: 0 18px 36px -22px rgba(44, 64, 94, .45); transition: transform .16s ease, box-shadow .16s ease;
}
.jr-card:hover { transform: translateY(-5px); text-decoration: none; box-shadow: 0 24px 44px -22px rgba(44, 64, 94, .5); }
.jr-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #d6ebfa; }
.jr-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.jr-card:hover .jr-card__media img { transform: scale(1.05); }
.jr-card__title { display: block; padding: 12px 16px 14px; font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1.25; }

/* ---- parents: latest news ---- */
.jr-news {
    max-width: 760px; margin: clamp(26px, 3vw, 40px) auto 0; padding: 18px 26px 10px;
    background: #fff; border-radius: 26px; box-shadow: 0 18px 40px -26px rgba(94, 54, 74, .4);
}
.jr-news__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.jr-news__title { margin: 0; font-size: 1.2rem; }
.jr-news__all { font-family: var(--font-head); font-weight: 700; font-size: .95rem; }
.jr-news__list { margin: 6px 0 0; padding: 0; list-style: none; }
.jr-news__list li + li { border-top: 1px solid #f6e3ea; }
.jr-news__item { display: flex; align-items: center; gap: 16px; padding: 12px 2px; color: var(--ink); }
.jr-news__item:hover { text-decoration: none; }
.jr-news__date {
    display: grid; place-content: center; flex: none; width: 54px; height: 54px; border-radius: 16px;
    background: #fdeef3; color: #cf3d6f; font-family: var(--font-head); line-height: 1; text-align: center;
}
.jr-news__date strong { font-size: 1.3rem; font-weight: 800; }
.jr-news__date span { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.jr-news__name { flex: 1; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.3; transition: color .15s ease; }
.jr-news__arrow { color: var(--pink); font-weight: 800; transition: transform .15s ease; }
.jr-news__item:hover .jr-news__name { color: var(--pink-deep); }
.jr-news__item:hover .jr-news__arrow { transform: translateX(3px); }

/* ---- join: sign, invitation, the kindergarten ---- */
.jr-join {
    display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr) minmax(0, .85fr); grid-template-areas: "sign text school";
    gap: clamp(16px, 2.4vw, 40px); align-items: end;
}
.jr-join__sign { grid-area: sign; position: relative; justify-self: start; width: 100%; max-width: 250px; margin-bottom: -4px; }
.jr-join__board { display: block; width: 100%; height: auto; }
.jr-join__sign .jr-note {
    left: 10%; right: 10%; top: 10%; height: 53%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 800; font-size: clamp(1.2rem, 1.9vw, 1.7rem); line-height: 1.05; color: #e0467b; text-align: center;
    transform: rotate(-3deg);
}
.jr-join__text { grid-area: text; padding-bottom: clamp(40px, 5vw, 84px); text-align: center; }
.jr-join__title { margin: 0 0 .4em; font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: 1.04; }
.jr-join__line { display: block; }
@media (min-width: 560px) {
    .jr-join__line { white-space: nowrap; }
}
.jr-join__line--accent { color: #2081cf; }
.jr-join__text .jr-lead { max-width: 26em; margin: 0 auto 24px; }
.jr-join__school { grid-area: school; position: relative; justify-self: end; width: 100%; max-width: 320px; margin-bottom: -2px; }
.jr-join__chapel { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.join-sun { z-index: 0; right: -6%; top: -30%; width: 34%; }
.join-fir { z-index: 0; left: -14%; bottom: 4%; width: 24%; }
.join-tree { z-index: 0; right: -22%; bottom: 2%; width: 36%; }
.join-daisy { z-index: 2; bottom: -2px; width: 24px; }
.join-daisy--1 { left: 2%; }
.join-daisy--2 { right: 4%; width: 20px; }
.join-flower { z-index: 2; right: 18%; bottom: -4px; width: 40px; }

/* ---- stops and handwritten notes ---- */
/* A stop is a 0×0 box placed where the butterfly rests; its note hangs off it. */
.jr-stop { position: absolute; z-index: 4; width: 0; height: 0; }
.jr-stop__pin { position: absolute; left: 0; top: 0; }
.jr-stop__bfly { position: absolute; left: 0; top: 0; width: var(--bfly-size, 80px); height: auto; transform: translate(-50%, -50%) rotate(-12deg); }
.journey.is-flying .jr-stop__bfly { visibility: hidden; }

.jr-note {
    position: absolute; margin: 0;
    font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.45rem, 2.1vw, 1.95rem); line-height: 1.02;
    color: var(--note-color, #1f6fb5); transform: rotate(-8deg); text-wrap: balance;
}
.jr-note__last { white-space: nowrap; }
.jr-note__heart { display: inline-block; width: .9em; height: auto; margin-left: .18em; vertical-align: -.3em; transform: rotate(10deg); }
.jr-note--hero, .jr-note--blue { --note-color: #1f6fb5; }
.jr-note--green { --note-color: #3f962d; }
.jr-note--ink { --note-color: #3c3442; }
.jr-note--rose { --note-color: #cf3d6f; }

.jr-stop--hero { left: calc(50% - 729 * var(--u)); top: calc(206 * var(--u)); }
.jr-stop--hero .jr-note { right: calc(14 * var(--u)); bottom: calc(30 * var(--u)); width: 4.2em; font-size: max(20px, calc(40 * var(--u))); text-align: right; transform: rotate(-12deg); }
.jr-stop--smile { left: 84%; bottom: 34px; }
.jr-stop--smile .jr-note { right: 46px; top: -22px; width: max-content; }
.jr-stop--discover, .jr-stop--parents { left: -160px; top: 12px; }
/* right of the butterfly: the trail arrives from above and leaves down to the left */
.jr-stop--discover .jr-note, .jr-stop--parents .jr-note { left: 24px; top: 24px; width: 190px; }
.jr-stop--heart { left: 90%; top: 16%; }
.jr-stop--join { left: 73%; top: 42%; }

/* ---- section decorations ---- */
.smile-fir { bottom: 6%; }
.smile-fir--1 { left: -26px; width: clamp(70px, 7vw, 112px); }
.smile-fir--2 { left: clamp(30px, 4vw, 66px); width: clamp(48px, 4.6vw, 74px); }
.smile-daisy { left: clamp(10px, 2vw, 34px); bottom: 3%; width: 28px; }
.smile-tree { right: -34px; bottom: 2%; width: clamp(110px, 11vw, 170px); }
.discover-cloud { opacity: .9; }
.discover-cloud--1 { left: -60px; top: 36%; width: clamp(140px, 13vw, 210px); }
.discover-cloud--2 { right: -50px; top: 6%; width: clamp(160px, 15vw, 240px); }
.heart-tree--1 { left: -42px; top: 10%; width: clamp(100px, 10vw, 150px); }
.heart-fir { left: clamp(20px, 3.4vw, 56px); bottom: 5%; width: clamp(46px, 4.4vw, 70px); }
.heart-tree--2 { right: -38px; bottom: 4%; width: clamp(100px, 10vw, 150px); }
.parents-tree { left: -34px; bottom: -6px; width: clamp(100px, 10vw, 150px); }
.parents-fir { right: clamp(6px, 2vw, 30px); bottom: -6px; width: clamp(56px, 5.4vw, 86px); }
.edge-tree { z-index: 1; bottom: 42%; width: clamp(80px, 9vw, 140px); }
.edge-tree--a { right: 5%; }
.edge-tree--c { left: 4%; }
.edge-fir { z-index: 1; bottom: 40%; width: clamp(40px, 4vw, 64px); }
.edge-fir--b { left: 9%; }
.edge-flower { z-index: 3; bottom: 20%; width: clamp(28px, 3vw, 46px); }
.edge-flower--a { left: 22%; }
.edge-flower--b { right: 24%; width: clamp(22px, 2.2vw, 32px); }
.edge-flower--c { right: 12%; }
.edge-daisy { z-index: 3; bottom: 16%; width: clamp(16px, 1.6vw, 24px); }
.edge-daisy--a { left: 64%; }
.edge-daisy--b { left: 38%; }

/* ---- the trail and the flying butterfly (assets/journey.js) ---- */
.trail { position: absolute; left: 0; top: 0; z-index: 2; display: none; overflow: visible; pointer-events: none; }
.journey.has-trail .trail { display: block; }
.trail__path { fill: none; stroke: #ec6a98; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 8 10; opacity: .75; }

.trail-flyer { --flyer: 100px; position: absolute; left: 0; top: 0; z-index: 5; display: none; width: 0; height: 0; pointer-events: none; will-change: transform; }
.journey.is-flying .trail-flyer { display: block; }
.trail-flyer__bob { position: absolute; left: calc(var(--flyer) / -2); top: calc(var(--flyer) / -2); width: var(--flyer); height: var(--flyer); animation: flyer-bob 2.6s ease-in-out infinite; }
.trail-flyer__bfly { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(94, 54, 74, .2)); }

.bfly__wing { transform-box: view-box; transform-origin: 50% 50%; }
.trail-flyer .bfly__wing--l, .jr-stop__bfly .bfly__wing--l { animation: wing-l .32s ease-in-out infinite alternate; }
.trail-flyer .bfly__wing--r, .jr-stop__bfly .bfly__wing--r { animation: wing-r .32s ease-in-out infinite alternate; }
.jr-stop__bfly .bfly__wing, .trail-flyer.is-resting .bfly__wing { animation-duration: 1.4s; }
@keyframes wing-l { to { transform: scaleX(.4) skewY(6deg); } }
@keyframes wing-r { to { transform: scaleX(.4) skewY(-6deg); } }
@keyframes flyer-bob { 50% { transform: translateY(-6px); } }

/* ============================ PROSE ============================ */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; box-shadow: var(--shadow-sm); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.4em 0; padding: .6em 1.2em; border-left: 5px solid var(--pink); background: var(--pink-soft); border-radius: 0 14px 14px 0; }
.prose a { text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6em .8em; text-align: left; }

/* The whole photo always stays visible (never cropped) at up to --page-hero-h
   tall, centered; a blurred, full-bleed copy of the same photo fills
   whatever empty space is left on the sides instead of flat background. */
.page-hero { position: relative; overflow: hidden; background: var(--blue-soft); --page-hero-h: 460px; }
.page-hero__bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(40px) saturate(1.15) brightness(.94);
    transform: scale(1.15);
}
.page-hero__img {
    position: relative; z-index: 1; display: block;
    max-width: 100%; max-height: var(--page-hero-h); width: auto; height: auto;
    margin: 0 auto;
}

.page-head { background: var(--pink-soft); padding: 42px 0; }
.page-head h1 { margin: 0; }
.breadcrumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 6px; }
.breadcrumbs a { color: var(--ink-soft); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.sidebar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }

/* ---------- Attachments ---------- */
.files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.files a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 700; }
.files a:hover { background: var(--pink-soft); text-decoration: none; }
.files .ext { font-family: var(--font-head); font-size: .72rem; background: var(--pink); color: #fff; padding: 4px 8px; border-radius: 8px; text-transform: uppercase; }
.files .size { margin-left: auto; font-weight: 600; color: var(--ink-soft); font-size: .85rem; }

/* ---------- PhotoSwipe grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-grid a { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.photo-grid a:hover img { transform: scale(1.06); }
.pswp__custom-caption { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; color: #fff; font-family: var(--font-head); font-size: .95rem; padding: 6px 16px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a, .pager span { min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 12px; font-weight: 700; font-family: var(--font-head); background: #fff; border: 1px solid var(--line); color: var(--ink); }
.pager .is-current { background: var(--pink); color: #fff; border-color: var(--pink); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink); color: #efe7ea; padding: 60px 0 26px; }
.footer-tree { width: 200px; right: 6%; top: -110px; }
/* the homepage ends with its own meadow and trees */
.page-home .footer-tree { display: none; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; color: #c9bcc2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Cookie bar ---------- */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 620px; margin: 0 auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cookie-bar p { margin: 0; flex: 1; min-width: 220px; font-size: .92rem; }
.cookie-bar[hidden] { display: none; }

/* ---------- Login ---------- */
.auth { min-height: 80vh; display: grid; place-items: center; padding: 40px 16px; background: var(--paper-2); }
.auth__card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px; width: 100%; max-width: 420px; }
.auth__card label { display: block; font-weight: 700; font-family: var(--font-head); margin: 14px 0 6px; }
.auth__card input { width: 100%; padding: .8em 1em; border-radius: 14px; border: 2px solid var(--line); font: inherit; }
.auth__card input:focus { outline: none; border-color: var(--pink); }
.alert { background: #fdecef; color: var(--pink-deep); border-radius: 14px; padding: 12px 16px; font-weight: 700; }

/* ============================ RESPONSIVE ============================ */
/* Hero below 1100px: text on top, photo underneath. Inside .hero__media --u
   is re-based on the photo width, so badges, hearts, sun and the tagline
   cloud keep their proportions to the photo. */
@media (max-width: 1099px) {
    /* the top padding leaves room for the journey's first stop above the title */
    .hero__grid { display: flex; flex-direction: column; width: auto; max-width: 776px; margin: 0 auto; padding: 84px 30px 0; }
    .hero__text { padding-top: 0; }
    .hero__title { font-size: clamp(3rem, 9.4vw, 5.4rem); }
    .hero__sparks--left { width: .24em; right: calc(100% + .08em); }
    .hero__lead { margin-top: 14px; font-size: 1.15rem; max-width: 30em; }
    .hero__cta { margin-top: 20px; font-size: 1.1rem; }
    .hero__media { --u: calc(min(100cqw - 60px, 716px) / 879); display: flex; flex-direction: column; margin-top: calc(110 * var(--u)); }
    .hero__frame { order: 1; }
    .hero__script { order: 2; position: relative; left: auto; top: auto; flex-shrink: 0; margin: calc(-72 * var(--u)) calc(-14 * var(--u)) 0 auto; }
    .hero-sun { left: auto; right: calc(-12 * var(--u)); top: calc(-165 * var(--u)); width: calc(150 * var(--u)); }
    .hero__meadow { margin-top: calc(-110 * var(--u)); }
    /* no side margins left for the sky cloud; the journey starts top right */
    .hero__sky { display: none; }
    .jr-stop--hero { left: calc(100% - 44px); top: 46px; }
    .jr-stop--hero .jr-note { right: 36px; bottom: -8px; font-size: 24px; }
}

@media (max-width: 1040px) {
    .article-layout { grid-template-columns: 1fr; }
}

/* Journey below 1180px: the centred headings leave no room beside them, so
   the stop moves above the heading with its note next to the butterfly. */
@media (max-width: 1180px) {
    .jr-head { padding-top: 64px; }
    .jr-stop--discover, .jr-stop--parents { left: 40px; top: 30px; }
    .jr-stop--discover .jr-note, .jr-stop--parents .jr-note { left: 44px; top: -24px; width: max-content; max-width: min(540px, calc(100vw - 150px)); text-align: left; }
    .jr-cloudnote { right: -3%; }
    .join-tree { right: -8%; }
}
/* no side margins left for the trees beside the text + photo sections */
@media (max-width: 1099px) {
    .smile-fir, .smile-daisy, .smile-tree, .heart-tree, .heart-fir { display: none; }
}
@media (max-width: 900px) {
    .jr-split { grid-template-columns: minmax(0, 1fr); }
    .jr-split__media { width: 100%; max-width: 480px; margin: 0 auto; }
    .jr-photo { margin: 0 auto; }
    .jr-tiles { margin: 0 auto; }
    .jr-tiles--links { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 540px; }
    .jr-discover__sign { flex-basis: 130px; width: 130px; }
    .jr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jr-join { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "text text" "sign school"; }
    .jr-join__text { padding-bottom: 8px; }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    /* starts below the header like the drawer, so the header isn't dimmed */
    .nav-backdrop { display: block; position: fixed; inset: var(--nav-drawer-top, 84px) 0 0 0; background: rgba(60, 52, 66, .45); z-index: 45; }
    .nav-backdrop[hidden] { display: none; }

    .main-nav {
        position: fixed; top: var(--nav-drawer-top, 84px); right: 0; bottom: 0; width: min(86vw, 340px);
        background: var(--paper); z-index: 55; padding: 22px 22px 32px;
        transform: translateX(100%); transition: transform .26s ease;
        overflow-y: auto; box-shadow: -20px 0 50px -20px rgba(0,0,0,.3);
    }
    .main-nav.is-open { transform: translateX(0); }
    .menu { flex-direction: column; align-items: stretch; gap: 2px; }
    .menu > li { border-bottom: 1px solid var(--line); }
    .menu a { padding: .95em .4em; border-radius: 12px; font-size: 1.1rem; }
    .menu-item--has-children { display: flex; flex-wrap: wrap; align-items: center; }
    .menu-item--has-children > a { flex: 1; }
    .menu-item--has-children > a::after { content: none; }
    .nav-caret {
        display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: var(--pink-soft);
        color: var(--pink-deep); border-radius: 12px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
    }
    .menu .submenu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
        padding: 0 0 8px 14px; flex-basis: 100%; display: none;
    }
    .menu-item--has-children.is-expanded > .submenu { display: block; }
    .menu-item--has-children.is-expanded > .nav-caret { transform: rotate(180deg); }
}

@media (max-width: 720px) {
    body { font-size: 17px; }
    .deco--heavy { display: none; }
    .page-hero { --page-hero-h: 240px; }
    .hero__grid { padding: 72px 22px 0; }
    .hero__title { transform: rotate(-2deg); }
    .hero__media { margin-top: 62px; }
    .hero__badges { left: -6px; top: -38px; }
    .hero__badge { height: 54px; min-width: 0; padding: 0 13px; margin-right: 0; font-size: 13px; }
    .hero__frame { padding: 7px; border-radius: 26px; }
    .hero__photo { border-radius: 20px; }
    .hero__script { width: 236px; height: 208px; margin: -44px -10px 0 auto; }
    .hero__script-text { left: 36px; top: 100px; width: 172px; font-size: 25px; }
    .hero__script-heart { width: 27px; left: 122px; top: 146px; }
    .hero-sun { width: 66px; right: -8px; top: -74px; }
    .hero__meadow { --u: calc(100cqw / 1000); margin-top: -46px; }
    .topbar .wrap { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
    .card-grid--3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    .jr-heading__title { font-size: clamp(2.4rem, 11vw, 3rem); }
    .jr-note { font-size: 1.45rem; }
    .jr-head { padding-top: 88px; }
    .jr-tiles, .jr-tiles--links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jr-discover { display: block; }
    .jr-discover__sign { display: none; }
    .jr-photo__frame { border-width: 7px; }
    .jr-stop--hero { left: calc(100% - 38px); top: 40px; }
    .jr-stop--hero .jr-note { right: 32px; font-size: 22px; }
    .jr-stop--smile { left: auto; right: 34px; }
    .jr-cloudnote { right: -3%; top: -18%; width: 60%; }
    .jr-news { padding: 14px 16px 6px; }
    .jr-news__item { gap: 12px; }
    .jr-news__date { width: 46px; height: 46px; border-radius: 14px; }
    .trail-flyer { --flyer: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-sun .sun__rays, .join-sun .sun__rays, .bfly__wing, .trail-flyer__bob { animation: none; }
    * { scroll-behavior: auto; }
}
