:root {
  --ink: #19201d;
  --muted: #6c746f;
  --line: #dfe3df;
  --paper: #ffffff;
  --background: #f4f5f1;
  --soft: #eceee9;
  --accent: #263f35;
  --shadow: 0 24px 64px rgba(25, 32, 29, 0.1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 0%, rgba(156, 201, 134, 0.14), transparent 34rem),
    var(--background);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 550;
  letter-spacing: -0.035em;
}

.map-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 3rem 1.25rem;
}

.map-shell {
  width: min(100%, 780px);
  text-align: center;
}

.map-header {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.intro,
.hero-copy {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.map-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(25, 32, 29, 0.08);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.apartment-map {
  display: block;
  width: 100%;
  height: min(58vh, 540px);
  min-height: 400px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.2rem;
  padding: 0;
  margin: 1.7rem 0 0;
  list-style: none;
  color: #4c554f;
  font-size: 0.8rem;
  font-weight: 650;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.swatch,
.type-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.swatch-red { background: #e56467; }
.swatch-orange { background: #f3b36c; }
.swatch-teal { background: #a8d2d2; }
.swatch-green { background: #9cc986; }
.swatch-purple { background: #8f7acc; }

.map-hint {
  margin: 1rem 0 0;
  color: #8b928e;
  font-size: 0.75rem;
}

.compare-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding: 0.8rem 1.05rem;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.compare-link:hover {
  background: #34413b;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, 1440px);
  min-height: 5rem;
  margin: 0 auto;
  border-bottom: 1px solid rgba(25, 32, 29, 0.12);
}

.back-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: #3e4842;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  color: #000;
}

.brand {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.header-nav a {
  color: #3e4842;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.header-nav a:hover {
  color: #000;
}

.detail-shell {
  width: min(100% - 2rem, 1440px);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.5rem) 0 6rem;
  --type-color: #9cc986;
}

.apartment-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 clamp(0rem, 3vw, 2rem) clamp(2rem, 5vw, 4rem);
}

.type-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.type-dot {
  background: var(--type-color);
}

.price {
  display: grid;
  gap: 0.35rem;
  text-align: right;
}

.price span {
  color: var(--muted);
  font-size: 0.75rem;
}

.price strong {
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.variant-section {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.6);
}

.variant-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.variant-heading p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.variant-heading span {
  color: var(--muted);
  font-size: 0.75rem;
}

.variant-tabs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.variant-tab {
  display: grid;
  min-width: 7.5rem;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
}

.variant-tab strong {
  font-size: 0.85rem;
}

.variant-tab span {
  color: var(--muted);
  font-size: 0.7rem;
}

.variant-tab:hover,
.variant-tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.variant-tab.active span {
  color: rgba(255, 255, 255, 0.65);
}

.apartment-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(480px, 1.4fr);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(25, 32, 29, 0.07);
}

.details-panel,
.floorplan-panel {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.details-panel {
  border-right: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2rem;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.fact {
  min-width: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.fact:nth-child(odd) {
  padding-right: 1rem;
}

.fact:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.fact dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.fact dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.fact-featured dd {
  font-size: 1rem;
}

.campaign,
.note,
.data-notice {
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 0.8rem;
  font-size: 0.78rem;
  line-height: 1.55;
}

.campaign {
  background: color-mix(in srgb, var(--type-color) 22%, white);
}

.note,
.data-notice {
  background: var(--soft);
}

.data-notice p,
.pdf-missing p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.floorplan-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #f8f8f5;
}

.floorplan-heading,
.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.floorplan-heading a {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration: none;
}

.pdf-viewer {
  width: 100%;
  min-height: 570px;
  flex: 1;
  border: 0;
  border-radius: 0.8rem;
  background: #fff;
}

.pdf-missing {
  display: grid;
  min-height: 480px;
  place-content: center;
  padding: 2rem;
  border: 1px dashed #c8cdc9;
  border-radius: 0.8rem;
  text-align: center;
}

.gallery-section {
  padding-top: clamp(4rem, 8vw, 7rem);
}

.gallery-heading span {
  color: var(--muted);
  font-size: 0.75rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0.8rem;
  background: #e7e9e6;
  cursor: zoom-in;
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 2rem 5rem;
  border: 0;
  color: #fff;
  background: rgba(12, 15, 13, 0.94);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(12, 15, 13, 0.8);
}

.lightbox img {
  grid-column: 2;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
}

.lightbox button {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
}

.lightbox-close {
  position: fixed;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
}

.lightbox-nav {
  width: 3rem;
  height: 3rem;
}

.lightbox-prev {
  grid-column: 1;
}

.lightbox-next {
  grid-column: 3;
}

#lightbox-counter {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.empty-state {
  display: grid;
  min-height: 60vh;
  place-content: center;
  text-align: center;
}

.button {
  justify-self: center;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.compare-shell {
  width: min(100% - 2rem, 1440px);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0 6rem;
}

.compare-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.compare-hero > div {
  max-width: 700px;
}

.offer-count {
  min-width: max-content;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.offer-count strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.comparison-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.highlight-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.highlight-card:hover {
  border-color: #aeb5b0;
  transform: translateY(-2px);
}

.highlight-card span,
.highlight-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.highlight-card strong {
  font-size: 1.35rem;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.comparison-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(25, 32, 29, 0.06);
}

.comparison-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.comparison-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.comparison-toolbar label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.comparison-toolbar select {
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 650;
}

.table-scroll {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th {
  padding: 0.8rem 1rem;
  color: var(--muted);
  background: #f8f8f5;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comparison-table td {
  padding: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  vertical-align: middle;
}

.comparison-table tbody tr:first-child td {
  border-top: 0;
}

.offer-row {
  cursor: pointer;
  outline: none;
  transition: background 140ms ease;
}

.offer-row:hover,
.offer-row:focus-visible {
  background: #f5f7f3;
}

.apartment-cell {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
}

.apartment-cell strong,
.total-cell > strong {
  font-size: 0.9rem;
}

.apartment-cell span,
.allocation {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.table-type {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.table-type > span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--row-color);
}

.total-cell {
  min-width: 150px;
}

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.offer-tag {
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
}

.offer-tag-muted {
  color: #505954;
  background: var(--soft);
}

.row-arrow {
  color: #9da49f;
  font-size: 1rem !important;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .apartment-grid {
    grid-template-columns: 1fr;
  }

  .details-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pdf-viewer {
    min-height: 70vh;
  }

  .comparison-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .map-page {
    padding-top: 2rem;
  }

  .map-card {
    border-radius: 1.25rem;
  }

  .apartment-map {
    min-height: 360px;
  }

  .site-header {
    min-height: 4rem;
  }

  .brand {
    display: none;
  }

  .header-nav {
    gap: 0;
  }

  .detail-shell {
    padding-top: 2.5rem;
  }

  .apartment-hero {
    display: block;
    padding-bottom: 2rem;
  }

  .price {
    margin-top: 1.5rem;
    text-align: left;
  }

  .variant-heading span {
    display: none;
  }

  .apartment-grid {
    border-radius: 1rem;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .fact:nth-child(odd),
  .fact:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .pdf-viewer {
    min-height: 65vh;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item:first-child {
    grid-column: span 2;
    grid-row: auto;
  }

  .lightbox {
    padding: 3.5rem 0.5rem 1rem;
  }

  .lightbox[open] {
    grid-template-columns: 3rem 1fr 3rem;
  }

  .compare-hero {
    display: block;
  }

  .offer-count {
    margin-top: 1.25rem;
  }

  .comparison-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .comparison-toolbar label {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
