/* Kind Dragon Games. Цвета маскота: слоновая кость, зелёная чешуя, золото рогов.
   Каждая игра — своё цветовое поле: луг великанов и земля раскопа. */
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url(unbounded-cyrillic-700.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url(unbounded-latin-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ivory: #fef9e6;
  --ivory-2: #f6edcc;
  --ink: #17240f;
  --forest: #2f5d1f;
  --forest-2: #3a6e27;
  --night: #1b3410;
  --leaf: #c3e27a;
  --gold: #f2b824;
  --gold-2: #ffd35c;
  --earth: #2a1b10;
  --earth-2: #3a2717;
  --sand: #f3dca0;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --m: clamp(20px, 4vw, 56px);
  --gap: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* полей ввода на сайте нет: мигающий курсор в тексте и синяя подсветка тапа не нужны */
body { margin: 0; background: var(--ivory); color: var(--ink); font: 18px/1.55 var(--text); caret-color: transparent; -webkit-tap-highlight-color: transparent; }
img, video { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; }
/* заголовки, кнопки, карточки и картинки не выделяются при кликах; обычный текст и почта — выделяются, чтобы их можно было скопировать */
h1, h2, h3, img, video, .bar, .btn, .acts, .stores, .host, .bubble, .route, .steps b, .facts dt, .socials, .end .links, .end .name {
  -webkit-user-select: none; user-select: none;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.03em; line-height: .98; }
p { margin: 0; }
.frame { padding-left: var(--m); padding-right: var(--m); max-width: 1520px; margin: 0 auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--m); top: 8px; z-index: 10; background: var(--gold); padding: 8px 14px; }

/* кнопки: плоские, круглые, одна заливка */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 17px;
  text-decoration: none; transition: transform .18s var(--ease), background-color .18s;
}
.btn:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.dark { background: var(--ink); color: var(--ivory); }
.btn.dark:hover { background: var(--forest); }
.btn.line { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn.line:hover { background: rgba(255, 255, 255, .12); }

/* шапка */
.bar { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.mark { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-family: var(--display); font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.mark img { width: 40px; height: 40px; }
.nav { display: flex; gap: 26px; }
.nav a, .lang a { text-decoration: none; font-weight: 600; }
.nav a:hover, .lang a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.lang { display: flex; gap: 2px; font-size: 15px; }
.lang a, .lang span { padding: 6px 10px; border-radius: 999px; }
.lang span { background: var(--ink); color: var(--ivory); font-weight: 700; }
.bar .btn { min-height: 44px; padding: 0 20px; font-size: 16px; }

/* первый экран: огромное имя студии и дракон, который здоровается */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: min(calc(100svh - 76px), 860px); padding-bottom: 32px; }
/* «Kind Dragon» в Unbounded шириной ≈7,4 кегля: размер привязан к ширине колонки, чтобы имя всегда было в две строки */
.hero h1 { font-size: min(6.2vw, 112px); white-space: nowrap; }
.hero h1 span { display: block; }
.hero .say { margin-top: 32px; max-width: 30em; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.45; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.host { position: relative; justify-self: center; width: min(100%, 560px); }
.host button { all: unset; display: block; width: 100%; cursor: pointer; border-radius: 40px; }
.host button:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.host img { width: 100%; transform-origin: 50% 100%; }
.host.hop img { animation: hop .7s ease-in-out; }
@keyframes hop { 45% { transform: translateY(-16px) rotate(-2deg); } }
.host.hop .bubble { animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.94); opacity: .4; } }
/* облачко всегда поверх дракона и левее его головы */
.bubble {
  position: absolute; z-index: 2; top: 0; right: 68%; width: min(300px, 70%); padding: 16px 20px; border-radius: 26px 26px 6px 26px;
  background: var(--ink); color: var(--ivory); font-size: 16px; line-height: 1.4; font-weight: 600;
}

/* общая сетка разделов */
.sec { padding-top: var(--gap); padding-bottom: var(--gap); }
.sec h2 { font-size: clamp(40px, 6.4vw, 104px); }
.lede { max-width: 34em; font-size: clamp(19px, 1.5vw, 23px); line-height: 1.45; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* «Укротитель великанов»: зелёный луг */
.giants { background: var(--forest); color: var(--ivory); }
/* «Укротитель» ≈7,8 кегля: влезает в половину ширины */
.giants h2 { color: var(--ivory); font-size: min(5.3vw, 84px); }
.giants .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; }
.giants .lede { color: #e9f3d2; }
.giants .stage { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); margin-top: clamp(48px, 6vw, 88px); }
.giants .stage > img { width: 100%; height: 100%; object-fit: cover; }
.phone { position: relative; border-radius: 28px; overflow: hidden; background: var(--night); aspect-ratio: 9 / 16; }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; }
.route-h { margin-top: clamp(64px, 8vw, 120px); font-size: clamp(26px, 2.6vw, 40px); color: var(--leaf); }
.route { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); margin: 28px 0 0; padding: 0; list-style: none; }
.route img { width: 100%; border-radius: 20px; aspect-ratio: 9 / 16; object-fit: cover; }
.route b { display: block; margin-top: 14px; font-family: var(--display); font-size: clamp(17px, 1.4vw, 21px); letter-spacing: -0.02em; color: var(--gold-2); }
.route span { display: block; color: #d7e7b5; font-size: 16px; }
.giants .stores { margin-top: clamp(48px, 5vw, 72px); }

/* мир студии: одна широкая картинка как пауза */
.world { display: block; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }

/* «Раскопки»: земля раскопа */
.dig { background: var(--earth); color: var(--sand); }
.dig h2 { color: var(--gold); }
.dig h2 span { display: block; }
.dig h2 > span:first-child { font-size: 1em; }
.dig h2 > .sub { font-size: .52em; color: var(--sand); margin-top: .12em; letter-spacing: -0.02em; }
.js .dig h2[data-in] > * { transform: none; }
.dig .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 40px 64px; align-items: center; margin-top: clamp(32px, 4vw, 56px); }
.dig .lede { color: var(--sand); }
.dig .top > img { width: 100%; }
.dig .stores { margin-top: 36px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 32px); margin: clamp(64px, 8vw, 120px) 0 0; padding: 0; list-style: none; counter-reset: none; }
.steps li:nth-child(even) { margin-top: clamp(0px, 6vw, 96px); }
.steps img { width: 100%; border-radius: 20px; aspect-ratio: 390 / 844; object-fit: cover; }
.steps b { display: block; margin-top: 18px; font-family: var(--display); font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -0.02em; color: var(--ivory); }
.steps span { display: block; margin-top: 6px; font-size: 17px; color: #e6d3a6; }
/* подробности об игре: три колонки текста на земле раскопа, без карточек */
.extra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 64px); margin: clamp(72px, 9vw, 128px) 0 0; }
.extra dt { font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.02em; line-height: 1.1; color: var(--gold); -webkit-user-select: none; user-select: none; }
.extra dd { margin: 12px 0 0; font-size: 17px; color: #e6d3a6; }

/* «Сортируй по-своему»: светлое шалфейное поле, как фон самой игры; скриншоты стоят на деревянной полке */
.sorter { --plank: #c08a52; --plank-edge: #8f5e30; --g: clamp(12px, 1.6vw, 24px); background: #e4ecd6; color: var(--ink); }
.sorter h2 { color: var(--forest); font-size: min(5.3vw, 84px); }
/* «по-своему» не рвётся на дефисе */
.sorter h2 .nw { white-space: nowrap; }
.sorter .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px clamp(32px, 5vw, 72px); align-items: center; }
.sorter .wide { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 24px; background: var(--night); }
.sorter .kind { margin-top: 14px; color: #4d5b40; font-size: 16px; }
.sorter .lede { margin-top: 24px; }
.sorter .stores { margin-top: 32px; }
.sorter .note { margin-top: 14px; color: #4d5b40; font-size: 16px; }
.sorter .extra dt { color: var(--forest); }
.sorter .extra dd { color: var(--ink); }
.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--g); margin: clamp(72px, 9vw, 128px) 0 0; padding: 0; list-style: none; overflow: hidden; }
.shelf img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px 18px 4px 4px; }
/* доска полки собирается из кусков под каждым скриншотом и закрывает промежутки между ними */
.shelf b::before { content: ""; display: block; height: 12px; margin: 0 calc(var(--g) / -2 - 1px) 18px; background: var(--plank); border-bottom: 7px solid var(--plank-edge); }
.shelf li:first-child b::before { margin-left: 0; border-radius: 4px 0 0 4px; }
.shelf li:last-child b::before { margin-right: 0; border-radius: 0 4px 4px 0; }
.shelf b { display: block; font-family: var(--display); font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -0.02em; color: var(--forest); -webkit-user-select: none; user-select: none; }
.shelf span { display: block; margin-top: 6px; font-size: 16px; color: #3f4b34; }

/* о студии */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px 72px; align-items: start; }
.about .statement { margin-top: 32px; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.35; max-width: 22em; }
.about .more { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 1.3vw, 20px); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.facts div { background: var(--ivory-2); border-radius: 28px; padding: 26px 28px; }
.facts dt { font-size: 16px; font-weight: 600; }
.facts dd { margin: 6px 0 0; font-family: var(--display); font-size: clamp(22px, 2.3vw, 34px); letter-spacing: -0.02em; line-height: 1.08; color: var(--forest); }
.facts .wide { grid-column: 1 / -1; }

/* контакты: золотое поле */
.talk { background: var(--gold); color: var(--ink); }
.talk h2 { max-width: 10em; }
.mail { display: inline-block; margin-top: clamp(32px, 4vw, 56px); font-family: var(--display); font-size: clamp(26px, 5.2vw, 84px); letter-spacing: -0.035em; line-height: 1.05; text-decoration: none; }
.mail:hover { text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 10px; }
.talk .lede { margin-top: 20px; }
.socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; list-style: none; }
.socials a { display: block; height: 100%; padding: 26px 28px 28px; border-radius: 28px; background: var(--ink); color: var(--ivory); text-decoration: none; transition: transform .18s var(--ease), background-color .18s; }
.socials a:hover { background: var(--forest); transform: translateY(-4px); }
.socials b { display: block; font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.02em; }
.socials span { display: block; margin-top: 8px; color: #d9e4c4; }
.socials i { font-style: normal; display: block; margin-top: 18px; color: var(--gold-2); font-weight: 700; }

/* подвал: имя студии во всю ширину */
.end { background: var(--night); color: var(--ivory); padding-top: 48px; overflow: hidden; }
.end .links { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; font-size: 16px; }
.end .links a { text-decoration-color: var(--gold); text-underline-offset: 4px; }
.end .links a:hover { color: var(--gold-2); }
.end .links .copy { margin-left: auto; color: #b9c9a3; }
/* «Kind Dragon Games» ≈12 кеглей шириной: 7,6vw занимает всю ширину между полями */
.end .name { margin-top: 40px; font-family: var(--display); font-weight: 700; color: var(--gold); font-size: min(7.6vw, 116px); letter-spacing: -0.04em; line-height: .9; white-space: nowrap; padding-bottom: .12em; }

/* текстовые страницы */
.doc { padding-top: clamp(48px, 7vw, 96px); padding-bottom: var(--gap); }
.doc h1 { font-size: clamp(34px, 5vw, 72px); max-width: 14em; line-height: 1.02; }
.doc .body { max-width: 44em; margin-top: 40px; }
.doc .body p { margin-top: 16px; }
.doc .body h2 { font-size: clamp(22px, 2vw, 28px); margin-top: 48px; line-height: 1.15; color: var(--forest); }
.doc .body a { text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* появление при прокрутке: только если сработал скрипт */
.js [data-in] > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-in].on > * { opacity: 1; transform: none; }
.js [data-in].on > :nth-child(2) { transition-delay: .08s; }
.js [data-in].on > :nth-child(3) { transition-delay: .16s; }
.js [data-in].on > :nth-child(4) { transition-delay: .24s; }
.js [data-in].on > :nth-child(5) { transition-delay: .32s; }
.hero h1 span { animation: rise .8s var(--ease) both; }
.hero h1 span + span { animation-delay: .08s; }
@keyframes rise { from { transform: translateY(28px); } }

@media (max-width: 980px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .hero h1 { font-size: clamp(36px, 11.2vw, 96px); }
  .host { width: min(78%, 420px); }
  .bubble { right: 56%; }
  .giants .top, .dig .top, .about { grid-template-columns: 1fr; }
  .giants h2 { font-size: clamp(34px, 9.6vw, 80px); }
  .giants .stage { grid-template-columns: minmax(0, 1fr) minmax(0, .5fr); }
  .route { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .route li { scroll-snap-align: start; }
  .steps { grid-template-columns: 1fr 1fr; }
  .extra { grid-template-columns: 1fr; }
  .sorter .top { grid-template-columns: 1fr; }
  .sorter h2 { font-size: clamp(34px, 9.6vw, 80px); }
  .shelf { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shelf li { scroll-snap-align: start; }
  .steps li:nth-child(even) { margin-top: 48px; }
  .socials { grid-template-columns: 1fr; }
  .world { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .bar { gap: 14px; }
  .bar .btn { display: none; }
  .mark { font-size: 15px; }
  .mark img { width: 34px; height: 34px; }
  .host { width: 100%; }
  .host img { width: 78%; margin: 0 auto; }
  .bubble { position: relative; top: auto; right: auto; width: auto; margin: 0 0 14px; font-size: 15px; border-radius: 22px 22px 22px 6px; }
  .facts dd { font-size: 22px; }
  .giants .stage { grid-template-columns: 1fr; }
  .giants .stage .phone { width: 62%; margin: 0 auto; }
  .route { grid-auto-columns: 62%; }
  .shelf { grid-auto-columns: 62%; }
  .facts { grid-template-columns: 1fr; }
  .end .links .copy { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-in] > * { opacity: 1; transform: none; }
}
