/* ============================================================
   Capital Domus — dark premium theme (design 1b)
   ============================================================ */
:root {
  --bg-deep: #0d1117;
  --bg: #13171f;
  --bg-hero: #1d212c;
  --bg-raise: #191e29;
  --bg-band: #161b25;
  --gold: #c8a76b;
  --gold-bright: #d4b47c;
  --gold-dim: #a08954;
  --ink: #eae6dd;
  --body-c: #a9aeb8;
  --muted: #868c98;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body-c);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- type helpers ---------- */
.k-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.12;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #14161c;
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold-dim);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.brand b { font-weight: 600; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.site-nav a.nav-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--body-c);
  transition: color 0.2s;
}
.site-nav a.nav-link:hover { color: var(--ink); }
.site-nav .btn { padding: 11px 20px; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* language switcher */
.lang-switch { display: flex; gap: 10px; margin-left: 6px; }
.lang-switch a {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lang-switch a.active, .lang-switch a:hover { color: var(--gold); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  background: var(--bg-hero);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(13,17,23,0.45) 0%, rgba(13,17,23,0.30) 40%, rgba(13,17,23,0.88) 100%),
    linear-gradient(90deg, rgba(13,17,23,0.55) 0%, rgba(13,17,23,0.10) 60%);
}
.hero .container {
  width: 100%;
  padding-top: 120px;
  padding-bottom: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.hero-kicker {
  color: var(--gold);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 58px);
  max-width: 560px;
  margin-bottom: 26px;
}
.hero-lead {
  max-width: 430px;
  color: #b9bec7;
  font-size: 14.5px;
}
.hero-cta { flex-shrink: 0; padding-bottom: 6px; }

/* ---------- stats band ---------- */
.stats {
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: 44px 36px;
  border-left: 1px solid var(--hairline);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-label { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 44px;
  gap: 24px;
}
.section-head h2 { font-size: clamp(28px, 3.2vw, 38px); }
.link-gold {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.link-gold:hover { color: var(--gold-bright); }
.link-underline {
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 4px;
}

/* ---------- current project card ---------- */
.project-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
}
.project-feature .pf-media {
  min-height: 420px;
  background: var(--bg-hero);
  background-size: cover;
  background-position: center;
}
.pf-body { padding: 46px 48px; display: flex; flex-direction: column; align-items: flex-start; }
.chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  background: rgba(200, 167, 107, 0.08);
  padding: 6px 12px;
  margin-bottom: 24px;
}
.pf-body h3 { font-size: 30px; margin-bottom: 16px; }
.pf-desc { margin-bottom: 28px; }
.spec-rows { width: 100%; margin-bottom: 28px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
}
.spec-row:first-child { border-top: 1px solid var(--hairline); }
.spec-row .sv { color: var(--ink); }
.spec-row .sv.gold { color: var(--gold); font-weight: 600; }

/* ---------- process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-top: 8px;
}
.step {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 18px;
}
.step.done, .step.now { border-top-color: var(--gold-dim); }
.step-tag { color: var(--muted); margin-bottom: 10px; }
.step.done .step-tag, .step.now .step-tag { color: var(--gold); }
.step-name {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.step.later .step-name { color: var(--body-c); }
.step-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- map section ---------- */
.map-section {
  background: var(--bg-deep);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 520px;
}
#map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: 520px;
  background: var(--bg-hero);
  filter: none;
}
/* dark map via tile filter */
#map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(200deg) brightness(0.7) contrast(0.85) saturate(0.25);
}
#map .leaflet-control-attribution {
  background: rgba(13, 17, 23, 0.8);
  color: var(--muted);
  font-size: 9px;
}
#map .leaflet-control-attribution a { color: var(--muted); }
.map-pin {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #0d1117;
  box-shadow: 0 0 0 2px var(--gold-dim), 0 0 18px rgba(200,167,107,0.55);
}
.map-pin.past {
  background: #2a3140;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}
.map-pin-label {
  background: rgba(13,17,23,0.88);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;
}
.map-copy { padding: 84px 0 84px 72px; max-width: 480px; }
.map-copy h2 { font-size: clamp(28px, 3.2vw, 36px); margin-bottom: 20px; }
.map-copy > p { margin-bottom: 34px; }
.loc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--ink);
}
.loc-row:first-of-type { border-top: 1px solid var(--hairline); }
.loc-meta { color: var(--muted); }
.loc-meta.gold { color: var(--gold); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--bg-band); }
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 84px;
  padding-bottom: 84px;
}
.cta-band h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.cta-band p { max-width: 470px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 40px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand { display: block; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); margin-bottom: 4px; }
.footer-col h4 {
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--body-c);
  padding: 3px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--ink); }
.footer-copy {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------- inner pages (generic shell for legacy views) ---------- */
.inner-main { padding: 72px 0 96px; min-height: 50vh; }
.inner-main h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 28px; }
.inner-main h2 { font-size: 26px; margin: 32px 0 14px; }
.inner-main p { margin-bottom: 14px; }
.inner-main table { border-collapse: collapse; }
.inner-main td, .inner-main th { border: 1px solid var(--hairline); padding: 8px 12px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .container { flex-direction: column; align-items: flex-start; }
  .project-feature { grid-template-columns: 1fr; }
  .project-feature .pf-media { min-height: 300px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .map-grid { grid-template-columns: 1fr; }
  .map-copy { padding: 56px 28px; max-width: none; }
  #map { min-height: 380px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .stats .container { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding: 22px 0; border-top: 1px solid var(--hairline); }
  .stat:first-child { border-top: 0; }
  .section { padding: 64px 0; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--hairline-strong);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 26px;
    gap: 20px;
  }
  .site-nav.open { display: flex; }
  .pf-body { padding: 32px 26px; }
}

/* ============================================================
   Legacy inner pages — dark reskin (project & gallery views)
   ============================================================ */
body.inner {
  background: var(--bg) !important;
  color: var(--body-c);
}
body.inner .inner-main { padding: 0; }
/* legacy pages control their own geometry — undo the reset for them */
body.inner .inner-main img { max-width: none; }
body.inner .inner-main .img-responsive { max-width: 100%; }
body.inner h1, body.inner h2, body.inner h3,
body.inner .Title, body.inner .title {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
}
body.inner .Text, body.inner .text, body.inner p, body.inner li, body.inner td {
  color: var(--body-c);
}
body.inner a { color: var(--gold); }
body.inner a:hover { color: var(--gold-bright); }
body.inner .btn, body.inner button, body.inner input[type=submit] {
  background: var(--gold);
  color: #14161c;
  border: 1px solid var(--gold);
}
body.inner .well, body.inner .Well, body.inner .panel {
  background: var(--bg-raise);
  border-color: var(--hairline);
}
body.inner input, body.inner textarea, body.inner select {
  background: var(--bg-raise);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}
/* keep legacy sliders/lightboxes visible */
body.inner .bx-wrapper { background: transparent; border: 0; box-shadow: none; }

/* about section */
.about-cols { max-width: 760px; }
.about-cols p { margin-bottom: 14px; }

/* Apdailos aprašas (decorations) — align with dark theme */
body.inner .Decorations {
  background-color: var(--bg-raise) !important;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
body.inner .Decorations .Decoration .title {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body.inner .Decorations .Decoration .text { color: var(--body-c); }
body.inner .Decorations .Decoration .image img {
  filter: sepia(1) hue-rotate(-12deg) saturate(1.4) brightness(1.5);
  opacity: 0.85;
}

/* leaflet tooltip arrow — kill the white default arrow on dark labels */
.map-pin-label:before { display: none !important; }

/* ============================================================
   Language switcher (flag SVG + locale code + dropdown)
   ============================================================ */
.lang-switch { position: relative; display: inline-flex; margin-left: 6px; }
.lang-switch .flag {
  height: 13px; width: auto; display: block; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  flex: none;
}
.lang-current {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--hairline-strong);
  color: var(--ink); cursor: pointer;
  padding: 8px 11px; font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  line-height: 1; transition: border-color 0.2s, color 0.2s;
}
.lang-current:hover { border-color: var(--gold-dim); }
.lang-current .lang-code { color: var(--ink); }
.lang-caret { color: var(--muted); font-size: 9px; transition: transform 0.2s; }
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 190px; list-style: none; margin: 0; padding: 6px;
  background: var(--bg-deep); border: 1px solid var(--hairline-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 400;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; color: var(--body-c);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.lang-menu a:hover { background: var(--bg-raise); color: var(--ink); }
.lang-menu a.active { color: var(--gold); }
.lang-menu .lang-name { flex: 1; }
.lang-menu .lang-code { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; }
.lang-menu a:hover .lang-code, .lang-menu a.active .lang-code { color: inherit; }

@media (max-width: 760px) {
  .lang-switch { margin: 6px 0 0; width: 100%; }
  .lang-current { width: 100%; justify-content: flex-start; }
  .lang-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    width: 100%; min-width: 0; margin-top: 8px; box-shadow: none;
    display: none;
  }
  .lang-switch.open .lang-menu { display: block; }
}
