:root {
    --primary-color: #b75326;
    --primary-dark: #9c4520;
    --primary-light: rgba(183, 83, 38, 0.1);
    --secondary-color: #2C3E50;
    --text-color: #45505c;
    --muted-color: #6b7785;
    --light-bg: #faf6f4;
    --border-color: rgba(44, 62, 80, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), #d46331);

    --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(31, 41, 51, 0.07), 0 2px 4px -2px rgba(31, 41, 51, 0.05);
    --shadow-lg: 0 12px 24px -8px rgba(31, 41, 51, 0.12), 0 4px 8px -4px rgba(31, 41, 51, 0.06);

    --radius: 14px;
    --nav-height: 4.5rem;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-color);
    background: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    color: var(--secondary-color);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

img {
    max-width: 100%;
    height: auto;
}

/* Visible keyboard focus everywhere */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -150%);
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    z-index: 2000;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

/* Navigation */
nav {
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.nav-container {
    max-width: 1200px;
    min-height: var(--nav-height);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    border-radius: 8px;
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
}

nav ul a::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.25rem;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

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

nav ul a:hover::after {
    transform: scaleX(1);
}

nav.nav-hidden {
    transform: translateY(-100%);
}

/* Hero Section */
.hero {
    background-image: url('../src/digitaldive-DC.webp');
    background-size: cover;
    background-position: center;
    color: white;
    min-height: min(78vh, 720px);
    padding: 7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(183, 83, 38, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(26, 32, 39, 0.82), rgba(26, 32, 39, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: white;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero p {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    margin: 0 auto 2.5rem;
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* Network lines styles */
.network-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

.line {
    position: absolute;
    background: var(--primary-color);
    opacity: 0.2;
    transform-origin: left center;
}

.connection-point {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #d46331;
    border-radius: 50%;
    opacity: 0;
    animation: pulse 3s infinite;
}

.horizontal-line {
    height: 1px;
    animation: expandHorizontal 8s infinite;
}

.vertical-line {
    width: 1px;
    animation: expandVertical 8s infinite;
}

/* Line positions */
.line1 { top: 20%; left: 10%; width: 40%; }
.line2 { top: 70%; left: 30%; width: 50%; }
.line3 { top: 30%; left: 20%; height: 40%; }
.line4 { top: 40%; left: 70%; height: 30%; }
.line5 { top: 80%; left: 50%; width: 30%; }

/* Connection points */
.point1 { top: 20%; left: 50%; animation-delay: 0s; }
.point2 { top: 70%; left: 80%; animation-delay: 1s; }
.point3 { top: 70%; left: 30%; animation-delay: 2s; }
.point4 { top: 40%; left: 70%; animation-delay: 1.5s; }
.point5 { top: 80%; left: 50%; animation-delay: 0.5s; }

/* Diagonal lines */
.diagonal-line {
    position: absolute;
    width: 100px;
    height: 1px;
    background: #d46331;
    opacity: 0.4;
    animation: fadeInOut 4s infinite;
}

.diagonal1 {
    top: 40%;
    left: 30%;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.diagonal2 {
    top: 60%;
    left: 60%;
    transform: rotate(-45deg);
    animation-delay: 2s;
}

@keyframes expandHorizontal {
    0%, 100% { transform: scaleX(0.3); opacity: 0.1; }
    50% { transform: scaleX(1); opacity: 0.3; }
}

@keyframes expandVertical {
    0%, 100% { transform: scaleY(0.3); opacity: 0.1; }
    50% { transform: scaleY(1); opacity: 0.4; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(2); opacity: 0.5; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
}

/* Section Styles */
section {
    padding: 6rem 2rem;
}

/* Reveal-on-scroll only when JS is running, so the page is never
   invisible if the script fails to load. */
.js section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js section.animate {
    opacity: 1;
    transform: translateY(0);
}

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

.services {
    background-color: var(--light-bg);
    border-block: 1px solid var(--border-color);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--muted-color);
    max-width: 60ch;
    margin: 0 auto;
    font-size: 1.05rem;
    text-wrap: pretty;
}

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

.service-card {
    background: white;
    padding: 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0.55;
    transition: opacity 0.35s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(183, 83, 38, 0.25);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 11px;
    background: var(--primary-light);
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    transition: background-color 0.25s ease;
}

.service-icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

.service-card:hover .service-icon {
    background: rgba(183, 83, 38, 0.16);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--muted-color);
    text-wrap: pretty;
}

/* Stats Section */
.stats {
    background: var(--gradient);
    color: white;
    padding: 4.5rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

/* Label is the term and the figure its description, so the markup reads
   "Tevreden Klanten: 50+" to a screen reader. Reversed visually so the
   number still leads. */
.stat-item {
    display: flex;
    flex-direction: column-reverse;
}

.stat-number {
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin: 0 0 0.25rem;
    letter-spacing: -0.03em;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(183, 83, 38, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.875rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(183, 83, 38, 0.36);
}

.cta-button:active {
    transform: translateY(0);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: min(100%, 560px);
    justify-content: center;
}

.contact-info {
    background: white;
    padding: 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-style: normal;
    display: grid;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0.5rem;
    border-radius: 10px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a.contact-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.contact-item .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-color);
}

.contact-item .icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.925rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
}

.mobile-menu-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .mobile-menu-button {
        display: block;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .logo-image {
        height: 34px;
    }

    .nav-container {
        position: relative;
        min-height: 4rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        width: 100%;
    }

    nav ul.show {
        display: flex;
    }

    nav ul a {
        display: block;
        width: 100%;
        padding: 0.85rem 1rem;
        text-align: center;
    }

    nav ul a::after {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 5rem 1.25rem;
        min-height: 0;
    }

    /* Sections */
    section {
        padding: 4rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Service Grid */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.75rem;
    }

    /* Stats Section */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* Contact Section */
    .contact-info {
        padding: 1.5rem;
    }

    /* Footer */
    footer {
        padding: 2.5rem 1.25rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .js section {
        opacity: 1;
        transform: none;
    }
}
