/* MEA Immobilier SA – main stylesheet (no framework) */

:root {
    --navy: #022056;
    --navy-900: #01153a;
    --red: #e3101e; /* darkened brand red for WCAG AA contrast on white */
    --ink: #1d2433;
    --muted: #5b6475;
    --surface: #ffffff;
    --surface-alt: #f4f6fa;
    --line: #e2e6ee;
    --radius: 14px;
    --shadow: 0 1px 2px rgb(2 32 86 / .06), 0 8px 24px rgb(2 32 86 / .08);
    --header-h: 72px;
    --container: 1120px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 .6em;
    color: var(--navy);
    text-wrap: balance;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--red); }

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--navy);
    color: #fff;
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .8rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--red); }
.btn-ghost { border-color: rgb(255 255 255 / .7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / .92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid transparent;
}

/* Header shadow once scrolled: pure CSS scroll-driven animation (progressive enhancement) */
@supports (animation-timeline: scroll()) {
    .site-header {
        animation: header-shadow linear both;
        animation-timeline: scroll(root);
        animation-range: 0 40px;
    }
    @keyframes header-shadow {
        to {
            border-bottom-color: var(--line);
            box-shadow: 0 4px 16px rgb(2 32 86 / .06);
        }
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand { flex: none; }
.brand img { width: 64px; height: auto; }

.main-nav ul {
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav a {
    display: block;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    white-space: nowrap;
    color: var(--ink);
}
.main-nav a:hover { color: var(--red); }

.main-nav .nav-cta { background: var(--navy); color: #fff; }
.main-nav .nav-cta:hover { background: var(--red); color: #fff; }

/* Small screens: no burger (no JS allowed by CSP), compact inline links */
@media (max-width: 600px) {
    :root { --header-h: 60px; }
    .brand img { width: 48px; }
    .main-nav ul { gap: 0; }
    .main-nav a { padding: .45rem .6rem; font-size: .85rem; }
}

@media (max-width: 360px) {
    .header-inner { width: calc(100% - 1.25rem); gap: .5rem; }
    .brand img { width: 36px; }
    .main-nav a { padding: .4rem .4rem; font-size: .78rem; }
}

/* ---------- Hero ---------- */
.hero {
    color: #fff;
    background:
        radial-gradient(60rem 30rem at 80% -10%, rgb(255 255 255 / .08), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
}
.hero-inner {
    display: grid;
    justify-items: center;
    text-align: center;
    padding-block: clamp(4rem, 10vw, 7.5rem);
}
.hero-logo { width: clamp(160px, 28vw, 260px); margin-bottom: 2rem; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
    margin: .5rem 0 2.25rem;
    padding: 0;
    list-style: none;
    color: rgb(255 255 255 / .85);
}
.hero-points li::before {
    content: "";
    display: inline-block;
    width: .5rem; height: .5rem;
    margin-right: .6rem;
    border-radius: 50%;
    background: var(--red);
    vertical-align: middle;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-alt { background: var(--surface-alt); }

.section-head { text-align: center; margin-bottom: 3rem; }

.eyebrow {
    margin-bottom: .5rem;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red);
}

.split {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (min-width: 860px) {
    .split { grid-template-columns: 1fr 1fr; }
}

.split > * { min-width: 0; }

.rounded { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgb(2 32 86 / .12); }

.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-logo img { object-fit: contain; padding: 1.5rem; }

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}
.card-body p { color: var(--muted); font-size: .975rem; }

.card-link {
    margin-top: auto;
    font-weight: 700;
    text-decoration: none;
}
.card-link::after { content: " →"; }

/* ---------- Quote ---------- */
.quote {
    position: relative;
    isolation: isolate;
    padding-block: clamp(4rem, 9vw, 7rem);
    color: #fff;
    text-align: center;
    background: url("../img/quote-bg.webp") center / cover no-repeat;
}
.quote::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(2 32 86 / .78);
}
.quote figure { margin: 0; }
.quote blockquote { margin: 0 auto 1rem; max-width: 900px; }
.quote blockquote p {
    margin: 0;
    font-size: clamp(1.4rem, 1rem + 1.8vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
}
.quote figcaption { color: rgb(255 255 255 / .8); }

/* ---------- Contact ---------- */
.contact-card {
    display: grid;
    gap: .5rem;
    padding: 1.5rem;
    font-style: normal;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.contact-line {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .75rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink);
    transition: background-color .2s;
}
.contact-line span { overflow-wrap: anywhere; }
.contact-line:hover { background: #fff; color: var(--navy); }
.contact-line svg {
    flex: none;
    width: 40px; height: 40px;
    padding: 9px;
    border-radius: 50%;
    background: var(--navy);
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Footer ---------- */
.site-footer {
    padding-block: 1.75rem;
    background: var(--navy);
    color: rgb(255 255 255 / .8);
    font-size: .9rem;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 2rem;
}
.footer-inner p { margin: 0; }
