/* Сайт лише темний: кадр — нічне капище, і світла тема виглядала б як інша гра. */

@font-face {
  font-family: "KyivType Titling";
  src: url("assets/KyivTypeTitling-Medium3.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("assets/FiraSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("assets/FiraSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #07090f;
  --text: #ece4d4;
  --muted: #b3a891;
  --gold-hi: #f6dc9a;
  --gold: #d9a54e;
  --gold-lo: #8f5e24;
  --ember: #ff8a2a;
  --line: rgba(236, 228, 212, 0.18);
  --gutter: max(16px, env(safe-area-inset-left));
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--text);
  font: 400 1rem/1.55 "Fira Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Сцена ─────────────────────────────────────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.scene__img,
.scene__fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* site.js читає object-position звідси й за ним кладе іскри на багаття — кадрування живе лише тут. */
.scene__img {
  object-fit: cover;
  object-position: 50% 50%;
  animation: settle 2.4s ease-out both;
}

/* Затінок угорі під назву й унизу під підвал; посередині кадр лишається чистим. */
.scene__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 9, 15, 0.78) 0%, rgba(7, 9, 15, 0.25) 38%, rgba(7, 9, 15, 0) 55%),
    linear-gradient(to top, rgba(7, 9, 15, 0.9) 0%, rgba(7, 9, 15, 0) 30%),
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(7, 9, 15, 0.55) 100%);
}

@keyframes settle {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Верхня смуга ──────────────────────────────────────────────────────── */

.bar {
  display: flex;
  justify-content: flex-end;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 0;
}

.lang {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.lang button {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--gold-hi); }
.lang button:hover { color: var(--text); }

/* ── Головне ───────────────────────────────────────────────────────────── */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(24px, 9vh, 120px) var(--gutter) 32px;
}

/* Жанр і місце — окремо й дрібно: фраза під назвою лірична й про жанр мовчить. */
.eyebrow {
  margin: 0 0 14px;
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95);
  animation: rise 1.4s 0.1s ease-out both;
}

.title {
  margin: 0;
  /* Ширше за ~6.4vw назва налазить на голову Перуна праворуч — кадр важливіший за кегль. */
  font: 500 clamp(2.6rem, 6.4vw, 5.2rem)/1 "KyivType Titling", "Fira Sans", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* Позолота — як вуса й брови Перуна на кадрі: світле згори, мідь знизу. */
  background: linear-gradient(to bottom, var(--gold-hi) 15%, var(--gold) 55%, var(--gold-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.85));
  animation: rise 1.4s 0.2s ease-out both;
}

.tagline {
  max-width: 34rem;
  margin: 20px 0 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  text-wrap: balance;
  color: var(--text);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
  animation: rise 1.4s 0.45s ease-out both;
}

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: auto 0 0;
  padding: 48px 0 0;
  animation: rise 1.4s 0.75s ease-out both;
}

.social a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.social a:hover {
  border-color: rgba(246, 220, 154, 0.6);
  color: var(--gold-hi);
  background: rgba(7, 9, 15, 0.75);
}
.social svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

/* ── Підвал ────────────────────────────────────────────────────────────── */

.foot {
  padding: 0 var(--gutter) max(18px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.foot p { margin: 4px 0 0; }
.foot__studio { font-size: 0.9rem; color: var(--text); }
.foot__studio a {
  color: var(--gold-hi);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(246, 220, 154, 0.35);
  transition: border-color 0.2s ease;
}
.foot__studio a:hover { border-bottom-color: var(--gold-hi); }
.foot__credit { opacity: 0.7; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* На вузькому екрані кадр видно лише смугою; лишаємо в ній багаття, а не порожнє небо між ідолами. */
@media (max-aspect-ratio: 1/1) {
  .scene__img { object-position: 30% 50%; }
  /* Тут текст стоїть просто над полум'ям, тож верхній затінок сягає нижче й густіший. */
  .scene__shade {
    background:
      linear-gradient(to bottom, rgba(7, 9, 15, 0.85) 0%, rgba(7, 9, 15, 0.6) 40%, rgba(7, 9, 15, 0) 62%),
      linear-gradient(to top, rgba(7, 9, 15, 0.9) 0%, rgba(7, 9, 15, 0) 30%);
  }
  .social span { display: none; }
  .social a { padding: 12px; }
  .social svg { width: 22px; height: 22px; }
}

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