:root {
  --ink: #171717;
  --muted: #666b73;
  --line: #e8e2d9;
  --soft: #f5f1ea;
  --accent: #a4512b;
  --forest: #25433b;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: 0;
}

.navbar {
  min-height: 72px;
  transition: box-shadow .25s ease, background-color .25s ease;
}

.navbar.is-scrolled {
  box-shadow: 0 12px 36px rgba(22, 24, 27, .08);
}

.navbar-brand {
  letter-spacing: 0;
}

.navbar .nav-link.active {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: #1d1d1b;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .35) 48%, rgba(0, 0, 0, .18));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.text-white-75 {
  color: rgba(255, 255, 255, .78);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.hero-badges span {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  padding: .55rem .75rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  font-size: .92rem;
}

.summary-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(18px);
}

.summary-panel > div {
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.summary-label {
  display: block;
  margin-bottom: .25rem;
  color: rgba(255, 255, 255, .68);
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 700;
}

.section-band {
  padding: 6rem 0;
}

.compact-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.soft-bg {
  background: var(--soft);
}

.eyebrow {
  margin-bottom: .5rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.quick-stats div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quick-stats strong,
.route-result strong {
  display: block;
  color: var(--accent);
  font-size: 1.65rem;
  line-height: 1;
}

.quick-stats span {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .9rem;
}

.gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.gallery-meta {
  display: flex;
  flex: 0 0 auto;
  gap: .65rem;
  align-items: center;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.gallery-meta button {
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

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

.gallery-story div {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: .8rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gallery-story i {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 1.1rem;
}

.gallery-story strong {
  font-size: .98rem;
}

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: .75rem;
}

.gallery-grid.is-collapsed .gallery-item:nth-of-type(n+9) {
  display: none;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ddd;
  cursor: zoom-in;
}

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

.gallery-item img,
.detail-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item img {
  filter: saturate(1.04) contrast(1.02);
  transition: transform .35s ease, filter .35s ease;
}

.gallery-item:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.05);
}

.gallery-item::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .46));
  pointer-events: none;
}

.gallery-item span {
  position: absolute;
  right: .65rem;
  bottom: .65rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .56);
  backdrop-filter: blur(10px);
  font-size: .78rem;
  font-weight: 800;
  z-index: 1;
}

.gallery-item[hidden] {
  display: none;
}

.feature-card {
  height: 100%;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card,
.key-item,
.buyer-grid div,
.selling-points div,
.quick-stats div,
.neighborhood-grid div {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card:hover,
.key-item:hover,
.buyer-grid div:hover,
.selling-points div:hover,
.quick-stats div:hover,
.neighborhood-grid div:hover {
  transform: translateY(-3px);
  border-color: rgba(164, 81, 43, .32);
  box-shadow: 0 18px 46px rgba(26, 28, 31, .08);
}

.feature-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-size: 1.25rem;
}

.feature-card h3 {
  margin-bottom: .5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.feature-card p,
.check-list p,
.location-panel span,
.contact-box p,
.key-item span {
  color: var(--muted);
}

.detail-photo {
  min-height: 420px;
  max-height: 560px;
}

.selling-points {
  display: grid;
  gap: .85rem;
}

.selling-points div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.selling-points i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-size: 1.25rem;
}

.selling-points span {
  color: var(--ink);
  font-weight: 700;
}

.check-list {
  display: grid;
  gap: .85rem;
  margin-top: 1.5rem;
}

.check-list p,
.contact-box p {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin: 0;
}

.check-list i {
  color: var(--accent);
  font-size: 1.25rem;
}

.dark-band {
  background: var(--forest);
}

.location-panel {
  display: grid;
  gap: .75rem;
}

.location-panel div {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.location-panel i {
  color: #fff;
  font-size: 1.25rem;
}

.location-panel span {
  color: rgba(255, 255, 255, .78);
}

.route-tabs,
.info-filter,
.album-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.route-tabs button,
.info-filter button,
.album-filter button {
  padding: .55rem .8rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-weight: 700;
}

.album-filter button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  margin-left: .35rem;
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: .75rem;
}

.info-filter button,
.album-filter button {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.route-tabs button.active,
.route-tabs button:hover {
  color: var(--forest);
  background: #fff;
}

.info-filter button.active,
.info-filter button:hover,
.album-filter button.active,
.album-filter button:hover {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.album-filter button.active span,
.album-filter button:hover span {
  color: var(--forest);
  background: #fff;
}

.route-result {
  display: grid;
  gap: .45rem;
  max-width: 520px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.route-result span {
  color: rgba(255, 255, 255, .78);
}

.contact-box {
  display: grid;
  gap: .85rem;
}

.contact-box i {
  color: var(--accent);
  font-size: 1.15rem;
}

.contact-box a {
  color: var(--ink);
}

.contact-form {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(26, 28, 31, .08);
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.message-count,
.form-note {
  color: var(--muted);
  font-size: .88rem;
}

.diagnostic-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.diagnostic-card h3 {
  margin-bottom: 1.1rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.energy-row {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.energy-row > span {
  color: var(--muted);
  font-size: .92rem;
}

.energy-scale {
  display: flex;
  align-items: center;
  gap: 2px;
}

.energy-scale span,
.energy-scale strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  color: #101010;
  font-size: .75rem;
  line-height: 1;
}

.energy-scale span:nth-child(1) {
  background: #20b486;
}

.energy-scale span:nth-child(2) {
  background: #70c95d;
}

.energy-scale span:nth-child(3) {
  background: #c7df35;
}

.energy-scale span:nth-child(4) {
  background: #f2df2e;
}

.energy-scale span:nth-child(5) {
  background: #f6a42d;
}

.energy-scale strong {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #e56a2d;
  font-size: .9rem;
}

.energy-scale span:nth-child(7) {
  color: #fff;
  background: #d91e2b;
}

.energy-scale.ges span:nth-child(1) {
  background: #f6e7ff;
}

.energy-scale.ges span:nth-child(2) {
  background: #e7c8ff;
}

.energy-scale.ges span:nth-child(3) {
  background: #d9a6ff;
}

.energy-scale.ges span:nth-child(4) {
  background: #c47df2;
}

.energy-scale.ges span:nth-child(5) {
  background: #ab56e0;
}

.energy-scale.ges strong {
  background: #9747d9;
}

.energy-scale.ges span:nth-child(7) {
  background: #7600b8;
}

.key-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.key-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: .85rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.key-item i {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--forest);
  background: #edf1ef;
  font-size: 1.15rem;
}

.key-item span {
  font-size: .86rem;
}

.key-item strong {
  font-size: 1.03rem;
}

.key-item[hidden] {
  display: none;
}

.buyer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.buyer-grid div {
  display: flex;
  gap: .8rem;
  align-items: center;
  min-height: 82px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.buyer-grid i {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 1.15rem;
}

.buyer-grid span {
  font-weight: 700;
}

.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.neighborhood-grid div {
  min-height: 180px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.neighborhood-grid i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-size: 1.2rem;
}

.neighborhood-grid h3 {
  margin-bottom: .5rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.neighborhood-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.form-control {
  border-color: var(--line);
  border-radius: 8px;
}

.btn {
  border-radius: 8px;
}

.modal-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem;
}

.modal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .34);
}

.modal-photo {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.modal-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: #fff;
  background: rgba(0, 0, 0, .82);
}

.modal-caption span {
  color: rgba(255, 255, 255, .72);
  white-space: nowrap;
}

.modal-thumbs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .75rem;
  background: #0f0f0f;
}

.modal-thumbs button {
  flex: 0 0 76px;
  width: 76px;
  height: 58px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #222;
  opacity: .62;
}

.modal-thumbs button.active,
.modal-thumbs button:hover {
  border-color: #fff;
  opacity: 1;
}

.modal-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1040;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(20, 22, 24, .16);
}

.mobile-cta a,
.mobile-cta button {
  display: grid;
  gap: .25rem;
  justify-items: center;
  padding: .7rem .5rem;
  border: 0;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
}

.mobile-cta i {
  color: var(--accent);
  font-size: 1.2rem;
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: 74px;
  }

  .navbar-collapse {
    padding: 1rem 0;
  }

  .navbar .btn {
    width: 100%;
    margin-top: .35rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-content .min-vh-100 {
    min-height: 820px !important;
    padding-top: 6rem;
  }

  .hero-content .display-4 {
    font-size: 2.75rem;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-grid.is-collapsed .gallery-item:nth-of-type(n+7) {
    display: none;
  }

  .key-grid,
  .buyer-grid,
  .neighborhood-grid {
    grid-template-columns: 1fr;
  }

  .mobile-cta {
    display: grid;
  }

  .gallery-controls {
    display: grid;
  }

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

  .gallery-meta {
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .container {
    --bs-gutter-x: 1.25rem;
  }

  .section-band {
    padding: 3.5rem 0;
  }

  .compact-section {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .72));
  }

  .hero-content .min-vh-100 {
    min-height: 760px !important;
    padding-top: 5.5rem;
  }

  .hero-content .display-4 {
    font-size: 2.25rem;
  }

  .hero-badges span {
    width: 100%;
    justify-content: center;
  }

  .summary-panel {
    grid-template-columns: 1fr 1fr;
  }

  .summary-panel > div {
    padding: .8rem;
  }

  .summary-panel strong {
    font-size: .95rem;
  }

  .quick-stats {
    grid-template-columns: 1fr 1fr;
  }

  .quick-stats strong,
  .route-result strong {
    font-size: 1.35rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 210px;
  }

  .gallery-grid.is-collapsed .gallery-item:nth-of-type(n+5) {
    display: none;
  }

  .gallery-item-large {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-photo {
    min-height: 300px;
  }

  .selling-points div,
  .key-item {
    grid-template-columns: 38px 1fr;
    gap: .75rem;
  }

  .selling-points i,
  .key-item i,
  .buyer-grid i,
  .neighborhood-grid i {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .neighborhood-grid div {
    min-height: auto;
  }

  .route-tabs button,
  .info-filter button,
  .album-filter button {
    flex: 1 1 auto;
  }
}
