/* =========================================================
   CSM BAT — Industrial Editorial Design System
   Refonte 2026 · Bricolage Grotesque · Manrope · JetBrains Mono
   ========================================================= */

/* -------- Tokens -------- */
:root {
    /* Palette */
    --ink:        #0E1116;
    --ink-2:      #161A20;
    --ink-3:      #1F252D;
    --bone:       #F4F1EA;
    --bone-2:     #ECE7DC;
    --paper:      #FBF9F4;
    --orange:     #E85A1F;
    --orange-2:   #C84610;
    --orange-soft:#F2A48A;
    --text:       #1A1F26;
    --muted:      #6B7280;
    --rule:       rgba(14,17,22,.10);
    --rule-strong:rgba(14,17,22,.18);
    --rule-light: rgba(244,241,234,.12);

    /* Typo */
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body:    "Manrope", system-ui, sans-serif;
    --mono:    "JetBrains Mono", ui-monospace, monospace;

    /* Layout */
    --container: 1280px;
    --gutter:    clamp(20px, 4vw, 56px);
    --section-y: clamp(72px, 9vw, 140px);

    /* Motion */
    --ease:    cubic-bezier(.2,.7,.2,1);
    --ease-out:cubic-bezier(.16,1,.3,1);
}

/* -------- Reset -------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--body);
    font-weight: 400;
    color: var(--text);
    background: var(--bone);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
input, select, textarea, button { font-family: inherit; }
::selection { background: var(--orange); color: var(--paper); }

/* -------- Utilities -------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--orange);
    display: inline-block;
}
.eyebrow.on-dark { color: var(--bone); }
.section-index {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--muted);
}

/* -------- Alerts (form messages) -------- */
.alert {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 14px 22px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 20px 50px rgba(14,17,22,.25);
    transition: opacity .4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90%;
}
.alert i { font-size: 18px; }
.alert-success { background: #0E1116; color: var(--bone); border-left: 3px solid var(--orange); }
.alert-error   { background: #B71C1C; color: #fff; }

/* -------- Top bar -------- */
.topbar {
    background: var(--ink);
    color: var(--bone);
    font-size: 12.5px;
    font-family: var(--mono);
    letter-spacing: .04em;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
}
.topbar-info { display: flex; gap: 28px; flex-wrap: wrap; }
.topbar-info span i, .topbar-info a i { color: var(--orange); margin-right: 8px; }
.topbar-info a { transition: color .2s var(--ease); }
.topbar-info a:hover { color: var(--orange); }
.topbar-social { display: flex; gap: 14px; }
.topbar-social a { transition: color .2s var(--ease); }
.topbar-social a:hover { color: var(--orange); }
@media (max-width: 720px) {
    .topbar { font-size: 11px; }
    .topbar-info { gap: 18px; }
    .topbar-info .hide-mobile { display: none; }
}

/* -------- Navigation -------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.navbar.scrolled {
    background: rgba(244,241,234,.92);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    box-shadow: 0 1px 0 var(--rule);
}
.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.nav-logo {
    font-family: var(--display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}
.nav-logo .dot {
    width: 8px;
    height: 8px;
    background: var(--orange);
    display: inline-block;
    border-radius: 50%;
}
.nav-menu { display: flex; gap: 36px; align-items: center; }
.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    position: relative;
    padding: 6px 0;
    transition: color .2s var(--ease);
}
.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0;
    background: var(--orange);
    transition: width .3s var(--ease-out);
}
.nav-menu a:hover { color: var(--orange); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu a.nav-cta {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--bone) !important;
    padding: 13px 22px;
    border-radius: 999px;
    line-height: 1;
    transition: background .2s var(--ease);
    display: inline-flex;
    align-items: center;
}
.nav-menu a.nav-cta:hover { background: var(--orange); }
.nav-menu a.nav-cta::after { display: none; }
.nav-menu a.nav-cta::before { display: none; }

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.nav-toggle span {
    height: 1.5px;
    width: 26px;
    background: var(--ink);
    transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 960px) {
    .nav-menu .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bone);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s var(--ease);
        border-bottom: 1px solid var(--rule);
    }
    .nav-menu.active { max-height: 420px; }
    .nav-menu a {
        padding: 18px var(--gutter);
        width: 100%;
        border-bottom: 1px solid var(--rule);
        font-size: 16px;
    }
    .nav-menu a::after { display: none; }
}

/* -------- Hero -------- */
.hero {
    position: relative;
    background: var(--bone);
    padding: clamp(48px, 7vw, 96px) 0 clamp(60px, 8vw, 120px);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--rule) 1px, transparent 1px),
        linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: -1px -1px;
    opacity: .55;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, transparent, #000 80%);
            mask-image: radial-gradient(ellipse at 70% 40%, transparent, #000 80%);
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: end;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: clamp(24px, 4vw, 40px);
}
.hero-meta .ref {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .12em;
    color: var(--muted);
    text-transform: uppercase;
}
.hero-meta .rule {
    flex: 1;
    height: 1px;
    background: var(--rule-strong);
    max-width: 220px;
}
.hero-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(48px, 9vw, 132px);
    line-height: .92;
    letter-spacing: -.035em;
    color: var(--ink);
    margin: 0 0 clamp(24px, 3vw, 36px);
}
.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--orange);
}
.hero-title .accent {
    display: inline-block;
    position: relative;
}
.hero-title .accent::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6%;
    width: 100%;
    height: .12em;
    background: var(--orange);
}
.hero-lede {
    font-size: clamp(15px, 1.4vw, 18px);
    color: var(--text);
    max-width: 480px;
    margin: 0 0 clamp(28px, 3.5vw, 44px);
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease-out);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
}
.btn-primary {
    background: var(--orange);
    color: var(--paper);
}
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bone); }
.btn .arrow {
    width: 24px;
    height: 1px;
    background: currentColor;
    position: relative;
    transition: width .25s var(--ease-out);
}
.btn .arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: -3px;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}
.btn:hover .arrow { width: 36px; }

.hero-visual {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--ink);
    border-radius: 28px;
}
.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(1.05);
    transition: transform 1.2s var(--ease-out);
}
.hero-visual:hover img { transform: scale(1.04); }
.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(14,17,22,.45));
    pointer-events: none;
}
.hero-badge {
    position: absolute;
    top: 22px;
    left: 22px;
    background: var(--paper);
    padding: 14px 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.hero-badge .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2BB673;
    box-shadow: 0 0 0 0 rgba(43,182,115,.6);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(43,182,115,.55); }
    70%  { box-shadow: 0 0 0 12px rgba(43,182,115,0); }
    100% { box-shadow: 0 0 0 0 rgba(43,182,115,0); }
}
.hero-floating {
    position: absolute;
    bottom: 22px;
    right: 22px;
    z-index: 2;
    background: var(--orange);
    color: var(--paper);
    padding: 22px 26px;
    max-width: 260px;
}
.hero-floating .num {
    font-family: var(--display);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}
.hero-floating .label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: 6px;
    opacity: .9;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { aspect-ratio: 4 / 4; }
}

/* -------- Marquee / Stat ticker -------- */
.ticker {
    background: var(--ink);
    color: var(--bone);
    border-block: 1px solid var(--rule-light);
    overflow: hidden;
}
.ticker-track {
    display: flex;
    gap: 80px;
    padding: 22px 0;
    animation: tick 38s linear infinite;
    width: max-content;
}
.ticker-track span {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(20px, 2.4vw, 30px);
    letter-spacing: -.01em;
    display: inline-flex;
    align-items: center;
    gap: 80px;
    text-transform: uppercase;
    white-space: nowrap;
}
.ticker-track span::after {
    content: "✦";
    color: var(--orange);
    font-size: 18px;
}
@keyframes tick {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* -------- Section base -------- */
section { position: relative; }
.section-pad { padding: var(--section-y) 0; }
.section-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: end;
    margin-bottom: clamp(40px, 6vw, 72px);
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}
.section-head .left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.section-head h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(36px, 5.4vw, 72px);
    line-height: 1;
    letter-spacing: -.025em;
    margin: 0;
    color: var(--ink);
    max-width: 14ch;
}
.section-head h2 em {
    font-style: italic;
    font-weight: 400;
    color: var(--orange);
}
.section-head .right {
    max-width: 380px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    justify-self: end;
    text-align: right;
}
@media (max-width: 800px) {
    .section-head { grid-template-columns: 1fr; gap: 18px; }
    .section-head .right { text-align: left; justify-self: start; }
}

/* -------- About -------- */
.about { background: var(--bone); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(28px, 5vw, 80px);
    align-items: start;
}
.about-image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--ink-2);
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.1) contrast(1.04);
    transition: transform 1s var(--ease-out);
}
.about-image:hover img { transform: scale(1.03); }
.about-tag {
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--ink);
    color: var(--bone);
    padding: 18px 22px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}
.about-tag i { color: var(--orange); font-size: 14px; }
.about-content { padding-top: 8px; }
.about-eyebrow { margin-bottom: 18px; }
.about-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(28px, 3.6vw, 46px);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 0 0 28px;
}
.about-title em { font-style: italic; font-weight: 400; color: var(--orange); }
.about-text p {
    color: var(--text);
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.7;
}
.about-text p strong { color: var(--ink); font-weight: 600; }
.about-features {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
}
.about-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    font-size: 14.5px;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
}
.about-features li:nth-child(odd)  { padding-right: 16px; border-right: 1px solid var(--rule); }
.about-features li:nth-child(even) { padding-left: 16px; }
.about-features li i { color: var(--orange); font-size: 12px; }
.about-cta { margin-top: 36px; }
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-features { grid-template-columns: 1fr; }
    .about-features li:nth-child(odd) { border-right: 0; padding-right: 0; }
    .about-features li:nth-child(even) { padding-left: 0; }
}

/* -------- Services -------- */
.services { background: var(--paper); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--rule);
    background: var(--rule);
    gap: 1px;
}
.service-card {
    background: var(--paper);
    padding: clamp(28px, 3vw, 44px);
    position: relative;
    transition: background .35s var(--ease), color .35s var(--ease);
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}
.service-card .num {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 24px;
    transition: color .35s var(--ease);
}
.service-card .icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ink);
    margin-bottom: 24px;
    transition: background .35s var(--ease), border-color .35s var(--ease);
}
.service-card .icon i {
    font-size: 22px;
    color: var(--ink);
    transition: color .35s var(--ease);
}
.service-card h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -.015em;
    line-height: 1.1;
    color: var(--ink);
    margin: 0 0 12px;
    transition: color .35s var(--ease);
}
.service-card p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
    transition: color .35s var(--ease);
}
.service-card .more {
    margin-top: auto;
    padding-top: 28px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color .35s var(--ease);
}
.service-card .more::after {
    content: "→";
    transition: transform .25s var(--ease-out);
}
.service-card .image-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity .5s var(--ease);
}
.service-card .image-bg img { width: 100%; height: 100%; object-fit: cover; }
.service-card .image-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(232,90,31,.94), rgba(200,70,16,.96));
}
.service-card > * { position: relative; z-index: 1; }

.service-card:hover .image-bg { opacity: 1; }
.service-card:hover h3,
.service-card:hover p,
.service-card:hover .num,
.service-card:hover .more { color: var(--paper); }
.service-card:hover .icon { background: var(--paper); border-color: var(--paper); }
.service-card:hover .icon i { color: var(--orange); }
.service-card:hover .more::after { transform: translateX(6px); }

@media (max-width: 980px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card { min-height: 320px; }
}
@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* -------- Stats / Why -------- */
.why {
    background: var(--ink);
    color: var(--bone);
    padding: var(--section-y) 0;
    position: relative;
    overflow: hidden;
}
.why::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(244,241,234,.04) 1px, transparent 1px);
    background-size: 80px 100%;
    pointer-events: none;
}
.why-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: end;
    margin-bottom: clamp(40px, 5vw, 64px);
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule-light);
    position: relative;
}
.why-head h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(32px, 4.6vw, 60px);
    line-height: 1;
    letter-spacing: -.025em;
    margin: 0;
    color: var(--bone);
    max-width: 16ch;
}
.why-head h2 em { font-style: italic; font-weight: 400; color: var(--orange-soft); }
.why-head .right {
    max-width: 360px;
    color: rgba(244,241,234,.7);
    font-size: 15px;
    line-height: 1.65;
    justify-self: end;
    text-align: right;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}
.stat {
    padding: 36px 28px;
    border-right: 1px solid var(--rule-light);
    position: relative;
}
.stat:last-child { border-right: 0; }
.stat .num {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(48px, 6vw, 84px);
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--bone);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.stat .num sup {
    font-size: .35em;
    color: var(--orange);
    font-weight: 600;
    margin-top: .4em;
}
.stat .label {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(244,241,234,.65);
    margin-top: 16px;
}
@media (max-width: 800px) {
    .why-head { grid-template-columns: 1fr; }
    .why-head .right { text-align: left; justify-self: start; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat { border-bottom: 1px solid var(--rule-light); padding: 28px 18px; }
    .stat:nth-child(2n) { border-right: 0; }
}

/* -------- Gallery -------- */
.gallery { background: var(--bone); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    grid-auto-rows: 220px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--ink);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s var(--ease-out), filter .4s var(--ease);
    filter: grayscale(.1) contrast(1.04);
}
.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(14,17,22,.78));
    z-index: 1;
    opacity: .6;
    transition: opacity .4s var(--ease);
}
.gallery-item:hover::before { opacity: 1; }
.gallery-item:hover img { transform: scale(1.05); filter: grayscale(0) contrast(1.04); }
.gallery-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    padding: 20px 22px;
    color: var(--bone);
    transform: translateY(8px);
    opacity: .9;
    transition: transform .4s var(--ease-out), opacity .4s var(--ease);
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); opacity: 1; }
.gallery-overlay .tag {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--orange-soft);
    margin-bottom: 8px;
}
.gallery-overlay h4 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -.01em;
    margin: 0;
}

.gallery-item.size-lg { grid-column: span 6; grid-row: span 2; }
.gallery-item.size-md { grid-column: span 6; grid-row: span 1; }
.gallery-item.size-sm { grid-column: span 3; grid-row: span 1; }

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 180px; }
    .gallery-item.size-lg { grid-column: span 6; grid-row: span 2; }
    .gallery-item.size-md { grid-column: span 3; grid-row: span 1; }
    .gallery-item.size-sm { grid-column: span 3; grid-row: span 1; }
}
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .gallery-item.size-lg, .gallery-item.size-md, .gallery-item.size-sm {
        grid-column: span 1; grid-row: span 1;
    }
}

/* -------- Devis form -------- */
.devis {
    background: var(--ink);
    color: var(--bone);
    padding: var(--section-y) 0;
    position: relative;
    overflow: hidden;
}
.devis::before {
    content: "DEVIS";
    position: absolute;
    right: -3vw;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 28vw;
    line-height: 1;
    color: var(--ink-2);
    letter-spacing: -.04em;
    pointer-events: none;
    z-index: 0;
}
.devis-inner { position: relative; z-index: 1; }
.devis-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(32px, 6vw, 100px);
    align-items: start;
}
.devis-aside h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(32px, 4.4vw, 60px);
    line-height: 1.02;
    letter-spacing: -.025em;
    margin: 0 0 24px;
    color: var(--bone);
}
.devis-aside h2 em { font-style: italic; font-weight: 400; color: var(--orange-soft); }
.devis-aside .lede {
    color: rgba(244,241,234,.72);
    font-size: 15px;
    line-height: 1.7;
    max-width: 360px;
}
.devis-contacts {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-top: 1px solid var(--rule-light);
    padding-top: 28px;
}
.devis-contacts a, .devis-contacts span {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--bone);
    font-size: 14.5px;
    transition: color .2s var(--ease);
}
.devis-contacts a:hover { color: var(--orange); }
.devis-contacts i {
    width: 36px;
    height: 36px;
    border: 1px solid var(--rule-light);
    display: grid;
    place-items: center;
    color: var(--orange);
    font-size: 14px;
    flex-shrink: 0;
}
.devis-form {
    background: transparent;
    padding: 0;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    margin-bottom: 14px;
    position: relative;
}
.form-group label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(244,241,234,.6);
    margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bone);
    border: 1px solid var(--bone);
    padding: 14px 16px;
    color: var(--ink);
    font-size: 15px;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
    border-radius: 10px;
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    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 1L6 6L11 1' stroke='%230E1116' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}
.form-group select option { background: var(--bone); color: var(--ink); }
.form-group textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,90,31,.18);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(14,17,22,.45); }

.btn-submit {
    margin-top: 24px;
    width: 100%;
    background: var(--orange);
    color: var(--paper);
    padding: 22px 28px;
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background .25s var(--ease), color .25s var(--ease);
    cursor: pointer;
    border: 0;
    font-weight: 500;
}
.btn-submit:hover { background: var(--bone); color: var(--ink); }
.btn-submit::after { content: "→"; }

@media (max-width: 900px) {
    .devis-grid { grid-template-columns: 1fr; gap: 40px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* -------- Footer -------- */
.footer {
    background: var(--ink);
    color: var(--bone);
    border-top: 1px solid var(--rule-light);
}
.footer-mark { padding: clamp(48px, 7vw, 100px) 0 clamp(20px, 3vw, 32px); }
.footer-mark .word {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(72px, 18vw, 240px);
    line-height: .9;
    letter-spacing: -.04em;
    color: var(--bone);
    margin: 0;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 28px);
}
.footer-mark .word .dot {
    width: clamp(14px, 2vw, 28px);
    height: clamp(14px, 2vw, 28px);
    background: var(--orange);
    border-radius: 50%;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    padding: clamp(40px, 5vw, 64px) 0;
    border-top: 1px solid var(--rule-light);
    border-bottom: 1px solid var(--rule-light);
}
.footer-section h4 {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0 0 22px;
    font-weight: 500;
}
.footer-section p, .footer-section li {
    font-size: 14.5px;
    color: rgba(244,241,234,.7);
    line-height: 1.7;
    margin: 0 0 10px;
}
.footer-section a {
    color: rgba(244,241,234,.85);
    transition: color .2s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.footer-section a:hover { color: var(--orange); }
.footer-section i { color: var(--orange); }
.footer-section .address-line { display: block; color: var(--bone); }
.social-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    color: rgba(244,241,234,.5);
}
.footer-bottom a:hover { color: var(--orange); }
@media (max-width: 800px) {
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
}

/* -------- Reveal animation -------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
    will-change: opacity, transform;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------- Legal pages -------- */
.legal-page {
    background: var(--bone);
    padding: clamp(80px, 10vw, 140px) 0 clamp(64px, 8vw, 120px);
    min-height: 60vh;
}
.legal-page h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -.025em;
    margin: 0 0 40px;
    color: var(--ink);
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}
.legal-page h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(22px, 2.4vw, 28px);
    margin: 40px 0 16px;
    color: var(--ink);
    letter-spacing: -.015em;
}
.legal-page h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 18px;
    margin: 24px 0 10px;
    color: var(--ink);
}
.legal-page p, .legal-page li {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--text);
    margin: 0 0 14px;
    max-width: 760px;
}
.legal-page ul { margin: 0 0 18px 22px; list-style: disc; max-width: 760px; }
.legal-page strong { color: var(--ink); font-weight: 600; }
.legal-page a { color: var(--orange); border-bottom: 1px solid var(--orange); }
.legal-page a:hover { color: var(--ink); border-bottom-color: var(--ink); }

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