/* Ігри для розваги · «Бенто-ігротека»: плитки різних розмірів, помаранчевий акцент, талісман Фішка */
:root {
  --bg: #FBF7EE;
  --ink: #1E1B2E;
  --yellow: #F5CF45;
  --purple: #8B4DF0;
  --lavender: #EFE9FB;
  --pink: #EE82D8;
  --coral: #EC5770;
  --cream: #FFFBEA;
  --orange: #FF7A1A;
  --orange-soft: #FFE7D1;
  --orange-text: #B54608;   /* помаранчевий для тексту на світлих тлах — контраст AA */
  --white: #FFFFFF;
  --muted: #4A4660;
  --tile-radius: 32px;
  --tile-pad: 28px;
  --gap: 20px;
  --shadow: 0 14px 30px rgba(30, 27, 46, .12);
  --wrap: 1200px;
  --header-h: 72px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading: "Fredoka", "Baloo 2", "Onest", system-ui, sans-serif;
  /* змінні, які успадковують міні-ігри */
  --paper: var(--white);
  --card: var(--cream);
  --accent: var(--orange);
  --accent-text: var(--ink);
  --line: rgba(30, 27, 46, .22);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.6 var(--font); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-text); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: inherit; line-height: 1.08; margin: 0 0 .45em; overflow-wrap: anywhere; }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 23px; line-height: 1.15; }
@media (min-width: 769px) { h1 { font-size: 56px; } h2 { font-size: 40px; } }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
/* виділення важливого: помаранчеве підкреслення */
.hl { background: linear-gradient(transparent 62%, var(--orange) 62%, var(--orange) 88%, transparent 88%); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--orange); color: var(--ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content;
  padding: 14px 26px; border: 0; border-radius: 999px;
  background: var(--orange); color: var(--ink);
  font: 600 17px/1.2 var(--heading); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255, 122, 26, .35); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px currentColor, 0 8px 18px rgba(30, 27, 46, .12); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.actions.left { justify-content: flex-start; }
@media (max-width: 768px) { .actions .btn { width: 100%; } }

/* кругла кнопка-стрілка в кутку плитки */
.arrow {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--white); text-decoration: none;
  transition: transform .25s ease;
}
.arrow svg { width: 20px; height: 20px; }
.arrow:hover, .arrow:focus-visible { transform: rotate(45deg); }
.tile.has-arrow { padding-right: calc(var(--tile-pad) + 44px); }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(251, 247, 238, .92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(30, 27, 46, .08); }
.site-header .bar { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 22px/1 var(--heading); }
.logo svg { width: 44px; height: 44px; flex: 0 0 auto; }
.top-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.top-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font: 500 16px/1.2 var(--font); }
.top-nav a:hover { background: var(--orange-soft); }
.header-right { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--white); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 768px) {
  .top-nav, .header-right .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header .bar { padding: 0 16px; }
}

/* ---------- мобільне меню: виїжджає зліва ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 90;
  width: min(320px, 86vw); padding: 20px 20px 28px;
  background: var(--cream); border-radius: 0 var(--tile-radius) var(--tile-radius) 0;
  box-shadow: 0 0 40px rgba(30, 27, 46, .25);
  overflow-y: auto; transform: translateX(-104%); transition: transform .3s ease; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-top .logo { font-size: 19px; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.drawer-close { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--orange); color: var(--ink); font: 700 28px/1 var(--heading); cursor: pointer; }
.drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drawer li a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--white); color: var(--ink); text-decoration: none; font: 600 18px/1.2 var(--heading); }
.drawer li a::before { content: ""; flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--c, var(--orange)); }
.drawer p { margin: 20px 0 8px; font: 600 14px/1.2 var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(30, 27, 46, .5); opacity: 0; transition: opacity .3s ease; }
.drawer-backdrop.show { opacity: 1; }
body.menu-open { overflow: hidden; }
@media (min-width: 769px) { .drawer, .drawer-backdrop { display: none !important; } }

/* ---------- сітка bento ---------- */
main { display: block; }
.section { padding: 28px 20px; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.bento { display: grid; gap: var(--gap); grid-template-columns: 1fr; grid-auto-flow: dense; }
@media (min-width: 769px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 769px) {
  .s-2 { grid-column: span 2; }
  .s-full { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .s-3 { grid-column: span 3; }
  .s-4 { grid-column: span 4; }
  .r-2 { grid-row: span 2; }
}

.tile {
  position: relative; min-width: 0;
  padding: var(--tile-pad); border-radius: var(--tile-radius);
  background: var(--white); color: var(--ink);
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile p:last-child, .tile ul:last-child, .tile ol:last-child { margin-bottom: 0; }
.tile .kicker { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); font: 600 13px/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; }
.tile h2 { font-size: 32px; }
@media (min-width: 769px) { .tile h2 { font-size: 40px; } }
.tile.big h2 { max-width: 14ch; }
/* кольори плиток: білий текст лише на фіолетовому, на решті — темний */
.t-yellow { background: var(--yellow); }
.t-purple { background: var(--purple); color: var(--white); }
.t-purple a:not(.btn) { color: var(--white); }
.t-lavender { background: var(--lavender); }
.t-pink { background: var(--pink); }
.t-coral { background: var(--coral); }
.t-cream { background: var(--cream); }
.t-orange { background: var(--orange-soft); }
.t-ink { background: var(--ink); color: var(--white); }
/* легкий нахил частини плиток; на hover — рівно й трохи вгору */
@media (min-width: 769px) {
  .tilt-l { transform: rotate(-1.2deg); }
  .tilt-r { transform: rotate(1.2deg); }
  .tilt-s { transform: rotate(-.6deg); }
}
@media (max-width: 768px) {
  .tilt-l { transform: rotate(-.5deg); }
  .tilt-r { transform: rotate(.5deg); }
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* поява плиток при скролі */
.reveal { opacity: 0; translate: 0 26px; transition: opacity .55s ease var(--d, 0s), translate .55s ease var(--d, 0s), transform .3s ease, box-shadow .3s ease; }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- порада ---------- */
.tip { background: var(--orange-soft); padding-left: calc(var(--tile-pad) + 6px); overflow: hidden; }
.tip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--orange); }
.tip-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--orange); color: var(--ink); font: 600 15px/1 var(--heading); }
.tip-badge svg { width: 22px; height: 22px; }
.tip strong { color: var(--orange-text); }

/* ---------- hero ---------- */
.hero { padding-top: 28px; }
.hero h1 { max-width: 13ch; }
.hero .lead { font-size: 19px; max-width: 46ch; }
.hero-main { padding: 40px var(--tile-pad); }
.mascot-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.mascot-tile svg.fishka { width: min(220px, 70%); margin: 0 auto 10px; }
.mascot-tile p { margin: 0; font: 600 20px/1.3 var(--heading); }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; }
.stat b { display: block; font: 700 54px/1 var(--heading); color: var(--orange-text); }
.t-purple .stat b, .stat.t-purple b { color: var(--white); }
.stat span { font: 500 17px/1.35 var(--font); }

/* плитка з грою */
.game-tile { display: flex; flex-direction: column; gap: 14px; }
.game-tile .game { background: transparent; border: 0; padding: 0; max-width: 460px; margin: 0 auto; width: 100%; }
.game-tile .game-intro { display: flex; align-items: center; gap: 14px; }
.game-tile .game-intro svg.fishka { width: 64px; flex: 0 0 64px; }
.game-tile .game-intro p { margin: 0; font: 600 18px/1.3 var(--heading); }

/* ---------- FAQ ---------- */
.faq { counter-reset: q; display: grid; gap: 12px; }
.faq-item { counter-increment: q; background: var(--white); border-radius: 22px; }
.faq-q { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; background: none; border: 0; border-radius: 22px; color: var(--ink); font: 600 19px/1.3 var(--heading); text-align: left; cursor: pointer; }
.faq-q::before { content: counter(q); flex: 0 0 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--orange); font: 700 16px/1 var(--heading); }
.faq-q::after { content: "+"; margin-left: auto; flex: 0 0 auto; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--orange-soft); font: 700 24px/1 var(--heading); transition: transform .25s ease; }
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-a { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s ease, opacity .3s ease; }
.faq-a > div { padding: 0 20px 18px 70px; }
.faq-a p { margin: 0; }
.faq-item.open .faq-a { opacity: 1; }
@media (max-width: 768px) { .faq-a > div { padding-left: 20px; } }

/* ---------- списки на внутрішніх сторінках ---------- */
.steps { list-style: none; counter-reset: s; margin: 0 0 1em; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding: 4px 0 14px 54px; min-height: 48px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--orange); font: 700 17px/1 var(--heading); }
.dots { list-style: none; margin: 0 0 1em; padding: 0; }
.dots > li { position: relative; padding: 0 0 10px 26px; }
.dots > li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }
.tel { display: block; margin: 4px 0 8px; font: 700 30px/1.1 var(--heading); color: inherit; text-decoration: none; }
.small { font-size: 15px; }
.nf-code { font: 700 120px/1 var(--heading); color: var(--orange-text); margin: 0; }

/* ---------- футер ---------- */
.site-footer { margin-top: 28px; padding: 0 20px 24px; }
.footer-box { max-width: var(--wrap); margin: 0 auto; padding: 36px var(--tile-pad) 22px; border-radius: var(--tile-radius); background: var(--ink); color: #F3F0FA; }
.footer-cols { display: grid; gap: 28px; }
@media (min-width: 769px) { .footer-cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .logo { color: #F3F0FA; }
.site-footer h2 { font-size: 20px; color: var(--yellow); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: #F3F0FA; }
.site-footer :focus-visible { outline-color: var(--yellow); }
.copy { margin: 28px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(243, 240, 250, .2); font-size: 14px; color: #D2CEE0; }
.footnote { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: #D2CEE0; }
.footnote p { margin: 0 0 6px; }

/* ---------- cookies ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
  max-width: 560px; margin: 0 auto; padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border-radius: 24px; box-shadow: 0 12px 32px rgba(30, 27, 46, .2); font-size: 16px;
}
.cookie p { margin: 0; flex: 1 1 240px; }
.cookie .btn { padding: 10px 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .tile, .btn, .arrow, .drawer, .drawer-backdrop, .faq-a, .faq-q::after { transition: none; }
  .tile:hover, .btn:hover { transform: none; }
  .tilt-l, .tilt-r, .tilt-s { transform: none; }
}

/* Фішка в плитках */
.tile-mascot svg.fishka { width: 96px; margin: 6px 0 0; }
.tile-mascot.corner { position: absolute; top: 18px; right: 22px; }
.tile-mascot.corner svg.fishka { width: 84px; margin: 0; }
@media (max-width: 768px) { .tile-mascot.corner svg.fishka { width: 64px; } }
.faq-tile h2 { padding-right: 90px; }
