/* ROOT VARIABLES */
:root {
    --bg-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent-primary: #1e3a8a; /* Navy Blue */
    --accent-vibrant: #3b82f6; /* Bright Blue */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* <picture> musi zachowywac sie jak blok obrazu w layoutach flex */
picture {
    display: block;
    max-width: 100%;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* UTILITIES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-vibrant));
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.accent-line.center {
    margin: 0 auto 1.5rem auto;
}

.format-center {
    text-align: center;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-vibrant));
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--glass-bg);
    transform: translateY(-3px);
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

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

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

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

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

/* HERO SECTION */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-vibrant));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(40px);
}

/* TWO COLUMNS (ABOUT, TESTIMONIALS) */
.two-col {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.two-col.reverse {
    flex-direction: row-reverse;
}

.col-image {
    flex: 1;
}

.col-image img {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}

.col-image:hover img {
    transform: scale(1.02);
}

.col-text {
    flex: 1;
}

.founder-image {
    flex: 0 0 360px;
    display: flex;
    justify-content: center;
}

.founder-image picture {
    display: block;
    width: 360px;
    max-width: 100%;
}

.founder-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item h3,
.stat-item .stat-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--accent-vibrant);
}

.quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
}

.author {
    font-weight: 600;
    color: var(--accent-primary);
}

/* SERVICES GRID */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: rgba(30, 58, 138, 0.2);
}

#projects .glass-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#projects .glass-card > a:first-child {
    display: flex !important;
    flex-direction: column;
    flex: 1;
}

#projects .glass-card > div:last-child {
    margin-top: auto;
}

.icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* FOOTER */
.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

footer {
    border-top: 1px solid var(--glass-border);
    background: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--accent-vibrant);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* ANIMATIONS */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s forwards ease-out;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards ease-out;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* SCROLL OBERVER CLASSES */
.observe {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.observe.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
}

.language-switcher button {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.language-switcher button:hover,
.language-switcher button.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.language-switcher button.is-active {
    border-color: var(--accent-vibrant);
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile menu hidden for demo */
    }
    
    #hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .two-col, .two-col.reverse {
        flex-direction: column;
    }

    #founder .two-col.reverse {
        flex-direction: column-reverse;
        text-align: center;
    }

    #founder .accent-line {
        margin-left: auto;
        margin-right: auto;
    }

    .founder-image {
        flex: 0 0 auto;
    }

    .founder-image picture {
        width: 240px;
    }
    
    .stats {
        justify-content: center;
    }
}

/* AUDIT POPUP */
.audit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 30, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.audit-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.audit-popup {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    padding: 0 2rem 2rem;
    box-shadow: 0 30px 70px rgba(10, 20, 50, 0.35);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.audit-popup-overlay.is-visible .audit-popup {
    transform: translateY(0) scale(1);
}

.audit-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 1.3rem;
    line-height: 1;
    color: #334;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.audit-popup-close:hover {
    color: var(--accent-primary);
}

.audit-popup .icon-badge {
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
    margin-top: 2.25rem;
}

.audit-popup-banner {
    display: block;
    width: calc(100% + 4rem);
    aspect-ratio: 900 / 385;
    object-fit: cover;
    object-position: center 20%;
    margin: 0 -2rem 1.25rem;
    max-width: none;
    border-radius: 0;
    background: linear-gradient(135deg, #eef3ff 0%, #f8faff 100%);
}

.audit-popup-banner + h3,
.audit-step picture + h3,
.audit-step h3:first-child {
    margin-top: 0;
}

.audit-step#auditStepForm h3,
.audit-step#auditStepSuccess h3 {
    margin-top: 2.25rem;
}

.audit-popup h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    color: #10172b;
}

.audit-popup p.audit-sub {
    color: #55607a;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.audit-popup-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.audit-popup-actions .btn-secondary {
    font-size: 0.85rem;
    padding: 10px 18px;
}

/* Audit form modal */
.audit-form {
    text-align: left;
}

.audit-form .form-group {
    margin-bottom: 1.1rem;
}

.audit-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2b3454;
    margin-bottom: 0.4rem;
}

.audit-form input,
.audit-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid rgba(30, 58, 138, 0.15);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #f8faff;
    color: #10172b;
    transition: border-color 0.2s ease;
}

.audit-form input:focus,
.audit-form textarea:focus {
    outline: none;
    border-color: var(--accent-vibrant);
    background: #ffffff;
}

.audit-form textarea {
    resize: vertical;
    min-height: 80px;
}

.audit-form .field-hint {
    font-size: 0.78rem;
    color: #8993a8;
    margin-top: 0.3rem;
}

.audit-form .audit-submit-row {
    margin-top: 1.4rem;
}

.audit-form button[type="submit"] {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
}

.audit-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.audit-form-error {
    color: #c0392b;
    font-size: 0.85rem;
    margin-top: 0.6rem;
    display: none;
}

.audit-form-error.is-visible {
    display: block;
}

/* Honeypot field - hidden from humans, visible to bots */
.audit-form .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.audit-success .icon-badge {
    color: #1e8e5a;
}

@media (max-width: 480px) {
    .audit-popup {
        padding: 1.75rem 1.4rem 1.6rem;
    }
}
