/* Общее для трёх драфтов: каркас по 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: var(--cream); }
  .stage { position: relative; overflow: hidden; min-height: calc(100svh - 120px); display: grid; align-items: center; isolation: isolate; }
  .layer { position: absolute; inset: -3%; will-change: transform; }
  .cam { position: absolute; inset: 0; animation: cam 14s ease-in-out infinite; will-change: transform; }
  @keyframes cam { 0%, 100% { transform: translate(0, 0) scale(1.04) rotate(0deg); } 22% { transform: translate(-1.3%, -0.8%) scale(1.062) rotate(-0.45deg); } 48% { transform: translate(0.3%, -1.1%) scale(1.05) rotate(0.15deg); } 74% { transform: translate(1.2%, 0.7%) scale(1.066) rotate(0.5deg); } }
  .cam > picture img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }

  /* слой эффектов привязан к прямоугольнику картинки: координаты в долях исходного кадра */
  .fx { position: absolute; pointer-events: none; }
  .ring { position: absolute; width: 0; height: 0; }
  .turn { position: absolute; opacity: 0; transition: opacity 0.22s ease; pointer-events: none; }
  .turn.on { opacity: 1; }
  .ring .oy { display: block; }
  /* дымка и пыль у основания воронки */
  .haze { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(214, 190, 146, 0.42), rgba(214, 190, 146, 0.16) 55%, rgba(214, 190, 146, 0) 100%); filter: blur(6px); animation: haze 8s ease-in-out infinite alternate; }
  @keyframes haze { from { transform: translate(-54%, -50%) scale(0.92); opacity: 0.65; } to { transform: translate(-46%, -54%) scale(1.12); opacity: 1; } }
  /* дом левитирует в воронке */
  .house { position: absolute; transform: translate(-50%, -50%) rotate(var(--r)); animation: hover 6.5s ease-in-out infinite; }
  /* дом далеко, в пыли: контраст и насыщенность ниже, тон уходит в цвет дымки */
  .house img { width: 100%; height: auto; display: block; filter: contrast(0.86) brightness(1.03) blur(0.2px); animation: drift 9s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: translateX(-8%) rotate(-4deg); } to { transform: translateX(8%) rotate(4.5deg); } }
  @keyframes hover { 0%, 100% { transform: translate(-50%, -36%) rotate(calc(var(--r) - 5deg)); } 50% { transform: translate(-50%, -66%) rotate(calc(var(--r) + 6deg)); } }
  /* деревья: тот же кадр в окне через фильтр ветра, края растворены */
  .trees { position: absolute; background-repeat: no-repeat; filter: url(#wind);
    -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); }
  .ring .ox { position: absolute; left: 0; top: 0; animation: ox var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
  .ring .oy { animation: oy var(--t) ease-in-out infinite alternate; animation-delay: calc(var(--d) - var(--t) / 2); }
  .ring .spin { display: block; animation: spin var(--s) linear infinite; transform-origin: 50% 50%; }
  .ring svg { display: block; height: auto; animation: lit var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
  /* свет идёт вместе с обломком по орбите: слева тёплое солнце, справа тень грозы */
  @keyframes lit { from { filter: brightness(1.22) sepia(0.45) saturate(1.3); } to { filter: brightness(0.52) saturate(0.75); } }
  .swirl { position: absolute; pointer-events: none; transition: opacity 1.2s ease; }
  @keyframes ox { from { transform: translateX(calc(var(--rx) * -1)); } to { transform: translateX(var(--rx)); } }
  @keyframes oy { 0% { transform: translateY(calc(var(--ry) * -1)) scale(0.6); opacity: 0; } 35% { opacity: 0; } 62% { opacity: 1; } 100% { transform: translateY(var(--ry)) scale(1.12); opacity: 1; } }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* травинки переднего плана */
  .grass { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; overflow: visible; }
  .grass g { transform-box: fill-box; transform-origin: 50% 100%; animation: sway var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
  @keyframes sway { from { transform: rotate(var(--a0)); } to { transform: rotate(var(--a1)); } }

  /* лепестки */
  .petal { position: absolute; will-change: transform, opacity; }
  .petal svg { display: block; width: 100%; height: auto; }
  .gust { position: absolute; will-change: transform, opacity; }
  .gust svg { display: block; width: 100%; height: auto; }

  /* перевод фокуса: размывается то, что под слоем, по маске глубины кадра (Тото и ближний луг / небо, воронка, холмы); радиус меняет c3.js */
  .dof { position: absolute; inset: 0; pointer-events: none; -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); }
  .dof-far { --m: url(img/c3/dof-far-desk.png); -webkit-mask: var(--m) 0 0 / 100% 100% no-repeat; mask: var(--m) 0 0 / 100% 100% no-repeat; }
  .dof-near { --m: url(img/c3/dof-near-desk.png); -webkit-mask: var(--m) 0 0 / 100% 100% no-repeat; mask: var(--m) 0 0 / 100% 100% no-repeat; }
  .vortex { position: absolute; z-index: 1; right: -6%; top: -30%; width: 62vw; max-width: 1100px; aspect-ratio: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0.29; filter: blur(1.2px);
    -webkit-mask-image: linear-gradient(90deg, transparent 14%, rgba(0, 0, 0, 0.3) 30%, #000 50%); mask-image: linear-gradient(90deg, transparent 14%, rgba(0, 0, 0, 0.3) 30%, #000 50%); }
  .vortex img { width: 100%; height: 100%; border-radius: 50%; -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); animation: vspin 70s linear infinite; }
  @keyframes vspin { to { transform: rotate(-360deg); } }

  .scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: radial-gradient(48% 78% at 79% 50%, rgba(5, 20, 26, 0.66), rgba(5, 20, 26, 0) 72%), linear-gradient(0deg, rgba(5, 16, 20, 0.55), rgba(5, 16, 20, 0) 26%); }

  /* текст: справа по композиции, выровнен по левому краю вместе с логотипом */
  .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: 28px; justify-items: start; text-align: left; padding-block: 80px 60px; }
  .copy h1 { margin: 0; line-height: 0; }
  .copy .logo { width: var(--lw); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.55)); }
  .tag { margin: 0 0 0 var(--stem); max-width: 31ch; font: italic 500 21px/1.45 Alegreya, Georgia, serif; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 14px rgba(0, 0, 0, 0.6); }

  /* кнопка: золото, сургучная печать с лапой, настоящий знак 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; }
  .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) {
    .stage { min-height: calc(100svh - 150px); align-items: start; }
    .vortex { display: none; }
    .scrim { background: radial-gradient(115% 36% at 50% 25%, rgba(5, 20, 26, 0.76), rgba(5, 20, 26, 0) 80%), linear-gradient(180deg, rgba(5, 20, 26, 0.25), rgba(5, 20, 26, 0) 40%, rgba(5, 16, 20, 0.3)); }
    .cam > picture img { object-position: 50% 50%; }
    /* телефон: всё по центру — язык, логотип, подпись и кнопка */
    .lang { top: 14px; right: auto; left: 50%; transform: translateX(-50%); }
    .copy { --lw: min(330px, calc(100vw - 60px)); --stem: 0px; justify-self: center; justify-items: center; text-align: center; width: auto; margin: 0; padding: 70px 22px 0; gap: 16px; }
    .tag { width: var(--lw); max-width: none; margin: 0; font-size: 16.5px; line-height: 1.38; }
    .wish { width: var(--lw); margin: 12px 0 0; min-height: 62px; padding: 0 92px 0 18px; gap: 11px; }
    .dof-far { --m: url(img/c3/dof-far-mob.png); }
    .dof-near { --m: url(img/c3/dof-near-mob.png); }
    .wish .seal { width: 80px; height: 80px; right: 1px; }
    .wish .lbl b { font-size: 19px; }
    .wish .steam { width: 38px; height: 38px; }
  }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
