/* Brigade WTC Devanahalli — site styles
   Mobile-first. No framework. Tokens below drive the whole palette. */

:root {
    --ink: #0f1d2b;
    --ink-2: #1c3147;
    --text: #25303b;
    --muted: #5b6673;
    --line: #e4ddd2;
    --bg: #ffffff;
    --soft: #f7f4ef;
    --gold: #b08d57;
    --gold-dark: #7d5f33;
    --ok: #1d6b45;
    --err: #b3261e;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(15, 29, 43, .10);
    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --header-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    padding-bottom: 64px; /* room for the mobile sticky bar */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
strong { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 1000;
    background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
}
.skip-link:focus { top: 8px; color: #fff; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

.section { padding: 56px 0; }
.section--soft { background: var(--soft); }
.section--ink { background: var(--ink); color: #dfe6ee; }
.section--ink h2, .section--ink h3, .section--ink strong { color: #fff; }
.section--ink a { color: var(--gold); }
@media (min-width: 900px) { .section { padding: 80px 0; } }

.eyebrow {
    display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gold-dark); font-weight: 600; margin-bottom: .6em;
}
.section--ink .eyebrow { color: var(--gold); }
.lead { font-size: 1.08rem; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.note {
    font-size: .875rem; color: var(--muted); border-left: 3px solid var(--gold);
    padding: 8px 12px; background: var(--soft); border-radius: 0 6px 6px 0;
}
.section--soft .note { background: #fff; }

/* ---------- Status bar ---------- */
.status-bar { background: var(--ink); color: #dfe6ee; font-size: .8rem; text-align: center; padding: 6px 16px; }
.status-bar strong { color: var(--gold); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.logo { text-decoration: none; color: var(--ink); line-height: 1.1; display: flex; flex-direction: column; }
.logo-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.logo-tag { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.logo:hover { color: var(--ink); }

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

.site-nav { display: none; }
.site-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.site-nav li { margin: 0; }
.site-nav a {
    display: block; padding: 12px 4px; text-decoration: none; color: var(--ink); font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--gold-dark); }
.header-cta { display: none; }

@media (min-width: 1180px) {
    .nav-toggle { display: none; }
    .site-nav a { white-space: nowrap; }
    .header-cta { white-space: nowrap; }
    .site-nav, .site-nav.is-open { display: block; position: static; box-shadow: none; border: 0; background: none; }
    .site-nav ul { display: flex; gap: 4px; padding: 0; }
    .site-nav a { border: 0; padding: 8px 9px; font-size: .9rem; border-radius: 6px; }
    .site-nav a:hover { background: var(--soft); }
    .header-cta { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 10px 22px; border-radius: 8px; border: 2px solid transparent;
    font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
    background: var(--gold-dark); color: #fff; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--gold); color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Hero slider (home) ---------- */
.hero { background: var(--ink); color: #fff; }
.hero-grid { display: grid; gap: 0; }
.slider { position: relative; min-height: 380px; overflow: hidden; }
.slide {
    position: absolute; inset: 0; display: flex; align-items: flex-end;
    padding: 40px 16px 72px; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide--1 { background: radial-gradient(120% 90% at 85% 10%, #2e4d6b 0%, #0f1d2b 60%); }
.slide--2 { background: radial-gradient(110% 90% at 15% 15%, #5b4526 0%, #1a2a3a 55%, #0f1d2b 100%); }
.slide--3 { background: radial-gradient(120% 90% at 70% 80%, #1f4a4a 0%, #0f1d2b 60%); }
.slide::before {
    /* Abstract line pattern — decorative only, not a project visual. */
    content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.5) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, transparent 0%, #000 70%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 70%);
}
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide--img::before {
    /* Legibility scrim over supplied imagery. */
    opacity: 1; background: linear-gradient(180deg, rgba(15,29,43,0) 25%, rgba(15,29,43,.72) 55%, rgba(15,29,43,.92) 100%);
    mask-image: none; -webkit-mask-image: none; z-index: 1;
}
.slide-content { position: relative; max-width: 560px; z-index: 2; }
.slide-kicker { color: #f0d9aa; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.slide-content { text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.slide-title { font-family: var(--serif); font-size: clamp(1.7rem, 4.6vw, 2.8rem); line-height: 1.15; margin: .3em 0 .4em; color: #fff; }
.slide-text { color: #dfe6ee; margin: 0; }
.slider-controls { position: absolute; left: 16px; bottom: 20px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.slider-btn {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5);
    background: transparent; color: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.slider-btn:hover { background: rgba(255,255,255,.12); }
.slider-dots { display: flex; gap: 6px; }
.slider-dot { width: 28px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; }
.slider-dot[aria-current="true"] { background: var(--gold); }
.hero-form { background: #fff; color: var(--text); padding: 24px 16px 28px; }
.hero-form .form-card { border: 0; box-shadow: none; padding: 0; }
@media (min-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) 400px; align-items: stretch; }
    .slider { min-height: 540px; }
    .slide { padding: 48px 48px 96px; }
    .slider-controls { left: 48px; bottom: 36px; }
    .hero-form { padding: 32px 28px; margin: 28px 24px 28px 0; border-radius: var(--radius); box-shadow: var(--shadow); align-self: center; }
}

/* ---------- Page header (inner pages) ---------- */
.page-banner {
    background: radial-gradient(120% 120% at 90% 0%, #2e4d6b 0%, var(--ink) 60%);
    color: #dfe6ee; padding: 36px 0 32px;
}
.page-banner p { margin: 0; max-width: 60ch; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; font-size: .85rem; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--gold); }
.breadcrumbs a { color: #fff; }
.breadcrumbs [aria-current="page"] { color: #b9c5d1; }
.banner-kicker { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- Intro block: H1 -> project link -> intro ---------- */
.intro { padding: 40px 0 8px; }
.intro h1 { margin-bottom: .25em; }
@media (min-width: 900px) { .intro { padding: 56px 0 16px; } }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; display: block; transition: box-shadow .2s, border-color .2s; }
.card--link:hover { border-color: var(--gold); box-shadow: var(--shadow); color: inherit; }
.card--link .more { color: var(--gold-dark); font-weight: 600; font-size: .9rem; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { background: #fff; padding: 16px; }
.fact dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-weight: 600; color: var(--ink); font-size: 1.05rem; line-height: 1.35; }
.fact dd small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }

.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before {
    content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
    border-left: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark); transform: rotate(-45deg);
}
.section--ink .check-list li::before { border-color: var(--gold); }

.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--gold-dark); border: 1px solid var(--line); vertical-align: middle; }
.badge--warn { background: #fff4e0; color: #7a4a00; border-color: #f0d9ad; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0 20px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: 12px 16px; font-weight: 600; color: var(--ink); caption-side: top; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td .btn { min-height: 38px; padding: 6px 14px; font-size: .85rem; }

/* ---------- Figures ---------- */
.figure { margin: 0; }
.figure-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.figure-media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-12x7 { aspect-ratio: 12 / 7; }
.gallery-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 960px) { .gallery-grid .span-2 { grid-column: span 2; } }
.gallery-grid .span-2 .figure-media { aspect-ratio: 16 / 9; }
.gallery-grid .figure-media { aspect-ratio: 1 / 1; }
/* Plans and maps are shown whole, never cropped. */
.gallery-grid .plan .figure-media { aspect-ratio: auto; }
.figure-media:has(img[src*="floor-plan"]), .figure-media:has(img[src*="location-map"]) { background: #fff; border: 1px solid var(--line); }
.figure-media img[src*="floor-plan"], .figure-media img[src*="location-map"], .figure-media img[src*="master-plan"] { object-fit: contain; height: auto; }
/* ---------- Placeholders (no official imagery supplied yet) ---------- */
.ph {
    position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
    background:
        repeating-linear-gradient(135deg, rgba(176,141,87,.10) 0 12px, transparent 12px 24px),
        linear-gradient(160deg, #f1ece3, #e7e0d4);
    border: 1px dashed #cbbfa9; color: var(--muted); font-size: .9rem;
}
.ph--wide { aspect-ratio: 16 / 9; }
.ph strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 4px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 16px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .form-card { padding: 28px; } }
.form-title { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin: 0 0 4px; }
.form-sub { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9c1b4; border-radius: 8px;
    font: 400 1rem/1.4 var(--sans); color: var(--text); background: #fff;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(176,141,87,.28); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: .82rem; margin: 4px 0 0; }
.phone-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; }
.form-status { font-size: .9rem; margin: 10px 0 0; min-height: 1.2em; }
.form-status.is-error { color: var(--err); }
.form-status.is-ok { color: var(--ok); }
.form-consent { font-size: .75rem; color: var(--muted); margin: 10px 0 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: 16px 4px; }
.form-success .tick {
    width: 52px; height: 52px; border-radius: 50%; background: #e3f2ea; color: var(--ok);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 8px;
}
.form-success h3 { font-family: var(--serif); font-size: 1.3rem; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius); width: min(460px, calc(100% - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(15, 29, 43, .65); }
.modal .form-card { border: 0; box-shadow: none; }
.modal-close {
    position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: var(--soft); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 1;
}

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary {
    cursor: pointer; list-style: none; padding: 16px 48px 16px 16px; font-weight: 600; color: var(--ink); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.4rem; color: var(--gold-dark); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 16px 16px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 100%); color: #dfe6ee; border-radius: var(--radius); padding: 28px 20px; display: grid; gap: 16px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .2em; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta-band p { margin: 0; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; padding: 36px 40px; } }

/* ---------- Explore links ---------- */
.explore { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .explore { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.explore a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.explore a:hover { border-color: var(--gold); }
.explore a span { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: #0b1520; color: #b9c5d1; padding: 48px 0 24px; font-size: .9rem; }
.site-footer a { color: #dfe6ee; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer strong { color: #fff; }
.site-footer .footer-legal a { text-decoration: underline; }
/* Buttons keep their own colours inside the footer (beats `.site-footer a`). */
.site-footer .btn--light { color: var(--ink); }
.site-footer .btn--light:hover { background: var(--gold); color: var(--ink); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-title { color: #fff; font-family: var(--serif); font-size: 1.2rem; margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-links li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid #1f2d3b; margin-top: 32px; padding-top: 20px; font-size: .78rem; color: #8b99a8; }
.footer-legal p { margin-bottom: .6em; }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,29,43,.08);
}
.mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 600; text-decoration: none; color: var(--ink); font-size: .92rem; }
.mobile-bar a + a { border-left: 1px solid var(--line); }
.mobile-bar a.primary { background: var(--gold-dark); color: #fff; }
@media (min-width: 900px) { .mobile-bar { display: none; } }

/* Contact slots stay empty until phone contact is switched on in site-config.js */
[data-contact-slot]:empty { display: none; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 80px 0; }
.notfound .code { font-family: var(--serif); font-size: 4.5rem; color: var(--gold); line-height: 1; }
