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

/* Netlify Forms honeypot – hide from users */
.hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form return message – top and middle of screen, text center-aligned */
.form-return-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 37, 64, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.form-return-overlay[aria-hidden="true"] {
    display: none;
}
.form-return-box {
    max-width: 440px;
    width: 100%;
    padding: 32px 28px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(10, 37, 64, 0.2), 0 0 0 1px var(--border-color);
    text-align: center;
}
.form-return-box .form-return-text {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
}
.form-return-box .form-return-close {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bg-white);
    background: var(--primary-color);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.form-return-box .form-return-close:hover {
    background: var(--hover-color);
}
.form-return-box.form-return-error .form-return-close {
    background: #c53030;
}
.form-return-box.form-return-error .form-return-close:hover {
    background: #9b2c2c;
}

:root {
    --primary-color: #0A2540;
    --secondary-color: #00D4FF;
    --text-primary: #0A2540;
    --text-secondary: #425466;
    --bg-white: #FFFFFF;
    --bg-light: #F7F9FC;
    --border-color: #E3E8EF;
    --hover-color: #0052CC;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header – floating pill over hero, pinned on scroll */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 20px 24px 0;
    width: calc(100% - 48px);
    max-width: 1248px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 9999px;
    background: rgba(232, 238, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(210, 220, 235, 0.8);
    box-shadow: 0 8px 32px rgba(10, 37, 64, 0.08), 0 0 0 1px rgba(10, 37, 64, 0.04);
    transition: margin 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header.header-scrolled {
    margin: 10px 24px 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 24px rgba(10, 37, 64, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

/* Benoir & Atlas: header keeps pill style on scroll, with 50% of original top margin */
.page-benoir .header.header-scrolled,
.page-atlas .header.header-scrolled {
    top: 10px; /* 50% of 20px – keeps gap from viewport top when sticky */
    margin: 10px 24px 0;
    width: calc(100% - 48px);
    max-width: 1248px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 9999px;
    border: 1px solid rgba(210, 220, 235, 0.8);
    box-shadow: 0 8px 32px rgba(10, 37, 64, 0.08), 0 0 0 1px rgba(10, 37, 64, 0.04);
    background: rgba(232, 238, 248, 0.92);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 48px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: #000000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.logo-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.logo img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
    vertical-align: middle;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

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

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 200px;
    padding: 8px 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-btn:hover {
    background: var(--bg-light);
    color: var(--hover-color);
}

.dropdown-btn:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-btn:last-child {
    border-radius: 0 0 6px 6px;
}

.contact-sales-btn {
    background: var(--text-primary);
    color: var(--bg-white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.contact-sales-btn:hover {
    background: var(--hover-color);
}

/* Burger button – hidden on desktop */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.burger-btn:hover {
    background: rgba(10, 37, 64, 0.06);
}

.burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-btn[aria-expanded="true"] .burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn[aria-expanded="true"] .burger-bar:nth-child(2) {
    opacity: 0;
}

.burger-btn[aria-expanded="true"] .burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav dropdown – hidden by default */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.12);
    flex-direction: column;
    gap: 4px;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}

.mobile-nav.is-open {
    max-height: 320px;
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-light);
    color: var(--hover-color);
}

/* Hero Section */
.hero-section {
    margin-top: -84px;
    padding: 164px 0 120px;
    background: linear-gradient(135deg, #F7F9FC 0%, #FFFFFF 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Atlas: same hero section height as benoir (500px like gallery), map stays natural size, content centered */
.page-atlas .hero-container {
    min-height: 500px;
}

.hero-content h1 {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-subtitle-mobile {
    display: none;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-primary {
    background: var(--text-primary);
    color: var(--bg-white);
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cta-primary:hover {
    background: var(--hover-color);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cta-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-light);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-gallery {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.hero-map-wrap {
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: transparent;
}

.hero-map-img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
    /* Softer edges: wider gradual fade */
    -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 45%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.gallery-container {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.gallery-image.active {
    opacity: 1;
    z-index: 2;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background: var(--text-primary);
}

.indicator:hover {
    background: var(--hover-color);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.feature-block {
    margin-bottom: 120px;
}

.feature-block:last-child {
    margin-bottom: 0;
}

/* Feature 2: right-oriented content, same edges */
.feature-block:nth-child(2) .feature-content {
    margin-left: auto;
    text-align: right;
}

.feature-content {
    max-width: 800px;
}

.feature-content h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.feature-content p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.feature-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.feature-link:hover {
    color: var(--hover-color);
}

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

/* Feature 3: center content and stat blocks on screen */
.feature-block:nth-child(3) .feature-content {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Atlas page: Feature 3 left-aligned, Feature 4 right-aligned */
.page-atlas .feature-block:nth-child(3) .feature-content {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.page-atlas .feature-block:nth-child(4) .feature-content {
    margin-left: auto;
    text-align: right;
}

/* Network Section */
.network-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.network-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.network-content h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.network-content > p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    line-height: 1.6;
}

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

.stat {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Client care section: stat font sizes 30% smaller */
#client-care .feature-stats .stat-value {
    font-size: 33.6px;
}

#client-care .feature-stats .stat-label {
    font-size: 11.2px;
}

/* Developers section: stat font sizes 30% smaller */
#developers .stat-value {
    font-size: 33.6px;
}

#developers .stat-label {
    font-size: 11.2px;
}

/* API Section */
.api-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.api-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.api-content h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.api-content p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.api-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stories Section */
.stories-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stories-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.story-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.story-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.story-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.4;
}

.story-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.story-link:hover {
    color: var(--hover-color);
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--bg-white);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-align: center;
}

.cta-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-secondary);
    text-align: center;
}

.contact-form {
    margin-top: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s ease;
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--text-primary);
}

.form-checkbox {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.form-checkbox label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.submit-btn {
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-white);
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .network-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        margin: 16px 16px 0;
        width: calc(100% - 32px);
        position: relative;
    }

    .header.header-scrolled {
        margin: 0;
        width: 100%;
    }

    .page-benoir .header.header-scrolled,
    .page-atlas .header.header-scrolled {
        top: 8px; /* 50% of 16px on mobile */
        margin: 8px 16px 0;
        width: calc(100% - 32px);
    }

    .header-container {
        flex-wrap: nowrap;
        height: 64px;
        min-height: 64px;
        align-items: center;
        justify-content: space-between;
    }

    .header-left {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 0;
        height: 64px;
    }

    .header-left .logo {
        gap: 0;
    }

    .header-left .logo > a:not(.logo-icon),
    .header-left .logo > img {
        display: none;
    }

    .burger-btn {
        display: flex;
        margin-left: 0;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .contact-sales-btn {
        position: static;
        flex-shrink: 0;
        margin-left: auto;
    }

    .header.header-scrolled .mobile-nav {
        border-radius: 0;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-subtitle-desktop {
        display: none;
    }

    .hero-subtitle-mobile {
        display: inline;
    }

    .feature-content h2,
    .network-content h2,
    .api-content h2,
    .cta-content h2,
    .section-title {
        font-size: 36px;
    }

    .network-stats {
        grid-template-columns: 1fr;
    }

    .feature-stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
