/* =========================================================
   MORALNE SALTO — Nadchodzi (jeden ekran, statyczna)
   Czarne tło, monochromia, premium, mobile-first.
   Bez scrolla. Animacje tylko fade-in (transform/opacity).
   ========================================================= */

:root {
  --bg: #000000;
  --white: #ffffff;
  --grey-1: rgba(255, 255, 255, 0.72);
  --grey-2: rgba(255, 255, 255, 0.46);
  --grey-3: rgba(255, 255, 255, 0.26);
  --hairline: rgba(255, 255, 255, 0.10);

  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --gut: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden; /* brak przewijania — wszystko na jednym ekranie */
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 1px solid var(--grey-1);
  outline-offset: 6px;
  border-radius: 4px;
}

/* Statyczna, bardzo subtelna poświata za logo — dodaje głębi, bez ruchu */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    90% 70% at 50% 42%,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0) 60%
  );
}

/* =========================================================
   EKRAN
   ========================================================= */
.screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh; /* fallback */
  min-height: 100dvh;
  padding:
    calc(var(--safe-t) + 22px)
    calc(var(--gut) + var(--safe-r))
    calc(var(--safe-b) + 22px)
    calc(var(--gut) + var(--safe-l));
}

/* Główny blok — idealnie wyśrodkowany w pionie */
.content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 620px;
  text-align: center;
}

/* ---------------- NADCHODZI ---------------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--grey-2);
  /* kompensata trackingu, by tekst był optycznie wyśrodkowany */
  text-indent: 0.46em;

  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.9s ease 0.15s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

/* ---------------- LOGO GŁÓWNE ---------------- */
.logo {
  width: clamp(240px, 82vw, 520px);
  height: auto;
  margin-top: 26px;

  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 1.3s ease 0.25s,
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

/* ---------------- COUNTDOWN ---------------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(16px, 6vw, 30px);
  margin-top: 38px;
  padding: 14px clamp(16px, 5vw, 26px) 12px;
  border: 1px solid var(--hairline);
  border-radius: 16px;

  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.9s ease 0.55s,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.55s;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.num {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(34px, 11vw, 56px);
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.label {
  margin-top: 11px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey-2);
  text-indent: 0.3em;
}

/* Stan końcowy */
.done {
  display: none;
  margin-top: 38px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 11vw, 50px);
  letter-spacing: 0.16em;
  text-transform: uppercase;

  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition:
    opacity 1.1s ease,
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.done.is-active {
  display: block;
}

.done.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------------- DATA ---------------- */
.date-line {
  margin-top: 22px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-3);
  text-indent: 0.28em;

  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.9s ease 0.8s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

/* =========================================================
   INSTAGRAM (na dole ekranu)
   ========================================================= */
.social {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 6px;
  color: var(--grey-1);
  transition:
    color 0.3s ease,
    opacity 0.9s ease 1s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1s;

  opacity: 0;
  transform: translateY(10px);
}

.social:hover,
.social:focus-visible {
  color: var(--white);
}

.social__icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.social:hover .social__icon,
.social:focus-visible .social__icon {
  opacity: 1;
}

.social__handle {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

/* =========================================================
   STAN PO ZAŁADOWANIU — fade-in wejścia
   ========================================================= */
.is-loaded .eyebrow,
.is-loaded .countdown,
.is-loaded .date-line,
.is-loaded .social {
  opacity: 1;
  transform: translateY(0);
}

.is-loaded .logo {
  opacity: 1;
  transform: scale(1);
}

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */
@media (min-width: 600px) {
  :root {
    --gut: 40px;
  }

  .unit {
    min-width: 64px;
  }

  .social__handle {
    font-size: 13px;
  }
}

@media (min-width: 900px) {
  .logo {
    width: clamp(360px, 40vw, 560px);
  }

  .num {
    font-size: 58px;
  }
}

/* Niskie ekrany / orientacja pozioma — wszystko musi zmieścić się bez scrolla */
@media (max-height: 620px) {
  .logo {
    width: clamp(180px, 46vw, 360px);
    margin-top: 16px;
  }

  .countdown {
    margin-top: 22px;
    padding: 10px 18px 8px;
  }

  .num {
    font-size: clamp(26px, 8vw, 40px);
  }

  .date-line {
    margin-top: 16px;
  }
}

/* =========================================================
   DOSTĘPNOŚĆ — ograniczony ruch
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }

  .eyebrow,
  .logo,
  .countdown,
  .date-line,
  .social {
    opacity: 1 !important;
    transform: none !important;
  }
}
