:root {
  --bg: #07080a;
  --fg: #eef0f3;
  --muted: #9aa1ab;          /* 7.6:1 na tle */
  --line: rgba(238, 240, 243, 0.14);
  --accent: #c9d3df;          /* chłodne srebro – „lakier” */
  --brand: #ef3340;           /* wyścigowa czerwień */
  --ink: #0b0b0d;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-race: cubic-bezier(0.12, 0.9, 0.2, 1);
  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "Saira", system-ui, -apple-system, sans-serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Tło ---------- */
#hex {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(160, 180, 205, 0.10), transparent 70%),
    radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, 0.9), transparent 60%);
  opacity: 0;
  animation: fade 2.4s 0.6s var(--ease-out) forwards;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

/* ---------- Układ ---------- */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vh, 36px);
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
}

/* ---------- Logo (styl naklejki rajdowej) ---------- */
.logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  position: relative;
  font-weight: 400;
}

.badge {
  position: relative;
  display: inline-block;
  font-size: clamp(84px, 25vw, 240px);
  padding: 0 0.12em 0.22em;
  filter: drop-shadow(0 0.08em 0.12em rgba(0, 0, 0, 0.55));
  opacity: 0;
  animation: slam 0.75s 0.7s var(--ease-race) forwards;
}

/* EMA – trzy warstwy: czerwony kontur, czarny kontur, białe wypełnienie */
.badge__ema {
  position: relative;
  display: block;
  font-family: "Kanit", var(--font-display);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.9;
  padding-right: 0.06em;
  color: transparent;
  text-transform: uppercase;
}
.badge__ema::before,
.badge__ema::after,
.badge__ema > span {
  position: absolute;
  inset: 0;
  padding-right: inherit;
}
.badge__ema::before {
  content: attr(data-text);
  -webkit-text-stroke: 0.15em var(--brand);
  color: var(--brand);
}
.badge__ema::after {
  content: attr(data-text);
  -webkit-text-stroke: 0.08em var(--ink);
  color: var(--ink);
}
.badge__ema > span {
  z-index: 1;
  background: linear-gradient(105deg,
    #ffffff 0%, #ffffff 40%, #c9d1db 47%, #ffffff 54%, #ffffff 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 6s 2.4s ease-in-out infinite;
}

/* STUDIO – czarna zakładka pod spodem */
.badge__tab {
  position: absolute;
  right: 0.1em;
  bottom: 0.02em;
  display: inline-flex;
  align-items: center;
  height: 0.26em;
  padding: 0 0.14em 0 0.18em;
  background: var(--ink);
  border-radius: 0.04em;
  transform: skewX(-14deg);
  box-shadow: 0 0 0 0.035em var(--brand);
  opacity: 0;
  animation: tab-in 0.6s 1.15s var(--ease-race) forwards;
}
.badge__tab span {
  display: block;
  transform: skewX(14deg);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 0.15em;
  letter-spacing: 0.12em;
  margin-right: -0.12em;
  color: #fff;
  text-transform: uppercase;
}

/* iskra połysku nad A */
.badge__spark {
  position: absolute;
  z-index: 2;
  top: -0.06em;
  right: 0.02em;
  width: 0.24em;
  height: 0.24em;
  color: #fff;
  filter: drop-shadow(0 0 0.04em rgba(255, 255, 255, 0.9));
  transform: scale(0) rotate(-90deg);
  animation:
    spark-in 0.5s 1.5s var(--ease-race) forwards,
    twinkle 4s 2.4s ease-in-out infinite;
}
.badge__spark svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* smugi prędkości przy wejściu */
.logo__streaks {
  position: absolute;
  inset: 0 -20vw;
  pointer-events: none;
  overflow: hidden;
}
.logo__streaks i {
  position: absolute;
  left: 0;
  height: 3px;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  transform: translateX(-120%) skewX(-20deg);
  opacity: 0;
  animation: streak 0.8s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}
.logo__streaks i:nth-child(1) { top: 26%; animation-delay: 0.35s; }
.logo__streaks i:nth-child(2) { top: 50%; width: 55%; height: 2px; background: linear-gradient(90deg, transparent, #fff, transparent); animation-delay: 0.45s; }
.logo__streaks i:nth-child(3) { top: 72%; width: 30%; animation-delay: 0.52s; }

/* ---------- Tekst ---------- */
.tagline {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-stretch: 112%;
  font-size: clamp(13px, 1.6vw, 15px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.soon {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-stretch: 125%;
  font-size: 11px;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Kontakt ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(4px, 2vh, 20px);
}

.contact__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
  font-stretch: 110%;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease-out);
}
.contact__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out);
}
.contact__item:hover {
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.contact__item:hover::before { transform: translateX(100%); }

.contact__item svg,
.social svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.social svg .fill { fill: currentColor; }

/* ---------- Social ---------- */
.social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease-out);
}
.social a:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.social svg { width: 20px; height: 20px; }

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ---------- Wejście reszty treści ---------- */
.tagline, .contact, .social, .soon {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s var(--ease-out) forwards;
}
.tagline { animation-delay: 1.6s; }
.contact { animation-delay: 1.8s; }
.social  { animation-delay: 1.95s; }
.soon    { animation-delay: 2.1s; }

/* ---------- Keyframes ---------- */
@keyframes fade { to { opacity: 1; } }

@keyframes slam {
  0%   { opacity: 0; transform: translateX(-30vw) skewX(-20deg) scale(1.15); }
  55%  { opacity: 1; }
  75%  { transform: translateX(1.5%) skewX(4deg) scale(0.98); }
  100% { opacity: 1; transform: none; }
}

@keyframes tab-in {
  from { opacity: 0; transform: translateX(40%) skewX(-14deg); }
  to   { opacity: 1; transform: skewX(-14deg); }
}

@keyframes spark-in {
  to { transform: scale(1) rotate(0); }
}

@keyframes twinkle {
  0%, 70%, 100% { opacity: 1; scale: 1; }
  80% { opacity: 0.4; scale: 0.6; }
  88% { opacity: 1; scale: 1.25; }
}

@keyframes streak {
  0%   { opacity: 0; transform: translateX(-120%) skewX(-20deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(330%) skewX(-20deg); }
}

@keyframes line-in { to { transform: scaleX(1); } }

@keyframes line-run {
  0%   { transform: translateX(-120%); }
  45%, 100% { transform: translateX(440%); }
}

@keyframes rise { to { opacity: 1; transform: none; } }

@keyframes sheen {
  0%   { background-position: 100% 0; }
  40%, 100% { background-position: 0% 0; }
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-5%, 3%); }
  40%  { transform: translate(3%, -6%); }
  60%  { transform: translate(-7%, -2%); }
  80%  { transform: translate(5%, 6%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Mniej ruchu ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grain { animation: none; }
}
