/* ===== CSS Variables ===== */
:root {
    --primary: #00a0dc;
    --primary-light: #33b5e5;
    --primary-dark: #0077a3;
    --accent: #ff6b35;
    --accent-warm: #e85a24;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #adb5bd;
    --dark: #212529;
    --darker: #0a0a0a;
    --overlay: rgba(0, 0, 0, 0.55);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker);
    color: var(--white);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.7;
    /* Safe area for notch devices */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    display: flex;
    flex-direction: column;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-accent {
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-lang-wrapper {
    position: relative;
    margin-left: auto;
}

.nav-cta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--glass);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-current {
    font-weight: 600;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    min-width: 140px;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--white);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--glass);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 1px;
}

.mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 900px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 1rem;
        right: 1rem;
        bottom: auto;
        flex-direction: column;
        gap: 0;
        background: rgba(20, 20, 25, 0.92);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        padding: 0.5rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
        justify-content: flex-start;
        z-index: 999;
        overflow-y: auto;
        max-height: calc(100vh - 100px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: none;
        border-radius: 8px;
        margin: 0.25rem 0.5rem;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: var(--glass);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-lang-wrapper {
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .mobile-menu {
        display: flex;
        z-index: 1001;
    }
}

/* ===== Video Background ===== */
.video-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: opacity 0.5s ease;
    opacity: 1;
    /* GPU acceleration dla płynności na iOS */
    will-change: opacity, transform;
    -webkit-transform: translateZ(0) scale(1.05);
    transform: translateZ(0) scale(1.05);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Ukryj kontrolki */
    pointer-events: none;
}

/* Ukryj WSZYSTKIE kontrolki wideo na każdej przeglądarce */
video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-container,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-fullscreen-button,
video::-moz-media-controls,
video::media-controls,
video::controls {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: none !important;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.55) 30%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* ===== Video Progress ===== */
.video-progress {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.progress-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--white);
    transform: scale(1.3);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ===== Main Content ===== */
.main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem 5rem 2rem;
    flex: 1;
    text-align: center;
}

/* ===== Top Badge ===== */
.top-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    margin-bottom: 1.25rem;
    animation: fadeDown 1s ease-out;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Main Title ===== */
.main-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.15;
    margin-bottom: 1rem;
    animation: fadeUp 1s ease-out 0.2s backwards;
}

.title-word {
    display: inline-block;
    color: var(--white);
}

.title-word.accent {
    color: var(--white);
}

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

/* ===== Subtitle ===== */
.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    max-width: 550px;
    margin-bottom: 1.25rem;
    animation: fadeUp 1s ease-out 0.4s backwards;
}

/* ===== Mission Box ===== */
.mission-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 520px;
    padding: 20px 28px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 2.5rem;
    text-align: left;
    animation: fadeUp 1s ease-out 0.5s backwards;
}

.mission-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    border-radius: 12px;
    color: var(--white);
}

.mission-box p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* ===== Waitlist Form ===== */
.waitlist-section {
    width: 100%;
    max-width: 500px;
    animation: fadeUp 1s ease-out 0.6s backwards;
}

.waitlist-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    min-width: 250px;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--dark);
    background: var(--white);
    border: none;
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input::placeholder {
    color: var(--gray);
}

.input-wrapper input:focus {
    box-shadow: 0 0 0 4px rgba(0, 160, 220, 0.3);
}

.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    min-width: 180px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.form-note strong {
    color: var(--white);
}

.form-note svg {
    color: var(--primary-light);
}

/* ===== Success & Already States ===== */
.success-state,
.already-state {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 450px;
    animation: scaleIn 0.5s ease-out;
}

.success-state.show,
.already-state.show {
    display: flex;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.already-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-state h2,
.already-state h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.success-state p,
.already-state p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    justify-content: center;
}

.share-row span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 3rem;
    padding: 20px 40px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    animation: fadeUp 1s ease-out 0.8s backwards;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* ===== Store Banner ===== */
.store-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 1.25rem;
    animation: fadeUp 1s ease-out 0.8s backwards;
}

.store-badge {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

.store-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.store-button {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.store-button:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.store-img {
    height: 48px;
    width: auto;
    display: block;
}

/* ===== Toast Notifications ===== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 28px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.toast-notification.toast-success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

/* ===== Footer ===== */
.footer {
    position: relative;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    z-index: 10;
    background: transparent;
    margin-top: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem;
        padding-top: 100px;
        justify-content: center;
        min-height: 100dvh;
    }
    
    .top-badge {
        padding: 8px 16px;
        margin-bottom: 1rem;
    }
    
    .badge-text {
        font-size: 0.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-wrapper {
        min-width: 100%;
    }
    
    .input-wrapper input {
        padding: 16px 20px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 10px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 16px 24px;
        border-radius: 10px;
    }
    
    .waitlist-section {
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .form-note {
        font-size: 0.8rem;
        flex-wrap: wrap;
        text-align: center;
        margin-top: 12px;
    }
    
    .stats-row {
        gap: 20px;
        padding: 16px 24px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .mission-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .video-progress {
        bottom: 80px;
    }
    
    .store-banner {
        gap: 8px;
        margin-top: 1.5rem;
    }
    
    .store-img {
        height: 42px;
    }
    
    .store-buttons {
        gap: 10px;
    }
    
    .footer {
        position: relative;
        padding: 15px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
        padding-top: 90px;
        padding-bottom: 80px;
    }
    
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 0.03em;
        margin-bottom: 0.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .top-badge {
        padding: 6px 14px;
    }
    
    .badge-text {
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .store-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .store-img {
        height: 38px;
    }
    
    .store-badge {
        font-size: 0.7rem;
        margin-top: 4px;
    }
    
    .footer {
        font-size: 0.7rem;
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Extra small phones */
@media (max-width: 375px) {
    .main-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .input-wrapper input {
        padding: 14px 16px;
    }
    
    .submit-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .store-img {
        height: 36px;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .main-content {
        padding-top: 70px;
        padding-bottom: 60px;
        min-height: auto;
    }
    
    .main-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        margin-bottom: 1rem;
    }
    
    .top-badge {
        margin-bottom: 0.5rem;
    }
    
    .store-banner {
        margin-top: 1rem;
    }
    
    .video-progress {
        bottom: 50px;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
