/* ==========================================================================
   Tatar Hill — styles. Design system: Malom Architectural Narrative
   (Merriweather 300 + Inter, 8px grid, 1280 max, 2px radius, diamond motif,
   tonal layering, no shadows). Themes: light (default) / dark / danube.
   ========================================================================== */

:root {
  /* brand constants */
  --malom-blue: #4A728C;
  --deep-blue: #3A5C75;
  --sage: #A2A094;
  --sage-deep: #6E6D62;
  --charcoal: #1A1F2B;
  --warm-white: #FAFAF8;
  --stone: #F5F4F1;
  --bronze: #8B6F47;
  --soft-grey: #9E9F9A;

  /* status */
  --st-available: #4A728C;
  --st-reserved: #B8892E;
  --st-deposit: #BF6B2A;
  --st-presold: #6A5C9E;
  --st-sold: #5A5E66;

  /* light theme (Tatar Hill: warm light, sage accent, bronze premium marks) */
  --bg: #FAFAF8;
  --bg-alt: #F5F4F1;
  --bg-deep: #ECEAE4;
  --ink: #1A1F2B;
  --ink-2: #454A54;
  --muted: #6E6D62;
  --line: #D9D7CF;
  --accent: #A2A094;
  --accent-ink: #6E6D62;
  --accent-2: #8B6F47;
  --cta-bg: #1A1F2B;
  --cta-ink: #FAFAF8;
  --cta-bg-h: #2B303D;
  --contact-bg: #1A1F2B;
  --contact-ink: #F2F1EC;
  --contact-muted: #B6B8B3;
  --contact-line: #3A3F4B;
  --nav-bg: rgba(250, 250, 248, .86);
  --hero-overlay: linear-gradient(180deg, rgba(26,31,43,.18) 0%, rgba(26,31,43,.28) 55%, rgba(26,31,43,.72) 100%);
  --img-filter: saturate(.82) contrast(1.02);
  --facade-filter: saturate(.7) contrast(1.02);
  --focus: #4A728C;

  --font-display: "Merriweather", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1280px;
  --gutter: 24px;
  --sec: 120px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  --bg: #15181F;
  --bg-alt: #1B1F28;
  --bg-deep: #10131A;
  --ink: #F2F1EC;
  --ink-2: #D2D2CB;
  --muted: #A5A69F;
  --line: #2E333E;
  --accent: #B5B3A6;
  --accent-ink: #C4C2B5;
  --accent-2: #C6A574;
  --cta-bg: #F2F1EC;
  --cta-ink: #15181F;
  --cta-bg-h: #FFFFFF;
  --contact-bg: #0F1218;
  --contact-ink: #F2F1EC;
  --contact-muted: #A5A69F;
  --contact-line: #2E333E;
  --nav-bg: rgba(21, 24, 31, .84);
  --hero-overlay: linear-gradient(180deg, rgba(15,18,24,.30) 0%, rgba(15,18,24,.40) 55%, rgba(21,24,31,.96) 100%);
  --img-filter: saturate(.72) contrast(1.04) brightness(.92);
  --facade-filter: saturate(.6) contrast(1.02) brightness(.9);
  --st-available: #7FA6BF;
  --st-reserved: #D4A64A;
  --st-deposit: #D98A4D;
  --st-presold: #9A8CC8;
  --st-sold: #7E838D;
  --focus: #A3CCE9;
}

[data-theme="danube"] {
  --bg: #F4F7F8;
  --bg-alt: #E9EFF2;
  --bg-deep: #DCE5EA;
  --ink: #16202B;
  --ink-2: #3E4B58;
  --muted: #5F6E7B;
  --line: #C9D5DC;
  --accent: #4A728C;
  --accent-ink: #3A5C75;
  --accent-2: #8B6F47;
  --cta-bg: #4A728C;
  --cta-ink: #FFFFFF;
  --cta-bg-h: #3A5C75;
  --contact-bg: #1F3446;
  --contact-ink: #F1F5F7;
  --contact-muted: #A9BAC6;
  --contact-line: #34506A;
  --nav-bg: rgba(244, 247, 248, .86);
  --hero-overlay: linear-gradient(180deg, rgba(31,52,70,.22) 0%, rgba(31,52,70,.30) 55%, rgba(22,32,43,.78) 100%);
  --img-filter: saturate(.85) contrast(1.02);
  --facade-filter: saturate(.75) contrast(1.02);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 48px; }
.col-5 { grid-column: 1 / span 5; } .col-6 { grid-column: span 6; } .col-6.col-start-7 { grid-column: 7 / span 6; }
.sec { padding: var(--sec) 0; }
.sec__head { max-width: 720px; margin-bottom: 64px; }
.sec__head--wide { max-width: 880px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cta-bg); color: var(--cta-ink); padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }

/* ---------- typography ---------- */
.label {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 24px; line-height: 1.2;
}
.h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 24px; }
.h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.3; margin: 0 0 16px; }
.h4 { font-family: var(--font-display); font-weight: 300; font-size: 22px; line-height: 1.35; margin: 0 0 8px; }
.h5 { font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; color: var(--ink); }
.lead { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 24px; }
p { margin: 0 0 16px; }
.small { font-size: 13px; line-height: 1.6; }
.muted { color: var(--muted); }

.diamond { display: inline-block; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); flex: 0 0 auto; }
.diamond--bronze { background: var(--accent-2); }
.diamond--lg { width: 12px; height: 12px; }
.divider { height: 1px; background: var(--line); margin: 80px 0 48px; position: relative; }
.divider--bronze::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; background: var(--accent-2); transform: translate(-50%, -50%) rotate(45deg); }
.quote { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45; text-align: center; max-width: 760px; margin: 0 auto; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 32px; border-radius: 2px; border: 1px solid transparent;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--cta-bg); color: var(--cta-ink); }
.btn--primary:hover { background: var(--cta-bg-h); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.btn--light { background: var(--warm-white); color: var(--charcoal); }
.btn--light:hover { background: #fff; }
.btn--ghost-light { border-color: rgba(250,250,248,.7); color: var(--warm-white); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(250,250,248,.08); }
.btn--sm { padding: 12px 24px; }
.btn--lg { padding: 18px 40px; }
.linkbtn { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); padding: 8px 0; }
.linkbtn:hover { color: var(--ink); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 24px; }
.nav__logo img { height: 40px; width: auto; }
[data-theme="dark"] .nav__logo img, [data-theme="dark"] .footer__brand img { filter: brightness(1.6) contrast(1.05); }
.nav__links { display: flex; gap: 32px; }
.nav__links a, .mobile a:not(.btn) { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); transition: color .25s; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 24px; }
.lang { display: flex; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.lang a { padding: 4px 6px; color: var(--muted); }
.lang a.is-active { color: var(--ink); border-bottom: 1px solid var(--accent-2); }
.nav__burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav__burger span { display: block; width: 24px; height: 1px; background: var(--ink); transition: transform .3s var(--ease); }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile { display: none; flex-direction: column; gap: 24px; padding: 24px var(--gutter) 40px; background: var(--nav-bg); border-top: 1px solid var(--line); }
.mobile:not([hidden]) { display: flex; }
@media (max-width: 1023px) {
  .nav__links, .nav__cta, .nav__right .lang { display: none; }
  .nav__burger { display: flex; }
  .nav__in { height: 68px; }
  .nav__logo img { height: 34px; }
}

/* ---------- hero (editorial: type on clean ground, image as a panel that opens on scroll) ---------- */
.hero { position: relative; padding-top: 80px; overflow: hidden; }
.hero__top { padding: clamp(40px, 7vh, 88px) var(--gutter) clamp(32px, 5vh, 56px); }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 clamp(20px, 3vh, 36px); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.hero__wordmark { font-family: var(--font-display); font-weight: 300; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(52px, 9.2vw, 148px); line-height: .96; margin: 0 -0.14em 0 0; color: var(--ink); text-indent: -.02em; }
.hero__wordmark .w { display: inline-block; opacity: 0; transform: translateY(.35em); }
.hero__wordmark .w--space { width: .32em; }
.is-ready .hero__wordmark .w { animation: wIn 1.1s var(--ease) forwards; animation-delay: calc(.08s + var(--i) * .045s); }
@keyframes wIn { to { opacity: 1; transform: none; } }
.hero__row { display: grid; grid-template-columns: 6fr 4fr 2fr; gap: 32px var(--gutter); align-items: end; margin-top: clamp(28px, 4vh, 48px); padding-top: 24px; border-top: 1px solid var(--line); }
.hero__tag { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.3; margin: 0; max-width: 20ch; color: var(--ink); }
.hero__aside { display: flex; flex-direction: column; gap: 24px; }
.hero__sub { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin: 0; max-width: 42ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__tag, .hero__aside, .rose { opacity: 0; transform: translateY(12px); }
.is-ready .hero__tag { animation: fadeUp 1s var(--ease) .55s forwards; }
.is-ready .hero__aside { animation: fadeUp 1s var(--ease) .7s forwards; }
.is-ready .rose { animation: fadeUp 1.2s var(--ease) .9s forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.rose { justify-self: end; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--accent-ink); }
.rose__svg { width: clamp(96px, 9vw, 132px); height: auto; transform: rotate(calc(var(--rose, 0) * 1deg)); transition: transform .2s linear; }
.rose__north { fill: var(--accent-2); }
.rose__core { fill: var(--accent-2); }
.rose__cap { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* image panel: starts inside the 1280 grid, opens to full-bleed while scrolling (JS sets --x 0..1) */
.hero__panel { --x: 0; --side: max(0px, calc((100vw - 1280px) / 2 + 24px)); position: relative; margin-top: clamp(8px, 2vh, 24px); clip-path: inset(0 calc(var(--side) * (1 - var(--x))) 0 calc(var(--side) * (1 - var(--x)))); }
.hero__panel-in { position: relative; aspect-ratio: 2.15 / 1; overflow: hidden; background: var(--bg-alt); }
.hero__panel-in img { width: 100%; height: 114%; object-fit: cover; object-position: 50% 28%; filter: saturate(.55) contrast(1.04) brightness(1.02) sepia(.10); transform: translateY(calc(var(--x) * -8%)) scale(1.02); will-change: transform; }
.hero__panel-in::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,31,43,.06) 0%, rgba(26,31,43,0) 40%, rgba(26,31,43,.42) 100%); pointer-events: none; }
.hero__panel-cap { position: absolute; left: calc(var(--side) * (1 - var(--x)) + 32px); bottom: 24px; display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(250,250,248,.9); }
.hero__panel-cap .diamond { background: var(--accent-2); }
.hero__panel { opacity: 0; transform: translateY(24px); }
.is-ready .hero__panel { animation: fadeUp 1.4s var(--ease) .35s forwards; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); margin-top: 8px; }
.stat { padding: 28px 0 24px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; }
.stat__v { font-family: var(--font-display); font-weight: 300; font-size: 30px; line-height: 1.1; color: var(--ink); }
.stat__l { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .hero__wordmark .w, .hero__tag, .hero__aside, .rose, .hero__panel { opacity: 1; transform: none; animation: none !important; }
  .hero__panel-in img { transform: none; }
}
@media (max-width: 1023px) {
  .hero { padding-top: 68px; }
  .hero__row { grid-template-columns: 1fr 1fr; }
  .rose { display: none; }
}
@media (max-width: 767px) {
  .hero__wordmark { font-size: clamp(56px, 17vw, 88px); letter-spacing: .1em; line-height: 1; }
  .hero__wordmark .w--space { display: block; height: 0; }
  .hero__row { grid-template-columns: 1fr; gap: 24px; }
  .hero__cta .btn { width: 100%; }
  .hero__panel { --side: 0px; }
  .hero__panel-in { aspect-ratio: 4 / 3; }
  .hero__panel-in img { height: 112%; }
  .hero__panel-cap { left: 20px; bottom: 16px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 0 16px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat__v { font-size: 24px; }
}

/* ---------- about ---------- */
.about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 24px; align-content: start; padding-top: 8px; }
.fact { border-top: 1px solid var(--line); padding-top: 24px; }
.fact__v { font-family: var(--font-display); font-weight: 300; font-size: 48px; line-height: 1; display: block; color: var(--ink); }
.fact__t { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin: 12px 0 12px; }
.fact__d { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- region ---------- */
.region { background: var(--bg-alt); padding-top: 0; }
.region__band { height: clamp(320px, 52vw, 640px); overflow: hidden; margin-bottom: var(--sec); position: relative; }
.region__band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: var(--img-filter); }
.region__band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,31,43,.0) 60%, var(--bg-alt) 100%); opacity: .9; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; }
.pillar { position: relative; padding-left: 24px; }
.pillar .diamond { position: absolute; left: 0; top: 12px; }
.pillar p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ---------- apartments / facade ---------- */
.apts__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg__btn { padding: 12px 24px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: background-color .25s, color .25s; }
.seg__btn + .seg__btn { border-left: 1px solid var(--line); }
.seg__btn.is-active { background: var(--cta-bg); color: var(--cta-ink); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; transform: rotate(45deg); display: inline-block; flex: 0 0 auto; }
.dot--available { background: var(--st-available); } .dot--reserved { background: var(--st-reserved); } .dot--deposit { background: var(--st-deposit); } .dot--presold { background: var(--st-presold); } .dot--sold { background: var(--st-sold); }
.apts__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px var(--gutter); align-items: start; }
.facade { position: relative; background: var(--bg-alt); }
.facade img { width: 100%; filter: var(--facade-filter); }
.facade__map { position: absolute; inset: 0; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.facade__hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.hs { cursor: pointer; }
.hs__shape { fill: var(--hs-fill, rgba(74,114,140,.16)); stroke: var(--hs-stroke, #4A728C); stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: fill-opacity .2s; }
.hs:focus-visible .hs__shape, .hs.is-active .hs__shape { stroke-width: 3; }
.hs__chip { fill: rgba(26,31,43,.78); }
.hs__txt { font-family: var(--font-body); font-size: 26px; font-weight: 600; letter-spacing: 2px; fill: #FAFAF8; text-transform: uppercase; }
.hs__txt--s { font-size: 20px; font-weight: 500; letter-spacing: 1px; fill: rgba(250,250,248,.85); }
.hs__mark { transform-box: fill-box; transform-origin: center; transform: rotate(45deg); }
.hs--garage { cursor: default; }
.hs--garage .hs__shape { fill: rgba(26,31,43,.18); stroke: rgba(250,250,248,.35); stroke-dasharray: 8 8; }
.aptlist__table { border-top: 1px solid var(--line); margin-bottom: 24px; }
.aptrow { display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; transition: background-color .2s; }
.aptrow:hover { background: var(--bg-alt); }
.aptrow__id { font-family: var(--font-display); font-size: 22px; font-weight: 300; }
.aptrow__meta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.aptrow__meta b { display: block; color: var(--ink); font-weight: 500; font-size: 14px; }
.aptrow__area { font-size: 14px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.aptrow--sold { opacity: .55; }
@media (max-width: 1023px) {
  .apts__grid { grid-template-columns: 1fr; }
  .hs__txt { font-size: 34px; } .hs__txt--s { font-size: 26px; }
}
@media (max-width: 480px) { .aptrow { grid-template-columns: 44px 1fr auto; } .aptrow__area { display: none; } }

/* ---------- plans ---------- */
.plans { background: var(--bg-alt); }
.plans__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px var(--gutter); }
.plan { background: var(--bg); border: 1px solid transparent; transition: border-color .25s var(--ease); text-align: left; padding: 0; display: flex; flex-direction: column; width: 100%; }
.plan:hover { border-color: var(--accent-ink); }
.plan__img { aspect-ratio: 16 / 9; overflow: hidden; background: #F7F7F5; }
.plan__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.plan:hover .plan__img img { transform: scale(1.03); }
.plan__body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan__type { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.plan__name { font-family: var(--font-display); font-weight: 300; font-size: 22px; line-height: 1.3; margin: 0; }
.plan__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; color: var(--ink-2); margin: 4px 0 8px; }
.plan__meta .diamond { width: 4px; height: 4px; }
.plan__d { font-size: 14px; color: var(--muted); margin: 0 0 16px; flex: 1; }
.plan__link { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.plan__link .diamond { width: 5px; height: 5px; }
@media (max-width: 1023px) { .plans__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .plans__grid { grid-template-columns: 1fr; } }

/* ---------- materials ---------- */
.materials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px var(--gutter); margin-bottom: 96px; }
.mat { border-top: 1px solid var(--line); padding-top: 24px; }
.mat__n { font-family: var(--font-display); font-weight: 300; font-size: 14px; color: var(--accent-2); display: block; margin-bottom: 24px; letter-spacing: .1em; }
.mat p { color: var(--ink-2); font-size: 15px; margin: 0; }
.knx { display: grid; grid-template-columns: 4fr 4fr 4fr; gap: 40px var(--gutter); background: var(--bg-alt); padding: 56px; }
.knx__head .label { margin-bottom: 16px; }
.knx__head .h3 { margin: 0; }
.knx__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 15px; }
.knx__list li { display: flex; align-items: center; gap: 12px; }
.knx__aside { display: grid; gap: 24px; }
.knx__aside p { font-size: 14px; color: var(--ink-2); margin: 0; }
.partners { margin-top: 64px; }
.partners .label { margin-bottom: 16px; }
.partners__list { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 18px; color: var(--ink-2); }
.partners__list span { display: inline-flex; align-items: center; }
.partners__list span + span::before { content: ""; width: 4px; height: 4px; background: var(--accent-2); transform: rotate(45deg); margin: 0 20px; }
@media (max-width: 1023px) { .materials__grid, .knx { grid-template-columns: 1fr; } .knx { padding: 32px; } }

/* ---------- location ---------- */
.location { background: var(--bg-alt); }
.location__addr { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.ledger { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.ledger__row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger__n { font-size: 16px; color: var(--ink); }
.ledger__t { font-family: var(--font-display); font-weight: 300; font-size: 26px; white-space: nowrap; }
.ledger__t small { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }

/* ---------- gallery ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.g { position: relative; overflow: hidden; background: var(--bg-alt); padding: 0; display: block; width: 100%; }
.g img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; filter: var(--img-filter); transition: transform .8s var(--ease); }
.g:hover img { transform: scale(1.03); }
.g--wide { grid-column: span 8; } .g--narrow { grid-column: span 4; } .g--half { grid-column: span 6; }
.g--wide img { aspect-ratio: 16 / 9; } .g--narrow img { aspect-ratio: 4 / 4.5; }
.g__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(250,250,248,.9); background: linear-gradient(0deg, rgba(26,31,43,.6), transparent); opacity: 0; transition: opacity .3s; text-align: left; }
.g:hover .g__cap, .g:focus-visible .g__cap { opacity: 1; }
.g--video { grid-column: span 4; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 32px; aspect-ratio: 4 / 4.5; border: 1px solid var(--line); background: var(--bg-alt); cursor: default; }
.g--video .play { width: 48px; height: 48px; border: 1px solid var(--accent-2); transform: rotate(45deg); display: flex; align-items: center; justify-content: center; margin-bottom: auto; }
.g--video .play::after { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--accent-2); transform: rotate(-45deg); }
.g--video h4 { font-family: var(--font-display); font-weight: 300; font-size: 22px; margin: 0 0 8px; }
.g--video p { font-size: 13px; color: var(--muted); margin: 0; }
.gallery__foot { margin-top: 48px; display: flex; justify-content: center; }
@media (max-width: 767px) { .g--wide, .g--narrow, .g--half, .g--video { grid-column: span 12; } .g--narrow img { aspect-ratio: 16/10; } }

/* ---------- contact ---------- */
.contact { background: var(--contact-bg); color: var(--contact-ink); }
.contact .label { color: var(--accent); }
.contact .lead { color: var(--contact-muted); }
.contact__dl { margin: 40px 0 0; display: grid; gap: 20px; }
.contact__dl div { display: grid; gap: 4px; }
.contact__dl dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--contact-muted); }
.contact__dl dd { margin: 0; font-size: 15px; }
.contact__dl a { border-bottom: 1px solid var(--accent-2); }
.form { display: grid; gap: 28px; }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--contact-line); color: var(--contact-ink);
  padding: 22px 0 10px; font: inherit; font-size: 16px; border-radius: 0; outline: none; transition: border-color .25s;
  -webkit-appearance: none; appearance: none;
}
.field select { cursor: pointer; }
.field select option { color: #1A1F2B; background: #FAFAF8; }
.field textarea { resize: vertical; min-height: 72px; }
.field label { position: absolute; left: 0; top: 22px; font-size: 16px; color: var(--contact-muted); pointer-events: none; transition: all .25s var(--ease); }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label, .field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label, .field label.is-up {
  top: 0; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.field input:focus, .field textarea:focus, .field select:focus { border-bottom: 2px solid var(--accent); padding-bottom: 9px; }
.field--select::after { content: ""; position: absolute; right: 4px; top: 30px; width: 7px; height: 7px; border-right: 1px solid var(--contact-muted); border-bottom: 1px solid var(--contact-muted); transform: rotate(45deg); pointer-events: none; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #D2695A; }
.form__err { color: #E7A197; font-size: 14px; margin: -8px 0 0; }
.form__err a { text-decoration: underline; }
.form .btn--primary { justify-self: start; background: var(--warm-white); color: var(--charcoal); }
.form .btn--primary:hover { background: #fff; }
[data-theme="danube"] .form .btn--primary { background: var(--malom-blue); color: #fff; }
[data-theme="danube"] .form .btn--primary:hover { background: #5B85A0; }
.form__privacy { color: var(--contact-muted); margin: -8px 0 0; }
.form__ok { padding: 24px 0; }
.form__ok .diamond { margin-bottom: 24px; }
.form__ok p { color: var(--contact-muted); }

/* ---------- footer ---------- */
.footer { background: var(--bg-deep); padding: 64px 0 40px; }
[data-theme="dark"] .footer { background: #0B0E13; }
.footer__in { display: grid; grid-template-columns: 3fr 3fr 6fr; gap: 40px var(--gutter); align-items: start; }
.footer__brand img { height: 36px; width: auto; margin-bottom: 16px; }
.footer__tag { font-family: var(--font-display); font-weight: 300; font-size: 16px; color: var(--muted); margin: 0; }
.footer__by .label { margin-bottom: 12px; }
.footer__by img { height: 32px; width: auto; }
[data-theme="dark"] .footer__by img { filter: brightness(1.4); }
.footer__legal p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.footer__legal .small { color: var(--muted); }
@media (max-width: 767px) { .footer__in { grid-template-columns: 1fr; } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(26,31,43,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__panel { position: relative; background: var(--bg); color: var(--ink); width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow: auto; display: grid; grid-template-columns: 7fr 5fr; animation: modalIn .5s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__close, .lightbox__close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; font-size: 28px; font-weight: 300; line-height: 1; z-index: 2; color: var(--ink); }
.lightbox__close { color: #fff; right: 16px; top: 16px; }
.modal__media { background: #F7F7F5; display: flex; flex-direction: column; min-height: 320px; }
[data-theme="dark"] .modal__media { background: #E9E8E2; }
.modal__tabs { display: flex; gap: 0; border-bottom: 1px solid #E2E0D8; }
.tab { padding: 16px 20px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #6E6D62; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: #1A1F2B; border-bottom-color: #8B6F47; }
.modal__img { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__img img { max-height: 70vh; width: 100%; object-fit: contain; }
.modal__body { padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 16px; }
.modal__body .label { margin-bottom: 8px; }
.modal__body .h3 { margin: 0; }
.modal__status { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 8px 0; border-top: 1px solid var(--line); padding-top: 16px; }
.specs div { display: grid; gap: 2px; }
.specs dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; font-size: 16px; }
.rooms summary { cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.rooms summary::before { content: ""; width: 5px; height: 5px; background: var(--accent-2); transform: rotate(45deg); }
.rooms__t { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.rooms__t td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.rooms__t td:last-child { text-align: right; white-space: nowrap; }
.rooms__t tr.total td { font-weight: 600; border-bottom: 0; }
.modal__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.modal__dl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.modal__dl a { color: var(--accent-ink); border-bottom: 1px solid var(--line); align-self: flex-start; }
.modal__nav { display: flex; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.modal__sold { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .modal { padding: 0; } .modal__panel { grid-template-columns: 1fr; max-height: 100vh; width: 100%; } .modal__img img { max-height: 46vh; } .modal__body { padding: 24px; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; }
.lightbox .modal__backdrop { background: rgba(15,18,24,.92); }
.lightbox__fig { position: relative; margin: 0; max-width: min(1400px, 92vw); z-index: 1; }
.lightbox__fig img { max-height: 84vh; width: auto; max-width: 100%; margin: 0 auto; }
.lightbox__fig figcaption { color: rgba(250,250,248,.75); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center; margin-top: 12px; }
.lightbox__arrow { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 48px; font-weight: 300; width: 56px; height: 80px; z-index: 2; }
.lightbox__arrow--l { left: 8px; } .lightbox__arrow--r { right: 8px; }

/* ---------- review switcher (variants for the client) ---------- */
.review { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 4px; background: rgba(26,31,43,.86); color: #FAFAF8; padding: 6px 8px 6px 16px; border-radius: 2px; backdrop-filter: blur(12px); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.review[hidden] { display: none; }
.review span { margin-right: 8px; color: rgba(250,250,248,.6); }
.review button { padding: 8px 12px; border-radius: 2px; color: rgba(250,250,248,.75); }
.review button.is-active { background: #FAFAF8; color: #1A1F2B; }

/* full-page capture guard (viewports taller than 2000px only exist in headless screenshots) */

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive grid ---------- */
@media (max-width: 1023px) {
  :root { --sec: 80px; }
  .grid { grid-template-columns: 1fr; row-gap: 40px; }
  .col-5, .col-6, .col-6.col-start-7 { grid-column: 1 / -1; }
  .sec__head { margin-bottom: 40px; }
}
@media (max-width: 767px) {
  :root { --sec: 60px; --gutter: 20px; }
  .about__facts, .pillars { grid-template-columns: 1fr; gap: 32px; }
  .fact__v { font-size: 40px; }
  .divider { margin: 56px 0 32px; }
  .apts__toolbar { flex-direction: column; align-items: flex-start; }
  .seg { width: 100%; } .seg__btn { flex: 1; }
  .ledger__t { font-size: 22px; }
  .review { left: 12px; right: 12px; transform: none; justify-content: center; }
}
