@font-face {
    font-family: "Old English Text MT";
    src: url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.eot");
    src: url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.eot?#iefix") format("embedded-opentype"),
         url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.woff2") format("woff2"),
         url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.woff") format("woff"),
         url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.ttf") format("truetype"),
         url("https://db.onlinewebfonts.com/t/f3258385782c4c96aa24fe8b5d5f9782.svg#Old English Text MT") format("svg");
}

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

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Barlow Semi Condensed', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    animation: fadeIn 1s ease-in-out forwards;
    transition: background-color 1s ease, color 1s ease;
}

/* Szary "znak wodny" — ten sam co na resztcie sklepu (główna, produkt,
   polityka, 404, przerwa techniczna). Do tej pory brakowało go tylko
   tutaj — teraz strona "wkrótce" jest spójna z całą resztą. */
body::before {
    content: "dystomia";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    font-family: 'Old English Text MT', 'Times New Roman', serif;
    font-size: clamp(150px, 36vw, 560px);
    line-height: 1;
    color: #000000;
    opacity: 0.05;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}

#head { height: 100px; display: flex; align-items: center; justify-content: center; }

#napis, #soon {
    font-family: 'Old English Text MT';
    font-size: clamp(40px, 9vw, 60px);
    margin: 0;
    background: linear-gradient(to right, #a80808, #a80808, rgb(0, 0, 0) 50%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background 1s ease, transform 0.3s ease;
}

#grid {
    display: grid;
    grid-template-columns: 25% 50% 25%;
    min-width: 100%;
    flex: 1;
}

/* Środkowa komórka siatki: był tu kiedyś sam #soon wyśrodkowany "na
   sztywno" (position: absolute + translate). Teraz to zwykły flex —
   łatwiej dokłada się pod spodem podtytuł i licznik, a wszystko nadal
   ląduje idealnie na środku ekranu. */
.soon-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 24px 16px;
}

#soon {
    position: relative;
    display: inline-block;
    /* Na stronach to <h1> (SEO) — bez tego przeglądarka dorobiłaby
       pogrubienie, którego krój "Old English Text MT" nie ma. */
    font-weight: normal;
}

/* Delikatna czerwona kreska pod "coming soon" — ten sam motyw co
   podkreślenie nazwy produktu na stronie głównej (spójność stylu). */
#soon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 46px;
    height: 2px;
    background: #a80808;
    transform: translateX(-50%);
    opacity: 0.7;
}

#soon-sub {
    margin: 0;
    font-size: clamp(11px, 2.6vw, 13px);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a9a9a;
    font-weight: 600;
}

/* ---- Licznik do premiery (soon.js wypełnia wartości i odkrywa) ---- */
#launch-countdown {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#launch-countdown.visible {
    opacity: 1;
    transform: none;
}

.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.6em;
}

.cd-num {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #161616;
    line-height: 1;
}

.cd-label {
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a80808;
    font-weight: 700;
}

.cd-sep {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(18px, 4.4vw, 24px);
    font-weight: 700;
    color: #d8d8d8;
    transform: translateY(-6px);
}

/* ---- Zapis na newsletter (soon-newsletter.js) ----
   Celowo kameralny: mała "pigułka" z jedną, okrągłą strzałką zamiast dużego
   pola i czerwonego przycisku — ma być dodatkiem do napisu "coming soon",
   nie jego konkurencją. Wjeżdża wolno po załadowaniu strony. Chowa się
   razem z całą siatką (#grid) pod "I see you" (body.demon) i pod
   finałowym odliczaniem (body.final-countdown) — patrz niżej. */
.soon-nl {
    position: relative;
    width: 100%;
    max-width: 290px;
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(6px);
    animation: soonNlIn 1s ease 0.8s forwards;
}

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

.soon-nl-label {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
    font-weight: 600;
}

.soon-nl-row {
    position: relative;
    width: 100%;
}

.soon-nl-row input {
    width: 100%;
    height: 38px;
    padding: 0 46px 0 16px;
    font: inherit;
    font-size: 14px;
    color: #161616;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dadada;
    border-radius: 999px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.soon-nl-row input::placeholder { color: #a8a8a8; }

.soon-nl-row input:hover { border-color: #c4c4c4; }

.soon-nl-row input:focus {
    background: #ffffff;
    border-color: rgba(168, 8, 8, 0.55);
    box-shadow: 0 0 0 3px rgba(168, 8, 8, 0.08);
}

.soon-nl-row button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
    background: #a80808;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
}

.soon-nl-row button:hover:not(:disabled) { background: #8a0606; transform: translateX(1px); }
.soon-nl-row button:active:not(:disabled) { transform: scale(0.92); }
.soon-nl-row button:disabled { opacity: 0.5; cursor: default; }
.soon-nl-row button:focus-visible { outline: 2px solid #161616; outline-offset: 2px; }

/* Pułapka na boty — niewidoczna dla ludzi, poza ekranem, bez fokusu. */
.soon-nl-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.soon-nl-msg {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.soon-nl-msg:empty { display: none; }
.soon-nl-msg.is-ok { color: #1a7f3c; }
.soon-nl-msg.is-error { color: #a80808; }

.soon-nl-hint {
    margin: 0;
    font-size: 11px;
    color: #b3b3b3;
    text-align: center;
}

/* Ruch wyłączany przy prefers-reduced-motion (jak wszystkie animacje w sklepie). */
@media (prefers-reduced-motion: reduce) {
    .soon-nl { animation: none; opacity: 1; transform: none; }
}

#social { display: flex; justify-content: center; gap: 10px; font-size: 15px; text-align: center; flex-wrap: wrap; }
#social p { margin: 0; }
#social a { color: #000; text-decoration: none; transition: opacity 0.2s ease; }
#social a:hover { text-decoration: underline; opacity: 0.6; }

#near {
    text-align: center;
    font-size: 13px;
    color: gray;
    font-family: 'Courier New', Courier, monospace;
    margin-top: auto;
    padding: 10px 0 18px;
}
#near p { margin: 0; }

@keyframes fadeIn { to { opacity: 1; visibility: visible; } }

/* Bardzo subtelne "oddychanie" logo/napisu — ledwo zauważalne, żeby
   strona nie stała zupełnie bez życia w oczekiwaniu na premierę.
   Wyłączane przy prefers-reduced-motion, jak wszystkie animacje w tym
   sklepie. */
@media (prefers-reduced-motion: no-preference) {
    #soon {
        animation: soonBreathe 3.6s ease-in-out infinite;
    }
}

@keyframes soonBreathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

@media (max-width: 768px) {
    #grid { grid-template-columns: 1% 98% 1%; }
    #launch-countdown { gap: 6px; }
    .cd-unit { min-width: 2.2em; }
}

/* DEMON FLASH EFFECT */
#demonText {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Old English Text MT';
    font-size: 60px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    color: #fff;
}

body.demon {
    background-color: #000;
    color: #fff;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.demon #napis,
body.demon #social,
body.demon #near,
body.demon #grid {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ---- Finałowe odliczanie (ostatnie 10 sekund do premiery/otwarcia) ----
   Ten sam pomysł co "I see you" wyżej (czarne tło, reszta strony znika)
   — tylko zamiast wpisywanego tekstu, wielka gradientowa liczba sekund.
   "I see you" jest w tym oknie CAŁKOWICIE wyłączone, nie tylko schowane
   (patrz soon.js/launch.js — setDemonDisabled), żeby oba efekty nigdy się
   nie nałożyły. Logika (kiedy wejść/wyjść, co pokazać) w JS — tu tylko
   wygląd. */
body.final-countdown {
    background-color: #000;
    transition: background-color 0.4s ease;
}

body.final-countdown #napis,
body.final-countdown #social,
body.final-countdown #near,
body.final-countdown #grid,
body.final-countdown .ck-card {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Wielka liczba — ten sam gradient i krój co logo "dystomia" (#napis/#soon
   wyżej: czerwień -> czerwień -> ciemny), tylko z BIAŁYM końcem zamiast
   czarnego (na czarnym tle czarny koniec gradientu byłby po prostu
   niewidoczny). */
#finalCountdownNumber {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-family: 'Old English Text MT';
    font-size: clamp(140px, 34vw, 320px);
    line-height: 1;
    font-weight: normal;
    background: white;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 36px rgba(255, 255, 255, 0.18));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.final-countdown #finalCountdownNumber {
    opacity: 1;
}

/* "Puls" przy każdej zmianie cyfry — klasa dorzucana i zdejmowana w JS co
   sekundę (soon.js/launch.js), żeby animacja odpalała się na nowo za
   każdym tiknięciem, nie tylko raz przy wejściu w tryb finałowy. */
@media (prefers-reduced-motion: no-preference) {
    #finalCountdownNumber.final-countdown-tick {
        animation: finalCountdownPulse 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
}

@keyframes finalCountdownPulse {
    0% { transform: translate(-50%, -50%) scale(1.35); filter: drop-shadow(0 0 60px rgba(255, 255, 255, 0.5)); }
    60% { transform: translate(-50%, -50%) scale(0.97); }
    100% { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 36px rgba(255, 255, 255, 0.18)); }
}
