/* =====================================================================
   Филипок / Filipok — детский развивающий клуб (Нарва)
   Palette "Тёплый алфавит" — terracotta + honey + leaf + plum on ivory.
   Fonts: Comfortaa (headings) + Nunito (body) + Caveat (accent).
   Все три — с кириллицей и эст. диакритикой (Cyrillic + Latin-ext).
   Light + dark, светлая по умолчанию. NO blue-yellow.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:        #FAF7FD;
  --bg-grad-1: #EFE6FB;
  --bg-grad-2: #F6F0FC;
  --surface:   #FFFFFF;
  --surface-2: #F4ECFB;
  --tint:      #EDE0FA;
  --line:      #E4D6F2;
  --line-soft: #EFE6F9;

  --text:      #241733;   /* 15.9:1 on bg */
  --muted:     #5C4A6E;   /* ~7.9:1 on surface / 7.4:1 on bg */
  --faint:     #6E5C82;   /* small secondary text — >=4.5:1 */

  --brand:     #8B3FD6;   /* violet — graphics */
  --brand-2:   #B57DEC;   /* light violet */
  --brand-3:   #C98BF0;   /* lilac (gradient end) */
  --plum:      #9A5BD6;   /* violet accent */
  --teal:      #2FA39A;   /* teal accent (cubes) */

  --cta:       #7C3AED;   /* fill: white text 5.70:1 */
  --cta-hover: #6D28D9;
  --cta-press: #5B21B6;
  --cta-ink:   #6D28D9;   /* purple TEXT on light surfaces (7.1:1) */

  --tg:        #7C3AED;   /* telegram button — brand violet (no blue) */

  --shadow-sm: 0 1px 2px rgba(60,30,90,.07), 0 3px 10px rgba(60,30,90,.06);
  --shadow:    0 12px 30px -14px rgba(76,29,149,.24), 0 4px 14px -7px rgba(76,29,149,.16);
  --shadow-lg: 0 30px 64px -28px rgba(70,25,135,.38), 0 12px 30px -16px rgba(70,25,135,.22);
  --ring:      0 0 0 3px rgba(124,58,237,.45);

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --pad: clamp(1.1rem, 4vw, 2.4rem);
  --maxw: 1200px;
  --sect-y: clamp(2.5rem, 6.5vw, 6rem); /* tighter gaps between sections (−~2 lines) */

  --font-head: "Comfortaa", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Comfortaa", cursive;

  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --bg:        #17121F;
  --bg-grad-1: #241733;
  --bg-grad-2: #120D1B;
  --surface:   #221A30;
  --surface-2: #2A2039;
  --tint:      #2F2440;
  --line:      #392C4E;
  --line-soft: #2F2440;

  --text:      #F3ECFA;   /* 15.9:1 */
  --muted:     #C8B8DC;   /* ~9.9:1 on bg */
  --faint:     #A593BE;   /* small secondary text — >=4.5:1 */

  --brand:     #B57DEC;
  --brand-2:   #C99CF2;
  --brand-3:   #9A5BD6;
  --plum:      #C295F0;
  --teal:      #54C7BC;

  --cta:       #7C3AED;   /* fill: white text 5.70:1 */
  --cta-hover: #6D28D9;
  --cta-press: #5B21B6;
  --cta-ink:   #C4A0F5;   /* purple TEXT on dark surfaces (>=4.5:1) */
  --tg:        #7C3AED;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.4);
  --shadow:    0 14px 36px -16px rgba(0,0,0,.6), 0 6px 16px -8px rgba(0,0,0,.45);
  --shadow-lg: 0 34px 70px -30px rgba(0,0,0,.7), 0 12px 30px -18px rgba(0,0,0,.55);
  --ring:      0 0 0 3px rgba(181,125,236,.5);
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 82% -8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 520px at -6% 6%, var(--bg-grad-2), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .3s var(--ease);
}

h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.14; letter-spacing: -.01em; color: var(--text); }
p { color: var(--muted); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* skip link */
.skip-link {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(-140%);
  top: 10px; z-index: 200; background: var(--cta); color: #fff;
  padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.45rem; border-radius: 999px; font-weight: 700; font-family: var(--font-body);
  letter-spacing: .005em; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease), transform .12s var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-cta, .btn-tg {
  background: var(--cta); color: #fff;
  box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--cta) 70%, transparent);
}
.btn-cta:hover, .btn-tg:hover { background: var(--cta-hover); box-shadow: 0 16px 32px -10px color-mix(in srgb, var(--cta) 60%, transparent); }

.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--cta-ink); background: var(--surface-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 6px 24px -18px rgba(110,55,18,.5);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.brand .mark { width: auto; height: 52px; flex: 0 0 auto; }
.brand b { font-weight: 700; }
.brand .tag { color: var(--faint); font-weight: 600; font-size: .68rem; letter-spacing: .04em; }

.primary-nav ul { display: flex; align-items: center; gap: clamp(.4rem, 1.6vw, 1.4rem); }
.primary-nav a {
  display: inline-block; padding: .5rem .2rem; font-weight: 600; color: var(--muted);
  position: relative; transition: color .2s var(--ease);
}
.primary-nav a::after {
  content: ""; position: absolute; left: .2rem; right: .2rem; bottom: .12rem; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 3px; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a:hover::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: .55rem; }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm); transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--brand); color: var(--cta-ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* theme toggle icons */
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* lang switch (desktop segmented) */
.lang-switch { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.lang-switch a {
  display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 .5rem;
  border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--muted); letter-spacing: .02em;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.lang-switch a.active { background: var(--cta); color: #fff; }
.lang-switch a:not(.active):hover { color: var(--text); background: var(--surface-2); }

/* mobile single lang toggle (hidden on desktop) */
.lang-toggle {
  display: none; align-items: center; gap: .35rem; height: 42px; padding: 0 .85rem;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  font-weight: 700; font-size: .9rem; color: var(--text);
}
.lang-toggle .cur { color: var(--cta-ink); }
.lang-toggle .sep { color: var(--faint); font-weight: 600; }
.lang-toggle .alt { color: var(--faint); }

.burger { display: none; }

/* ---------- Hero (3D alphabet cubes) ---------- */
.hero { position: relative; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: var(--sect-y); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-family: var(--font-hand); font-size: 1.18rem; font-weight: 700; color: var(--cta-ink); letter-spacing: .01em;
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }

.hero-copy h1 { font-size: clamp(2.2rem, 5.8vw, 3.9rem); font-weight: 700; margin: 1.1rem 0 0; letter-spacing: -.02em; }
.grad-text { background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 60%, var(--brand-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); max-width: 40ch; margin-top: 1.2rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 4vw, 2.6rem); margin-top: 2.4rem; }
.hero-meta .stat { display: flex; flex-direction: column; }
.hero-meta .stat b { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--text); line-height: 1; }
.hero-meta .stat span { font-size: .86rem; color: var(--faint); margin-top: .4rem; }

/* 3D scene */
.hero-stage { perspective: 1100px; }
.hero-scene {
  position: relative; aspect-ratio: 5/4.6; transform-style: preserve-3d;
  will-change: transform; transition: transform .2s var(--ease);
}
.hero-aura {
  position: absolute; inset: 4% 2% 6% 2%; z-index: -1; border-radius: 46% 54% 58% 42% / 50% 44% 56% 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-2) 40%, transparent), transparent 72%);
  filter: blur(10px); transform: translateZ(-70px);
}
.hero-aura.two { inset: 24% 30% 18% 8%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-3) 36%, transparent), transparent 70%); transform: translateZ(-50px); }

/* Zaitsev cubes: real 3D boxes, one consonant + all its vowels per cube (like the originals) */
.hero-stage { container-type: inline-size; }
.zc {
  --h: calc(var(--s) / 2);
  position: absolute; width: var(--s); height: var(--s);
  transform-style: preserve-3d; animation: floaty 7s ease-in-out infinite;
}
.zc-b {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx, -22deg)) rotateY(var(--ry, -30deg)) rotateZ(var(--rz, 0deg));
}
.zc .f {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 800; font-size: calc(var(--s) * .44); line-height: 1;
  letter-spacing: -.03em; color: var(--ink); border-radius: 4%;
  background: var(--side); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(60, 30, 10, .08), inset 0 0 calc(var(--s) * .14) rgba(60, 30, 10, .07);
}
.zc .fr { transform: translateZ(var(--h)); background: var(--front); }
.zc .bk { transform: rotateY(180deg) translateZ(var(--h)); background: var(--front); }
.zc .rt { transform: rotateY(90deg) translateZ(var(--h)); }
.zc .lt { transform: rotateY(-90deg) translateZ(var(--h)); }
.zc .tp { transform: rotateX(90deg) translateZ(var(--h)) rotateZ(180deg); background: var(--top); }
.zc .bt { transform: rotateX(-90deg) translateZ(var(--h)); background: var(--top); }
.zc.tw .rt { transform: rotateY(90deg) translateZ(var(--h)) rotateZ(-90deg); }
.zc.tw .tp { transform: rotateX(90deg) translateZ(var(--h)); }
/* soft shadow under each cube (drawn on the bottom face, pushed down) */
.zc .bt { box-shadow: 0 0 calc(var(--s) * .35) calc(var(--s) * .08) rgba(70, 25, 135, .28); }

/* «золотые» — мёд и коричневые буквы, как настоящие кубики */
.zc-gold  { --top: linear-gradient(135deg, #FFE0A0, #FFCB6B); --front: linear-gradient(160deg, #FFC766, #F2A23A); --side: linear-gradient(160deg, #E9962E, #CF7A1C); --ink: #5A2A0C; }
/* белые — у Зайцева с синими буквами; на сайте без сине-жёлтого, поэтому фиолетовые */
.zc-white { --top: #FFFFFF; --front: linear-gradient(160deg, #FFFFFF, #F4EEFA); --side: linear-gradient(160deg, #E8DDF4, #D6C6EA); --ink: #5B21B6; }
/* «железные» — сиреневые в палитре сайта */
.zc-lilac { --top: linear-gradient(135deg, #F1E7FC, #E2D0F8); --front: linear-gradient(160deg, #DCC6F7, #C3A3EF); --side: linear-gradient(160deg, #AE88E4, #9468D6); --ink: #3B1466; }

.zc.q1 { --s: 24cqw; top: 9%;  left: 9%;   --rz: -5deg; transform: translateZ(60px);  animation-delay: -.4s; }
.zc.q2 { --s: 21cqw; top: 4%;  right: 22%; --ry: -24deg; --rz: 4deg; transform: translateZ(110px); animation-delay: -2.2s; }
.zc.q3 { --s: 26cqw; bottom: 12%; left: 7%; --rz: 3deg; transform: translateZ(90px);  animation-delay: -1.2s; }
.zc.q4 { --s: 22cqw; bottom: 14%; right: 13%; --ry: -34deg; --rz: -4deg; transform: translateZ(140px); animation-delay: -3.1s; }
.zc.q5 { --s: 15cqw; top: 40%; left: 41%; --rx: -28deg; --ry: -38deg; --rz: 8deg; transform: translateZ(185px); animation-delay: -1.8s; }
.zc.q6 { --s: 12cqw; top: 29%; right: 35%; --ry: 34deg; --rz: -10deg; transform: translateZ(40px); animation-delay: -2.7s; }
.zc.q7 { --s: 11cqw; bottom: 3%; left: 43%; --rx: -30deg; --ry: -20deg; --rz: 12deg; transform: translateZ(120px); animation-delay: -3.6s; }

@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .zc { animation: none; } }

.hero-chip {
  position: absolute; display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-chip svg { width: 18px; height: 18px; color: var(--brand); }
.hero-chip.t { top: 45%; right: -3%; transform: translateZ(170px); }
.hero-chip.b { bottom: 1%; left: 2%; transform: translateZ(200px); }
.hero-chip b { color: var(--cta-ink); }

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--sect-y); position: relative; }
.section.tint { background: linear-gradient(180deg, transparent, var(--surface-2) 12%, var(--surface-2) 88%, transparent); }
.section-head { max-width: 58ch; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; margin-top: .7rem; letter-spacing: -.02em; }
.section-sub { margin-top: 1rem; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--muted); }
.eyebrow.sm { font-size: 1.05rem; }
.divider { width: 66px; height: 5px; border-radius: 5px; margin: 1.1rem 0 0; background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3)); }
.section-head.center .divider { margin-inline: auto; }

/* ---------- Services / lessons ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .65rem; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.card:hover::before { opacity: 1; }
.card .ic {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  color: #fff; margin-bottom: .3rem; box-shadow: var(--shadow-sm);
  background: linear-gradient(150deg, var(--brand), var(--cta));
}
.card .ic svg { width: 28px; height: 28px; }
.card.t-honey .ic { background: linear-gradient(150deg, #FFC368, #E89321); }
.card.t-leaf  .ic { background: linear-gradient(150deg, #79C566, #3F8E45); }
.card.t-plum  .ic { background: linear-gradient(150deg, #B57DEC, #7E3FCB); }
.card.t-teal  .ic { background: linear-gradient(150deg, #54C7BC, #1E8C84); }
.card h3 { font-size: 1.2rem; font-weight: 700; }
/* wide last card (7th): icon on the left, text on the right, spans the whole row */
.card.wide { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; gap: 1.2rem; }
.card.wide .ic { flex: none; margin-bottom: 0; }
.card.wide .card-body { display: flex; flex-direction: column; gap: .65rem; align-items: flex-start; }
.card.wide p { max-width: 70ch; }
.card p { font-size: .98rem; flex: 1; }
.tag-pill {
  /* radius in em, not 999px: a long text wraps into a rounded rectangle instead of a stadium that clips the letters */
  align-self: flex-start; margin-top: .4rem; padding: .35rem .85rem; border-radius: 1.1em; line-height: 1.35; max-width: 100%;
  background: var(--tint); color: var(--cta-ink); font-weight: 700; font-size: .86rem; border: 1px solid var(--line-soft);
}

/* topic chips */
.topics-head { margin-top: clamp(3rem, 6vw, 4.2rem); }
.topics { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.05rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: .94rem; color: var(--text); transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { transform: translateY(-3px); border-color: var(--brand); }
.chip svg { width: 17px; height: 17px; color: var(--brand); }

/* ---------- About / methodology ---------- */
.about-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
.about-photo { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); aspect-ratio: 4/3.2; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .badge {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem; display: flex; align-items: center; gap: .7rem;
  padding: .8rem 1rem; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.about-photo .badge .av { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 700; background: linear-gradient(150deg, var(--brand), var(--cta)); }
.about-photo .badge .t span { display: block; font-size: .78rem; color: var(--faint); }
.about-photo .badge .t b { font-size: .98rem; color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1.8rem; }
.fact {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm); transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.fact:hover { border-color: var(--brand); transform: translateY(-3px); }
.fact b { display: block; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.fact span { display: block; margin-top: .5rem; font-size: .86rem; color: var(--muted); }

/* ---------- Groups ---------- */
.groups-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.2vw, 1.6rem); margin-top: clamp(2.2rem, 5vw, 3.2rem); }
.group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.9rem 1.7rem; box-shadow: var(--shadow-sm); text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.group:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.group .emoji {
  width: 78px; height: 78px; margin: 0 auto 1rem; border-radius: 26px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; color: #fff;
  box-shadow: var(--shadow-sm);
}
.group.g1 .emoji { background: linear-gradient(150deg, #A66CE6, #7E3FCB); }
.group.g2 .emoji { background: linear-gradient(150deg, #79C566, #3F8E45); }
.group.g3 .emoji { background: linear-gradient(150deg, #F2743C, #C2410C); }
.group.g4 .emoji { background: linear-gradient(150deg, #54C7BC, #1E8C84); }
.group h3 { font-size: 1.22rem; }
.group .age { display: inline-block; margin: .5rem 0 .2rem; font-weight: 700; color: var(--cta-ink); font-size: .9rem; padding: .25rem .7rem; border-radius: 999px; background: var(--tint); border: 1px solid var(--line-soft); }
.group p { font-size: .96rem; margin-top: .6rem; }

/* ---------- Gallery — afiša-style carousel (vikerkaaruuskula pattern, themed) ---------- */
.gal-carousel { position: relative; display: flex; align-items: center; gap: 14px; margin-top: clamp(2.2rem, 5vw, 3.2rem); }
.gal-arrow {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%;
  background: var(--surface); color: var(--cta-ink); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-size: 1.7rem; line-height: 1; display: grid; place-items: center;
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.gal-arrow:hover { background: var(--cta); color: #fff; border-color: var(--cta); transform: scale(1.08); }
.gal-arrow:disabled { opacity: .38; cursor: default; box-shadow: var(--shadow-sm); }
.gal-arrow:disabled:hover { background: var(--surface); color: var(--cta-ink); border-color: var(--line); transform: none; }
.gal-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; flex: 1 1 auto; min-width: 0;
  padding: 6px 4px 16px; scroll-snap-type: x proximity;
  scrollbar-color: color-mix(in srgb, var(--brand) 45%, transparent) transparent;
}
.gal-track::-webkit-scrollbar { height: 8px; }
.gal-track::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--brand) 38%, transparent); border-radius: 8px; }
.gal-track::-webkit-scrollbar-track { background: transparent; }

.gal {
  flex: 0 0 auto; width: 266px; aspect-ratio: 3/4; border-radius: var(--r-lg); overflow: hidden;
  position: relative; cursor: pointer; scroll-snap-align: start;
  background-size: cover; background-position: center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.gal::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,20,60,0) 42%, rgba(36,20,60,.82)); opacity: .9; transition: opacity .3s var(--ease); }
.gal:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.gal:hover::after { opacity: 1; }
.gal:focus-visible { box-shadow: var(--ring); }
.gal b { position: absolute; left: 1rem; right: 1rem; bottom: .95rem; z-index: 1; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.04rem; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.gal .zoom { position: absolute; top: .8rem; right: .8rem; z-index: 1; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transform: translateY(-4px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.gal:hover .zoom, .gal:focus-visible .zoom { opacity: 1; transform: translateY(0); }
.gal .zoom svg { width: 18px; height: 18px; }

/* gallery lightbox — warm themed, full (uncropped) image */
.gl-lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); }
.gl-lightbox.open { display: flex; }
.gl-backdrop { position: absolute; inset: 0; background: rgba(26,12,4,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gl-dialog { position: relative; z-index: 1; width: min(1140px, 100%); display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.gl-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1.3rem); width: 100%; }
.gl-frame {
  position: relative; flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: clamp(.45rem, 1.4vw, .9rem); border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.16); box-shadow: var(--shadow-lg);
}
.gl-img {
  display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto;
  border-radius: var(--r-lg); object-fit: contain; background: #1B1410;
  transition: opacity .15s var(--ease);
}
.gl-img.fading { opacity: 0; }
.gl-arrow {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface); color: var(--cta-ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.gl-arrow:hover { background: var(--surface-2); border-color: var(--brand); transform: scale(1.06); }
.gl-arrow svg { width: 24px; height: 24px; }
.gl-close {
  position: fixed; top: clamp(.9rem, 3vw, 1.6rem); right: clamp(.9rem, 3vw, 1.6rem); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--cta-ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: background-color .2s var(--ease), transform .25s var(--ease);
}
.gl-close:hover { background: var(--surface-2); transform: rotate(90deg); }
.gl-close svg { width: 22px; height: 22px; }
.gl-caption {
  text-align: center; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: .55rem 1.2rem; border-radius: 999px; max-width: 92%;
}
.gl-thumbs { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.gl-thumb { width: 66px; height: 50px; border-radius: 10px; background-size: cover; background-position: center; cursor: pointer; border: 2px solid transparent; opacity: .55; transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.gl-thumb.active, .gl-thumb:hover { opacity: 1; border-color: var(--brand-2); }

/* ---------- Trial CTA banner ---------- */
.trial {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.6rem);
  background: linear-gradient(135deg, #7C3AED, #6D28D9 50%, #4C1D95);
  color: #fff; box-shadow: var(--shadow-lg);
}
.trial::after { content: ""; position: absolute; right: -8%; top: -45%; width: 56%; height: 190%; border-radius: 50%; background: radial-gradient(closest-side, rgba(214,140,246,.42), transparent 70%); }
.trial-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.45fr .85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.trial .eyebrow { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.32); color: #fff; }
.trial .eyebrow .dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.trial h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; margin-top: 1rem; }
.trial p { color: rgba(255,244,234,.94); margin-top: 1rem; max-width: 46ch; }
.trial .btn-cta { background: #fff; color: var(--cta); margin-top: 1.8rem; }
.trial .btn-cta:hover { background: #fbeede; }
.trial-card { text-align: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: var(--r-lg); padding: 2rem 1.2rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.trial-card .num { font-family: var(--font-head); font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 700; line-height: 1.05; }
.trial-card .lbl { margin-top: .6rem; opacity: .94; font-size: .95rem; }

/* ---------- Schedule + Prices (inside the warm banner) ---------- */
.trial .info-head { position: relative; z-index: 1; max-width: 60ch; }
.trial .info-head h2 { margin-top: 1rem; }
.info-panel {
  position: relative; z-index: 1; margin-top: 1.6rem;
  background: rgba(255,255,255,.96); border-radius: var(--r-lg);
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1.1rem, 2.6vw, 1.8rem);
  box-shadow: 0 16px 40px -18px rgba(60,20,0,.55);
}
.sched-row, .price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .72rem 0; border-bottom: 1px solid #ECE0F7;
}
.sched-row:last-child, .price-row:last-child { border-bottom: none; }
.sched-row .grp { font-weight: 700; color: #241733; }
.sched-row .when { color: #6D28D9; font-weight: 700; font-family: var(--font-head); font-size: .9rem; white-space: nowrap; }
.price-row span { color: #241733; font-weight: 600; }
.price-row b { color: #6D28D9; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.sched-br { display: none; } /* mobile-only line break inside a schedule row */
@media (max-width: 760px) {
  .sched-br { display: inline; }
  /* компактные строки: убираем row-gap (он раздвигал перенесённую строку) и лишний padding */
  .sched-row, .price-row { padding: .45rem 0; gap: 0 .8rem; line-height: 1.34; }
  .sched-row .when, .price-row b { margin-top: .1rem; }
}
.info-note { position: relative; z-index: 1; margin-top: 1.1rem; color: rgba(255,244,234,.94); font-size: .9rem; max-width: 62ch; }
.trial .info-note + .btn-cta { margin-top: 1.3rem; }

/* payment / bank details (inside the prices banner) */
.pay-note { position: relative; z-index: 1; margin-top: 1.3rem; max-width: 64ch; }
.pay-note p { color: rgba(255,244,234,.94); font-size: .92rem; margin-top: .55rem; }
.pay-note p:first-child { margin-top: 0; }
.pay-bank {
  display: flex; flex-direction: column; gap: .3rem; margin: .85rem 0;
  padding: .9rem 1.1rem; border-radius: var(--r);
  background: rgba(255,255,255,.96); box-shadow: 0 12px 30px -16px rgba(60,20,0,.5);
}
.pay-bank .pay-name { font-weight: 700; color: #241733; }
.pay-bank .pay-iban { color: #5C4A6E; font-weight: 700; font-size: .95rem; }
.pay-bank .pay-iban .num { font-family: var(--font-head); font-weight: 700; color: #6D28D9; white-space: nowrap; letter-spacing: .01em; }
.trial .pay-note + .btn-cta { margin-top: 1.3rem; }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.4vw, 1.7rem); margin-top: clamp(2.2rem, 5vw, 3.2rem); }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.6rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); }
.contact-card h3 { font-size: 1.3rem; }
.contact-card .lead { margin-top: .7rem; font-size: .98rem; }
.contact-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.4rem; }
.copy-row { display: flex; align-items: flex-start; gap: .7rem; margin-top: 1.2rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line); }
.copy-row span { flex: 1; font-size: .9rem; color: var(--muted); white-space: pre-line; }
.copy-btn { flex: 0 0 auto; padding: .5rem .9rem; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 700; font-size: .85rem; transition: background-color .2s var(--ease); }
.copy-btn:hover { background: var(--cta-hover); }
.contact-note { margin-top: 1rem; font-size: .84rem; color: var(--faint); }

.contact-line { display: flex; align-items: center; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.contact-line:last-child { border-bottom: none; }
.contact-line .ic { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: var(--tint); color: var(--cta-ink); }
.contact-line .ic svg { width: 20px; height: 20px; }
.contact-line .t { display: flex; flex-direction: column; }
.contact-line .t span { font-size: .82rem; color: var(--faint); }
.contact-line .t a, .contact-line .t b { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.contact-line .t a:hover { color: var(--cta-ink); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(3rem, 6vw, 5rem); padding-block: clamp(2.4rem, 5vw, 3.6rem) 1.6rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(1.4rem, 4vw, 3rem); }
.footer-brand p { margin-top: 1rem; max-width: 40ch; font-size: .94rem; }
.footer-col h4 { font-size: .95rem; font-weight: 700; margin-bottom: .9rem; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a, .footer-col p { color: var(--muted); font-size: .94rem; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--cta-ink); }
.footer-bottom { margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.4rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.footer-bottom p { font-size: .88rem; color: var(--faint); }
.credit { color: var(--cta-ink); font-weight: 700; }
.credit:hover { text-decoration: underline; }

/* ---------- Footer decor: magic wand + balloons ---------- */
.site-footer { position: relative; overflow: hidden; }
.site-footer .container { position: relative; z-index: 1; pointer-events: none; } /* let clicks pass to balloons behind */
.site-footer .container a, .site-footer .container button { pointer-events: auto; } /* …but keep links clickable */
.footer-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* balloons rise continuously up the footer and pop when clicked */
.fd-balloon {
  position: absolute; width: 40px; height: auto; pointer-events: auto; cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(70,25,135,.16)); -webkit-tap-highlight-color: transparent;
  animation: balloonRise 14s linear infinite;
  transform-origin: 50% 100%; will-change: top, transform; /* swing/lean from the string */
}
.fd-balloon.b1 { left: 4%;  width: 92px; top: 8%;  animation-duration: 13s;   animation-delay: -2s; }
.fd-balloon.b2 { left: 26%; width: 60px; top: 18%; animation-duration: 16s;   animation-delay: -9s; }
.fd-balloon.b3 { left: 48%; width: 64px; top: 30%; animation-duration: 12.5s; animation-delay: -5s; }
.fd-balloon.b4 { left: 70%; width: 72px; top: 22%; animation-duration: 17s;   animation-delay: -13s; }
.fd-balloon.b5 { left: 86%; width: 88px; top: 10%; animation-duration: 14.5s; animation-delay: -7s; }
.fd-balloon.popping { animation: balloonPop .22s ease-out forwards !important; transform-origin: 50% 50% !important; }
@keyframes balloonRise { 0% { top: 112%; } 100% { top: -32%; } }
/* inflate a touch, then burst (instant disappear) — the sparks do the "pop" */
@keyframes balloonPop { 0% { transform: scale(1); opacity: 1; } 55% { transform: scale(1.32); opacity: 1; } 56% { transform: scale(1.32); opacity: 0; } 100% { transform: scale(1.32); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fd-balloon { animation: none; } }
@media (max-width: 760px) {
  .fd-balloon.b1 { width: 76px; } .fd-balloon.b2 { width: 52px; } .fd-balloon.b3 { width: 56px; }
  .fd-balloon.b4 { width: 60px; } .fd-balloon.b5 { width: 72px; }
}

/* ---------- Magic wand cursor + click sparkles ---------- */
@media (hover: hover) and (pointer: fine) {
  html.wand-on, html.wand-on * { cursor: url('wand-cursor.png') 12 10, auto !important; }
}
.magic-spark {
  position: fixed; z-index: 9990; pointer-events: none; width: 8px; height: 8px;
  background: currentColor; border-radius: 50%;
  box-shadow: 0 0 8px currentColor, 0 0 2px #fff;
  transform: translate(-50%, -50%); will-change: transform, opacity;
  animation: magicSpark var(--dur, 700ms) cubic-bezier(.2,.7,.3,1) forwards;
}
.magic-spark.star {
  border-radius: 0; box-shadow: 0 0 8px currentColor;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@keyframes magicSpark {
  0%   { transform: translate(-50%,-50%) translate(0,0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%,-50%) translate(var(--dx,0), var(--dy,0)) scale(.2) rotate(150deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .magic-spark { display: none; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(140%);
  z-index: 150; display: inline-flex; align-items: center; gap: .6rem;
  background: var(--text); color: var(--bg); padding: .8rem 1.2rem; border-radius: 999px;
  font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .35s var(--ease); max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; color: var(--brand-2); }

/* ---------- Reveal (JS-gated so content is visible without JS) ---------- */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .hero-scene { transition: none; } }

/* ---------- Mobile drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(26,12,4,.5); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(86vw, 360px);
  background: var(--surface); box-shadow: var(--shadow-lg); padding: 1.2rem var(--pad) 2rem;
  transform: translateX(105%); transition: transform .32s var(--ease); display: flex; flex-direction: column; gap: .3rem;
  overflow-y: auto;
}
.mobile-drawer.open { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.m-link { padding: .95rem .4rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--text); border-bottom: 1px solid var(--line-soft); }
.m-link:hover { color: var(--cta-ink); }
.m-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.4rem; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .groups-grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-inline: auto; }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { order: -1; max-width: 480px; margin-inline: auto; width: 100%; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .trial-grid { grid-template-columns: 1fr; text-align: center; }
  .trial p { margin-inline: auto; }
}

@media (max-width: 760px) {
  /* Mobile typography: root 16 -> 18 (single bump, body stays 1rem) */
  html { font-size: 18px; }

  .primary-nav { display: none; }
  .lang-switch { display: none; }
  .lang-toggle { display: inline-flex; }
  .burger { display: inline-grid; }

  /* Symmetric header insets: gap right-to-burger == gap left-to-logo. */
  .header-inner { height: 66px; gap: .6rem; }
  /* logo + wordmark stay on ONE horizontal line next to the mark */
  .brand { font-size: .84rem; gap: .4rem; }
  .brand .mark { width: auto; height: 40px; }
  .brand .tag { display: none; }
  .header-tools { gap: .4rem; flex: none; }
  .brand { min-width: 0; }
  .icon-btn { width: 40px; height: 40px; }
  .lang-toggle { height: 40px; padding: 0 .7rem; }

  .cards { grid-template-columns: 1fr; }
  .card.wide { flex-direction: column; gap: .65rem; }
  .card.wide .ic { margin-bottom: .3rem; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  /* gallery carousel: swipe instead of arrows, wider cards */
  .gal-carousel { gap: 0; }
  .gal-c-prev, .gal-c-next { display: none; }
  .gal { width: 76vw; max-width: 320px; }

  /* hero pills: in front of cubes, but smaller + inset so they fit the screen */
  .hero-chip { font-size: .68rem; padding: .34rem .6rem; gap: .3rem; }
  .hero-chip svg { width: 14px; height: 14px; }
  .hero-chip.t { top: 52%; right: 10%; transform: translateZ(200px); }
  .hero-chip.b { bottom: 5%; left: 11%; transform: translateZ(205px); }
  /* hero eyebrow on a single line, +10% size */
  .hero .eyebrow { white-space: nowrap; font-size: 1.01rem; padding: .42rem .85rem; }

  /* Footer: hide sections + contacts on mobile, keep brand + credit */
  .footer-col { display: none; }
  /* brand block aligned to the left edge on mobile */
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .footer-brand p { margin-inline: 0; }
  /* поднимаем нижнюю строку («Сделано в…») примерно на одну строку выше */
  .footer-bottom { justify-content: flex-start; text-align: left; margin-top: .6rem; padding-top: .9rem; gap: .2rem; }
  .gl-thumbs { display: none; }
  /* mobile lightbox: full-width bigger image, arrows overlaid on the edges */
  .gl-stage { gap: 0; }
  .gl-frame { width: 100%; padding: 6px; }
  .gl-img { max-height: 74vh; width: 100%; }
  .gl-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; z-index: 2; background: color-mix(in srgb, var(--surface) 90%, transparent); }
  .gl-arrow:hover { transform: translateY(-50%) scale(1.06); }
  .gl-prev { left: 8px; }
  .gl-next { right: 8px; }
}

@media (max-width: 420px) {
  .gal { width: 82vw; }
  .hero-meta { gap: 1.1rem 1.6rem; }
}

/* narrow phones (iPhone with Display Zoom, SE, or enlarged Safari text): wordmark wraps to two lines, controls never overlap it */
@media (max-width: 420px) {
  .brand b { display: block; white-space: normal; width: min-content; line-height: 1.05; }
}
@media (max-width: 350px) {
  .brand .mark { height: 34px; }
  .header-tools { gap: .3rem; }
  .icon-btn { width: 36px; height: 36px; }
  .lang-toggle { height: 36px; padding: 0 .55rem; }
}
