/* ============================================================
   ESO — European Software Office SRL
   Faithful reproduction of the eso.be design.
   Colours pulled directly from the live site's CSS variables:
     header        #1b262c
     menu text     #e6e6e6
     primary fg    #3d3d3d
     body bg       #ffffff
     soft bg       #f9f9f9
   ============================================================ */

:root {
    --color-header-bg: #1b262c;
    --color-menu-text: #e6e6e6;
    --color-primary:   #3d3d3d;
    --color-body-bg:   #ffffff;
    --color-soft-bg:   #f9f9f9;
    --color-text:      #000000;
    --color-divider:   #d0d0d0;
    --color-accent:    #c9a961;          /* gold star in the logo */
    --header-height:   60px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-body-bg);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

/* ─── Layout ─────────────────────────────────────────────── */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Clamp any accidental horizontal overflow without affecting fixed-position
       elements (putting overflow-x: hidden on html/body breaks iOS Safari fixed nav) */
    overflow-x: hidden;
}

main {
    flex: 1;
    /* Push content below the fixed header */
    padding-top: var(--header-height);
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--color-header-bg);
    color: var(--color-menu-text);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-menu-text);
    font-weight: 700;
}

.brand-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    display: inline-block;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-menu-text);
    border-radius: 22px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.nav-links a.active,
.nav-links a:hover {
    border-color: var(--color-menu-text);
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-menu-text);
}

@media (max-width: 800px) {
    .brand-name { display: none; }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 360px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        text-align: center;
    }
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
    position: relative;
    height: 65vh;
    min-height: 360px;
    overflow: hidden;
    /* Medium grey = the "water"; canvas animation draws red ink on top */
    background: #888888;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas fills the entire hero section — the animation layer */
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Subtle dark vignette — keeps white text readable over the mid-grey canvas */
    background: radial-gradient(ellipse at center,
        rgba(0,0,0,0.00) 35%,
        rgba(0,0,0,0.28) 100%);
    pointer-events: none;
}

@media (max-width: 600px) {
    .hero {
        height: 55vh;
        min-height: 280px;
    }
}

.hero-text {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
    /* Drop shadow to keep white text crisp over the grey/ink canvas */
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}

.hero-divider {
    display: block;
    width: 80px;
    height: 1px;
    background: #ffffff;
    margin: 18px auto;
    opacity: 0.80;
}

.hero-text h2 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: #f0f0f0;
    line-height: 1.4;
}

/* ─── Generic section heading ────────────────────────────── */

.section-heading {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

.section-heading.centered { text-align: center; }

.section-divider {
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-text);
    margin: 0 0 36px 0;
}

.section-divider.centered {
    margin-left: auto;
    margin-right: auto;
}

/* ─── About ──────────────────────────────────────────────── */

.about {
    background: var(--color-body-bg);
    padding: 80px 24px;
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    margin: 0 0 16px 0;
    font-size: 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 800px) {
    .about-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    /* Show image first on mobile — more visual impact */
    .about-image { order: -1; }
}

@media (max-width: 600px) {
    .about { padding: 48px 20px; }
}

/* ─── Services ───────────────────────────────────────────── */

.services {
    background: var(--color-body-bg);
    padding: 80px 24px;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
    margin-top: 24px;
}

/* The 4th tile (Integrator) appears centered on its own row,
   exactly like the original. */
.services-grid > :nth-child(4) {
    grid-column: 2 / 3;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid > :nth-child(4) {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .services-grid > :nth-child(4) {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .services { padding: 48px 20px; }
}

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

.service-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    background: #eee;
}

/* Slightly larger circle on mobile for easier viewing */
@media (max-width: 560px) {
    .service-image {
        width: 120px;
        height: 120px;
    }
}

.service-tile h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.service-tile p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ─── Contact ────────────────────────────────────────────── */

.contact {
    background: var(--color-soft-bg);
    padding: 80px 24px;
}

@media (max-width: 600px) {
    .contact { padding: 48px 20px; }
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1.4fr;
    gap: 32px;
    margin-top: 24px;
    align-items: start;
}

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

.address {
    font-size: 1rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.contact-socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.contact-socials a {
    color: var(--color-text);
    font-size: 1.4rem;
    transition: opacity 0.15s;
}

.contact-socials a:hover { opacity: 0.6; }

.contact-form-wrap {
    max-width: 100%;
}

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

.form-field { margin-bottom: 12px; }

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-error {
    color: #b00020;
    margin: 6px 0 12px 0;
    font-size: 0.9rem;
    list-style: none;
    padding: 0;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: #2c2c2c;
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover { background: #000; }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }

.thank-you {
    padding: 24px;
    background: #fff;
    border: 1px solid #d0d0d0;
    text-align: center;
}

.thank-you h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-map {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eee;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 1000px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-map { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .form-row { grid-template-columns: 1fr; }
}

/* On mobile the map doesn't need to be as tall */
@media (max-width: 600px) {
    .contact-map { aspect-ratio: 16 / 9; }
    /* Minimum touch target height for form fields */
    .form-control { min-height: 44px; }
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
    background: var(--color-soft-bg);
    border-top: 1px solid #e8e8e8;
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text);
}

.social-row {
    list-style: none;
    margin: 0 0 18px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.social-row a {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}

.social-row a:hover { opacity: 0.75; }

.footer-nav {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.9rem;
    font-weight: 700;
}

.copyright {
    font-size: 0.85rem;
    color: #555;
}

.footer-brand { font-weight: 600; }

/* ─── Validation tweaks ──────────────────────────────────── */
.validation-message { color: #b00020; font-size: 0.85rem; }
