/* ==========================================================================
   Ajax Trading Corporation — public site
   Look: warm stone ground, ink type, Ajax navy + oak accent.
   Display: Fraunces · Body: Instrument Sans (Google Fonts, loaded in layout)
   ========================================================================== */

:root {
    --stone: #f5f1ea;
    --stone-2: #ece6db;
    --paper: #fffdf9;
    --ink: #17191f;
    --ink-2: #474a54;
    --muted: #6a6d76;
    --line: #ddd5c7;
    --navy: #1e2a4a;
    --navy-2: #2b3b66;
    --oak: #9a6532;
    --oak-2: #c89259;
    --ok: #1f6b45;
    --err: #a3261f;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(23, 25, 31, .05), 0 8px 24px rgba(23, 25, 31, .06);
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);

    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--stone);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
a:hover { color: var(--oak); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--oak-2); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--navy); color: #eef0f6; }
.section--ink h2, .section--ink h3 { color: #fff; }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--oak); margin-bottom: 14px;
}
.section--ink .eyebrow { color: var(--oak-2); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 62ch; }
.section--ink .lead { color: #c9cfdf; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .lead { margin: 10px 0 0; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
    white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent;
    font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); color: #fff; }
.btn--oak { background: var(--oak); color: #fff; }
.btn--oak:hover { background: #82531f; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--stone); color: var(--navy); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost-light:hover { background: #fff; color: var(--navy); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--navy); white-space: nowrap; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 4px; }
.section--ink .link-arrow { color: #fff; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 241, 234, .92);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { height: 40px; width: auto; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff;
    display: grid; place-items: center; font: 600 1.25rem/1 var(--display);
}
.brand-text { line-height: 1.05; white-space: nowrap; }
.brand-text strong { display: block; font: 600 1.15rem/1 var(--display); letter-spacing: .06em; }
.brand-text span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .96rem;
    padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--stone-2); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--stone-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); }
.lang-toggle a {
    min-width: 40px; min-height: 34px; display: grid; place-items: center; padding: 0 10px;
    border-radius: 999px; font-size: .82rem; font-weight: 700; letter-spacing: .04em;
    text-decoration: none; color: var(--muted);
}
.lang-toggle a[aria-current="true"] { background: var(--ink); color: #fff; }

.nav-toggle {
    display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--paper); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1240px) {
    .main-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn { display: none; }
    body.nav-open { overflow: hidden; }
    /* backdrop-filter would make the fixed menu position against the header */
    body.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--stone); }
    body.nav-open .main-nav {
        display: flex; flex-direction: column; align-items: stretch; gap: 2px;
        position: fixed; inset: 72px 0 0 0; background: var(--stone); padding: 20px var(--gutter) 40px; overflow-y: auto;
    }
    body.nav-open .main-nav a { font-size: 1.35rem; font-family: var(--display); padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
    body.nav-open .main-nav .nav-cta-mobile { display: flex; margin-top: 20px; border: 0; border-radius: 999px; font-family: var(--body); font-size: 1rem; color: #fff; background: var(--navy); }
    body.nav-open .float-chat { display: none; }
}
.nav-cta-mobile { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--oak); }
.hero .lead { margin-bottom: 32px; }
.hero-art {
    position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.4;
    background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .elevation { width: 100%; height: 100%; }
.hero-badge {
    position: absolute; left: 16px; bottom: 16px; background: rgba(255, 253, 249, .95);
    border-radius: 12px; padding: 10px 14px; font-size: .85rem; line-height: 1.3; box-shadow: var(--shadow);
}
.hero-badge strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.stat { padding: 18px 16px 0 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat-value { font: 500 1.9rem/1 var(--display); }
.stat-value small { font: 600 .8rem/1 var(--body); color: var(--muted); margin-left: 4px; }
.stat-label { font-size: .88rem; color: var(--muted); margin: 6px 0 0; line-height: 1.35; }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .stat, .stat + .stat { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
    .stat-label { margin: 0; }
    .hero .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- Paths (3 entry points) ---------- */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.path {
    display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius);
    background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.path:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--oak-2); color: var(--ink); }
.path-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--stone-2); display: grid; place-items: center; color: var(--navy); }
.path-icon svg { width: 26px; height: 26px; }
.path h3 { margin: 6px 0 0; }
.path p { color: var(--ink-2); margin: 0; flex: 1; }
.path .link-arrow { margin-top: 8px; }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.process li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.process li::before { content: "0" counter(step); display: block; font: 500 .95rem/1 var(--display); color: var(--oak); margin-bottom: 14px; }
.process h3 { font-size: 1.2rem; }
.process p { color: var(--ink-2); margin: 0; font-size: .97rem; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Media placeholders (used until real photos are uploaded) ---------- */
.ph {
    position: relative; width: 100%; height: 100%; display: grid; place-items: center;
    background:
        repeating-linear-gradient(90deg, transparent 0 22px, rgba(154, 101, 50, .07) 22px 23px),
        linear-gradient(180deg, #efe7da, #e4d8c5);
    color: #8a7a64; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-align: center; padding: 12px;
}
.ph svg { width: 42px; height: 42px; opacity: .55; margin: 0 auto 6px; display: block; }
.ph--dark { background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.05) 22px 23px), #25325a; color: #aab3cc; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.15rem; margin: 0; }
.card-body p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.card-tag { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--oak); }
.card-foot { margin-top: auto; padding-top: 10px; }

/* Portfolio: first featured tile spans wider on desktop */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work-grid .card:first-child { grid-column: span 2; grid-row: span 2; }
.work-grid .card:first-child .card-media { aspect-ratio: auto; flex: 1; min-height: 320px; }
.work-grid .card:first-child .card-body { flex: none; }
@media (max-width: 960px) {
    .work-grid { grid-template-columns: 1fr 1fr; }
    .work-grid .card:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 560px) {
    .work-grid { grid-template-columns: 1fr; }
    .work-grid .card:first-child { grid-column: auto; }
    .work-grid .card:first-child .card-media { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- Factory band ---------- */
.factory { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.factory-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 0; }
.factory-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-weight: 500; }
.factory-list li svg { width: 20px; height: 20px; color: var(--oak-2); flex: none; }
.factory-art { border-radius: 20px; overflow: hidden; aspect-ratio: 1 / 1; }
.factory-art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .factory { grid-template-columns: 1fr; } .factory-art { aspect-ratio: 4 / 3; } }

/* ---------- Accessories strip ---------- */
.acc-card .card-media { aspect-ratio: 5 / 4; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; padding: 0; list-style: none; }
.chip {
    min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--paper); font: 600 .9rem/1.2 var(--body); color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Materials ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--ink-2); margin: 0; }
.feature-icon { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--oak); color: var(--oak); display: grid; place-items: center; margin-bottom: 16px; }
.feature-icon svg { width: 22px; height: 22px; }
@media (max-width: 800px) { .features { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Updates ---------- */
.updates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.update { text-decoration: none; color: var(--ink); }
.update .card-media { border-radius: var(--radius-sm); aspect-ratio: 1 / 1; margin-bottom: 10px; }
.update p { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.35; }
@media (max-width: 860px) { .updates { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 24px; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #c9cfdf; margin: 0; max-width: 46ch; }
.cta-actions { display: grid; gap: 10px; }
.cta-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .cta-channels { grid-template-columns: 1fr; } }

.channel {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px;
    border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem;
}
.channel:hover { background: rgba(255,255,255,.16); color: #fff; }
.channel svg { width: 18px; height: 18px; }
.channel--light { background: var(--paper); border-color: var(--line); color: var(--ink); }
.channel--light:hover { background: var(--stone-2); color: var(--ink); }

/* ---------- Page header ---------- */
.page-head { padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); max-width: 20ch; }

/* ---------- Machines ---------- */
.machine { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.machine:nth-child(even) .machine-media { order: 2; }
.machine-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 11; }
.machine-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-num { font: 500 .95rem/1 var(--display); color: var(--oak); margin-bottom: 10px; display: block; }
.machine p { color: var(--ink-2); max-width: 52ch; }
@media (max-width: 800px) { .machine { grid-template-columns: 1fr; } .machine:nth-child(even) .machine-media { order: 0; } }

/* ---------- About ---------- */
.about-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.about-block p { margin: 0; color: var(--ink-2); }
.locations { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.location { padding: 24px 0; border-top: 2px solid var(--ink); }
.location h3 { font-size: 1.15rem; margin-bottom: 6px; }
.location p { margin: 0; color: var(--ink-2); }
@media (max-width: 800px) { .about-blocks, .locations { grid-template-columns: 1fr; } }

/* ---------- Showroom ---------- */
.showrooms { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.showroom-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 16px; }
.showroom-card.upcoming { background: transparent; border-style: dashed; }
.showroom-card h2 { font-size: 1.45rem; margin-bottom: 8px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: #e3efe7; color: var(--ok); }
.badge--soon { background: var(--stone-2); color: var(--ink-2); }
.badge--neutral { background: var(--stone-2); color: var(--navy); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1 / 1; background: var(--stone-2); position: sticky; top: 96px; }
.map iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .showrooms { grid-template-columns: 1fr; } .map { position: static; aspect-ratio: 4 / 3; } }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 36px); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field-label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: -2px; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
    background: #fff; font: 400 1rem/1.4 var(--body); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 42, 74, .12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .92rem; color: var(--ink-2);
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--oak-2); outline-offset: 2px; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.alert--ok { background: #e3efe7; color: var(--ok); }
.alert--err { background: #f7e2df; color: var(--err); }
.form-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.contact-aside h2 { font-size: 1.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.contact-aside .channel { justify-content: flex-start; }

/* ---------- Configurator ---------- */
.builder { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.builder-step { margin-bottom: 28px; }
.builder-step > .field-label { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch span { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; }
.swatch i { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.swatch input:focus-visible + span { outline: 3px solid var(--oak-2); outline-offset: 2px; }
.module-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.module-add {
    min-height: 52px; border-radius: 12px; border: 1.5px dashed #bfb4a2; background: transparent; cursor: pointer;
    font: 600 .95rem/1.2 var(--body); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.module-add:hover { border-style: solid; border-color: var(--ink); background: #fff; }
.builder-preview { position: sticky; top: 96px; }
.preview-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.preview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.preview-head h2 { font-size: 1.35rem; margin: 0; }
.elev { background: #f0ebe2; border-radius: 12px; padding: 22px 16px 0; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; overflow-x: auto; }
.elev-row { display: flex; gap: 3px; align-items: flex-end; min-height: 20px; }
.elev-wall { margin-bottom: 44px; min-height: 76px; align-items: flex-start; }
.elev-counter { height: 8px; background: #3b3b3b; border-radius: 2px 2px 0 0; }
.elev-floor { height: 6px; background: #cfc5b4; margin: 0 -16px; }
.cab { position: relative; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); background: var(--finish, #e8e2d6); }
.cab--base { width: 60px; height: 108px; }
.cab--drawer { width: 46px; height: 108px; }
.cab--corner { width: 90px; height: 108px; }
.cab--wall { width: 60px; height: 76px; }
.cab::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(0,0,0,.14); border-radius: 2px; }
.cab--drawer::before { background: linear-gradient(transparent 32%, rgba(0,0,0,.14) 32% calc(32% + 1px), transparent calc(32% + 1px) 66%, rgba(0,0,0,.14) 66% calc(66% + 1px), transparent calc(66% + 1px)); }
.cab button {
    position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; border: 0;
    background: var(--ink); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.cab:hover button, .cab:focus-within button { opacity: 1; }
@media (hover: none) { .cab button { opacity: 1; } }
.elev-empty { color: var(--muted); text-align: center; margin: auto; padding: 40px 10px; font-size: .95rem; }
.module-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.module-list li { font-size: .82rem; background: var(--stone-2); border-radius: 999px; padding: 4px 10px; color: var(--ink-2); }
.preview-card form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.preview-card form h3 { font-size: 1.15rem; }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } .builder-preview { position: static; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b8bcc7; padding: 64px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font: 700 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #e3e5ea; text-decoration: none; }
.site-footer a:hover { color: var(--oak-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand-text span { color: #8d92a0; }
.site-footer .brand-mark { background: var(--oak); }
.footer-tagline { max-width: 38ch; font-size: .95rem; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #3a3e49; display: grid; place-items: center; }
.socials a:hover { border-color: var(--oak-2); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid #2c3039; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #8d92a0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating chat ---------- */
.float-chat { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.float-chat-menu { display: none; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); min-width: 210px; }
.float-chat.open .float-chat-menu { display: flex; }
.float-chat-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.float-chat-menu a:hover { background: var(--stone-2); color: var(--ink); }
.float-chat-menu svg { width: 20px; height: 20px; color: var(--navy); }
.float-chat-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; border: 0;
    background: var(--oak); color: #fff; font: 700 .95rem/1 var(--body); cursor: pointer; box-shadow: 0 8px 24px rgba(154, 101, 50, .35);
}
.float-chat-btn:hover { background: #82531f; }
.float-chat-btn svg { width: 22px; height: 22px; }

/* ---------- Reveal on scroll (progressive; content visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    * { transition: none !important; }
}

[hidden] { display: none !important; }
a.visually-hidden:focus { position: fixed !important; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }

@media (max-width: 560px) {
    .path { padding: 22px; }
    .float-chat-btn { width: 56px; height: 56px; padding: 0; justify-content: center; }
    .float-chat-btn .float-chat-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Live chat (Maya) ---------- */
.chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #d8412f; border: 2px solid #fff; }
.float-chat-btn { position: relative; }
.chat-panel {
    width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
    border-radius: 20px; box-shadow: 0 18px 48px rgba(23, 25, 31, .22); overflow: hidden;
}
.chat-panel[hidden] { display: none !important; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 14px 14px 16px; background: var(--navy); color: #fff; }
.chat-head h2 { font: 600 1.02rem/1.2 var(--body); margin: 0; color: #fff; letter-spacing: 0; }
.chat-head p { margin: 2px 0 0; font-size: .8rem; color: #c9cfdf; line-height: 1.3; }
.chat-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--oak); display: grid; place-items: center; font: 600 1.1rem/1 var(--display); }
.chat-close { margin-left: auto; width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-close:hover { background: rgba(255,255,255,.2); }
.chat-close svg { width: 20px; height: 20px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--stone); overscroll-behavior: contain; }
.msg { max-width: 85%; display: flex; flex-direction: column; gap: 3px; }
.msg p { margin: 0; padding: 10px 13px; border-radius: 14px; font-size: .95rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-name { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 0 4px; }
.msg--ajax { align-self: flex-start; }
.msg--ajax p { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg--me p { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg-note { align-self: center; font-size: .8rem; color: var(--ok); background: #e3efe7; padding: 6px 12px; border-radius: 999px; text-align: center; }
.chat-typing, .chat-error { margin: 0; padding: 8px 16px; font-size: .84rem; background: var(--stone); }
.chat-typing { color: var(--muted); font-style: italic; }
.chat-error { color: var(--err); background: #f7e2df; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--paper); }
.chat-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: 400 16px/1.35 var(--body); color: var(--ink); background: #fff; }
.chat-form textarea:focus { outline: none; border-color: var(--navy); }
.chat-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--oak); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-send:hover { background: #82531f; }
.chat-send svg { width: 20px; height: 20px; }
.chat-foot { margin: 0; padding: 0 12px 10px; font-size: .78rem; color: var(--muted); background: var(--paper); text-align: center; }
.chat-foot a { color: var(--navy-2); }
body.nav-open .chat { display: none; }
@media (max-width: 560px) {
    .chat.is-open { inset: 0; right: 0; bottom: 0; }
    .chat.is-open .chat-panel { width: 100vw; height: 100%; border-radius: 0; border: 0; }
    .chat.is-open .float-chat-btn { display: none; }
}
