/*
 * MaturaTracker — landing
 * Kolory i Inter wzięte z aplikacji (styl Graphite), szeroki Archivo na nagłówki i licznik.
 */
/* Czcionki trzymane u nas (bez Google Fonts — żadnego IP do Google'a). Licencja SIL OFL: fonts/LICENSE-*.txt */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(fonts/archivo-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(fonts/archivo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/inter-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/inter-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/inter-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/inter-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/inter-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/inter-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
    --asfalt: #0b0b0e;
    --grafit: #15151a;
    --grafit-2: #1c1c23;
    --linia: rgba(255, 255, 255, 0.08);
    --kreda: #ececf1;
    --popiol: #a3a3b4;
    --fiolet: #8b5cf6;
    --fiolet-mocny: #7c3aed;
    --fiolet-tlo: rgba(139, 92, 246, 0.14);

    --f-bad: #ef4444;
    --f-weak: #f97316;
    --f-avg: #f59e0b;
    --f-good: #eab308;
    --f-vgood: #84cc16;
    --f-excel: #22c55e;
    --f-max: #fbbf24;

    --font-body: 'Inter', system-ui, sans-serif;
    --font-wide: 'Archivo', 'Arial Black', sans-serif;

    --r-lg: 1.125rem;
    --r-md: 0.75rem;
    --r-sm: 0.5rem;
}

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

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

body {
    margin: 0;
    background: var(--asfalt);
    background-image: radial-gradient(ellipse 70% 45% at 70% -5%, rgba(124, 58, 237, 0.10) 0%, transparent 60%);
    color: var(--kreda);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--fiolet);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

/* ---------- nagłówek ---------- */
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.375rem;
    padding-bottom: 1.375rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    font-family: var(--font-wide);
    font-stretch: 112%;
    font-weight: 800;
    font-size: 1.05rem;
}

.social {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: var(--popiol);
}

.social a {
    text-decoration: none;
}

.social a:hover {
    color: var(--kreda);
}

/* ---------- hero ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 2.5rem;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 6rem;
}

h1,
h2 {
    font-family: var(--font-wide);
    font-stretch: 118%;
    font-weight: 850;
    letter-spacing: -0.01em;
    line-height: 1.04;
    margin: 0;
}

h1 {
    font-size: clamp(2.3rem, 4.6vw, 3.7rem);
    max-width: 13ch;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.lead {
    margin: 1.5rem 0 2rem;
    max-width: 34rem;
    color: var(--popiol);
    font-size: 1.15rem;
}

/* ---------- formularz ---------- */
.waitlist {
    max-width: 34rem;
}

.field-row {
    display: flex;
    gap: 0.5rem;
}

.waitlist input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.875rem 1rem;
    border: 1px solid var(--linia);
    border-radius: var(--r-md);
    background: var(--grafit);
    color: var(--kreda);
    font: inherit;
}

.waitlist input[type="email"]::placeholder {
    color: #6f6f80;
}

.waitlist input[type="email"]:focus {
    outline: none;
    border-color: var(--fiolet);
    box-shadow: 0 0 0 3px var(--fiolet-tlo);
}

.waitlist button {
    flex: 0 0 auto;
    padding: 0.875rem 1.25rem;
    border: 0;
    border-radius: var(--r-md);
    background: var(--fiolet-mocny);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.waitlist button:hover {
    background: var(--fiolet);
}

.waitlist button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.consent {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    margin-top: 0.875rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--popiol);
    cursor: pointer;
}

.consent input {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    margin: 1px 0 0;
    accent-color: var(--fiolet-mocny);
}

.form-msg {
    min-height: 1.4em;
    margin: 0.75rem 0 0;
    font-size: 0.92rem;
}

.form-msg.ok {
    color: var(--f-excel);
}

.form-msg.err {
    color: #f87171;
}

.waitlist.sent .field-row,
.waitlist.sent .consent {
    display: none;
}

.launch-note {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #7c7c8e;
}

/* ---------- pytania ---------- */
.faq {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
    border-top: 1px solid var(--linia);
}

.faq h2 {
    margin-bottom: 1.5rem;
}

.faq details {
    max-width: 46rem;
    border-bottom: 1px solid var(--linia);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    flex: 0 0 auto;
    color: var(--fiolet);
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    margin: 0 0 1.25rem;
    color: var(--popiol);
    max-width: 40rem;
}

/* ---------- stopka ---------- */
.bottom {
    border-top: 1px solid var(--linia);
    font-size: 0.85rem;
    color: #7c7c8e;
}

.bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.bottom-row p {
    margin: 0;
}

.bottom nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.bottom a {
    text-decoration: none;
}

.bottom a:hover {
    color: var(--kreda);
}

/* ---------- strony tekstowe (polityka) ---------- */
.doc {
    max-width: 46rem;
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.doc h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    max-width: none;
    margin-bottom: 0.5rem;
}

.doc h2 {
    font-family: var(--font-body);
    font-stretch: normal;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2.25rem 0 0.5rem;
}

.doc p,
.doc li {
    color: #c9c9d4;
}

.doc .meta {
    color: #7c7c8e;
    font-size: 0.9rem;
}

.doc .todo {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    padding: 0 4px;
    border-radius: 4px;
}

/* ---------- hero: data startu ---------- */
.eyebrow {
    margin: 0 0 1.125rem;
}

.eyebrow span {
    display: inline-block;
    padding: 0.3125rem 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    color: #fcd34d;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- mniejsze ekrany ---------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .hero {
        padding-top: 1.5rem;
        padding-bottom: 4rem;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .faq {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .top .social a:not(.nav-faq) {
        display: none;
    }

    .brand span {
        font-size: 0.95rem;
    }

    .field-row {
        flex-direction: column;
    }

}

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

/* nazwa w logo jak w aplikacji: fioletowy gradient */
.brand span {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #8b5cf6;
}

[hidden] {
    display: none !important;
}

/* ---------- pokaz aplikacji w hero: zapętlony klip wtopiony w tło ---------- */
main {
    overflow-x: clip;                /* klip wychodzi poza prawą krawędź treści — bez poziomego przewijania */
}

.showcase {
    --clip-blur: 0px;                /* ostro (np. 0.7px = lekkie rozmycie) */
    position: relative;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.showcase::before {
    content: '';
    position: absolute;
    inset: 5% 0 5% 10%;
    background: radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.24), transparent 70%);
    filter: blur(40px);
}

.showcase-frame {
    position: relative;
    /* na szerokim ekranie klip jest większy: wychodzi w prawo poza kolumnę, ale nie dalej niż do krawędzi okna */
    width: calc(100% + min(440px, (100vw - min(100vw, 1140px)) / 2 + 24px));
    aspect-ratio: 1920 / 986;
    overflow: hidden;
    /* wszystkie krawędzie rozpływają się w tle strony, rogi najmocniej */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 76%, transparent), linear-gradient(to bottom, transparent, #000 13%, #000 78%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 76%, transparent), linear-gradient(to bottom, transparent, #000 13%, #000 78%, transparent);
    mask-composite: intersect;
}

.showcase-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);          /* rozmycie nie zostawia jasnej obwódki */
    filter: blur(var(--clip-blur)) brightness(0.92) saturate(1.05);
}

@media (max-width: 900px) {
    .showcase-frame { width: auto; margin: 0 -16px; aspect-ratio: 3 / 2; } /* na telefonie środek klipu, trochę większy */
}

/* pułapka na boty w formularzu zapisu: pole niewidoczne dla ludzi */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* =====================================================================
 * 27.10 — strona na całą szerokość, większe logo i klip, zmieniający się nagłówek
 * ===================================================================== */
:root {
    --pad: clamp(16px, 5vw, 6rem);   /* odstęp treści od krawędzi okna */
}

.wrap {
    max-width: none;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* logo trochę większe */
.brand { gap: 0.75rem; font-size: 1.3rem; }
.brand img { width: 3rem; height: auto; }

/* hero: tekst po lewej, klip po prawej aż do krawędzi okna */
@media (min-width: 901px) {
    .hero { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 2rem; }
}
h1 { font-size: clamp(2.3rem, 4.3vw, 5rem); }
.showcase-frame { width: calc(100% + var(--pad)); }

/* zmieniający się nagłówek: hasła leżą w tej samej komórce, wjeżdżają od lewej do prawej */
.rot { display: grid; }
.rot-item { grid-area: 1 / 1; align-self: start; }               /* każde hasło zaczyna się od góry */
.rot-item + .rot-item { visibility: hidden; }               /* bez skryptu widać tylko pierwsze hasło */
.rot.ready .rot-item {
    visibility: visible;
    clip-path: inset(-0.2em 100% -0.2em 0);                 /* schowane: odsłania się od lewej */
    opacity: 0.4;
    transition: clip-path 1s cubic-bezier(0.65, 0, 0.25, 1), opacity 1s ease;
}
.rot.ready .rot-item.is-on { clip-path: inset(-0.2em 0 -0.2em 0); opacity: 1; }
.rot.ready .rot-item.is-out { clip-path: inset(-0.2em 0 -0.2em 100%); opacity: 0.4; transition-duration: 0.7s; }  /* znika w prawo */
.rot.ready .rot-item.no-anim { transition: none; }

/* „matury.” w gradiencie jak w logo; gdy hasło wjedzie, przez słowo przechodzi błysk i lekka poświata */
.grad {
    background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%), linear-gradient(90deg, #a78bfa, #f97316);
    background-size: 260% 100%, 100% 100%;
    background-position: 130% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.rot.ready .rot-item.is-on .grad { animation: gradShine 1.5s cubic-bezier(0.45, 0, 0.25, 1) 0.8s both; }
@keyframes gradShine {
    0% { background-position: 130% 0, 0 0; filter: drop-shadow(0 0 0 rgba(249, 115, 22, 0)); }
    45% { filter: drop-shadow(0 0 22px rgba(249, 115, 22, 0.5)); }
    100% { background-position: -30% 0, 0 0; filter: drop-shadow(0 0 0 rgba(249, 115, 22, 0)); }
}
@media (prefers-reduced-motion: reduce) {
    .rot.ready .rot-item.is-on .grad { animation: none; }
}


@media (max-width: 900px) {
    .showcase-frame { width: auto; margin: 0 calc(-1 * var(--pad)); }
}

@media (max-width: 560px) {
    .wrap { padding-left: var(--pad); padding-right: var(--pad); }
    .brand span { font-size: 1.1rem; }
    .brand img { width: 2.625rem; }
}

/* pytania na osobnej stronie (pytania.html) i link do nich pod formularzem */
.launch-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.launch-note a:hover { color: var(--kreda); }
.faq-page .faq { padding: 0.75rem 0 0; border-top: 0; }
.faq-back { margin-top: 2rem; }
.faq-back a { color: var(--kreda); text-decoration: none; font-weight: 600; }
.faq-back a:hover { color: #c4b5fd; }

/* =====================================================================
 * 2.11 — podpis pod klipem + duże ekrany (4K)
 * ===================================================================== */

/* podpis pod klipem: wchodzi w rozmyty dół filmu, wyśrodkowany na widocznej części klipu */
.showcase-note {
    position: relative;
    width: calc(100% + var(--pad));
    margin: -2rem 0 0;
    padding: 0 24% 0 12%;
    text-align: center;
    font-size: 0.8rem;
    color: #7c7c8e;
}
@media (max-width: 900px) {
    .showcase-note { width: auto; margin-top: -0.5rem; padding: 0; }
}

/* stopka zawsze na dole okna; na wysokim ekranie hero stoi pośrodku wolnego miejsca */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1 0 auto; }
main:not(.doc) { display: flex; flex-direction: column; justify-content: center; }

/* ekran szerszy niż 1920 px (np. 4K): cała strona rośnie proporcjonalnie, jak powiększony widok 1920 × 960.
   Wszystkie odstępy są w rem, więc skaluje się razem z czcionką. Na zwykłych ekranach i telefonach bez zmian. */
@media (min-width: 1921px) {
    html { font-size: max(100%, min(100vw / 120, 100vh / 60)); }
}
/* bardzo szeroki, a niski ekran (ultrawide): treść nie rozjeżdża się na boki */
.wrap:not(.doc) { max-width: 120rem; }
/* polityka i pytania: tekst w wygodnej szerokości (wcześniej rozciągał się na cały ekran) */
.doc > * { max-width: 46rem; }
