/* Лэндинг Eggsun. Язык оформления — самой игры (EggProto/ComicUI.swift, Comic): бумага, чернила и одна
   терракота; Unbounded ExtraBold в заголовках и кнопках, системный шрифт в тексте, как в игре; кнопки —
   чёрные плиты с терракотовым краем (SlabButtonStyle), надписи — на рваных полосках бумаги (TornStrip),
   подсказка — растр (DirectionalRaster). Углы прямые, как у печати. Одна поверхность сверху донизу. */

:root {
  --paper: #F6F1E6; --ink: #111111; --terra: #FF5A1F; --dark-terra: #8A250A;
  --sand: #ECE4D4; --muted: #6B645A; --text: #2B2824;
  --gap: 20px; --pad: 40px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }

.h1, .h2 { font-family: "Unbounded", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.h1 { font-size: clamp(34px, 4.1vw, 62px); line-height: 1.05; text-wrap: balance; }
.h2 { font-size: clamp(27px, 2.8vw, 42px); line-height: 1.1; max-width: 17ch; text-wrap: balance; }
.lead { font-size: 19px; color: var(--text); margin: 0; max-width: 40ch; text-wrap: pretty; }
figcaption { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Шапка */
.top__in { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.top__brand { display: flex; align-items: center; gap: 10px; font: 800 18px "Unbounded", sans-serif; text-decoration: none; }
.top__brand img { border-radius: 8px; }
.top__home { font-size: 15px; text-decoration: none; }
.top__home:hover, .links a:hover, .foot a:hover { text-decoration: underline; }

/* Значок стора: пока игра на проверке — без ссылки и с подписью. */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.soon { font: 800 13px "Unbounded", sans-serif; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.store-badge--soon { cursor: default; opacity: 0.55; }
.store-badge--soon:hover { transform: none; }

/* Первый экран: текст и поиск яиц по правилам игры. */
.hero { padding-top: 36px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero__text .lead { margin: 26px 0 30px; }
.hero__text .meta { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.toy { margin: 0; }
.toy__card {
  position: relative; aspect-ratio: 5 / 4;
  background: radial-gradient(circle, rgba(17, 17, 17, 0.07) 1.2px, transparent 1.6px) 0 0 / 11px 11px, var(--sand); border: 3px solid var(--ink);
  box-shadow: 9px 10px 0 var(--terra); overflow: hidden; cursor: crosshair; -webkit-tap-highlight-color: transparent;
}
.toy__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.toy__hint {
  position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%) rotate(-1.5deg); margin: 0; white-space: nowrap;
  font: 800 12px "Unbounded", sans-serif; text-transform: uppercase; letter-spacing: 0.01em;
  background: var(--paper); padding: 7px 12px; box-shadow: 0 2px 0 rgba(17, 17, 17, 0.18); pointer-events: none;
  transition: opacity 0.3s;
}
.toy__card.is-playing .toy__hint { opacity: 0; }
.tray { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 7px; pointer-events: none; }
.tray__egg {
  width: 26px; height: 34px; background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transition: transform 0.3s cubic-bezier(.3, 1.8, .5, 1), background 0.15s;
}
.tray__egg.is-found { background: var(--terra); transform: scale(1.1); }
.slab {
  font: 800 16px "Unbounded", sans-serif; text-transform: uppercase; color: var(--paper); background: var(--ink);
  border: 0; padding: 16px 26px; box-shadow: 7px 8px 0 var(--terra); cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.slab:active { transform: translate(5px, 5px); box-shadow: 2px 3px 0 var(--terra); }
.toy__again { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); }
.toy__again:active { transform: translate(calc(-50% + 5px), 5px); }
.toy figcaption { margin-top: 22px; max-width: 58ch; }
.for-touch { display: none; }
@media (hover: none) { .for-mouse { display: none; } .for-touch { display: inline; } }

/* Разделы */
.sec { padding: 128px 0 0; }
.sec__head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-bottom: 40px; }
.sec__head .lead { padding-top: 6px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.bento--two > * { grid-column: span 6; }
.tile { margin: 0; background: var(--sand); padding: 32px; min-width: 0; }
.tile figcaption { margin: 18px auto 0; max-width: 44ch; text-align: center; }

/* Телефон, на котором снята запись: iPhone с кнопкой «Домой», экран 750×1334. Статус-бар в записи
   срезан (50 px из 1334), его место — тёмная полоса экрана. */
.tile--phone { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 52px 24px; }
.phone {
  --pw: 296px; width: min(100%, var(--pw)); position: relative; background: #1A1A1A;
  padding: calc(var(--pw) * 0.255) calc(var(--pw) * 0.062); border-radius: calc(var(--pw) * 0.16);
  box-shadow: inset 0 0 0 2px #2C2C2C, 0 30px 50px -30px rgba(17, 17, 17, 0.55);
}
.phone__screen { position: relative; aspect-ratio: 750 / 1334; background: var(--ink); overflow: hidden; padding-top: 6.667%; }
.phone__screen img, .phone__screen video { width: 100%; height: auto; aspect-ratio: 750 / 1284; object-fit: cover; }
.phone__ear {
  position: absolute; left: 50%; top: calc(var(--pw) * 0.125); transform: translateX(-50%);
  width: 16%; height: calc(var(--pw) * 0.018); border-radius: 99px; background: #333;
}
.phone__home {
  position: absolute; left: 50%; bottom: calc(var(--pw) * 0.05); transform: translateX(-50%);
  width: calc(var(--pw) * 0.155); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 2px #3A3A3A;
}

/* Поиск по расстоянию: линейка из чисел HuntEngine. */
.bento--hunt > .tile--phone { grid-column: span 6; }
.tile--ruler { grid-column: span 6; display: flex; flex-direction: column; padding: 52px 40px 32px; }
.ruler { position: relative; flex: 1; min-height: 520px; margin-bottom: 64px; }
.ruler__line { position: absolute; left: 22px; top: 0; bottom: 0; border-left: 3px solid var(--ink); }
.ruler__glow {
  position: absolute; left: 0; width: 47px; bottom: 0;
  background: radial-gradient(circle, var(--terra) 38%, transparent 42%) 0 0 / 9px 9px;
  -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000);
}
.ruler__dot { position: absolute; left: 23.5px; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); }
.ruler__mark { position: absolute; left: 0; right: 0; transform: translateY(-50%); display: grid; grid-template-columns: 64px 86px 1fr; align-items: center; }
.ruler__mark::before { content: ""; grid-column: 1; height: 3px; width: 47px; background: var(--ink); }
.ruler__mark b { font: 800 16px "Unbounded", sans-serif; white-space: nowrap; }
.ruler__mark span { font-size: 16px; line-height: 1.3; color: var(--text); }
.ruler__mark--catch b { color: var(--dark-terra); }
.ruler__egg { position: absolute; left: 0; top: 100%; margin-top: 10px; width: 47px; height: 61px; }
.tile--ruler figcaption { text-align: left; margin: 0; }

.tile--film video { background: var(--ink); }

/* Конец */
.sec--end { padding-bottom: 96px; }
.end__store { padding-top: 6px; }
.cta {
  display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; padding: 44px 48px;
  background: var(--sand);
}
.cta__icon { width: 120px; height: 120px; border-radius: 27px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 17px; color: var(--text); max-width: 52ch; }
.facts li { padding-left: 28px; position: relative; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 14px; height: 18px; background: var(--terra);
  border: 2px solid var(--ink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.links { display: flex; gap: 24px; margin: 30px 0 0; font-size: 15px; }

.foot { margin-top: 0; border-top: 2px solid var(--ink); }
.foot__row { display: flex; justify-content: space-between; gap: 16px; padding-top: 26px; padding-bottom: 26px; font-size: 14px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot .top__home { color: var(--ink); }

@media (max-width: 1100px) {
  .hero__grid, .sec__head { gap: 40px; }
  .phone { --pw: 256px; }
  .tile--ruler { padding: 44px 28px 28px; }
  .ruler__mark { grid-template-columns: 60px 80px 1fr; }
  .ruler__mark span { font-size: 15px; }
}

@media (max-width: 820px) {
  :root { --pad: 16px; --gap: 14px; }
  body { font-size: 17px; }
  .top__in { height: 62px; }
  .hero { padding-top: 12px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .lead { font-size: 17px; }
  .hero__text .lead { margin: 18px 0 24px; }
  .toy__card { aspect-ratio: 1; margin-right: 9px; }
  .sec { padding-top: 88px; }
  .sec__head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
  .bento > *, .bento--two > *, .bento--hunt > .tile--phone, .bento--hunt > .tile--ruler { grid-column: span 12; }
  .tile { padding: 24px; }
  .tile--phone { padding: 40px 16px 32px; }
  .phone { --pw: 252px; }
  .tile--ruler { padding: 36px 20px 24px; }
  .ruler { min-height: 460px; }
  .ruler__mark { grid-template-columns: 58px 76px 1fr; }
  .ruler__mark b { font-size: 15px; }
  .cta { grid-template-columns: 1fr; gap: 24px; padding: 28px 22px; }
  .cta__icon { width: 88px; height: 88px; border-radius: 20px; }
  .foot__row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
