:root {
  --bg: #e6e9ed;
  --ink: #0e1218;
  --muted: #5c6570;
  --line: rgba(14, 18, 24, 0.12);
  --panel: rgba(244, 246, 248, 0.88);
  --panel-solid: #f4f6f8;
  --accent: #1a4a4a;
  --accent-soft: #d5e3e1;
  --serif: "Fraunces", Georgia, serif;
  --sans: Manrope, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  background:
    radial-gradient(920px 520px at 100% -8%, #c5d0d8 0%, transparent 55%),
    radial-gradient(720px 440px at -8% 18%, #d2d6dc 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  backdrop-filter: blur(16px);
  background: rgba(230, 233, 237, 0.78);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.top nav { display: flex; gap: 18px; align-items: center; }
.top a, .linkish {
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--muted);
}
.top a:hover, .linkish:hover { color: var(--ink); }

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  place-items: end start;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: #2a323c center/cover no-repeat;
  transform: scale(1.04);
  animation: heroIn 1.2s ease-out both;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 18, 24, 0.78) 0%, rgba(14, 18, 24, 0.35) 52%, rgba(14, 18, 24, 0.18) 100%),
    linear-gradient(0deg, rgba(14, 18, 24, 0.5), transparent 44%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  color: #f2f4f6;
  padding: clamp(28px, 6vw, 72px);
  max-width: 720px;
  animation: rise 0.85s 0.12s ease both;
}
.hero-logo {
  color: #f2f4f6;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  margin: 0 0 12px;
  line-height: 0.95;
  letter-spacing: 0.03em;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  margin: 0 0 14px;
  line-height: 1.18;
}
.hero-lead {
  margin: 0 0 28px;
  color: rgba(242, 244, 246, 0.82);
  font-size: 1.02rem;
  max-width: 34rem;
  line-height: 1.5;
}
.cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  background: #f2f4f6;
  color: var(--ink);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cta:hover { background: #fff; }
.cta:active { transform: scale(0.98); }
.cta.accent {
  background: var(--accent);
  color: #f2f4f6;
}
.cta.accent:hover { background: #143838; }

.catalog {
  padding: 42px 18px 72px;
}
.catalog-shell {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 960px) {
  .catalog-shell { grid-template-columns: 1fr; }
  .filters {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(340px, 92vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    overflow: auto;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
  }
  .filters.open { transform: translateX(0); }
  #openFiltersMobile { display: inline; }
}
@media (min-width: 961px) {
  #openFiltersMobile { display: none !important; }
}

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px 16px 22px;
  position: sticky;
  top: 68px;
  backdrop-filter: blur(12px);
}
.filters-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.filters-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.text-btn, .linkish {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.field > span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  padding: 10px 11px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.results-bar p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  display: grid;
  grid-template-rows: 210px auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  padding: 0;
  width: 100%;
  overflow: hidden;
  animation: rise 0.45s ease both;
  transition: transform 0.2s ease;
}
.card:active { transform: scale(0.98); }
.card-media {
  position: relative;
  overflow: hidden;
  background: #c8d0d8;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 14px 2px 8px; }
.card-body h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.15;
}
.card-price {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}
.card:hover .card-price { color: #0e1218; }
.card-meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.card-teaser {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty, .error, .loading {
  color: var(--muted);
  padding: 28px 0;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 72px;
  animation: rise 0.45s ease both;
}
.page-complex {
  max-width: 1180px;
  padding: 18px 0 72px;
}
.page-pad {
  padding: 0 22px;
  max-width: 1180px;
  margin: 0 auto;
}
.page-back {
  margin-bottom: 14px;
}

.cx-hero-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  z-index: 0;
}
.cx-hero-hit img {
  width: 100%;
  height: min(58vh, 560px);
  object-fit: cover;
  display: block;
}
.cx-hero {
  position: relative;
  min-height: min(58vh, 560px);
  overflow: hidden;
  margin: 0 0 0;
  background: #2a323c;
}
.cx-hero > img {
  width: 100%;
  height: min(58vh, 560px);
  object-fit: cover;
  display: block;
}
.cx-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(14, 18, 24, 0.78) 0%, rgba(14, 18, 24, 0.15) 48%, rgba(14, 18, 24, 0.25) 100%);
}
.cx-hero-caption {
  position: absolute;
  left: max(22px, calc((100% - 1180px) / 2 + 22px));
  right: max(22px, calc((100% - 1180px) / 2 + 22px));
  bottom: 28px;
  color: #f2f4f6;
  max-width: 40rem;
  z-index: 2;
  pointer-events: none;
}
.cx-kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(242, 244, 246, 0.78);
}
.cx-hero-caption h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
}

.cx-band {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.cx-price {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.cx-price-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.cx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cta.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 16px;
}
.cta.ghost:hover {
  border-color: var(--ink);
  background: transparent;
}

.cx-section {
  padding: 28px 0 8px;
}
.cx-section h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  margin: 0 0 14px;
  font-weight: 600;
}
.cx-count {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
}
.cx-lead {
  padding: 22px 0 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.complex-desc {
  margin: 0;
  line-height: 1.65;
  color: var(--ink);
  max-width: 48rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 500;
}
.cx-facts {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.cx-facts .kv {
  max-width: 36rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 820px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
.gallery-grid .gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe4e9;
  display: block;
  cursor: zoom-in;
  text-decoration: none;
}
.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-grid .gallery-item:hover img { transform: scale(1.03); }
.gallery-grid .gallery-item:active { transform: scale(0.99); }

/* legacy strip kept for safety */
.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery-item {
  flex: 0 0 auto;
  width: min(220px, 70vw);
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  overflow: hidden;
  background: #dfe4e9;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.03); }
.doc-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.7;
}
.doc-list a { color: var(--accent); }
.video-frame {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  background: #0e1218;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-link, .site-link {
  margin: 8px 0 0;
}
.video-link a, .site-link a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-hero {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #2a323c;
}
.page-hero img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}
.page-hero-veil {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(14, 18, 24, 0.72), transparent);
}
.page-hero-caption {
  position: absolute;
  left: 22px;
  bottom: 20px;
  right: 22px;
  color: #f2f4f6;
}
.page-hero-caption h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 6px;
  font-weight: 600;
}
.page-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .page-grid { grid-template-columns: 1fr; }
}
.media-section {
  margin-top: 28px;
}
.media-section h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 12px;
  font-weight: 600;
}
.visual-box {
  background: #dfe4e9;
  min-height: 280px;
  display: grid;
  place-items: center;
  position: relative;
}
.visual-box img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}
.visual-box img.cover {
  max-height: none;
  min-height: 280px;
  height: 100%;
  object-fit: cover;
}
.plan-hit {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.plan-hit img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  background: #dfe4e9;
}
.plan-hit img.cover {
  max-height: none;
  min-height: 280px;
  object-fit: cover;
}
.plan-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 12px;
  background: rgba(14, 18, 24, 0.78);
  color: #f2f4f6;
  font-size: 0.85rem;
  pointer-events: none;
}

.info h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.info .price {
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}
.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.kv th, .kv td {
  text-align: left;
  vertical-align: top;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.kv th {
  width: 40%;
  color: var(--muted);
  font-weight: 500;
  padding-right: 10px;
}

.apt-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  max-width: 820px;
}
.apt-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.apt-row:hover { border-color: rgba(14, 18, 24, 0.35); }
.apt-row:active { transform: scale(0.99); }
.apt-row img {
  width: 88px;
  height: 66px;
  object-fit: contain;
  background: #dfe4e9;
  display: block;
}
.apt-row .apt-meta { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.apt-row .apt-price { font-weight: 700; color: var(--accent); white-space: nowrap; }

.lead {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.lead h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 12px 0 14px;
  font-weight: 600;
}
.lead .actions { margin-top: 12px; }
.lead-msg {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.lead-msg.ok { color: var(--accent); }
.lead-msg.err { color: #8a2f2f; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 22px 40px;
  color: var(--muted);
}
.site-foot .logo {
  color: var(--ink);
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.site-foot p { margin: 0; }
.foot-links { margin-top: 10px !important; }
.foot-links a { color: var(--accent); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: #f2f4f6;
  padding: 10px 14px;
  text-decoration: none;
}
.skip-link:focus { left: 8px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 4px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
  cursor: pointer;
}
.consent a { color: var(--accent); }

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  background: rgba(8, 10, 14, 0.96);
  color: #f2f4f6;
  overflow: hidden;
}
.lightbox[open],
.lightbox:modal {
  position: fixed;
  inset: 0;
  display: block;
}
.lightbox::backdrop {
  background: rgba(8, 10, 14, 0.92);
}
.lb-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  pointer-events: none;
}
.lb-counter {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: rgba(242, 244, 246, 0.8);
}
.lb-close {
  pointer-events: auto;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f4f6;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
}
.lb-close:active { transform: scale(0.96); }
.lb-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 64px 72px 40px;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #f2f4f6;
  width: 48px;
  height: 64px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lb-nav:active { transform: translateY(-50%) scale(0.96); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 720px) {
  .lb-stage { padding: 56px 16px 24px; }
  .lb-nav { width: 40px; height: 52px; font-size: 1.6rem; }
}

.filters-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 24, 0.35);
  z-index: 35;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes heroIn {
  from { opacity: 0.45; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg, .hero-inner, .card, .page { animation: none; }
  .card-media img, .cta, .card, .apt-row { transition: none; }
  .card:hover .card-media img { transform: none; }
}
