/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary:      #6C63FF;
    --primary-dark: #5A52D5;
    --secondary:    #FF6584;
    --accent:       #43CBFF;
    --text:         #1b1b18;
    --text-muted:   #706f6c;
    --bg:           #FDFDFC;
    --bg-alt:       #F5F5F3;
    --border:       rgba(26,26,0,0.12);
    --white:        #ffffff;
    --radius:       12px;
    --shadow:       0 4px 24px rgba(108,99,255,0.12);
    --transition:   0.22s ease;
    --font:         'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    height: 64px;
    background: rgba(253,253,252,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: -0.3px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-nav a {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.4rem 0.9rem;
    border-radius: 7px;
    border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.navbar-nav a:hover {
    background: var(--bg-alt);
    border-color: var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.35rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    font-family: var(--font);
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--white) !important;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108,99,255,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--primary) !important;
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text) !important;
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-alt);
}

.btn-white {
    background: var(--white);
    color: var(--primary) !important;
    border-color: var(--white);
    font-weight: 700;
}

.btn-white:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-full {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 9px;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(108,99,255,0.1);
    color: var(--primary);
    border: 1px solid rgba(108,99,255,0.22);
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    padding-top: 64px;
    min-height: 100vh;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.6);
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color var(--transition);
}

.footer a:hover { color: var(--white); }

/* ============================================================
   DOTS DECORATION
   ============================================================ */
.dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 160px;
}

.dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.22;
    display: block;
    flex-shrink: 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    padding: 5rem 2.5rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FDFDFC 0%, #EDEAFF 60%, #F5F0FF 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -8%;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.14) 0%, transparent 65%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,101,132,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.hero-container {
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge { margin-bottom: 1.25rem; }

.hero-tagline {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.2rem, 3.8vw, 3.5rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 1.35rem;
}

.hero-title span { color: var(--primary); }

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.72;
    margin-bottom: 2.25rem;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   HERO VISUAL – CARD STACK
   ============================================================ */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card-stack {
    position: relative;
    width: 320px;
    height: 320px;
}

.ebook-card {
    position: absolute;
    background: var(--white);
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 12px 40px rgba(108,99,255,0.18);
    border: 1px solid rgba(108,99,255,0.1);
}

.ebook-card-main {
    width: 200px;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.ebook-card-back1 {
    width: 185px;
    top: 20px;
    left: 42%;
    transform: translateX(-50%) rotate(6deg);
    z-index: 2;
    opacity: 0.72;
}

.ebook-card-back2 {
    width: 185px;
    top: 20px;
    left: 58%;
    transform: translateX(-50%) rotate(-6deg);
    z-index: 1;
    opacity: 0.52;
}

.ebook-cover {
    width: 100%;
    height: 112px;
    border-radius: 9px;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

.ebook-cover-1 { background: linear-gradient(135deg, #6C63FF, #43CBFF); }
.ebook-cover-2 { background: linear-gradient(135deg, #FF6584, #FFB347); }
.ebook-cover-3 { background: linear-gradient(135deg, #43CBFF, #6C63FF); }

.ebook-title-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.ebook-price {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-bubble {
    position: absolute;
    background: var(--white);
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    box-shadow: 0 4px 22px rgba(0,0,0,0.11);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-bubble-1 { bottom: 55px; left: -15px; }
.stat-bubble-2 { top: 15px; right: -5px; }
.stat-bubble i { color: var(--primary); }

.dots-hero {
    position: absolute;
    bottom: 20px;
    right: 5px;
    z-index: 0;
}

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--primary);
    margin-bottom: 0.7rem;
}

.section-sub {
    color: var(--text-muted);
    font-size: 0.975rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
    padding: 6rem 2.5rem;
    background: var(--bg);
}

.features-grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(108,99,255,0.09);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
    padding: 6rem 2.5rem;
    background: var(--bg-alt);
}

.steps-grid {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 18px rgba(108,99,255,0.38);
}

.step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--text);
}

.step p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing {
    padding: 6rem 2.5rem;
    background: var(--bg);
}

.pricing-grid {
    max-width: 940px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.25rem;
    border: 1.5px solid var(--border);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
}

.pricing-card:hover { transform: translateY(-3px); }

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 44px rgba(108,99,255,0.2);
    transform: scale(1.04);
}

.pricing-card.featured:hover { transform: scale(1.04) translateY(-3px); }

.pricing-card.featured::before {
    content: 'Najpopularniejszy';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.95rem;
    border-radius: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pricing-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.6rem;
}

.pricing-amount {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.pricing-amount sup {
    font-size: 1.1rem;
    font-weight: 600;
    vertical-align: super;
}

.pricing-period {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    font-size: 0.875rem;
    color: var(--text);
    padding: 0.45rem 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--primary); font-size: 0.92rem; flex-shrink: 0; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta {
    padding: 7rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #9b59b6 100%);
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.8px;
    position: relative;
    z-index: 1;
}

.cta p {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 2.25rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.cta .btn { position: relative; z-index: 1; }

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #EDEAFF 0%, #FDFDFC 50%, #F5F0FF 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -8%;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.11) 0%, transparent 70%);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -8%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,101,132,0.09) 0%, transparent 70%);
    pointer-events: none;
}

/* LOGIN: promo left, card right */
.auth-wrapper-login {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4.5rem;
    max-width: 920px;
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* REGISTER: card left, promo right */
.auth-wrapper-register {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 4.5rem;
    max-width: 960px;
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ---- AUTH CARD ---- */
.auth-card {
    background: var(--white);
    border-radius: 18px;
    padding: 2.75rem;
    border: 1px solid rgba(108,99,255,0.1);
    box-shadow: 0 12px 50px rgba(108,99,255,0.13);
}

.auth-card-header { margin-bottom: 2rem; }

.auth-card-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.6px;
    margin-bottom: 0.3rem;
}

.auth-card-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-card-header a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-card-header a:hover { text-decoration: underline; }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 1.2rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid rgba(26,26,0,0.16);
    border-radius: 9px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.14);
    background: var(--white);
}

.form-control::placeholder { color: rgba(112,111,108,0.5); }

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.link-muted {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.link-muted:hover { color: var(--primary); }

/* ---- ALERT ---- */
.alert-error {
    background: #FFF0F0;
    border: 1.5px solid #FFCDD2;
    border-radius: 9px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.84rem;
    color: #C62828;
}

.alert-error ul {
    padding-left: 1.2rem;
    margin: 0;
}

/* ---- FOOTER TEXTS ---- */
.auth-register-link,
.auth-login-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.4rem;
}

.auth-register-link a,
.auth-login-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-register-link a:hover,
.auth-login-link a:hover { text-decoration: underline; }

.terms-note {
    text-align: center;
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-top: 0.85rem;
    line-height: 1.55;
}

.terms-note a { color: var(--primary); text-decoration: none; }
.terms-note a:hover { text-decoration: underline; }

/* ---- AUTH PROMO ---- */
.auth-promo-badge { margin-bottom: 1.2rem; }

.auth-promo h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.7px;
    color: var(--text);
    line-height: 1.18;
    margin-bottom: 1rem;
}

.auth-promo h2 span { color: var(--primary); }

.auth-promo p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.auth-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 2rem;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--text);
}

.auth-benefits li i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item { }

.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.auth-dots {
    margin-top: 2.25rem;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 164px;
}

.auth-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.2;
    display: block;
}

/* ============================================================
   BOOTSTRAP ICONS FALLBACK (gdy CDN nie działa)
   ============================================================ */
.bi::before { display: inline-block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-desc { margin: 0 auto 2rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }

    .auth-wrapper-login,
    .auth-wrapper-register {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        max-width: 480px;
    }

    .auth-promo { display: none; }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 640px) {
    .navbar { padding: 0 1rem; }
    .navbar-nav .nav-link-hide { display: none; }

    .hero { padding: 3rem 1.25rem 3rem; }

    .features, .how-it-works, .pricing, .cta { padding: 4rem 1.25rem; }

    .auth-card { padding: 1.75rem 1.5rem; }

    .form-row { grid-template-columns: 1fr; }

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer a { margin-left: 0.75rem; }
}
