:root {
    --primary: #11322f; /* Dark Teal from banner */
    --primary-dark: #091c1a;
    --secondary: #FADB5F; /* Magical Gold from banner */
    --text-dark: #1a2f2c;
    --text-light: #4b6662;
    --bg-white: #ffffff;
    --bg-light: #f4f8f7; /* Very light teal tint */
    --bg-dark: #11322f;
    --border-color: #d1e0dd;
    --success: #27ae60;
    --gold: #D4AF37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.text-center { text-align: center; }
.text-white { color: #fff !important; }
.text-light { color: #bdc3c7 !important; }
.bg-light { background-color: var(--bg-light); }
.bg-blue { background-color: var(--primary); }
.bg-dark { background-color: var(--bg-dark); }
.mt-40 { margin-top: 40px; }
.mt-10 { margin-top: 10px; }
.small-text { font-size: 0.85rem; }

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 50px;
}

/* Navigation */
.navbar {
    padding: 20px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--secondary);
}

.btn-disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff, var(--bg-light));
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--secondary);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.trial-note {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 500;
}

.hero-image {
    flex: 1;
}

.mockup-window {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 350px;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    background: #f1f1f1;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.mockup-body {
    display: flex;
    flex: 1;
}

.mockup-sidebar {
    width: 25%;
    background: #f8f9fa;
    border-right: 1px solid var(--border-color);
}

.mockup-content {
    flex: 1;
    padding: 20px;
}

.mockup-title { height: 20px; width: 40%; background: var(--secondary); border-radius: 4px; margin-bottom: 20px; }
.mockup-line { height: 10px; width: 100%; background: #f1f1f1; border-radius: 4px; margin-bottom: 10px; }
.mockup-line.short { width: 70%; }

/* Sections */
.section {
    padding: 80px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    text-align: left;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Split Layout */
.split-layout {
    display: flex;
    align-items: center;
    gap: 50px;
}

.split-text, .split-image {
    flex: 1;
}

.workflow-list {
    list-style: none;
    margin-top: 30px;
}

.workflow-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.workflow-list h4 { margin-bottom: 5px; }
.workflow-list p { color: var(--text-light); font-size: 0.95rem; }

.workflow-mockup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 380px;
    display: flex;
    flex-direction: column;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.3s;
}
.workflow-mockup:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }

.report-preview {
    flex: 1;
    width: 100%;
    padding: 30px;
    background: #fdfdfd;
    height: 100%;
    box-sizing: border-box;
}
.report-header { height: 24px; width: 60%; background: var(--primary); border-radius: 4px; margin-bottom: 30px; opacity: 1; }
.report-line { height: 12px; width: 100%; background: #bdc3c7; border-radius: 4px; margin-bottom: 15px; }
.report-line.short { width: 80%; background: #95a5a6; }
.report-chart { height: 80px; width: 100%; background: #eef2f7; border-radius: 8px; margin: 25px 0; border: 2px dashed #7f8c8d; }
.report-signature { height: 20px; width: 40%; background: #34495e; border-radius: 4px; margin-top: 30px; opacity: 0.8; margin-left: auto; }

/* Security Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    text-align: left;
}

.security-item {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 12px;
}

.sec-icon { font-size: 3.5rem; margin-bottom: 15px; color: var(--secondary); }
.security-item h4 { color: #fff; margin-bottom: 10px; }
.security-item p { color: #e0e0e0; font-size: 0.95rem; }

/* Pricing */
.pricing-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pricing-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    position: relative;
}

.badge-ribbon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.price-box {
    margin: 20px 0 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
}

.old-price { font-size: 1.2rem; color: var(--text-light); text-decoration: line-through; white-space: nowrap; }
.price { font-size: 2.8rem; font-weight: 800; color: var(--text-dark); white-space: nowrap; }
.period { font-size: 0.9rem; color: var(--text-light); font-weight: 600; white-space: nowrap; }

.pricing-features { list-style: none; margin-bottom: 30px; }
.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--secondary);
    color: var(--text-dark);
    font-size: 0.95rem;
}
.pricing-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
    margin-right: 10px;
}

/* Downloads */
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.download-box {
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.download-box:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.download-box h4 { margin: 15px 0 5px; font-size: 1.2rem; }
.download-box p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; }
.download-box.disabled { opacity: 0.7; }

/* Waitlist */
.waitlist-section { padding: 60px 0; }
.waitlist-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 30px auto 0;
}
.waitlist-form input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
}

/* Footer */
footer {
    padding: 180px 0 40px; /* Przestrzeń na grafikę (drzewo/dzieci) */
    background: var(--bg-dark) url('app4ot_grafika_dzieci_1024x500.png') no-repeat center bottom;
    background-size: cover;
    border-top: 2px solid var(--secondary);
    position: relative;
    z-index: 1;
}

/* Przyciemnienie tła aby napisy były czytelne na złotym drzewie */
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(17, 50, 47, 0.9) 0%, rgba(17, 50, 47, 0.2) 40%, rgba(17, 50, 47, 0.7) 100%);
    z-index: -1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.footer-logo { font-size: 1.5rem; font-weight: 800; color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,0.9); }
.footer-logo span { color: var(--secondary); }
.footer-links a {
    margin-left: 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--secondary); }
.copyright { text-align: center; color: rgba(255,255,255,0.9); font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0,0,0,0.9); font-weight: 500; }

/* Responsive */
@media (max-width: 900px) {
    .hero-container, .split-layout { flex-direction: column; text-align: center; }
    .cta-buttons { justify-content: center; }
    .grid-4, .grid-3, .grid-2, .download-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* Simplified for mobile */
}

/* Consent Modal */
.consent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Safari requires -webkit- prefix for backdrop-filter */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    /* iPhone notch / Dynamic Island safe area */
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-top: max(16px, env(safe-area-inset-top));
    box-sizing: border-box;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    /* Prevent Safari body scroll when modal is open */
    -webkit-overflow-scrolling: touch;
}

.consent-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.consent-modal-card {
    background: #fff;
    width: 100%;
    max-width: 580px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    font-family: 'Inter', sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Safari 100vh fix:
       - dvh = dynamic viewport height (excludes browser chrome) - Safari 15.4+
       - fallback: 100vh - 32px for older Safari/iOS */
    max-height: calc(100vh - 32px); /* Fallback for older browsers */
    max-height: calc(100dvh - 32px); /* Dynamic viewport - Safari 15.4+, Chrome 108+ */
}

.consent-modal-overlay.active .consent-modal-card {
    transform: scale(1);
}

.consent-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
    padding: 20px 24px 16px;
    flex-shrink: 0;
}

.consent-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #004D40;
    font-weight: 700;
    line-height: 1.3;
}

.consent-modal-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.consent-modal-body {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: left;
    /* Key: scrollable on mobile */
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    -webkit-overflow-scrolling: touch;
}

.consent-modal-body p {
    margin: 0 0 12px 0;
    color: #555;
}

.consent-domain-list {
    background: #f5f9f8;
    border: 1px solid #e0f2f1;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.consent-domain-list ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.consent-domain-list li {
    font-family: monospace;
    font-size: 0.88rem;
    color: #00796B;
    margin-bottom: 6px;
}

.consent-warning-box {
    background: #fff3e0;
    border-left: 4px solid #ffb300;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.88rem;
    color: #e65100;
    margin-bottom: 20px;
    text-align: left;
}

.consent-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    /* Sticky footer: always visible even when body overflows */
    flex-shrink: 0;
    padding: 14px 24px;
    border-top: 1px solid #eee;
    background: #fff;
    border-radius: 0 0 16px 16px;
}

.consent-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.92rem;
    transition: all 0.2s;
    border: none;
    /* Prevent button from being too small on mobile */
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.consent-btn-cancel {
    background: #e0e0e0;
    color: #616161;
}

.consent-btn-cancel:hover {
    background: #d5d5d5;
}

.consent-btn-accept {
    background: #009688;
    color: #fff;
    flex: 1;
}

.consent-btn-accept:hover, .consent-btn-accept:active {
    background: #00796b;
}

/* Mobile: stack buttons vertically, full width */
@media (max-width: 480px) {
    .consent-modal-overlay {
        padding: 8px;
        align-items: flex-start;
    }
    .consent-modal-card {
        max-height: calc(100vh - 16px);
        border-radius: 12px;
    }
    .consent-modal-header {
        padding: 14px 16px 12px;
    }
    .consent-modal-body {
        padding: 12px 16px;
        font-size: 0.88rem;
    }
    .consent-modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }
    .consent-btn {
        width: 100%;
        text-align: center;
        padding: 14px 16px;
        font-size: 1rem;
    }
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary);
    user-select: none;
    line-height: 1;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: var(--bg-white);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        gap: 20px;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-container {
        flex-wrap: wrap;
    }
}
