/* ==========================================================================
   Karlinah Immobilier — styles.css
   Design system: monochrome, austere, modernist.
   Font: Outfit. Grid: 8pt. Mobile-first.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --ink: #0A0A0A;
    --canvas: #FCFBF8;
    --mute: #3D3B36;
    --whisper: #6B6862;
    --line: #E5E2DA;
    --noir: #14130F;
    --cream: #F0EDE5;
    --invert-text: #FCFBF8;
    --invert-mute: #B8B3A4;
    --invert-line: #2C2A24;

    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Avenir Next', 'Helvetica Neue', system-ui, sans-serif;
    --font-body: var(--font-display);

    --max-w: 1200px;
    --gutter: 32px;
    --section-py: 56px;
    --header-h: 64px;
}

@media (min-width: 768px) {
    :root {
        --section-py: 96px;
        --header-h: 72px;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

p {
    text-align: justify;
}

@media (min-width: 768px) {
    body { font-size: 16px; }
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
code { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace; font-size: 0.9em; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--ink);
    color: var(--invert-text);
    font-size: 13px;
    font-weight: 400;
}
.skip-link:focus {
    top: 8px;
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.content-narrow {
    max-width: 780px;
}

/* ---------- Typography ---------- */
h1 {
    font-size: 38px;
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) {
    h1 { font-size: 64px; }
}

h2 {
    font-size: 28px;
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}
@media (min-width: 768px) {
    h2 { font-size: 40px; }
}

h3 {
    font-size: 20px;
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 12px;
}
@media (min-width: 768px) {
    h3 { font-size: 22px; }
}

.eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
    margin-bottom: 16px;
}

.text-muted {
    color: var(--whisper);
    font-style: italic;
}

p + p {
    margin-top: 16px;
}

/* ---------- Arrow link ---------- */
.arrow-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    color: var(--ink);
    margin-top: 16px;
}
.arrow-link:hover,
.arrow-link:focus-visible {
    text-decoration-thickness: 2px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    height: var(--header-h);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    height: 100%;
    gap: 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-logo-mark {
    height: 36px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-wordmark {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .header-wordmark { font-size: 13px; }
}

.header-nav {
    margin-left: auto;
    display: none;
}
@media (min-width: 768px) {
    .header-nav { display: block; }
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-list a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
    text-decoration: none;
    padding: 4px 0;
}
.nav-list a:hover,
.nav-list a:focus-visible {
    color: var(--ink);
}
.nav-list a.active {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 1px;
}

.header-lang {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-left: 32px;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .header-lang { display: flex; }
}

.lang-current {
    font-weight: 500;
    color: var(--ink);
}
.lang-sep {
    color: var(--whisper);
}
.lang-link {
    color: var(--whisper);
    text-decoration: none;
}
.lang-link:hover,
.lang-link:focus-visible {
    color: var(--ink);
}

/* ---------- Mobile menu ---------- */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    padding: 4px;
}
@media (min-width: 768px) {
    .menu-toggle { display: none; }
}

.menu-bar {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--ink);
    transition: transform 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-bar:first-child {
    transform: translateY(3px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-bar:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--canvas);
    z-index: 99;
    padding: 48px var(--gutter);
}
.mobile-menu[aria-hidden="false"] {
    display: block;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.mobile-nav-list a {
    font-size: 22px;
    font-weight: 200;
    color: var(--ink);
}
.mobile-nav-list a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.mobile-lang {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
    padding: 80px 0 var(--section-py);
}
@media (min-width: 768px) {
    .hero { padding: 120px 0 var(--section-py); }
}

.hero--page {
    padding: 64px 0 48px;
}
@media (min-width: 768px) {
    .hero--page { padding: 96px 0 64px; }
}

.hero h1 {
    margin-bottom: 24px;
    max-width: 720px;
}

.hero-body {
    max-width: 640px;
    color: var(--mute);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.hero-body--lead {
    font-size: 18px;
    line-height: 1.7;
    color: var(--mute);
}
@media (min-width: 768px) {
    .hero-body--lead { font-size: 20px; }
}

.hero--404 {
    min-height: 50vh;
    display: flex;
    align-items: center;
}

/* ---------- Sections ---------- */
.section {
    padding: var(--section-py) 0;
}

.section--alt {
    background: var(--cream);
}

/* ---------- Brands ---------- */
.brands-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
    flex-wrap: wrap;
}
@media (min-width: 768px) {
    .brands-grid { gap: 56px; }
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.brand-item:hover {
    opacity: 1;
}

.brand-item img {
    max-height: 48px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-item--square img {
    max-height: 52px;
    max-width: 52px;
}

.brand-item--wide img {
    max-height: 36px;
    max-width: 140px;
}

/* ---------- Leadership ---------- */
.leadership-grid {
    display: grid;
    gap: 32px;
    margin-top: 40px;
}
@media (min-width: 768px) {
    .leadership-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

.leader-card {
    padding: 32px;
    background: var(--canvas);
    border-radius: 4px;
    border: 1px solid var(--line);
}

.leader-name {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 4px;
}

.leader-role {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.leader-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--mute);
}

/* ---------- Pillars ---------- */
.pillars-section {
    background: var(--noir);
    color: var(--invert-text);
}
/* Full-bleed on the section wrapper */
.pillars-section .section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.pillars-section .eyebrow {
    color: var(--invert-mute);
}
.pillars-section h3 {
    color: var(--invert-text);
}
.pillars-section .arrow-link {
    color: var(--invert-mute);
}
.pillars-section .arrow-link:hover {
    color: var(--invert-text);
}

.pillars-grid {
    display: grid;
    gap: 48px;
    margin-top: 40px;
}
@media (min-width: 768px) {
    .pillars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

.pillar {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pillar .arrow-link {
    margin-top: auto;
    padding-top: 16px;
}

.pillar-num {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--invert-mute);
    margin-bottom: 8px;
    display: block;
}

.pillar-eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--invert-mute);
    margin-bottom: 12px;
}

.pillar p {
    color: var(--invert-mute);
    font-size: 15px;
}

/* ---------- Stats ---------- */
.stats-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 48px 0;
}
@media (min-width: 768px) {
    .stats-section { padding: 64px 0; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
@media (min-width: 768px) {
    .stat {
        border-right: 1px solid var(--line);
    }
    .stat:last-child {
        border-right: none;
    }
}

.stat-value {
    font-size: 36px;
    font-weight: 200;
    letter-spacing: -0.01em;
    line-height: 1;
    margin-bottom: 8px;
}
@media (min-width: 768px) {
    .stat-value { font-size: 56px; }
}

.stat-label {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
}

/* ---------- Project cards ---------- */
.projects-grid {
    display: grid;
    gap: 40px;
    margin-top: 32px;
}
@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

.project-card {
    border: 1px solid var(--line);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.project-card-img {
    width: 100%;
    height: 200px;
    background: var(--cream);
    background-image: url('/assets/img/anfa-cliff.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}
.project-card-img--karli {
    background-image: url('/assets/img/lotissement-karli.jpg');
}
@media (min-width: 768px) {
    .project-card-img { height: 280px; }
}

.project-card-eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
    padding: 24px 24px 0;
}

.project-card h3 {
    padding: 8px 24px 0;
}

.project-card p {
    padding: 0 24px;
    color: var(--mute);
    font-size: 15px;
}

.project-card .arrow-link {
    margin: 8px 24px 24px;
}

.project-card--placeholder {
    border-style: dashed;
    opacity: 0.6;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    gap: 48px;
}
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}

.contact-block {
    margin-bottom: 24px;
}

.contact-label {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
    margin-bottom: 4px;
}

.contact-info a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.contact-info a:hover {
    text-decoration-thickness: 2px;
}

/* ---------- Form ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-bottom-color: var(--ink);
}

.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-bottom-color: #b91c1c;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6862' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 24px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    border: 1px solid var(--line);
    padding: 12px;
}
.form-group textarea:focus {
    border-color: var(--ink);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}
.form-group--checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--ink);
}
.form-group--checkbox label {
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mute);
    line-height: 1.5;
}
.form-group--checkbox label a {
    text-decoration: underline;
}

.form-submit {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    align-self: flex-start;
}
.form-submit:hover,
.form-submit:focus-visible {
    text-decoration-thickness: 2px;
}
.form-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-message {
    padding: 16px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
}
.form-message--success {
    border-color: var(--mute);
}
.form-message--error {
    border-color: #b91c1c;
    color: #b91c1c;
}

/* ---------- Map ---------- */
.map-embed {
    margin-top: 24px;
    border: 1px solid var(--line);
}
.map-embed iframe {
    display: block;
    width: 100%;
    height: 400px;
}

/* ---------- Legal content ---------- */
.legal-content h2 {
    font-size: 22px;
    font-weight: 300;
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content h3 {
    font-size: 17px;
    font-weight: 400;
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin: 12px 0;
}
.legal-content ul li {
    margin-bottom: 4px;
}

.legal-content p {
    color: var(--mute);
}

.legal-content strong {
    color: var(--ink);
    font-weight: 500;
}

.legal-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-table {
    margin: 16px 0;
    border: 1px solid var(--line);
}
.legal-table th,
.legal-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.legal-table th {
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--whisper);
    background: var(--cream);
}
.legal-table td {
    color: var(--mute);
}

.legal-date {
    margin-top: 40px;
    color: var(--whisper);
}

/* ---------- App directory (Innovation) ---------- */
.app-directory {
    margin-top: 24px;
}

.app-directory-table {
    border: 1px solid var(--line);
    margin-bottom: 24px;
}
.app-directory-table th,
.app-directory-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: top;
}
.app-directory-table th {
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--whisper);
    background: var(--cream);
}
.app-directory-table td {
    color: var(--mute);
}
.app-directory-table td:first-child {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.app-directory-note {
    color: var(--whisper);
    font-style: italic;
}

.app-directory-identity {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--whisper);
    margin-top: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--noir);
    color: var(--invert-text);
    padding: 64px 0 32px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-divider {
    height: 1px;
    background: var(--invert-line);
    margin: 0;
}

.footer-main {
    display: grid;
    gap: 40px;
    padding-bottom: 40px;
}
@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}

.footer-brand-col {}

.footer-brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.footer-logo-mark {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-wordmark {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--invert-text);
}

.footer-contact-block p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--invert-mute);
    margin: 0;
}
.footer-contact-block a {
    color: var(--invert-mute);
    text-decoration: none;
}
.footer-contact-block a:hover {
    color: var(--invert-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-sitemap {
    display: flex;
    gap: 48px;
}

.footer-sitemap-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-sitemap a {
    font-size: 12px;
    color: var(--invert-mute);
    text-decoration: none;
}
.footer-sitemap a:hover,
.footer-sitemap a:focus-visible {
    color: var(--invert-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
}
@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.footer-copyright {
    font-size: 11px;
    color: var(--invert-mute);
}

.footer-bottom-lang {
    font-size: 11px;
    color: var(--invert-mute);
}
.lang-current {
    font-weight: 500;
    color: var(--invert-text);
}
.lang-sep {
    margin: 0 4px;
}
.lang-link {
    color: var(--invert-mute);
    text-decoration: none;
}
.lang-link:hover {
    color: var(--invert-text);
}

/* ---------- Focus ---------- */
:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.site-footer :focus-visible {
    outline-color: var(--invert-text);
}

/* ---------- Responsive table scroll ---------- */
@media (max-width: 600px) {
    .app-directory-table,
    .legal-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- Print ---------- */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu,
    .menu-toggle,
    .skip-link,
    .map-embed,
    .form-submit,
    .contact-form {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}
