/* ============================== GLOBAL RESET & VARIABLES =========================== */
:root {
    --color-bg-dark: #121217;       /* Deep Charcoal/Near Black Background */
    --color-text-light: #F0F0F5;    /* Off-White Text */
    --color-text-muted: #A9A9B8;    /* Softer text for supporting copy */
    --color-accent-teal: #00FFFF;   /* Electric Teal Accent */
    --color-cta-primary: #B89E41;   /* Muted Gold/Success CTA */
    --color-bg-dark-subtle: #1D1D23; /* Slightly lighter dark background for contrast sections */
    --color-card: #1E1E25;
    --color-border: #2a2a33;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    overflow-x: hidden; /* Safety net against horizontal scrolling on phones */
}

/* Keep anchored sections clear of the top edge when jumped to */
section[id], .card[id] {
    scroll-margin-top: 24px;
}

a {
    color: var(--color-accent-teal);
}

a:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--color-accent-teal);
    outline-offset: 3px;
}

/* Utility Classes */
.container {
    max-width: 1200px; /* Standard large container size */
    margin: 0 auto;
    padding: 0 40px; /* Padding on left/right for all sections */
}

.py-full {
    padding: 80px 0; /* Vertical padding for major sections */
}

.bg-dark-subtle {
    background-color: var(--color-bg-dark-subtle);
}

.mb-5 {
    margin-bottom: 40px;
}

.large-text {
    font-size: 1.2rem;
}

/* ============================== TYPOGRAPHY & HEADINGS =========================== */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 20px;
    overflow-wrap: break-word;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.3;
}

p {
    overflow-wrap: break-word;
}

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

/* Section Specific Headings */
#solutions h2, #data-sovereignty h2, #tech h2, #about h2 {
    color: var(--color-accent-teal);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.section-intro {
    color: var(--color-text-muted);
    font-size: 1.15rem;
    max-width: 800px;
    margin-bottom: 40px;
}

.text-center .section-intro,
.section-intro.text-center {
    margin-left: auto;
    margin-right: auto;
}

/* ============================== HEADER & NAVIGATION STYLING =========================== */
.main-header {
    background: rgba(18, 18, 23, 0.95); /* Semi-transparent background */
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-text-light);
    text-decoration: none;
    white-space: nowrap;
}

nav ul {
    display: flex;
    flex-wrap: wrap; /* Wraps instead of overflowing on narrow screens */
    justify-content: center;
    list-style: none;
}
nav a {
    display: inline-block;
    color: #aaa;
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s;
}
nav a:hover {
    color: var(--color-accent-teal);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-header .cta-group {
    flex-shrink: 0;
}

/* ============================== BUTTONS (CTAs) =========================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-accent-teal);
    color: var(--color-bg-dark); /* Dark text on bright button */
    border: 2px solid var(--color-accent-teal);
}
.btn-primary:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-light);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ============================== HERO SECTION STYLING =========================== */
#hero {
    min-height: 75vh; /* Ensures it takes up most of the screen */
    display: flex;
    align-items: center;
    text-align: center;
    padding: 80px 0;
    /* Built-in "abstract network" visual: no image file needed */
    background-color: #0a0a10;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='rgb(0,255,255)' stroke-opacity='0.14' stroke-width='1'%3E%3Cpath d='M20 30 L110 70 L200 40 M110 70 L90 160 L30 200 M90 160 L190 180 L200 40 M110 70 L190 180'/%3E%3C/g%3E%3Cg fill='rgb(0,255,255)' fill-opacity='0.35'%3E%3Ccircle cx='20' cy='30' r='2.5'/%3E%3Ccircle cx='110' cy='70' r='3.5'/%3E%3Ccircle cx='200' cy='40' r='2.5'/%3E%3Ccircle cx='90' cy='160' r='3'/%3E%3Ccircle cx='30' cy='200' r='2'/%3E%3Ccircle cx='190' cy='180' r='3'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 18% 25%, rgba(0, 255, 255, 0.14), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(184, 158, 65, 0.12), transparent 50%),
        linear-gradient(180deg, rgba(10, 10, 16, 0) 60%, var(--color-bg-dark) 100%);
    background-size: 240px 240px, cover, cover, cover;
    background-repeat: repeat, no-repeat, no-repeat, no-repeat;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.subheadline {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.85;
}

.hero-status {
    display: inline-block;
    max-width: 760px;
    margin: 0 auto 40px;
    padding: 10px 18px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 999px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.hero-status strong {
    color: var(--color-accent-teal);
}

.hero-ctas {
    justify-content: center;
    gap: 20px;
}

/* ============================== GRID LAYOUTS (The Structure) =========================== */
.grid {
    display: grid;
}

.three-col-grid {
    display: grid;
    /* Responsive columns; min() stops a 300px column overflowing small phones */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 30px;
}

/* Card Styling (Used in Pain/Solution and Services) */
.card {
    background-color: var(--color-card);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* Deep shadow */
    transition: all 0.3s ease;
}

.card p + p {
    margin-top: 12px;
}

/* Special Styling for Pain/Solution Grid */
.card-risk { border-left: 4px solid red; }
.card-solution { border-left: 4px solid var(--color-accent-teal); }
.card-benefit { border-left: 4px solid #4CAF50; }

/* Service Cards */
.service-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}
.service-card p {
    flex-grow: 1;
}
.hover-effect:hover {
    background-color: var(--color-bg-dark-subtle);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.1); /* Teal glow effect on hover */
}

.service-grid {
    margin-top: 40px;
}

.learn-more-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--color-accent-teal);
    font-weight: 700;
    text-decoration: none;
}
.learn-more-link:hover {
    text-decoration: underline;
}

/* ============================== TECHNOLOGY SECTION =========================== */
.step-card {
    border-top: 3px solid var(--color-accent-teal);
}

.step-number {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--color-accent-teal);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    border: 1px solid var(--color-cta-primary);
    border-radius: 999px;
    color: var(--color-cta-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    vertical-align: middle;
}

.tech-detail {
    margin-top: 30px;
}

.tech-detail ul, .status-card ul {
    margin-top: 15px;
    padding-left: 20px;
}

.tech-detail li, .status-card li {
    margin-bottom: 8px;
}

.status-card {
    border-left: 4px solid var(--color-cta-primary);
}

/* ============================== DATA SOVEREIGNTY STYLING (Comparison Table) =========================== */
.comparison-table {
    text-align: center;
}
.comp-box h4 {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin-bottom: 15px;
}

/* Specific box coloring for contrast */
.risk-box { border: 2px solid red; }
.success-box { background-color: var(--color-bg-dark-subtle); border: 2px solid var(--color-accent-teal); }

.comparison-table ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.comparison-table li {
    margin-bottom: 10px;
    font-size: 1rem;
}

/* ============================== ABOUT SECTION =========================== */
.about-grid {
    align-items: start;
}

.about-card h3 {
    color: var(--color-text-light);
}

.about-card p {
    color: var(--color-text-muted);
}

.about-card .about-lead {
    color: var(--color-text-light);
    font-size: 1.15rem;
}

/* ============================== FINAL CTA & FOOTER STYLING =========================== */

#discovery {
    padding-top: 60px; /* Adjust padding for the closing section */
}

#discovery .subheadline {
    margin-bottom: 40px;
}

.discovery-ctas {
    justify-content: center;
    gap: 20px;
}

.contact-line {
    margin-top: 30px;
    color: var(--color-text-muted);
    overflow-wrap: anywhere;
}

footer {
    background-color: #0a0a10;
    padding: 30px 0;
    border-top: 1px solid var(--color-accent-teal);
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.footer-content a {
    color: #aaa;
    text-decoration: none;
}
.footer-content a:hover {
    color: var(--color-accent-teal);
}

/* ============================== MEDIA QUERIES (Basic Responsiveness) =========================== */
@media (max-width: 900px) {
    .three-col-grid, .two-col-grid {
        gap: 20px;
    }
    .service-card, .card {
        padding: 30px;
    }
    /* Stack the header: logo, wrapped nav, then buttons */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .main-header .cta-group {
        justify-content: center;
    }
    nav ul {
        padding: 0;
    }
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }
    .py-full {
        padding: 60px 0;
    }
    #hero {
        padding: 60px 0;
    }
    .subheadline {
        font-size: 1.1rem;
    }
    .hero-status {
        border-radius: 12px;
    }
    nav a {
        padding: 8px 10px;
    }
    .main-header .btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    .service-card, .card {
        padding: 24px;
    }
    .hero-ctas .btn-large,
    .discovery-ctas .btn-large {
        width: 100%; /* Make CTAs full width for mobile clarity */
    }
    .btn-large {
        padding: 15px 20px;
    }
}

/* ============================== ANIMATIONS (For Polish) =========================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* The element itself fades in; its children (including buttons) inherit the fade
   and are never left hidden. */
.animate-fade-in {
    animation: fadeIn 1s ease both;
}

/* Delaying the animations for staggered effect */
.delay-2 { animation-delay: 0.5s; }
.delay-4 { animation-delay: 1s; }

/* ============================== REDUCED MOTION =========================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .animate-fade-in {
        opacity: 1;
        transform: none;
    }
    .btn-primary:hover,
    .hover-effect:hover {
        transform: none;
    }
}
