/* Кейс «Erasmus+ Ukraine: Baukasten» (ТЗ v2.13, Додаток Л). Вигляд і рух = макет v1. Правила обмежені .er-page / dialog.gal, щоб не конфліктувати з класами сайту.
   Рух: transform/opacity; виняток: background-color фіксованого шару .er-bgfx. Автоцикли (Social, Merch) і FLIP конструктора веде erasmus.js (reduced-motion: старт на паузі, FLIP без анімації). */
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-cyrillic-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-cyrillic-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url(/assets/fonts/unbounded-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; src: url(/assets/fonts/unbounded-latin-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; src: url(/assets/fonts/unbounded-cyrillic-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url(/assets/fonts/unbounded-cyrillic-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
.er-bgfx { position: fixed; inset: 0; z-index: -1; background: rgb(var(--bgrgb, 235, 232, 222)); transition: background-color .8s cubic-bezier(.22, 1, .36, 1); }
.er-bgfx.is-hero { transition: none; }
html:not(.js) .er-page .proj [data-flow] { background: rgb(var(--bgrgb)); }   /* без JS кожна секція малює власне тло */
.er-page { font-family: var(--sans); font-weight: 400; font-size: clamp(16px, 1.05vw, 18px); line-height: 1.6; color: var(--fg); overflow-x: clip; }
.er-page *, dialog.gal * { box-sizing: border-box; }
.er-page img, dialog.gal img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
.er-page ul, dialog.gal ul { list-style: none; margin: 0; padding: 0; }
.er-page button, dialog.gal button { font: inherit; color: inherit; cursor: pointer; }
.er-page a { color: inherit; text-decoration: none; }
.er-page h1, .er-page h2, .er-page h3, .er-page p, .er-page figure { margin: 0; }
.er-page :focus-visible, dialog.gal :focus-visible { outline: 2px solid var(--acc, #8FA2FF); outline-offset: 4px; border-radius: 3px; }
.er-page .label { font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; line-height: 1.4; }
.er-page .display { font-family: var(--display); text-transform: uppercase; font-weight: 400; line-height: 1.04; letter-spacing: -.005em; }
.er-page .proj-display { font-family: var(--proj); font-weight: 900; text-transform: uppercase; line-height: 1.02; letter-spacing: -.01em; }
.er-page .btn, dialog.gal .btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: 500 13px var(--sans); letter-spacing: .07em; text-transform: uppercase; transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease); }
.er-page .btn:hover { transform: translateY(-2px); background: var(--acc); color: var(--bg); }
.er-page .btn--ghost, dialog.gal .btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.er-page .btn--ghost:hover { background: var(--hell); color: var(--nacht); }
.er-page .ic, dialog.gal .ic { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--fg); color: var(--bg); font: 600 18px var(--sans); transition: transform .35s var(--ease), opacity .3s; }
.er-page .ic:hover { transform: scale(1.08); }
.er-page .ic[disabled] { opacity: .3; }
.js .er-page .rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .er-page .rv.in { opacity: 1; transform: none; }
.js .er-page .rv.d1 { transition-delay: .1s; }
.js .er-page .mask { overflow: hidden; padding-bottom: .08em; }
.js .er-page .mask > span { display: block; transform: translateY(108%); transition: transform 1.1s var(--ease); }
.js .er-page .mask.in > span { transform: none; }

/* ---------- 1 · Einstieg ---------- */
.er-page .hero { height: 230vh; position: relative; }
.er-page .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; padding: clamp(96px, 10vw, 124px) var(--gutter) clamp(24px, 3vw, 40px); display: grid; grid-template-rows: auto 1fr auto; }
.er-page .hero-top { position: relative; z-index: 3; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.er-page .hero-top .type { color: var(--acc); }
.er-page .word-wrap { align-self: center; position: relative; z-index: 2; }
.er-page .word { position: relative; display: grid; place-items: center start; }
.er-page .word .ttl, .er-page .word .ttl2 { grid-area: 1/1; }
.er-page .ttl { font-size: clamp(4rem, min(17vw, 21vh), 19rem); line-height: .96; opacity: calc(1 - var(--p) * 3); transform: translateY(calc(var(--p) * -4vh)); }
.er-page .ln { display: block; overflow: hidden; padding-top: .04em; }
.er-page .ttl2 { font-family: var(--proj); font-weight: 900; font-size: clamp(2.4rem, 6.6vw, 8rem); line-height: 1.02; letter-spacing: -.02em; color: #fff; text-transform: uppercase; opacity: calc((var(--p) - .35) * 3); transform: translateY(calc((1 - var(--p)) * 5vh)); }
.er-page .sub { font-weight: 300; font-size: clamp(19px, 2.1vw, 32px); line-height: 1.3; max-width: 26ch; letter-spacing: -.01em; margin-top: .4em; opacity: calc(1 - var(--p) * 2.6); }
.er-page .stack { position: absolute; right: calc(var(--gutter) + 1vw); top: 17vh; width: clamp(150px, 36vw, 520px); height: 62vh; z-index: 1; pointer-events: none; }
.er-page .card { position: absolute; width: 50%; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, .28), 0 22px 40px rgba(0, 0, 0, .40), 0 54px 100px -8px rgba(0, 0, 0, .50), 0 0 0 6px rgba(255, 255, 255, .55); }
.er-page .card img { width: 100%; height: 100%; object-fit: cover; }
.er-page .card.c1 { right: 0; top: 0; transform: translate(calc(var(--p) * 6vw), calc(var(--p) * -90vh)) rotate(calc(3.4deg + var(--p) * 10deg)); }
.er-page .card.c2 { left: 0; top: 24%; transform: translate(calc(var(--p) * -30vw), calc(var(--p) * -90vh)) rotate(calc(-2.6deg - var(--p) * 12deg)); }
.er-page .card.c3 { right: 0; top: 46%; transform: translate(calc(var(--p) * 12vw), calc(var(--p) * -110vh)) rotate(calc(1.2deg + var(--p) * 8deg)); }
.er-page .card.c1 img { object-position: 36% 60%; }
.er-page .card.c3 img { object-position: 50% 40%; }
.er-page .meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); border-top: 1px solid rgba(var(--fgrgb), .22); opacity: calc(1 - var(--p) * 2.2); position: relative; z-index: 2; }
.er-page .meta > div { padding-top: 12px; }
.er-page .meta .label { display: block; margin-bottom: 4px; color: var(--mut); }
.er-page .meta p { font-size: 14px; line-height: 1.4; }

@media (min-width: 721px) { .er-page .stage { top: 72px; height: calc(100svh - 72px); padding-top: clamp(24px, 3vw, 40px); } }

/* ---------- Проєктна частина ---------- */
.er-page .proj { position: relative; z-index: 2; overflow-x: clip; }
.er-page .brief { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); padding: clamp(56px, 9vw, 130px) var(--gutter) clamp(56px, 8vw, 110px); }
.er-page .brief .label { color: var(--mut); margin-bottom: 14px; }
.er-page .brief p { font-size: clamp(17px, 1.4vw, 23px); line-height: 1.55; max-width: 46ch; }
.er-page .brief .col .label:not(:first-child) { margin-top: clamp(28px, 3.4vw, 48px); }
.er-page .chapters { position: sticky; top: 62px; z-index: 60; display: flex; justify-content: center; gap: 10px; padding: 10px var(--gutter); background: rgba(var(--bgrgb), .9); backdrop-filter: blur(8px); border-block: 1px solid rgba(var(--fgrgb), .18); flex-wrap: wrap; }
.er-page .pill { min-height: 40px; display: inline-flex; align-items: center; padding: 0 22px; border-radius: 999px; font: 500 13px var(--sans); letter-spacing: .07em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(var(--fgrgb), .45); transition: background .3s var(--ease), color .3s var(--ease); }
.er-page .pill:hover, .er-page .pill.is-on { background: var(--fg); color: var(--bg); }
.er-page .sec { padding: clamp(40px, 6vw, 88px) var(--gutter); scroll-margin-top: 110px; }
.er-page .sec .head { border-top: 1px solid rgba(var(--fgrgb), .35); padding-top: clamp(14px, 2vw, 26px); margin-bottom: clamp(18px, 2.6vw, 34px); }
.er-page .sec .head h2 { font-size: clamp(1.3rem, 5vw, 5.6rem); overflow-wrap: anywhere; }
.er-page .lead { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.42; max-width: 44ch; margin-bottom: clamp(16px, 2.4vw, 32px); font-weight: 300; }
.er-page h3.proj-display { font-size: clamp(1.8rem, 3.2vw, 3.4rem); }

/* ---------- Baukasten ---------- */
.er-page .lab-grid { display: grid; grid-template-columns: minmax(260px, .62fr) 1.9fr; gap: clamp(24px, 4vw, 72px); align-items: start; }
.er-page .lab-ctrl { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 22px); position: sticky; top: 120px; }
.er-page .lab-ctrl .label { color: var(--mut); margin-bottom: 10px; display: block; }
.er-page .areas { display: flex; flex-wrap: wrap; gap: 8px; }
.er-page .areas .sub-areas { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 2px 18px; padding-left: 14px; border-left: 2px solid rgba(var(--fgrgb), .25); width: 100%; }
.er-page .chip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 16px 5px 7px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px rgba(var(--fgrgb), .4); font: 500 13px var(--sans); letter-spacing: .02em; text-align: left; line-height: 1.15; transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease); }
.er-page .chip:hover { transform: translateY(-2px); }
.er-page .chip small { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-top: 2px; }
.er-page .chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }
.er-page .cdot { flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.er-page .cdot[data-a="basis"] { background: #112CC2; } .er-page .cdot[data-a="bildung"] { background: #9164CA; } .er-page .cdot[data-a="schule"] { background: #33ADAD; }
.er-page .cdot[data-a="hochschule"] { background: #0D9EE5; } .er-page .cdot[data-a="beruf"] { background: #663380; } .er-page .cdot[data-a="erwachsen"] { background: #33337E; }
.er-page .cdot[data-a="jugend"] { background: #FF0066; } .er-page .cdot[data-a="sport"] { background: #339433; } .er-page .cdot[data-a="here"] { background: #FF8033; }
.er-page .seg { display: inline-flex; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(var(--fgrgb), .4); padding: 3px; }
.er-page .seg button { min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; font: 500 13px var(--sans); letter-spacing: .07em; text-transform: uppercase; transition: background .3s var(--ease), color .3s var(--ease); }
.er-page .seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.er-page .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.er-page .acts .btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }
.er-page .acts .btn { min-height: 46px; padding: 0 22px; }
.er-page .tip { font-size: 15px; line-height: 1.5; color: var(--mut); max-width: 34ch; }
.er-page .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.er-page .poster-wrap { min-width: 0; width: min(100%, calc((100svh - 230px) * 1.38)); }
.er-page .poster { --pc: #112CC2; --rh: 11.4cqw; container-type: inline-size; position: relative; aspect-ratio: 1.38/1; background: var(--pc); border-radius: 6px; overflow: hidden; transition: background-color .7s var(--ease); box-shadow: 0 30px 70px -26px rgba(1, 14, 92, .55), 0 8px 20px -8px rgba(1, 14, 92, .35); color: #fff; }
.er-page .pl-rows { position: absolute; left: 3.6cqw; top: 3.6cqw; width: 61cqw; display: flex; flex-direction: column; gap: 1.1cqw; }
.er-page .pl-row { display: flex; gap: 1.1cqw; height: var(--rh); align-items: stretch; overflow: hidden; }
.er-page .pl-b { flex: none; height: 100%; border: 0; padding: 0; background: #EEEEEE; color: #0b0b0b; cursor: pointer; font-family: var(--proj); font-weight: 900; text-transform: uppercase; white-space: nowrap; line-height: 1; transition: filter .25s var(--ease); position: relative; -webkit-tap-highlight-color: transparent; }
.er-page .pl-b:hover { filter: brightness(.9); }
.er-page .pl-b:focus-visible { outline: .4cqw solid #fff; outline-offset: .3cqw; z-index: 2; }
.er-page .pl-w { padding: 0 calc(2.5cqw * var(--wf, 1)); font-size: calc(4cqw * var(--wf, 1)); display: flex; align-items: center; letter-spacing: -.01em; }
.er-page .pl-b[data-g="1"] { flex: 1 1 auto; justify-content: flex-start; }
.er-page .sh-pill { border-radius: 999px; } .er-page .sh-dR { border-radius: 0 999px 999px 0; } .er-page .sh-dL { border-radius: 999px 0 0 999px; } .er-page .sh-dome { border-radius: 999px 999px 0 0; }
.er-page .pl-f.sh-circle { width: var(--rh); border-radius: 50%; }
.er-page .pl-f.sh-halfR { width: calc(var(--rh) * .5); border-radius: 0 999px 999px 0; }
.er-page .pl-f.sh-halfL { width: calc(var(--rh) * .5); border-radius: 999px 0 0 999px; }
.er-page .pl-f.sh-dome { width: calc(var(--rh) * 1.25); }
.er-page .pl-f.sh-pill { width: calc(var(--rh) * 1.7); }
.er-page .pl-f.sh-dR, .er-page .pl-f.sh-dL { width: calc(var(--rh) * 1.3); }
.er-page .pl-f[data-g="1"] { width: auto; }
.er-page .pl-photo { position: absolute; right: 0; top: 0; bottom: 0; width: 33.6cqw; margin: 0; overflow: hidden; background: #222; }
.er-page .pl-photo img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease); }
.er-page .pl-photo img.ph.off { opacity: 0; }
.er-page .pl-logo { position: absolute; left: 3.6cqw; top: 3.6cqw; width: 21cqw; height: auto; z-index: 2; }
.er-page .pl-foot { position: absolute; left: 3.6cqw; bottom: 3.4cqw; width: 58cqw; font-family: var(--proj); font-weight: 800; text-transform: uppercase; font-size: 1.9cqw; line-height: 1.35; letter-spacing: .005em; color: #fff; }
.er-page .poster.shake { animation: erShake .4s var(--ease); }
@keyframes erShake { 20% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }
.er-page .poster-cap { margin-top: 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--mut); }
.er-page .poster-cap b { font-weight: 500; color: var(--fg); }
/* ---------- Grundlagen ---------- */
.er-page .logo-stage { position: relative; border-radius: var(--r); overflow: hidden; background: #112CC2; margin-bottom: clamp(24px, 3vw, 40px); max-width: 1000px; }
.er-page .logo-stage img { width: 100%; height: auto; }
.er-page .kit { --rh: clamp(44px, 6vw, 84px); margin-bottom: clamp(24px, 3vw, 40px); }
.er-page .kit .label { display: block; color: var(--mut); margin-bottom: 12px; }
.er-page .kit-row { display: flex; align-items: center; gap: clamp(6px, .9vw, 12px); flex-wrap: wrap; padding: clamp(18px, 2.4vw, 32px); background: #112CC2; border-radius: var(--r); max-width: 1000px; }
.er-page .kb { display: block; height: var(--rh); background: #EEEEEE; flex: none; }
.er-page .kb.sh-circle { width: var(--rh); border-radius: 50%; } .er-page .kb.sh-halfR { width: calc(var(--rh) * .5); border-radius: 0 999px 999px 0; } .er-page .kb.sh-halfL { width: calc(var(--rh) * .5); border-radius: 999px 0 0 999px; }
.er-page .kb.sh-pill { width: calc(var(--rh) * 1.7); border-radius: 999px; } .er-page .kb.sh-dome { width: calc(var(--rh) * 1.25); border-radius: 999px 999px 0 0; }
.er-page .kb.sh-dR { width: calc(var(--rh) * 1.3); border-radius: 0 999px 999px 0; } .er-page .kb.sh-dL { width: calc(var(--rh) * 1.3); border-radius: 999px 0 0 999px; }
.er-page .kit-cap { margin-top: 12px; font-size: 17px; line-height: 1.5; max-width: 52ch; }
.er-page .system { display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap; padding: clamp(14px, 1.8vw, 22px) 0; border-block: 1px solid rgba(var(--fgrgb), .22); margin-bottom: clamp(24px, 3vw, 40px); }
.er-page .pal { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.er-page .pal i { display: block; width: clamp(34px, 4.4vw, 56px); height: clamp(34px, 4.4vw, 56px); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.er-page .pal .sep { width: 1px; height: 28px; background: currentColor; opacity: .4; margin: 0 10px; }
.er-page .pal .p1 { background: #112CC2; } .er-page .pal .p2 { background: #1D1D1B; } .er-page .pal .p3 { background: #fff; }
.er-page .pal .b1 { background: #9164CA; } .er-page .pal .b2 { background: #33ADAD; } .er-page .pal .b3 { background: #0D9EE5; } .er-page .pal .b4 { background: #663380; }
.er-page .pal .b5 { background: #33337E; } .er-page .pal .b6 { background: #FF0066; } .er-page .pal .b7 { background: #339433; } .er-page .pal .b8 { background: #FF8033; }
.er-page .type-note { font-size: 14px; line-height: 1.5; max-width: 44ch; }
.er-page .type-note b { font-weight: 500; }
.er-page .sys-note { font-size: clamp(17px, 1.4vw, 22px); font-weight: 300; max-width: 52ch; line-height: 1.5; }

/* ---------- Plakate ---------- */
.er-page .kv-row { display: block; max-width: 1040px; margin-inline: auto; padding-right: 6%; }
.er-page .kv-row h3 { margin-bottom: 14px; }
.er-page .kv-row p { font-weight: 300; font-size: clamp(17px, 1.4vw, 22px); max-width: 36ch; }
.er-page .deck { outline-offset: 10px; }
.er-page .deck-stage { display: flex; gap: 12px; overflow-x: auto; }
.er-page .deck-stage .slide { flex: none; width: 80%; }
.js .er-page .deck-stage { display: block; position: relative; aspect-ratio: 1.55; overflow: visible; touch-action: pan-y; cursor: grab; user-select: none; }
.js .er-page .deck-stage .slide { position: absolute; inset: 0; width: auto; transition: transform .8s var(--ease), opacity .6s var(--ease); will-change: transform; }
.js .er-page .slide[data-pos="0"] { transform: none; z-index: 5; }
.js .er-page .slide[data-pos="1"] { transform: translate(6%, 1.5%) rotate(3deg) scale(.96); z-index: 4; }
.js .er-page .slide[data-pos="2"] { transform: translate(12%, 3%) rotate(6deg) scale(.92); z-index: 3; }
.js .er-page .slide[data-pos="out"] { transform: translate(-118%, -4%) rotate(-14deg); opacity: 0; z-index: 6; }
.js .er-page .slide[data-pos="far"] { transform: translate(16%, 4%) rotate(8deg) scale(.9); opacity: 0; z-index: 1; }
.js .er-page .slide[data-pos="out"], .js .er-page .slide[data-pos="far"] { pointer-events: none; }
.er-page .slide.pic { display: grid; place-items: center; }
.er-page .slide.pic img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--r); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35); }
.er-page .deck-ctrl { display: flex; align-items: center; gap: 14px; margin-top: clamp(20px, 2.6vw, 34px); }
.er-page .deck-ctrl .pos { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; min-width: 6ch; text-align: center; opacity: .85; }
.er-page .cap { margin-top: 10px; font-size: 14px; opacity: .8; }
.er-page .series { margin-top: clamp(36px, 5vw, 72px); }
.er-page .series > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin-bottom: clamp(14px, 1.8vw, 24px); border-top: 1px solid rgba(var(--fgrgb), .28); padding-top: 14px; }
.er-page .series header .label { color: var(--mut); }
.er-page .rail-track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px var(--gutter) 10px; margin-inline: calc(var(--gutter) * -1); scroll-padding-inline: var(--gutter); cursor: grab; }
.er-page .rail-track::-webkit-scrollbar { display: none; }
.er-page .rail-track.drag { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.er-page .rcard { flex: none; scroll-snap-align: start; width: clamp(280px, 56vw, 880px); }
.er-page .rail-ctrl { display: flex; align-items: center; gap: 16px; margin-top: clamp(14px, 1.8vw, 22px); }
.er-page .bar { flex: 1; height: 2px; background: rgba(var(--fgrgb), .25); position: relative; overflow: hidden; }
.er-page .bar i { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(var(--v, .2)); }
.er-page .rpic { display: block; width: 100%; aspect-ratio: 3/2; border-radius: var(--r); overflow: hidden; background: var(--nacht); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); }
.er-page .rpic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.er-page .rpic:hover img { transform: scale(1.04); }
.er-page .rcap { margin: 12px 2px 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; }
.er-page .rcap b { font-weight: 500; }
.er-page .rcap span { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; opacity: .7; }

/* ---------- Merchandise: вкладки-предмети, усі варіанти видно одразу ---------- */
.er-page .mtabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(18px, 2.4vw, 32px); }
.er-page .mtabs .chip { min-height: 48px; padding: 6px 22px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.js .er-page .mpanel:not(.is-cur) { display: none; }
.er-page .mpics { display: grid; gap: clamp(10px, 1.4vw, 20px); max-width: 1100px; }
.er-page .mpics.mp-3 { grid-template-columns: repeat(3, 1fr); } .er-page .mpics.mp-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.er-page .mf { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #010E5C; }
.er-page .mf img { width: 100%; height: 100%; object-fit: cover; }
.er-page .mnote { margin-top: clamp(16px, 2vw, 26px); font-size: 15px; line-height: 1.5; color: var(--mut); max-width: 60ch; }
.er-page .rpic--s { aspect-ratio: 1.53; }
/* ---------- Social: автоцикл (більше не використовується) ---------- */
.er-page .loop { position: relative; }
.er-page .loop-stage { position: relative; aspect-ratio: 1.53; border-radius: var(--r); overflow: hidden; background: #112CC2; max-width: 1100px; margin-inline: auto; }
.er-page .loop .lp { transform: scale(1.03); transition: opacity .9s var(--ease), transform 5s linear; }
.er-page .loop .lp.on { transform: none; }
.er-page .loop-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 1100px; margin: 14px auto 0; }
.er-page .loop .dots { display: flex; gap: 8px; }
.er-page .loop .dot { width: 34px; height: 12px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; }
.er-page .loop .dot::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 2px; background: rgba(var(--fgrgb), .3); }
.er-page .loop .dot::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 2px; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.er-page .loop .dot.on::after { transform: scaleX(1); }
.js .er-page .loop:not(.paused) .dot.on::after { animation: erBar var(--lt, 3.2s) linear forwards; }
@keyframes erBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.er-page .loop .cap { flex: 1 1 140px; min-width: 0; margin: 0; font: 500 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.er-page .loop .ic { width: 38px; height: 38px; background: none; color: inherit; box-shadow: inset 0 0 0 1px currentColor; font-size: 11px; }

/* ---------- Hinweise / Weiter ---------- */
.er-page .credits { padding: clamp(8px, 2vw, 24px) var(--gutter) clamp(40px, 6vw, 80px); }
.er-page .cr-h { color: var(--mut); margin-bottom: 24px; }
.er-page .credits .row { padding: 18px 0; border-top: 1px solid rgba(var(--fgrgb), .22); }
.er-page .credits .row:last-child { border-bottom: 1px solid rgba(var(--fgrgb), .22); }
.er-page .credits .row p { max-width: 62ch; }
.er-page .next { padding: clamp(40px, 6vw, 90px) var(--gutter) clamp(56px, 8vw, 110px); display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.er-page .next .label { display: block; margin-bottom: 10px; color: var(--mut); }
.er-page .next h2 { font-size: clamp(2.6rem, 7vw, 7.4rem); }

/* ---------- Діалоги = спільний <dialog class="gal"> із deck.js ---------- */
dialog.gal { margin: auto; border: 0; padding: 0; background: var(--nacht); color: var(--hell); width: min(1500px, 96vw); max-height: 94svh; border-radius: 6px; overflow: hidden; font-family: var(--sans); }
dialog.gal::backdrop { background: rgba(6, 12, 22, .88); }
dialog.gal .btn--ghost { color: var(--hell); }
dialog.gal .btn--ghost:hover { background: var(--hell); color: var(--nacht); }
dialog.gal .ic { background: var(--hell); color: var(--nacht); }
.gal-in { display: flex; flex-direction: column; max-height: 94svh; }
.gal-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--lineL); }
.gal-bar h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.4rem); text-transform: uppercase; line-height: 1.04; }
.gal-grid { overflow: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding: 14px 18px 22px; flex: 1 1 auto; min-height: 0; }
.gal-grid li { position: relative; flex: none; width: calc((100% - 30px) / 4); aspect-ratio: 1; background: #1b2a45; border-radius: 10px; overflow: hidden; }
.gal-grid button { position: absolute; inset: 0; display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gal-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal-grid button:hover img { transform: scale(1.05); }
.gal-view { padding: 14px 18px; display: grid; gap: 12px; justify-items: center; }
.gal-view[hidden] { display: none; }
.gal-view img { max-height: 74svh; width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; }
.gal-ctrl { display: flex; align-items: center; gap: 14px; width: 100%; justify-content: center; }
.gal-ctrl .pos { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; opacity: .8; min-width: 7ch; text-align: center; }
.gal.is-view .gal-grid { display: none; }

/* ---------- reduced-motion: без FLIP/паралаксу/автоциклів (їх вимикає JS), стабільний hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .er-page .ln > span { animation: erUp 1.2s var(--ease) both; }
  html.js .er-page .ln:nth-child(2) > span { animation-delay: .12s; }
  html.js .er-page .stack .card { animation: erLay 640ms var(--ease) backwards; }
  html.js .er-page .stack .card.c2 { animation-delay: 350ms; }
  html.js .er-page .stack .card.c1 { animation-delay: 460ms; }
  html.js .er-page .stack .card.c3 { animation-delay: 570ms; }
}
@keyframes erUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes erLay { from { opacity: 0; translate: 0 46px; rotate: 5deg; scale: 1.05; } }
@media (prefers-reduced-motion: reduce) {
  .er-bgfx { transition: none; }
  .er-page .hero { height: auto; }
  .er-page .stage { position: relative; height: auto; min-height: 100svh; }
  .er-page .poster, .er-page .pl-b, .er-page .lp, .er-page .loop .lp { transition: none; }
  .er-page .poster.shake { animation: none; }
  .js .er-page .slide { transition: none; }
}

/* ---------- Планшет / мобільна ---------- */
@media (max-width: 900px) {
  .er-page .hero { height: 200vh; }
  .er-page .hero-top .type { display: none; }
  .er-page .stack { bottom: auto; top: 15vh; width: 58vw; height: 30vh; right: var(--gutter); }
  .er-page .meta { grid-template-columns: 1fr 1fr; row-gap: 2px; }
  .er-page .meta > div:nth-child(n+3) { display: none; }
  .er-page .brief { grid-template-columns: 1fr; }
  .er-page .lab-grid { grid-template-columns: 1fr; }
  .er-page .lab-ctrl { position: static; }
  .er-page .kv-row { padding-right: 0; }
  .er-page .mpics.mp-3 { grid-template-columns: 1fr; } .er-page .mpics.mp-2 { grid-template-columns: 1fr 1fr; }
  .er-page .poster-wrap { width: 100%; }
  .gal-grid li { width: calc((100% - 10px) / 2); }
}
@media (max-width: 720px) {
  .er-page .stage { padding-top: 84px; }
  .er-page .ttl { font-size: clamp(3.6rem, 21vw, 6rem); }
  .er-page .ttl2 { font-size: clamp(2rem, 10vw, 3.6rem); }
  .er-page .chapters { top: 50px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .er-page .chapters::-webkit-scrollbar { display: none; }
  .er-page .pill { flex: none; }
  .er-page .rcard { width: 84vw; }
  .er-page h3.proj-display { font-size: clamp(1.25rem, 6.2vw, 2rem); }
}

/* Social: вирізки з прозорим тлом (рішення Софії 07.11.2026): шаблони «плавають» на тлі сторінки з м'якою тінню, кадри цілком. */
.er-page .rpic--s { aspect-ratio: auto; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; display: grid; place-items: center; height: clamp(260px, 46svh, 520px); }
.er-page .rpic--s img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 22px 30px rgba(1, 14, 92, .28)); }
.er-page #social .rcard { width: auto; }
.er-page #social .rcap b { font-weight: 500; }

/* мобільний hero: заголовок завжди над картками (плюс у «ERASMUS+» не ховається) */
@media (max-width: 820px) { .er-page .word { position: relative; z-index: 3; } }

/* hero без «Ein Baukasten» як другого заголовка: статичний перший екран (без порожнього екрана після відлітаючих карток) */
.er-page .hero { height: auto; }
.er-page .stage { position: relative; top: auto; height: auto; min-height: calc(100svh - 72px); }
@media (max-width: 720px) { .er-page .stage { min-height: 100svh; } }
@media (min-width: 901px) { .er-page .stack { top: 12vh; height: 54vh; width: clamp(150px, 31vw, 440px); } }
@media (max-width: 720px) { .er-page .stack { top: 19vh; width: 50vw; height: 25vh; } .er-page .hero-top { position: relative; z-index: 3; } }

/* ==== 11.11 (Софія): правки Erasmus ==== */
/* Baukasten: весь плакат видно на одному екрані; текст і керування ліворуч, мова під плакатом праворуч */
.er-page #baukasten { padding-top: clamp(20px, 2.4vw, 36px); scroll-margin-top: 132px; }
.er-page #baukasten .head { margin-bottom: clamp(10px, 1.4vw, 20px); }
.er-page #baukasten .head h2 { font-size: clamp(1.3rem, 4vw, 4.4rem); }
.er-page #baukasten .lab-lead { font-size: clamp(16px, 1.15vw, 19px); line-height: 1.45; max-width: 38ch; margin: 0 0 4px; }
.er-page #baukasten .lab-grid { grid-template-columns: minmax(250px, .55fr) 1.9fr; align-items: start; }
.er-page #baukasten .lab-ctrl { top: 140px; }
.er-page #baukasten .poster-wrap { width: min(100%, max(460px, calc((100svh - 330px) * 1.38))); }
.er-page .poster-cap { flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.er-page .poster-cap .pc-l { margin: 0; }
.er-page .poster-cap .pc-l span { display: block; }
.er-page .poster-cap .pc-lang { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.er-page .poster-cap .pc-lang .label { margin: 0; }

/* Grundlagen: фото зліва, правила праворуч (раніше права половина була порожня) */
@media (min-width: 901px) {
  .er-page #grundlagen { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); column-gap: clamp(28px, 4vw, 72px); align-content: start; }
  .er-page #grundlagen > .head { grid-column: 1 / -1; }
  .er-page #grundlagen > .logo-stage { grid-column: 1; grid-row: 2 / span 3; margin: 0; max-width: none; align-self: start; }
  .er-page #grundlagen > .kit { grid-column: 2; grid-row: 2; margin: 0 0 clamp(18px, 2vw, 28px); }
  .er-page #grundlagen > .system { grid-column: 2; grid-row: 3; margin: 0 0 clamp(18px, 2vw, 28px); }
  .er-page #grundlagen > .sys-note { grid-column: 2; grid-row: 4; margin: 0; align-self: start; }
  .er-page #grundlagen .kit { --rh: clamp(34px, 3.6vw, 56px); }
  .er-page #grundlagen .kit-row { max-width: none; }
}

/* Merchandise: плитки; клік змінює оформлення */
.er-page .mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 28px); max-width: 1500px; }
.er-page .mt-b { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; background: #010E5C; cursor: pointer; }
.er-page .mt-pics { position: absolute; inset: 0; display: block; }
.er-page .mt-i { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease); }
.er-page .mt-i.on { opacity: 1; }
.er-page .mt-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.er-page .mt-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.er-page .mt-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: background-color .3s var(--ease); }
.er-page .mt-dots i.on { background: #fff; }
.er-page .mt-b:hover .mt-dots i:not(.on) { background: rgba(255, 255, 255, .7); }
.er-page .mt-n { margin: 12px 0 0; display: grid; gap: 2px; }
.er-page .mt-n b { font-weight: 500; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.er-page .mt-n .mt-v { color: var(--mut); font-size: 14px; line-height: 1.35; min-height: 2.7em; }
.er-page .mshow .mnote { margin-top: clamp(18px, 2vw, 28px); }
@media (max-width: 900px) { .er-page .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .er-page .mt-i, .er-page .mt-dots i { transition: none; } }

/* Social: спокійна сітка 2×2 замість стрічки, що «стрибала» (картинки підвантажувались і міняли ширину) */
.er-page .sgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); max-width: 1400px; }
.er-page .sc-p { aspect-ratio: 3 / 2; display: grid; place-items: center; border-radius: var(--r); background: rgba(17, 44, 194, .07); overflow: hidden; padding: clamp(10px, 1.4vw, 20px); }
.er-page .sc-p img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(1, 14, 92, .22)); }
.er-page .sc .rcap { margin: 12px 0 0; }
@media (max-width: 900px) { .er-page .sgrid { grid-template-columns: 1fr; } }
