/* Сайт Wordwood — в стиле игры: тёплый лес, кремовая бумага, дерево, оранжевый Рыжик.
   Шрифты свои (без сторонних серверов): Fredoka — название, Unbounded — заголовки, Nunito — текст. */
@font-face { font-family: 'Fredoka'; src: url('fonts/fredoka-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Unbounded'; src: url('fonts/unbounded-cyrillic-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0400-04FF; }
@font-face { font-family: 'Unbounded'; src: url('fonts/unbounded-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+00AB, U+00BB; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-cyrillic-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0400-04FF; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+00AB, U+00BB, U+2026; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-cyrillic-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0400-04FF; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+00AB, U+00BB, U+2026; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-cyrillic-900-normal.woff2') format('woff2'); font-weight: 900; font-display: swap; unicode-range: U+0400-04FF; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-latin-900-normal.woff2') format('woff2'); font-weight: 900; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+00AB, U+00BB, U+2026; }

:root {
  --forest: #244d3e; --forest-deep: #183a2e; --cream: #fff4de; --paper: #fff7e6; --paper-2: #fbe9c6;
  --wood: #c8955a; --wood-dark: #8a5a2c; --wood-ink: #4a2e17;
  --fox: #de753d; --fox-dark: #a94e22; --green: #5f9a52; --leaf: #3f6a2c; --sun: #f1c760;
  --ink: #20332c; --ink-soft: #4a5d55;
  --radius: 26px; --radius-s: 16px;
  --shadow: 0 5px 0 rgba(110, 70, 30, 0.35), 0 14px 30px rgba(15, 25, 12, 0.28);
  --shadow-soft: 0 3px 0 rgba(110, 70, 30, 0.25), 0 10px 22px rgba(15, 25, 12, 0.16);
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Nunito', system-ui, sans-serif;
  --font-brand: 'Fredoka', 'Nunito', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 600 18px/1.6 var(--font); overflow-x: hidden; }
img, video, iframe { display: block; max-width: 100%; }
a { color: var(--fox-dark); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--paper); border-radius: 12px; }
.skip:focus { left: 16px; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { width: min(860px, 100%); }

/* кнопки как в игре: выпуклое дерево и оранжевая ягода */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 0; border-radius: 999px; font: 900 19px/1.1 var(--font); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { color: #fff; background: linear-gradient(180deg, #f3934f, var(--fox) 55%, #c95f27); box-shadow: 0 5px 0 var(--fox-dark), 0 12px 24px rgba(169, 78, 34, 0.35); text-shadow: 0 1px 0 rgba(120, 50, 10, 0.35); }
.btn--primary svg { fill: currentColor; stroke: none; }
.btn--wood { color: var(--wood-ink); background: linear-gradient(180deg, #fff3d8, #ecd09c); box-shadow: 0 5px 0 #b7834a, 0 10px 20px rgba(60, 35, 10, 0.22); border: 2px solid #b7834a; }
.btn--big { min-height: 68px; padding: 0 34px; font-size: 22px; }
.btn--small { min-height: 46px; padding: 0 18px; font-size: 16px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--fox-dark); }
.btn--wood:active { box-shadow: 0 2px 0 #b7834a; }
.btn[aria-disabled='true'] { opacity: .62; cursor: default; transform: none; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter); padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: rgba(24, 58, 46, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.top__brand { display: inline-flex; align-items: center; gap: 10px; color: #fff6df; text-decoration: none; font: 700 26px/1 var(--font-brand); letter-spacing: .01em; }
.top__brand img { border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.top__nav { display: flex; gap: 6px; margin-left: auto; }
.top__nav a { color: #fff1d0; text-decoration: none; font-weight: 800; font-size: 16px; padding: 8px 12px; border-radius: 999px; }
.top__nav a:hover { background: rgba(255, 244, 222, .14); }
.top__cta { margin-left: 8px; }
@media (max-width: 900px) { .top__nav { display: none; } .top__cta { margin-left: auto; } }
.top--doc .top__nav--doc { display: flex; }

/* первый экран: живой лес из игры с Рыжиком */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: center; padding: clamp(28px, 6vw, 64px) var(--gutter); overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero__video { opacity: 0; transition: opacity .8s ease; }
.hero__video.is-on { opacity: 1; }
.hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 40, 30, 0) 30%, rgba(18, 40, 30, .35) 62%, rgba(18, 40, 30, .55)); }
.hero__card { position: relative; margin-left: auto; width: min(560px, 100%); padding: clamp(22px, 3.4vw, 38px); border-radius: 30px; background: linear-gradient(180deg, rgba(255, 249, 236, .96), rgba(251, 233, 198, .96)); border: 3px solid #d9b27c; box-shadow: 0 6px 0 #8a5a2c, 0 26px 60px rgba(10, 20, 10, .45); }
.hero__card::before { content: ''; position: absolute; top: -18px; left: -14px; width: 70px; height: 50px; background: radial-gradient(ellipse 18px 11px at 26px 30px, #9ccf7c 98%, transparent), radial-gradient(ellipse 14px 9px at 46px 18px, #7fb55e 98%, transparent); transform: rotate(-12deg); }
.hero__kicker { font-weight: 900; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--leaf); }
.hero h1 { margin: 8px 0 14px; }
.brand-word { display: block; font: 700 clamp(56px, 8vw, 92px)/.95 var(--font-brand); color: #fff6df; -webkit-text-stroke: 3px #2d5a2f; paint-order: stroke fill; text-shadow: 0 5px 0 #2d5a2f, 0 10px 22px rgba(20, 40, 20, .35); letter-spacing: .01em; }
.hero__sub { display: block; margin-top: 12px; font: 800 clamp(20px, 2.4vw, 26px)/1.2 var(--font-display); color: var(--forest); }
.hero__lead { color: var(--ink-soft); font-size: clamp(17px, 1.6vw, 19px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts li { padding: 6px 12px; border-radius: 999px; background: #f4e3bd; border: 2px solid #e3c58f; font-weight: 800; font-size: 15px; color: var(--wood-ink); }
.facts b { color: var(--fox-dark); font-weight: 900; }
@media (max-width: 760px) {
  .hero { min-height: auto; align-items: flex-end; padding-top: 52vh; }
  .hero__bg img, .hero__video { object-position: 50% 15%; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(18, 40, 30, 0) 35%, rgba(18, 40, 30, .45) 70%); }
  .hero__card { margin: 0 auto; }
  .hero__actions .btn { flex: 1 1 100%; }
}
/* телефон: картинка с Рыжиком сверху во всю ширину, карточка начинается сразу под пеньком (без пустой травы) */
@media (orientation: portrait) and (max-width: 760px) {
  .hero { padding-top: calc(100vw * 0.74); padding-bottom: 28px; }
  .hero__bg img, .hero__video { height: calc(100vw * 1.12); bottom: auto; object-position: 50% 0%; }
  .hero__bg { background: linear-gradient(180deg, #57752f, #e9d6a8 calc(100vw * 1.5), var(--cream)); }
  .hero__bg::after { background: linear-gradient(180deg, rgba(18, 40, 30, 0) 60%, rgba(18, 40, 30, .25)); height: calc(100vw * 1.12); }
}

/* разделы */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.title { font: 800 clamp(28px, 3.6vw, 42px)/1.15 var(--font-display); color: var(--forest); text-align: center; text-wrap: balance; }
.lead { max-width: 720px; margin: 14px auto 0; text-align: center; color: var(--ink-soft); font-size: clamp(17px, 1.6vw, 20px); text-wrap: pretty; }
.note { margin-top: 12px; text-align: center; color: var(--ink-soft); font-size: 15px; }
.section--play { background: linear-gradient(180deg, var(--cream), #f6e6c4); }
.section--how { background: var(--forest); color: #fff1d0; }
.section--how .title { color: #fff6df; }
.section--how .lead { color: #e6dcc0; }
.section--shots { background: #f6e6c4; overflow: hidden; }
.section--video { background: linear-gradient(180deg, #f6e6c4, var(--cream)); padding-top: 0; }
.section--parents { background: var(--cream); }
.section--apps { background: radial-gradient(ellipse at 50% 0%, #2f604d, var(--forest-deep)); color: #fff1d0; }
.section--apps .title { color: #fff6df; }
.section--apps .lead { color: #e6dcc0; }
.section--faq { background: var(--cream); }

/* игра на странице */
.player { margin-top: 28px; }
.player__frame { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden; background: #22362e; border: 8px solid #c98b55; box-shadow: var(--shadow), inset 0 0 0 3px #7a4e2a; }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__start { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #22362e; }
.player__start img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) brightness(.82); transition: filter .3s ease; }
.player__start:hover img { filter: saturate(1.1) brightness(.92); }
.player__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; min-height: 76px; padding: 0 38px; border-radius: 999px; color: #fff; font: 900 clamp(20px, 2.4vw, 26px)/1 var(--font); background: linear-gradient(180deg, #f3934f, var(--fox) 55%, #c95f27); box-shadow: 0 6px 0 var(--fox-dark), 0 16px 34px rgba(0, 0, 0, .4); white-space: nowrap; }
.player__play svg { width: 30px; height: 30px; fill: currentColor; }
.player__bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.player.is-on .player__start { display: none; }
.player__frame:fullscreen { border: 0; border-radius: 0; }
@media (orientation: portrait) and (max-width: 760px) { .player__frame { aspect-ratio: 9 / 15; max-height: 78vh; margin: 0 auto; } }

/* цепочка обучения */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 14px 14px 22px; border-radius: var(--radius); background: linear-gradient(180deg, var(--paper), var(--paper-2)); color: var(--ink); box-shadow: 0 6px 0 #0f2a20, 0 18px 34px rgba(0, 0, 0, .3); counter-increment: step; }
.step img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; border: 3px solid #d9b27c; }
.step h3 { margin: 16px 6px 6px; font: 800 20px/1.2 var(--font-display); color: var(--forest); }
.step h3::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 50%; color: #fff; font: 900 18px/1 var(--font); background: var(--fox); box-shadow: 0 3px 0 var(--fox-dark); vertical-align: 2px; }
.step p { margin: 0 6px; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* снимки: листаются вбок */
.shots { display: flex; gap: 20px; margin-top: 32px; padding: 6px var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--wood) transparent; }
.shots figure { flex: none; margin: 0; scroll-snap-align: center; width: clamp(200px, 22vw, 270px); }
.shots img { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow-soft); }
.shots figure.is-wide { width: clamp(300px, 46vw, 560px); }

/* видео */
.video { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 8px solid #c98b55; box-shadow: var(--shadow); background: #22362e; }
.video video { width: 100%; height: auto; }

/* карточки для родителей */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.card { padding: 22px 22px 24px; border-radius: var(--radius); background: linear-gradient(180deg, var(--paper), var(--paper-2)); border: 2px solid #e3c58f; box-shadow: var(--shadow-soft); }
.card h3 { font: 800 19px/1.25 var(--font-display); color: var(--forest); margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* приложение */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 36px; }
.app { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius); background: linear-gradient(180deg, var(--paper), var(--paper-2)); color: var(--ink); box-shadow: 0 6px 0 #0f2a20, 0 18px 34px rgba(0, 0, 0, .3); }
.app__head { display: flex; align-items: center; gap: 12px; }
.app__head svg { width: 40px; height: 40px; fill: none; stroke: var(--forest); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app h3 { font: 800 22px/1.2 var(--font-display); color: var(--forest); }
.app p { color: var(--ink-soft); font-size: 16px; }
.app__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.app__meta { font-size: 14px; color: var(--ink-soft); }
.app ol { margin: 0; padding-left: 22px; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 760px) { .apps { grid-template-columns: 1fr; } .app__actions .btn { flex: 1 1 100%; } }

/* вопросы */
details { margin-top: 14px; border-radius: 20px; background: var(--paper); border: 2px solid #e3c58f; box-shadow: var(--shadow-soft); }
summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative; font: 800 18px/1.35 var(--font); color: var(--forest); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--fox); color: #fff; font: 900 20px/1 var(--font); box-shadow: 0 3px 0 var(--fox-dark); }
details[open] summary::after { content: '–'; }
details p { padding: 0 22px 20px; color: var(--ink-soft); font-size: 17px; }
.section--faq .title { margin-bottom: 18px; }

/* подвал */
.foot { background: var(--forest-deep); color: #d9cfb5; padding: 34px 0 calc(34px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot__brand { display: inline-flex; align-items: center; gap: 10px; color: #fff6df; font: 700 22px/1 var(--font-brand); }
.foot__brand img { border-radius: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: #ffd39a; font-weight: 800; }
.foot p { margin-left: auto; }
@media (max-width: 700px) { .foot p { margin-left: 0; } }

/* страница политики */
.doc { background: linear-gradient(180deg, #f6e6c4, var(--cream) 400px); }
.policy { width: min(860px, 100%); margin: 0 auto; padding: 32px var(--gutter) 64px; display: grid; gap: 28px; }
.policy__card { padding: clamp(22px, 4vw, 42px); border-radius: var(--radius); background: var(--paper); border: 2px solid #e3c58f; box-shadow: var(--shadow-soft); }
.policy h1, .policy .policy__title { margin: 0; font: 800 clamp(26px, 4vw, 36px)/1.2 var(--font-display); color: var(--forest); }
.policy h2 { margin: 26px 0 6px; font: 800 20px/1.3 var(--font-display); color: var(--forest); }
.policy p, .policy li { color: var(--ink); font-size: 17px; }
.policy p + p { margin-top: 10px; }
.policy ul { margin: 0; padding-left: 22px; }
.muted { margin-top: 8px !important; color: var(--ink-soft) !important; font-size: 15px !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .player__start img, .hero__video { transition: none; }
  .btn:hover { transform: none; }
}
@media (max-width: 760px) {
  .btn--big { min-height: 62px; padding: 0 20px; font-size: 19px; }
  .btn { white-space: nowrap; }
}
/* длинные адреса (сайт, почта) переносятся и не дают прокрутки вбок на узком телефоне */
.policy p, .policy li { overflow-wrap: anywhere; }
@media (max-width: 420px) { .top--doc .top__nav a { padding: 8px 8px; font-size: 15px; } .top__brand { font-size: 22px; } .top__brand img { width: 34px; height: 34px; } }
.policy { grid-template-columns: minmax(0, 1fr); }
.policy h1, .policy .policy__title, .policy h2 { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 420px) { .policy h1, .policy .policy__title { font-size: 23px; } .policy__card { padding: 20px 16px; } }
.player__start picture { position: absolute; inset: 0; } .player__start picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.section, .hero { scroll-margin-top: 76px; }

/* кнопка «Наверх»: круглая деревянная, справа внизу, появляется после первого экрана */
.to-top { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; min-width: 56px; padding: 0 20px 0 16px; border-radius: 999px; color: var(--wood-ink); text-decoration: none; font: 900 16px/1 var(--font); background: linear-gradient(180deg, #fff3d8, #ecd09c); border: 2px solid #b7834a; box-shadow: 0 5px 0 #b7834a, 0 12px 24px rgba(30, 20, 5, .3); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.to-top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:active { transform: translateY(3px); box-shadow: 0 2px 0 #b7834a; }
@media (max-width: 600px) { .to-top { padding: 0; width: 56px; justify-content: center; } .to-top span { display: none; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
