/* Общее для трёх драфтов: каркас по R03 — фон, логотип, описание, одна кнопка Steam,
   язык, подвал и нижний блок согласия. Шрифты в драфте с Google Fonts; в сборке —
   локальные файлы (R27), для китайского, японского и корейского — системные. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 16px/1.5 "Alegreya Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

.page { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }

/* язык */
.lang {
  position: absolute; top: 18px; right: 20px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 12px;
  border-radius: 999px; font-size: 15px; cursor: pointer;
}
.lang svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang .chev { width: 12px; height: 12px; }

/* кнопка Steam */
.cta {
  display: inline-flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 28px 0 18px;
  border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: 0.01em;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s;
}
.cta:hover { transform: translateY(-2px); }
.cta:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.cta svg { width: 30px; height: 30px; flex: none; }
.cta small { display: block; font-weight: 500; font-size: 13px; opacity: 0.78; letter-spacing: 0.04em; text-transform: uppercase; }

/* подвал */
.foot { position: relative; z-index: 5; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 13.5px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.foot nav a, .foot nav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; background: none; border: 0; color: inherit; text-decoration: none; cursor: pointer; font-size: 14px; }
.foot nav a:hover, .foot nav button:hover { text-decoration: underline; }
.foot p { margin: 0; opacity: 0.75; }

/* согласие */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
.consent[hidden] { display: none; }
.consent .in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: center; }
.consent h2 { margin: 0 0 2px; font-size: 16px; }
.consent p { margin: 0; font-size: 14px; line-height: 1.45; }
.consent p a { display: inline-block; padding: 14px 4px; margin: -14px -4px; }   /* область нажатия 44×44 (R06), строка не раздвигается */
.consent .acts { display: flex; gap: 10px; }
.consent .acts button { min-height: 44px; min-width: 112px; padding: 0 18px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
@media (max-width: 720px) {
  .consent .in { grid-template-columns: minmax(0, 1fr); }
  .consent .acts button { flex: 1; min-width: 0; padding: 0 8px; }
}



@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ——— страница ——— */
  :root {
    --gold-1: #fbe08e; --gold-2: #f1c257; --gold-3: #d99a2b; --gold-ink: #2a1a06;
    --teal-1: #1b4651; --teal-2: #0d2a33; --teal-3: #071a20;
    --cream: #f6ebd2; --wax: #8e2f22; --wax-2: #6f2218;
  }
  body { background: var(--teal-3); color: #2a2414; }
  .stage { position: relative; overflow: hidden; min-height: calc(100svh - 120px); display: grid; align-items: center; isolation: isolate; }

  /* камера плавает сама; внутри три плана, у каждого свой сдвиг от мыши */
  .cam { position: absolute; inset: 0; transform: scale(1.06); }
  .bump { position: absolute; inset: 0; }
  .layer { position: absolute; inset: -3%; will-change: transform; }
  .layer picture img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
  .map { position: absolute; pointer-events: none; }

  /* лучи солнца слева медленно переливаются */
  .rays { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0.55;
    background: repeating-linear-gradient(62deg, rgba(255, 236, 170, 0) 0 46px, rgba(255, 236, 170, 0.16) 70px, rgba(255, 236, 170, 0) 104px);
    background-size: 200% 100%; animation: rays 14s ease-in-out infinite alternate;
    -webkit-mask-image: radial-gradient(45% 75% at 14% 0%, #000, transparent 72%); mask-image: radial-gradient(45% 75% at 14% 0%, #000, transparent 72%); }
  @keyframes rays { from { background-position: 0 0; opacity: 0.4; } to { background-position: 30% 0; opacity: 0.7; } }

  /* позы Тото: участки цельных кадров вместе с землёй вокруг, сменяются целиком */
  .pose { position: absolute; opacity: 0; }
  .pose.on { opacity: 1; }
  .hit { position: absolute; pointer-events: auto; cursor: pointer; }
  .grass { position: absolute; max-width: none; transform-origin: 50% 100%; animation: breeze 5.5s ease-in-out infinite alternate; }
  .fly { position: absolute; pointer-events: none; will-change: transform, opacity; }
  .fly svg { display: block; width: 100%; height: auto; }
  @keyframes breeze { from { transform: skewX(-1.3deg); } to { transform: skewX(1.5deg); } }
  .mote, .petal { position: absolute; pointer-events: none; will-change: transform, opacity; }
  .mote { width: 5px; height: 5px; border-radius: 50%; background: #fff4c9; box-shadow: 0 0 8px 3px rgba(255, 236, 170, 0.55); }
  .petal svg { display: block; width: 100%; height: auto; }

  /* тёплый свет под текстом */
  .scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: radial-gradient(42% 70% at 79% 47%, rgba(255, 248, 230, 0.72), rgba(255, 248, 230, 0) 72%), linear-gradient(0deg, rgba(20, 26, 12, 0.28), rgba(20, 26, 12, 0) 24%); }

  /* текст справа, логотип, описание и кнопка по ножке «Т», как в C3 */
  .copy { --lw: min(430px, 36vw); --stem: calc(var(--lw) * 0.0969); position: relative; z-index: 4; justify-self: end; width: calc(var(--lw) + 70px); margin-right: max(6vw, 36px); display: grid; gap: 40px; justify-items: start; text-align: left; padding-block: 64px 100px; }
  .copy .wish { margin-top: 19px; }
  .copy h1 { margin: 0; line-height: 0; }
  .copy .logo { width: var(--lw); filter: drop-shadow(0 2px 14px rgba(255, 246, 222, 0.85)); }
  .tag { margin: 0 0 0 var(--stem); max-width: 31ch; font: italic 500 21px/1.45 Alegreya, Georgia, serif; color: #2a2414; text-shadow: 0 1px 12px rgba(255, 248, 230, 0.95), 0 0 2px rgba(255, 248, 230, 0.8); }

  /* кнопка: золото, сургучная печать с лапой, настоящий знак Steam */
  .wish { position: relative; display: inline-flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 114px 0 24px; margin-left: var(--stem);
    border-radius: 16px; text-decoration: none; color: var(--gold-ink);
    background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 46%, var(--gold-3) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 252, 230, 0.9), inset 0 -3px 0 rgba(120, 70, 10, 0.35), inset 0 0 0 1px rgba(110, 66, 8, 0.55),
      0 0 0 3px rgba(7, 26, 32, 0.55), 0 0 0 4px rgba(251, 224, 142, 0.45), 0 20px 40px -16px rgba(0, 0, 0, 0.85), 0 0 70px rgba(241, 194, 87, 0.28);
    transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s; overflow: visible; }
  .wish::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 240, 0.55) 46%, transparent 60%); background-size: 260% 100%; background-position: 120% 0; animation: shine 5.5s ease-in-out infinite; mix-blend-mode: soft-light; }
  @keyframes shine { 0%, 62% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
  .wish:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 252, 230, 0.95), inset 0 -3px 0 rgba(120, 70, 10, 0.35), inset 0 0 0 1px rgba(110, 66, 8, 0.6),
      0 0 0 3px rgba(7, 26, 32, 0.55), 0 0 0 4px rgba(251, 224, 142, 0.85), 0 26px 46px -16px rgba(0, 0, 0, 0.9), 0 0 90px rgba(241, 194, 87, 0.45); }
  .wish:focus-visible { outline: 3px solid var(--gold-1); outline-offset: 6px; }
  .wish .steam { width: 46px; height: 46px; flex: none; fill: currentColor; }
  .wish .lbl { display: grid; line-height: 1.05; }
  .wish .lbl b { font: 800 23px/1.05 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.005em; }
  .wish .lbl small { margin-top: 4px; font: 700 12.5px/1 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: #6b4610; }
  .wish .seal { position: absolute; right: 2px; top: 50%; width: 98px; height: 98px; transform: translateY(-50%) rotate(11deg); animation: seal 4.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(40, 8, 4, 0.55)); }
  .wish .seal .paw { transform-origin: 52px 54px; animation: paw 4.2s ease-in-out infinite; }
  .wish:hover .seal { animation: stamp 0.55s cubic-bezier(.3, 1.6, .5, 1) 1, seal 4.2s ease-in-out 0.55s infinite; }
  @keyframes seal { 0%, 100% { transform: translateY(-50%) rotate(11deg); } 50% { transform: translateY(-52%) rotate(17deg); } }
  @keyframes paw { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(0.86); } 86% { transform: scale(1.06); } }
  @keyframes stamp { 0% { transform: translateY(-50%) rotate(11deg) scale(1); } 40% { transform: translateY(-50%) rotate(18deg) scale(0.84); } 100% { transform: translateY(-50%) rotate(11deg) scale(1); } }

  /* переключатель языка и кнопки согласия: тёмная эмаль, двойная золотая кромка */
  .lang, .consent .acts button {
    background: linear-gradient(180deg, var(--teal-1), var(--teal-2) 60%, var(--teal-3));
    color: var(--cream); border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.18), inset 0 0 0 1px rgba(251, 224, 142, 0.55), inset 0 0 0 3px rgba(7, 26, 32, 0.9), inset 0 0 0 4px rgba(251, 224, 142, 0.18), 0 8px 20px -10px rgba(0, 0, 0, 0.7);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); transition: background 0.25s, box-shadow 0.25s, color 0.25s;
  }
  .lang { height: 46px; padding: 0 16px 0 13px; backdrop-filter: blur(8px); }
  .lang svg { stroke: var(--gold-2); }
  .lang:hover, .consent .acts button:hover {
    background: linear-gradient(180deg, #24596a, #123742 60%, #0a222a);
    box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.25), inset 0 0 0 1px rgba(251, 224, 142, 0.95), inset 0 0 0 3px rgba(7, 26, 32, 0.9), inset 0 0 0 4px rgba(251, 224, 142, 0.35), 0 10px 24px -10px rgba(0, 0, 0, 0.8), 0 0 18px rgba(241, 194, 87, 0.25);
  }
  .lang:focus-visible, .consent .acts button:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }

  .foot { background: var(--teal-3); color: #cfd8d4; }
  .lang { height: 44px; padding: 0 12px 0 10px; gap: 6px; font-size: 14px; font-weight: 700; color: #2a2414; text-shadow: none; background: rgba(255, 249, 234, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(42, 36, 20, 0.38), 0 4px 14px -6px rgba(40, 32, 10, 0.45); }
  .lang:hover { background: rgba(255, 248, 230, 0.78); box-shadow: inset 0 0 0 1px rgba(42, 36, 20, 0.4); }
  .lang svg { stroke: #6b5a2c; width: 16px; height: 16px; }
  .consent { background: linear-gradient(180deg, rgba(13, 42, 51, 0.94), rgba(7, 26, 32, 0.97)); color: #eef0e6; backdrop-filter: blur(14px); }
  .consent::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(251, 224, 142, 0.7) 20%, rgba(251, 224, 142, 0.7) 80%, transparent); }
  .consent .orn { position: absolute; left: 50%; top: -14px; width: 240px; height: 28px; transform: translateX(-50%); color: var(--gold-2); overflow: visible; }
  .consent a { color: var(--gold-1); }
  .consent .acts button { border-radius: 12px; min-height: 46px; }
  .consent .acts .acc { background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 46%, var(--gold-3)); color: var(--gold-ink); font-weight: 800; text-shadow: none;
    box-shadow: inset 0 1px 0 rgba(255, 252, 230, 0.9), inset 0 -2px 0 rgba(120, 70, 10, 0.35), inset 0 0 0 1px rgba(110, 66, 8, 0.55), 0 0 0 2px rgba(7, 26, 32, 0.6), 0 0 0 3px rgba(251, 224, 142, 0.5), 0 8px 20px -10px rgba(0, 0, 0, 0.7); }
  .consent .acts .acc:hover { background: linear-gradient(180deg, #fff0b8, var(--gold-1) 46%, var(--gold-2)); color: var(--gold-ink);
    box-shadow: inset 0 1px 0 rgba(255, 252, 230, 0.95), inset 0 -2px 0 rgba(120, 70, 10, 0.35), inset 0 0 0 1px rgba(110, 66, 8, 0.6), 0 0 0 2px rgba(7, 26, 32, 0.6), 0 0 0 3px rgba(251, 224, 142, 0.9), 0 10px 24px -10px rgba(0, 0, 0, 0.8), 0 0 22px rgba(241, 194, 87, 0.35); }


  @media (max-width: 760px) {
    .lang { top: 14px; right: auto; left: 50%; transform: translateX(-50%); }
    .stage { min-height: calc(100svh - 150px); align-items: stretch; grid-template-columns: minmax(0, 1fr); }
    .copy h1 { width: var(--lw); }
    .copy h1 picture { display: block; }
    .copy .logo { width: 100%; }
    .layer { inset: calc(-3% + 18px) -3% calc(-3% - 18px); }   /* кадр чуть ниже: уши Тото у камеры не заходят на текст */
    .layer picture img { object-position: 50% 50%; }
    .rays { -webkit-mask-image: radial-gradient(80% 45% at 10% 0%, #000, transparent 72%); mask-image: radial-gradient(80% 45% at 10% 0%, #000, transparent 72%); }
    .scrim { background: radial-gradient(130% 30% at 50% 17%, rgba(255, 249, 234, 0.9), rgba(255, 249, 234, 0.55) 55%, rgba(255, 249, 234, 0) 85%), linear-gradient(0deg, rgba(20, 26, 12, 0.32), rgba(20, 26, 12, 0) 22%); }
    .tag { text-shadow: 0 0 10px rgba(255, 249, 234, 1), 0 0 3px rgba(255, 249, 234, 0.95); }
    .copy .wish { margin-top: auto; }
    /* телефон: всё по центру — логотип и описание сверху, Тото посередине, кнопка внизу над плашкой */
    .copy { --lw: min(330px, calc(100vw - 60px)); --stem: 0px; justify-self: stretch; width: auto; margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
      gap: 14px; padding: 72px 22px var(--cb, 220px); }
    .tag { margin: 0; width: var(--lw); max-width: none; font-size: 16.5px; line-height: 1.38; }
    .wish { margin: auto 0 0; width: var(--lw); min-height: 62px; padding: 0 92px 0 18px; gap: 11px; }
    .wish .seal { width: 80px; height: 80px; right: 1px; }
    .wish .lbl b { font-size: 19px; }
    .wish .steam { width: 38px; height: 38px; }
    .consent { padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); }
    .consent .in { gap: 10px; }
    .consent h2 { font-size: 15px; }
    .consent p { font-size: 13px; line-height: 1.4; }
    .consent .acts { gap: 8px; }
    .consent .acts button { min-height: 44px; font-size: 14.5px; border-radius: 11px; }
  }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
