/* Kedra Homes — site styles */
:root {
    --plaster: #f6f7f5;
    --white: #ffffff;
    --graphite: #1f2528;
    --graphite-2: #3a4246;
    --pine: #2e4a3b;
    --pine-dark: #233a2e;
    --oak: #c9a27a;
    --stone: #d8dcd7;
    --muted: #5b6468;
    --radius-sm: 4px;
    --radius-lg: 14px;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
}

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

body {
    margin: 0;
    background: var(--plaster);
    color: var(--graphite);
    font-family: 'Onest', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 62ch; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246, 247, 245, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--stone);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.wordmark span { font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--graphite-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--pine); color: var(--graphite); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--graphite); }
@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .nav {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; gap: 0; background: var(--plaster);
        border-bottom: 1px solid var(--stone); padding: 8px var(--gutter) 16px;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 0; border-bottom: 1px solid var(--stone); }
    .nav a:last-child { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px;
    font: inherit; font-size: 16px; font-weight: 600; text-decoration: none;
    border-radius: var(--radius-sm); border: 1.5px solid transparent; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-dark); }
.btn-light { background: #fff; color: var(--graphite); }
.btn-light:hover { background: var(--plaster); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: min(88vh, 820px);
    display: flex; align-items: flex-end; color: #fff;
    background: var(--graphite);
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(to top, rgba(20,24,26,.85) 0%, rgba(20,24,26,.45) 50%, rgba(20,24,26,.1) 80%),
        linear-gradient(to right, rgba(20,24,26,.55) 0%, rgba(20,24,26,0) 65%);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(40px, 8vh, 88px); padding-top: 120px; }
.hero h1 { font-size: clamp(40px, 7.2vw, 92px); font-weight: 800; letter-spacing: -0.035em; max-width: 15ch; line-height: 1.0; }
.hero p { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); max-width: 52ch; color: rgba(255,255,255,.88); }
.hero .btn-row { margin-top: 32px; }
.hero-caption { position: absolute; z-index: 1; right: var(--gutter); bottom: 20px; font-size: 13px; color: rgba(255,255,255,.7); }
@media (max-width: 700px) { .hero-caption { display: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-white { background: var(--white); }
.section-dark { background: var(--graphite); color: #fff; }
.section-dark .muted { color: rgba(255,255,255,.7); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(32px, 4.4vw, 56px); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Project list (home) ---------- */
.project-list { border-top: 1px solid var(--stone); }
.project-row {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px);
    padding: clamp(28px, 4vw, 48px) 0; border-bottom: 1px solid var(--stone);
    text-decoration: none; color: inherit;
}
.project-row figure { margin: 0; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--stone); }
.project-row figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-row:hover figure img { transform: scale(1.03); }
.project-row .body { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.address { font-size: clamp(38px, 5.6vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: .98; }
.address small { display: block; font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 14px; line-height: 1.4; }
.project-row .link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.project-row:hover .link { color: var(--pine); }
.facts-inline { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--graphite-2); margin: 0; padding: 0; list-style: none; }
.facts-inline b { font-weight: 700; color: var(--graphite); }
@media (max-width: 820px) { .project-row { grid-template-columns: 1fr; } }

/* Status */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; width: fit-content; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-available { background: #e3ece6; color: var(--pine); }
.status-rented { background: #e6e8e9; color: var(--graphite-2); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px 24px 0 0; border-top: 2px solid rgba(255,255,255,.22); }
.steps li::before { content: counter(step); display: block; font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: var(--oak); margin-bottom: 16px; line-height: 1; }
.steps h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: -0.01em; }
.steps p { font-size: 15px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Location ---------- */
.location { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.location figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.location figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.distances { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--stone); }
.distances li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--stone); }
.distances b { white-space: nowrap; }
@media (max-width: 820px) { .location { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
.contact-list span { display: block; font-size: 14px; color: var(--muted); }
.contact-list a, .contact-list p { font-size: 20px; font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--pine); text-decoration: underline; }
.form { display: grid; gap: 16px; background: var(--white); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); border: 1px solid var(--stone); }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea {
    font: inherit; font-size: 16px; font-weight: 400; color: var(--graphite);
    padding: 12px 14px; border: 1px solid #bfc5c0; border-radius: var(--radius-sm); background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--pine); outline-offset: 0; border-color: var(--pine); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .note { font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form .row2 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--graphite); color: rgba(255,255,255,.75); padding: 56px 0 32px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; letter-spacing: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark span { color: rgba(255,255,255,.6); }
.site-footer .legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- Project page ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 32px; }
.crumbs a { color: var(--muted); }
.project-hero { padding: 24px 0 48px; }
.project-hero .top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px 56px; align-items: end; }
.project-hero h1 { font-size: clamp(44px, 7.4vw, 104px); font-weight: 800; letter-spacing: -0.045em; line-height: .95; }
.project-hero .lede { margin-top: 20px; font-size: 19px; color: var(--graphite-2); max-width: 54ch; }
.project-hero .cover { margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; }
.project-hero .cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
@media (max-width: 900px) { .project-hero .top { grid-template-columns: 1fr; } .project-hero .cover img { aspect-ratio: 4 / 3; } }

.offer { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 18px; }
.offer .price { display: grid; gap: 2px; }
.offer .price span { font-size: 14px; color: var(--muted); }
.offer .price strong { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.offer .price em { font-style: normal; font-size: 14px; color: var(--muted); }
.offer hr { border: 0; border-top: 1px solid var(--stone); margin: 0; }

.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--stone); margin: 0; }
.specs div { padding: 24px 20px 24px 0; border-bottom: 1px solid var(--stone); }
.specs dt { font-size: 14px; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
@media (max-width: 820px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 88px); }
.split h2 { font-size: clamp(28px, 3.4vw, 42px); }
.split .content { display: grid; gap: 20px; }
.split .content p { max-width: 64ch; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.feature-list li { padding: 18px 0; border-top: 1px solid var(--stone); }
.feature-list h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.feature-list p { font-size: 15px; color: var(--muted); }
@media (max-width: 640px) { .feature-list { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 18vw, 240px); grid-auto-flow: dense; gap: 10px; }
.gallery button { padding: 0; border: 0; background: var(--stone); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; grid-column: span 4; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery button:hover img { transform: scale(1.04); }
.gallery .wide { grid-column: span 8; grid-row: span 2; }
.gallery .tall { grid-row: span 2; }
@media (max-width: 720px) {
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; }
    .gallery button, .gallery .wide { grid-column: span 1; grid-row: span 1; }
    .gallery .wide { grid-column: span 2; }
    .gallery .tall { grid-row: span 2; }
}

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,18,20,.94); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.24); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 14px; }

/* FAQ */
.faq { border-top: 1px solid var(--stone); }
.faq details { border-bottom: 1px solid var(--stone); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--pine); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 22px; color: var(--graphite-2); max-width: 68ch; display: grid; gap: 12px; }

.cta-band { background: var(--pine); color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 38px); max-width: 22ch; }
.cta-band p { margin-top: 10px; color: rgba(255,255,255,.85); max-width: 52ch; }

/* Cookie banner */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto; background: var(--graphite); color: #fff; border-radius: var(--radius-lg); padding: 18px 20px; display: none; gap: 16px; align-items: center; justify-content: space-between; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cookie.show { display: flex; }
.cookie a { color: #fff; }
.cookie .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; flex-shrink: 0; }
@media (max-width: 480px) { .cookie { flex-direction: column; align-items: stretch; } }

/* Legal / text pages */
.prose { max-width: 70ch; padding: 48px 0 96px; }
.prose h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 24px; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--graphite-2); }
.prose p + p { margin-top: 12px; }

/* Upcoming project status and room schedule */
.status-upcoming { background: #f3eadf; color: #7a5530; }
.rooms { width: 100%; border-collapse: collapse; font-size: 16px; }
.rooms th, .rooms td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--stone); }
.rooms td:last-child, .rooms th:last-child { text-align: right; white-space: nowrap; }
.rooms th { font-size: 14px; font-weight: 600; color: var(--muted); }
.rooms tr.total td { font-weight: 700; border-bottom: 2px solid var(--graphite); }
.rooms tbody + tbody tr:first-child td { padding-top: 24px; }
.plan-figure { margin: 0; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius-lg); padding: clamp(12px, 2vw, 24px); }
.plan-figure img { width: 100%; height: auto; }
.plan-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.subhead { font-size: clamp(22px, 2.4vw, 28px); margin: clamp(56px, 7vw, 88px) 0 8px; }

/* Interactive floor plan (Linu iela 12 PoC) */
.status-done { background: #e6e8e9; color: var(--graphite-2); }
.plan-explorer { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.plan-stage { position: relative; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius-lg); padding: clamp(10px, 1.6vw, 20px); position: sticky; top: 88px; }
.plan-stage .canvas { position: relative; }
.plan-stage img { width: 100%; height: auto; }
.plan-stage .zone { position: absolute; background: rgba(46, 74, 59, 0); border: 2px solid transparent; border-radius: 2px; transition: background-color .15s, border-color .15s; cursor: pointer; }
.plan-stage .zone.on { background: rgba(46, 74, 59, .28); border-color: var(--pine); }
.room-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone); }
.room-list button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 2.2em 1fr auto; gap: 8px; padding: 11px 8px; border-bottom: 1px solid var(--stone); cursor: pointer; font-size: 16px; }
.room-list button:focus-visible { outline: 3px solid var(--oak); outline-offset: -3px; }
.room-list button .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.room-list button .a { font-weight: 600; font-variant-numeric: tabular-nums; }
.room-list button.on { background: #e3ece6; }
.room-list .group { padding: 22px 8px 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.room-list .sum { display: flex; justify-content: space-between; padding: 12px 8px; font-weight: 700; border-bottom: 2px solid var(--graphite); }
@media (max-width: 860px) { .plan-explorer { grid-template-columns: 1fr; } .plan-stage { position: relative; top: 0; order: -1; } }
