/* ============================================================
   LANDING.CSS — nowa strona główna Pomocnik Maturalny
   Ładowane TYLKO na index.html, po styles.css.
   Motyw: niebieski #2563EB na jasnym tle + akcenty fiolet/cyjan
   ============================================================ */

:root {
    --pm-blue: #2563EB;
    --pm-blue-dark: #1E40AF;
    --pm-blue-light: #60A5FA;
    --pm-violet: #7C3AED;
    --pm-cyan: #06B6D4;
    --pm-ink: #0F172A;
    --pm-gray: #64748B;
    --pm-line: #E2E8F0;
    --pm-grad: linear-gradient(100deg, #2563EB 0%, #7C3AED 55%, #06B6D4 100%);
    --pm-radius: 20px;
    --pm-shadow-sm: 0 4px 16px rgba(15, 23, 42, .06);
    --pm-shadow-md: 0 12px 40px rgba(15, 23, 42, .10);
    --pm-shadow-lg: 0 30px 80px rgba(37, 99, 235, .18);
    --pm-ease: cubic-bezier(.22, 1, .36, 1);
}

body.landing {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pm-ink);
    background: #F8FAFC;
    overflow-x: clip;
}

body.landing h1,
body.landing h2,
body.landing h3 {
    font-family: 'Sora', 'Manrope', -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

body.landing ::selection {
    background: rgba(37, 99, 235, .2);
}

/* ---------- Pasek postępu scrollowania ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3.5px;
    background: var(--pm-grad);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 3000;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(37, 99, 235, .5);
}

/* ---------- NAVBAR (szklany, smuklejszy) ---------- */
body.landing .navbar {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
    box-shadow: none;
    transition: box-shadow .3s ease, background .3s ease;
}

body.landing .nav-container {
    height: 76px;
    padding: 0 20px;
}

body.landing .logo-image {
    height: 92px !important;
    max-width: 420px !important;
}

body.landing .nav-link {
    font-weight: 600;
}

body.landing .auth-link {
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-x {
    position: relative;
    min-height: calc(100svh - 76px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 64px 0 96px;
    isolation: isolate;
}

/* --- warstwy tła: aurora + siatka + glify --- */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(1200px 700px at 85% -10%, rgba(96, 165, 250, .22), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(124, 58, 237, .12), transparent 60%),
        linear-gradient(180deg, #FFFFFF 0%, #F1F5FF 55%, #F8FAFC 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(37, 99, 235, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, .07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
    animation: gridDrift 26s linear infinite;
}

@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 56px 56px, 56px 56px; }
}

/* UWAGA: bloby są "rozmyte" samym gradientem radialnym — filter: blur()
   na tak dużych elementach potrafi wywalić rendering (pusta strona) */
.blob {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
}

.blob-1 {
    width: 880px; height: 880px;
    top: -340px; right: -280px;
    background: radial-gradient(circle, rgba(96, 165, 250, .5) 0%, rgba(37, 99, 235, .22) 38%, transparent 68%);
    animation: blobFloat 16s ease-in-out infinite alternate;
}

.blob-2 {
    width: 760px; height: 760px;
    bottom: -380px; left: -320px;
    background: radial-gradient(circle, rgba(167, 139, 250, .38) 0%, rgba(124, 58, 237, .16) 40%, transparent 68%);
    animation: blobFloat 20s ease-in-out infinite alternate-reverse;
}

.blob-3 {
    width: 560px; height: 560px;
    top: 30%; left: 30%;
    background: radial-gradient(circle, rgba(103, 232, 249, .26) 0%, rgba(6, 182, 212, .1) 40%, transparent 66%);
    animation: blobPulse 14s ease-in-out infinite;
}

@keyframes blobFloat {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

@keyframes blobPulse {
    0%, 100% { transform: scale(1); opacity: .16; }
    50%      { transform: scale(1.25); opacity: .3; }
}

/* dryfujące symbole szkolne */
.glyphs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.glyph {
    position: absolute;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: rgba(37, 99, 235, .16);
    user-select: none;
    animation: glyphFloat var(--dur, 11s) ease-in-out var(--del, 0s) infinite alternate;
}

.glyph.violet { color: rgba(124, 58, 237, .13); }
.glyph.cyan   { color: rgba(6, 182, 212, .15); }

@keyframes glyphFloat {
    from { transform: translate3d(0, 0, 0) rotate(var(--rot, -6deg)); }
    to   { transform: translate3d(0, -26px, 0) rotate(calc(var(--rot, -6deg) * -1)); }
}

/* --- układ hero --- */
.hero-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 48px;
    align-items: center;
}

.hero-copy { position: relative; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(37, 99, 235, .18);
    box-shadow: var(--pm-shadow-sm);
    font-weight: 700;
    font-size: 14px;
    color: var(--pm-blue-dark);
    animation: heroIn .8s var(--pm-ease) both;
}

.hero-badge .dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
    animation: dotPulse 2s ease-out infinite;
}

@keyframes dotPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-h1 {
    margin: 22px 0 0;
    font-size: clamp(44px, 6.2vw, 76px);
    line-height: 1.03;
    font-weight: 800;
    color: var(--pm-ink);
    animation: heroIn .8s .08s var(--pm-ease) both;
}

.hero-h1 .grad {
    background: var(--pm-grad);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradShift 6s ease-in-out infinite alternate;
}

@keyframes gradShift {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}

.hero-sub {
    margin-top: 20px;
    max-width: 520px;
    font-size: 19px;
    line-height: 1.65;
    color: var(--pm-gray);
    animation: heroIn .8s .16s var(--pm-ease) both;
}

.hero-sub strong { color: var(--pm-ink); }

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
    animation: heroIn .8s .24s var(--pm-ease) both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* przycisk główny — gradient + połysk + magnetyczny (JS) */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 38px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(100deg, #2563EB, #4F46E5 60%, #7C3AED);
    background-size: 180% 100%;
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .35);
    transition: background-position .4s ease, box-shadow .3s ease, transform .2s ease;
    will-change: transform;
}

.btn-primary:hover {
    background-position: 100% 0;
    box-shadow: 0 20px 48px rgba(79, 70, 229, .42);
}

.btn-primary .shine {
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg);
    animation: shineSweep 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shineSweep {
    0%, 55% { left: -80%; }
    85%, 100% { left: 130%; }
}

.btn-primary svg { transition: transform .3s var(--pm-ease); }
.btn-primary:hover svg { transform: translateX(5px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 30px;
    border-radius: 999px;
    border: 1.5px solid var(--pm-line);
    background: rgba(255, 255, 255, .75);
    color: var(--pm-ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.btn-ghost:hover {
    border-color: var(--pm-blue);
    transform: translateY(-2px);
    box-shadow: var(--pm-shadow-sm);
}

/* --- licznik do matury (szklany pasek) --- */
.countdown-x {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
    padding: 18px 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .75);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: var(--pm-shadow-md);
    animation: heroIn .8s .32s var(--pm-ease) both;
}

.cd-item { text-align: center; min-width: 66px; flex: none; }

.cd-num {
    font-family: 'Sora', sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    padding: 0 3px;
    background: linear-gradient(180deg, #1E40AF, #2563EB);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
}

.cd-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--pm-gray);
    margin-top: 2px;
}

.cd-sep {
    font-size: 26px;
    font-weight: 800;
    color: rgba(37, 99, 235, .35);
    padding-bottom: 16px;
    animation: sepBlink 1s steps(2, start) infinite;
}

@keyframes sepBlink { to { visibility: hidden; } }

.cd-caption {
    margin-left: 18px;
    padding-left: 20px;
    border-left: 1px solid var(--pm-line);
    font-size: 14px;
    font-weight: 700;
    color: var(--pm-ink);
    line-height: 1.4;
}

.cd-caption small {
    display: block;
    font-weight: 600;
    color: var(--pm-gray);
}

/* ============================================================
   TELEFON — żywa makieta aplikacji
   ============================================================ */
.hero-app {
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1400px;
    /* zapas na głowę siedzącego nad telefonem — hero ma overflow:hidden */
    padding-top: 96px;
    animation: heroIn .9s .2s var(--pm-ease) both;
}

.phone-x {
    position: relative;
    width: 272px;
    aspect-ratio: 9 / 19.5;
    display: flex;
    flex-direction: column;
    border-radius: 48px;
    background: #0F172A;
    padding: 12px;
    box-shadow:
        0 50px 100px -20px rgba(30, 64, 175, .4),
        0 30px 60px -30px rgba(15, 23, 42, .5),
        inset 0 0 0 2px rgba(255, 255, 255, .08);
    transform-style: preserve-3d;
    transition: transform .25s ease-out;
    animation: phoneBreath 7s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes phoneBreath {
    from { translate: 0 0; }
    to   { translate: 0 -14px; }
}

.phone-x::after {
    /* odbicie światła na ramce */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 48px;
    background: linear-gradient(120deg, rgba(255, 255, 255, .14), transparent 30%, transparent 70%, rgba(255, 255, 255, .08));
    pointer-events: none;
}

.phone-screen-x {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 38px;
    background: linear-gradient(180deg, #F8FAFC, #EFF3FB);
    overflow: hidden;
    padding: 50px 14px 14px;
    text-align: left;
}


.scr-days small { white-space: nowrap; }

.phone-notch-x {
    position: absolute;
    top: 12px; left: 50%;
    transform: translateX(-50%);
    width: 110px; height: 26px;
    border-radius: 999px;
    background: #0F172A;
    z-index: 5;
}

/* UI ekranu przeskalowane do mniejszej ramki telefonu (296px -> 272px) */
.phone-screen-x > * { zoom: 0.92; }

/* pasek statusu */
.scr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 12px;
}

.scr-logo {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--pm-ink);
}

.scr-logo b { color: var(--pm-blue); }

.scr-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--pm-grad);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

/* karta z licznikiem */
.scr-hero {
    border-radius: 20px;
    padding: 18px 16px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(124, 58, 237, .55), transparent 55%),
        linear-gradient(135deg, #1E40AF, #2563EB);
    color: #fff;
    box-shadow: 0 14px 30px rgba(30, 64, 175, .35);
    position: relative;
    overflow: hidden;
}

.scr-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -20%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    animation: blobPulse 9s ease-in-out infinite;
}

.scr-hero-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .85;
}

.scr-days {
    margin-top: 6px;
    font-family: 'Sora', sans-serif;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.scr-days small {
    font-size: 15px;
    font-weight: 700;
    opacity: .85;
    margin-left: 6px;
}

.scr-hero-sub { margin-top: 6px; font-size: 12.5px; font-weight: 600; opacity: .85; }

/* karta postępu */
.scr-card {
    margin-top: 12px;
    border-radius: 18px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

.scr-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    font-weight: 800;
    color: var(--pm-ink);
}

.scr-card-head b {
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    color: var(--pm-blue);
}

.scr-bar {
    height: 8px;
    border-radius: 999px;
    background: #EDF1F7;
    margin-top: 10px;
    overflow: hidden;
}

.scr-bar > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--pm-grad);
    transition: width 1.4s var(--pm-ease);
}

.scr-subj { margin-top: 12px; display: grid; gap: 9px; }

.scr-subj-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pm-ink);
}

.scr-subj-tag {
    display: grid;
    place-items: center;
    height: 24px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 800;
    color: #fff;
}

.scr-subj-tag.pol { background: #2563EB; }
.scr-subj-tag.mat { background: #7C3AED; }
.scr-subj-tag.ang { background: #06B6D4; }

.scr-subj-row .scr-bar { margin-top: 0; height: 7px; }
.scr-subj-row .pct { text-align: right; color: var(--pm-gray); font-variant-numeric: tabular-nums; }

.scr-subj-row[data-c="pol"] i { background: linear-gradient(90deg, #60A5FA, #2563EB); }
.scr-subj-row[data-c="mat"] i { background: linear-gradient(90deg, #A78BFA, #7C3AED); }
.scr-subj-row[data-c="ang"] i { background: linear-gradient(90deg, #67E8F9, #06B6D4); }

/* dzisiejszy plan */
.scr-plan { padding: 12px 16px 14px; }

.scr-plan-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pm-gray);
    margin-bottom: 9px;
}

.scr-plan-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pm-ink);
    padding: 5px 0;
}

.scr-plan-row .st {
    width: 20px; height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.scr-plan-row.done .st { background: rgba(34, 197, 94, .16); color: #16A34A; }
.scr-plan-row.done span { text-decoration: line-through; color: var(--pm-gray); }
.scr-plan-row.todo .st { border: 2px dashed #CBD5E1; color: transparent; }

/* dolny pasek aplikacji */
.scr-tabbar {
    margin-top: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
    display: flex;
    justify-content: space-around;
    padding: 10px 6px;
}

.scr-tab {
    width: 34px; height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #94A3B8;
}

.scr-tab.on {
    background: rgba(37, 99, 235, .12);
    color: var(--pm-blue);
}

/* chłopak siedzący na krawędzi telefonu */
.phone-boy {
    position: absolute;
    /* obrazek 458x821, siedzisko na ~62% wysokości — pupa ląduje na krawędzi */
    top: -129px;
    right: 14px;
    width: 116px;
    height: auto;
    z-index: 6;
    pointer-events: none;
    filter: drop-shadow(0 12px 16px rgba(15, 23, 42, .28));
}

/* pływające chipy wokół telefonu */
.float-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: var(--pm-shadow-md);
    font-size: 13px;
    font-weight: 700;
    color: var(--pm-ink);
    white-space: nowrap;
    animation: chipFloat var(--dur, 6s) ease-in-out var(--del, 0s) infinite alternate;
    z-index: 3;
}

.float-chip small { display: block; font-weight: 600; color: var(--pm-gray); font-size: 11.5px; }

.float-chip .ic {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
}

.chip-1 { top: 8%; left: -12%; --dur: 7s; }
.chip-1 .ic { background: linear-gradient(135deg, #22C55E, #16A34A); }

.chip-2 { bottom: 20%; right: -14%; --dur: 8s; --del: .8s; }
.chip-2 .ic { background: linear-gradient(135deg, #F59E0B, #F97316); }

.chip-3 { bottom: -3%; left: -6%; --dur: 6.4s; --del: 1.6s; }
.chip-3 .ic { background: var(--pm-grad); }

@keyframes chipFloat {
    from { transform: translateY(0); }
    to   { transform: translateY(-16px); }
}

/* poświata pod telefonem */
.phone-glow {
    position: absolute;
    bottom: -8%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 60px;
    background: radial-gradient(ellipse, rgba(37, 99, 235, .35), transparent 70%);
    filter: blur(18px);
    z-index: -1;
}

/* wskaźnik scrolla */
.scroll-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--pm-gray);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .8;
}

.scroll-hint .wheel {
    width: 24px; height: 38px;
    border: 2px solid rgba(100, 116, 139, .5);
    border-radius: 999px;
    position: relative;
}

.scroll-hint .wheel::after {
    content: '';
    position: absolute;
    top: 7px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    border-radius: 999px;
    background: var(--pm-blue);
    animation: wheelDot 1.8s ease-in-out infinite;
}

@keyframes wheelDot {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   TICKER — przesuwający się pasek lektur/tematów
   ============================================================ */
.ticker {
    position: relative;
    padding: 22px 0;
    background: var(--pm-ink);
    overflow: hidden;
    transform: rotate(-1.2deg) scale(1.02);
    margin: -12px 0 40px;
    z-index: 2;
}

.ticker-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: tickerMove 38s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
    display: flex;
    align-items: center;
    gap: 48px;
    color: rgba(255, 255, 255, .85);
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.ticker-item .star { color: var(--pm-blue-light); font-size: 13px; }

@keyframes tickerMove {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   SEKCJE WSPÓLNE + ANIMACJE SCROLL
   ============================================================ */
.section-x { padding: 96px 0; position: relative; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }

.section-kicker {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .09);
    color: var(--pm-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.section-title-x {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--pm-ink);
}

.section-title-x .grad {
    background: var(--pm-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-sub {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--pm-gray);
}

/* reveal on scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .8s var(--pm-ease), transform .8s var(--pm-ease);
    transition-delay: calc(var(--i, 0) * 90ms);
    will-change: opacity, transform;
}

[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal="left"]  { transform: translateX(-44px); }
[data-reveal="right"] { transform: translateX(44px); }
[data-reveal="left"].in-view,
[data-reveal="right"].in-view { transform: translateX(0); }

[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal="zoom"].in-view { transform: scale(1); }

/* ============================================================
   FEATURES — karty z ikonami
   ============================================================ */
.features-x { background: #fff; }

.features-grid-x {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fcard {
    position: relative;
    background: #fff;
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-radius);
    padding: 30px 28px;
    overflow: hidden;
    transition: transform .35s var(--pm-ease), box-shadow .35s var(--pm-ease), border-color .35s ease;
}

.fcard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pm-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--pm-ease);
}

.fcard::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, .08), transparent 70%);
    opacity: 0;
    transition: opacity .4s ease;
}

.fcard:hover {
    transform: translateY(-8px);
    box-shadow: var(--pm-shadow-lg);
    border-color: rgba(37, 99, 235, .35);
}

.fcard:hover::before { transform: scaleX(1); }
.fcard:hover::after  { opacity: 1; }

.fcard-icon {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--pm-blue), var(--pm-violet));
    box-shadow: 0 10px 22px rgba(37, 99, 235, .3);
    transition: transform .35s var(--pm-ease);
}

.fcard:hover .fcard-icon { transform: scale(1.1) rotate(-6deg); }

.fcard h3 {
    margin: 18px 0 10px;
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--pm-ink);
}

.fcard p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--pm-gray);
}

/* ============================================================
   PRZEDMIOTY — panele z animowanymi wizualizacjami
   ============================================================ */
.subjects-x { background: linear-gradient(180deg, #F8FAFC, #EFF4FF 50%, #F8FAFC); }

.subject-panel {
    max-width: 1200px;
    margin: 0 auto 72px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.subject-panel:last-child { margin-bottom: 0; }

.subject-panel.rev .subject-text  { order: 2; }
.subject-panel.rev .subject-visual { order: 1; }

.subject-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 18px;
}

.subject-tag.pol { background: linear-gradient(100deg, #2563EB, #1E40AF); }
.subject-tag.mat { background: linear-gradient(100deg, #7C3AED, #6D28D9); }
.subject-tag.ang { background: linear-gradient(100deg, #06B6D4, #0891B2); }

.subject-text h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    color: var(--pm-ink);
    line-height: 1.15;
}

.subject-text .lead {
    margin-top: 14px;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--pm-gray);
}

.subject-feats {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pm-line);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pm-ink);
    box-shadow: var(--pm-shadow-sm);
    transition: transform .25s var(--pm-ease), border-color .25s ease, box-shadow .25s ease;
}

.feat-pill:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, .4);
    box-shadow: var(--pm-shadow-md);
}

.feat-pill .tick {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(34, 197, 94, .15);
    color: #16A34A;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

/* wspólna rama wizualizacji */
.subject-visual {
    position: relative;
    border-radius: 26px;
    background: #fff;
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-shadow-md);
    padding: 28px;
    min-height: 340px;
    overflow: hidden;
    transition: transform .4s var(--pm-ease), box-shadow .4s var(--pm-ease);
}

.subject-visual:hover {
    transform: translateY(-6px) rotate(-.4deg);
    box-shadow: var(--pm-shadow-lg);
}

.subject-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(500px 260px at 110% -10%, var(--tint, rgba(37, 99, 235, .1)), transparent 60%);
    pointer-events: none;
}

.subject-visual.mat-v { --tint: rgba(124, 58, 237, .12); }
.subject-visual.ang-v { --tint: rgba(6, 182, 212, .12); }

/* --- POLSKI: rozprawka oceniana przez AI --- */
.essay-doc {
    background: #F8FAFC;
    border: 1px solid var(--pm-line);
    border-radius: 16px;
    padding: 20px;
    position: relative;
}

.essay-title {
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--pm-ink);
    margin-bottom: 14px;
}

.essay-line {
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #CBD5E1, #E2E8F0);
    margin-bottom: 10px;
    width: 0;
}

.in-view .essay-line { animation: lineGrow 1s var(--pm-ease) forwards; animation-delay: var(--del, 0s); }

@keyframes lineGrow { to { width: var(--w, 100%); } }

.essay-mark {
    position: relative;
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(34, 197, 94, .14);
    color: #15803D;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
}

.in-view .essay-mark { animation: popIn .5s var(--pm-ease) 1.4s forwards; }

@keyframes popIn {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: scale(1); }
}

.ai-score {
    position: absolute;
    right: 22px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: var(--pm-shadow-md);
    border: 1px solid var(--pm-line);
    opacity: 0;
    z-index: 1;
}

.in-view .ai-score { animation: popIn .6s var(--pm-ease) 1.8s forwards; }

.ai-ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.ai-ring .bg { fill: none; stroke: #EDF1F7; stroke-width: 6; }
.ai-ring .val {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 138.2;
    stroke-dashoffset: 138.2;
}

.in-view .ai-ring .val { animation: ringFill 1.6s var(--pm-ease) 2s forwards; }

@keyframes ringFill { to { stroke-dashoffset: 18; } }

.ai-score-txt { font-size: 12px; font-weight: 700; color: var(--pm-gray); line-height: 1.35; }
.ai-score-txt b { display: block; font-family: 'Sora', sans-serif; font-size: 17px; color: var(--pm-ink); }

/* --- MATEMATYKA: wykres + wzory --- */
.math-canvas { position: relative; }

.math-svg { width: 100%; height: auto; display: block; }

.math-svg .axis  { stroke: #CBD5E1; stroke-width: 1.5; }
.math-svg .gridl { stroke: #EDF1F7; stroke-width: 1; }

.math-svg .curve {
    fill: none;
    stroke: url(#mathGrad);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.in-view .math-svg .curve { animation: drawCurve 2.2s var(--pm-ease) .3s forwards; }

@keyframes drawCurve { to { stroke-dashoffset: 0; } }

.math-svg .pt { fill: #7C3AED; opacity: 0; }
.in-view .math-svg .pt { animation: popIn .4s ease forwards; }
.in-view .math-svg .pt:nth-of-type(1) { animation-delay: 1.2s; }
.in-view .math-svg .pt:nth-of-type(2) { animation-delay: 1.7s; }
.in-view .math-svg .pt:nth-of-type(3) { animation-delay: 2.2s; }

.formula-chip {
    position: absolute;
    padding: 9px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-shadow-sm);
    font-family: 'Courier New', monospace;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pm-violet);
    animation: chipFloat var(--dur, 6s) ease-in-out var(--del, 0s) infinite alternate;
    z-index: 1;
}

/* --- ANGIELSKI: czat + listening --- */
.chat-box { display: grid; gap: 12px; }

.chat-bubble {
    max-width: 82%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(14px);
}

.in-view .chat-bubble { animation: bubbleIn .55s var(--pm-ease) forwards; }
.in-view .chat-bubble:nth-child(1) { animation-delay: .2s; }
.in-view .chat-bubble:nth-child(2) { animation-delay: .9s; }
.in-view .chat-bubble:nth-child(3) { animation-delay: 1.7s; }

@keyframes bubbleIn {
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.q {
    background: #F1F5F9;
    color: var(--pm-ink);
    border-bottom-left-radius: 6px;
    justify-self: start;
}

.chat-bubble.a {
    background: linear-gradient(120deg, #06B6D4, #2563EB);
    color: #fff;
    border-bottom-right-radius: 6px;
    justify-self: end;
}

.chat-bubble .who {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .65;
    margin-bottom: 3px;
}

.listening-bar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #F8FAFC;
    border: 1px solid var(--pm-line);
    border-radius: 14px;
    padding: 12px 16px;
    position: relative;
    z-index: 1;
}

.listening-bar .play {
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pm-cyan);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(6, 182, 212, .4);
}

.eq { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; }

.eq i {
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #06B6D4, #2563EB);
    height: 30%;
}

.in-view .eq i { animation: eqBounce 1s ease-in-out calc(var(--n) * .09s) infinite alternate; }

@keyframes eqBounce {
    from { height: 22%; opacity: .6; }
    to   { height: 100%; opacity: 1; }
}

.listening-bar .time { font-size: 12px; font-weight: 700; color: var(--pm-gray); font-variant-numeric: tabular-nums; }

/* ============================================================
   O NAS — delikatny lifting istniejącej sekcji
   ============================================================ */
body.landing .about-us { background: #fff; padding: 96px 0; }

body.landing .about-card {
    transition: transform .4s var(--pm-ease), box-shadow .4s var(--pm-ease);
}

body.landing .about-card:hover {
    transform: translateY(-8px) rotate(.5deg);
    box-shadow: var(--pm-shadow-lg);
}

/* ============================================================
   CTA
   ============================================================ */
.cta-x {
    position: relative;
    margin: 0 20px 40px;
    border-radius: 32px;
    overflow: hidden;
    max-width: 1160px;
    padding: 88px 32px;
    text-align: center;
    color: #fff;
    background: linear-gradient(115deg, #1E40AF, #2563EB 45%, #7C3AED);
    background-size: 200% 200%;
    animation: ctaGrad 10s ease-in-out infinite alternate;
    isolation: isolate;
}

@media (min-width: 1200px) { .cta-x { margin: 0 auto 40px; } }

@keyframes ctaGrad {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}

.cta-x::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.cta-orb.o1 { width: 420px; height: 420px; top: -160px; left: -140px; background: radial-gradient(circle, rgba(96, 165, 250, .55) 0%, transparent 65%); animation: blobFloat 12s ease-in-out infinite alternate; }
.cta-orb.o2 { width: 480px; height: 480px; bottom: -200px; right: -160px; background: radial-gradient(circle, rgba(167, 139, 250, .5) 0%, transparent 65%); animation: blobFloat 15s ease-in-out infinite alternate-reverse; }

/* dziewczyna z tabletem przy boku CTA */
.cta-girl {
    position: absolute;
    right: 34px;
    bottom: 0;
    width: 172px;
    height: auto;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 18px 26px rgba(15, 23, 42, .35));
}

.cta-x h2,
.cta-x p,
.cta-x .cta-mini-count,
.cta-x .btn-white {
    position: relative;
    z-index: 1;
}

.cta-x h2 {
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 800;
    line-height: 1.12;
}

.cta-x p {
    margin: 16px auto 0;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.65;
    opacity: .9;
}

.cta-x .cta-mini-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 14px;
    font-weight: 700;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.btn-white {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
    padding: 18px 42px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: var(--pm-blue-dark);
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .3);
    transition: transform .25s var(--pm-ease), box-shadow .25s ease;
    will-change: transform;
}

.btn-white:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 26px 60px rgba(15, 23, 42, .4);
}

.btn-white .shine {
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(37, 99, 235, .16), transparent);
    transform: skewX(-20deg);
    animation: shineSweep 4s ease-in-out infinite;
    pointer-events: none;
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 1060px) {
    .chip-1 { left: -2%; }
    .chip-2 { right: -4%; }
}

@media (max-width: 968px) {
    .hero-x { padding: 40px 0 80px; min-height: 0; }

    .hero-wrap {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }

    .hero-copy { display: flex; flex-direction: column; align-items: center; }

    .hero-sub { max-width: 560px; }

    .hero-ctas { justify-content: center; }

    .countdown-x { flex-wrap: wrap; justify-content: center; }

    .cd-caption {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    .scroll-hint { display: none; }

    .features-grid-x { grid-template-columns: repeat(2, 1fr); }

    .subject-panel {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .subject-panel.rev .subject-text  { order: 1; }
    .subject-panel.rev .subject-visual { order: 2; }

    .chip-1 { top: 4%; left: 0; }
    .chip-2 { bottom: 26%; right: 0; }
    .chip-3 { bottom: -4%; left: 6%; }

    .cta-girl { display: none; }
}

@media (max-width: 640px) {
    body.landing .logo-image { height: 64px !important; max-width: 280px !important; }

    .hero-h1 { font-size: clamp(38px, 11vw, 52px); }

    .hero-sub { font-size: 16.5px; }

    .btn-primary, .btn-ghost { padding: 15px 28px; font-size: 15.5px; }

    .countdown-x { padding: 14px 16px; gap: 2px; }
    .cd-item { min-width: 52px; }
    .cd-num { font-size: 26px; }
    .cd-sep { font-size: 20px; padding-bottom: 14px; }

    .phone-x { width: 260px; }

    .phone-boy { width: 96px; top: -107px; right: 12px; }

    .float-chip { font-size: 12px; padding: 10px 12px; }
    .float-chip .ic { width: 28px; height: 28px; }
    .chip-1 { top: -3%; left: 0; }
    .chip-2 { display: none; }
    .chip-3 { bottom: -6%; left: 4%; }

    .features-grid-x { grid-template-columns: 1fr; }

    .section-x { padding: 64px 0; }

    .cta-x { padding: 64px 20px; border-radius: 24px; margin: 0 12px 32px; }

    .ticker-item { font-size: 13px; gap: 32px; }
    .ticker-track { gap: 32px; }
}

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

    [data-reveal] { opacity: 1; transform: none; }

    .ticker-track { animation: none; }
}
