:root {
  --color-primary: #8b5cf6;
  --color-primary-dark: #6d28d9;
  --color-text: #e8e0f8;
  --color-surface: #1e1730;
  --color-muted: #2a2140;
  --color-card: #1a1428;
  --color-body: #a89bc8;
  --color-heading: #f5f3ff;
  --color-page: #0e0a16;
  --color-accent: #f472b6;
  --color-footer: #08060f;
  --color-border: #32284a;
  --color-price: #f5f3ff;
  --font-display: "Nunito Sans", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-page);
  line-height: 1.5;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--color-body);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header — Zoopla-like white bar + purple accents */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 16, 34, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-link img {
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--color-primary);
}

.header-phone {
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-heading);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-muted);
  text-decoration: none;
}

.btn-accent {
  background: var(--color-primary);
  color: #fff;
}

.btn-accent:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  color: #fff;
}

/* Hero — photo-led with light brand wash */
.hero {
  position: relative;
  /* Near 21:9 so ultrawide stays proportional */
  min-height: clamp(560px, calc(100vw * 9 / 21), 820px);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  color: #fff;
  padding: 0;
  background-color: #0e0a16;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Couple upper-right; leave lower band clear for search */
  object-position: 80% 22%;
  display: block;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      100deg,
      rgba(14, 10, 22, 0.78) 0%,
      rgba(14, 10, 22, 0.42) 32%,
      rgba(14, 10, 22, 0.1) 58%,
      rgba(14, 10, 22, 0.06) 100%
    ),
    linear-gradient(
      180deg,
      rgba(14, 10, 22, 0.15) 0%,
      rgba(14, 10, 22, 0) 40%,
      rgba(14, 10, 22, 0.35) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem 0 1.75rem;
  box-sizing: border-box;
}

.hero-copy {
  max-width: 36rem;
}

.hero-copy h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  max-width: 18ch;
  margin-bottom: 0.65rem;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0;
}

.hero .search-panel {
  margin-top: 0;
  width: min(100%, 920px);
}

@media (min-width: 1400px) {
  .hero {
    min-height: clamp(640px, calc(100vw * 9 / 21), 900px);
  }

  .hero-media img {
    object-position: 78% 20%;
  }

  .hero .search-panel {
    width: min(100%, 980px);
  }
}

@media (max-width: 1100px) {
  .hero {
    min-height: 600px;
  }

  .hero-media img {
    object-position: center 24%;
  }

  .hero-inner {
    padding: 2.5rem 0 1.5rem;
  }

  .hero .search-panel {
    width: 100%;
  }

  .hero-shade {
    background: linear-gradient(
      180deg,
      rgba(14, 10, 22, 0.62) 0%,
      rgba(14, 10, 22, 0.25) 38%,
      rgba(14, 10, 22, 0.55) 100%
    );
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 640px;
  }

  .hero-media img {
    object-position: center 18%;
  }

  .hero-inner {
    padding: 2rem 0 1.25rem;
    justify-content: flex-end;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy h1,
  .hero-copy p {
    max-width: none;
  }

  .hero-shade {
    background: linear-gradient(
      180deg,
      rgba(14, 10, 22, 0.4) 0%,
      rgba(14, 10, 22, 0.18) 32%,
      rgba(14, 10, 22, 0.55) 68%,
      rgba(14, 10, 22, 0.82) 100%
    );
  }
}

.search-panel {
  margin-top: 1.5rem;
  background: rgba(36, 28, 56, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)) auto;
  gap: 0.65rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.search-panel label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.search-panel input,
.search-panel select,
.form-field input,
.form-field select,
.form-field textarea,
.calc-grid input,
.calc-grid select,
.filters-bar input,
.filters-bar select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #1a142c;
  color: var(--color-heading);
}

.section {
  padding: 2.75rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head p {
  margin: 0;
}

/* Listing cards — Zoopla-like */
.listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.listing-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  min-height: 210px;
  transition: box-shadow 0.15s ease;
}

.listing-card:hover {
  box-shadow: 0 8px 28px rgba(88, 28, 160, 0.12);
}

.listing-card > a {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.listing-media {
  background: var(--color-muted);
  overflow: hidden;
  min-height: 210px;
}

.listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
}

.listing-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-price);
  letter-spacing: -0.02em;
}

.listing-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.listing-body p {
  margin: 0;
  font-size: 0.95rem;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--color-body);
  font-weight: 600;
}

.listing-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.filters-bar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)) auto;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  background: var(--color-card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.results-count {
  margin-bottom: 0.85rem;
  font-weight: 700;
  color: var(--color-heading);
}

.page-hero {
  padding: 1.75rem 0 1.25rem;
  background: linear-gradient(180deg, #1a1428, var(--color-page));
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.page-hero--media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(240px, 38vw, 420px);
  display: flex;
  align-items: end;
  padding: 0;
  border-bottom: 0;
  background: #1a1428;
}

.page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.03);
  animation: hero- ken 18s ease-out forwards;
}

.page-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(18, 12, 28, 0.88) 0%, rgba(18, 12, 28, 0.55) 48%, rgba(18, 12, 28, 0.28) 100%),
    linear-gradient(0deg, rgba(18, 12, 28, 0.72) 0%, transparent 55%);
}

.page-hero-copy {
  position: relative;
  z-index: 2;
  padding: 2.5rem 0 2.1rem;
  max-width: 40rem;
  animation: fade-up 0.7s ease both;
}

.page-hero--media h1,
.page-hero--media p {
  color: #f6f2ff;
}

.page-hero--media p {
  margin-bottom: 0;
  color: rgba(246, 242, 255, 0.88);
  max-width: 34rem;
}

@keyframes hero-ken {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero-media,
  .page-hero-copy,
  .info-card--media,
  .split-media,
  .media-cta {
    animation: none !important;
  }
}

.property-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.gallery {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.gallery-stage {
  position: relative;
  background: #1a1625;
}

.gallery-main {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1a1428;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
  z-index: 2;
  padding: 0;
}

.gallery-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-arrow:hover {
  background: #fff;
  color: #0f0a18;
  transform: translateY(-50%) scale(1.04);
}

.gallery-arrow-prev {
  left: 14px;
}

.gallery-arrow-next {
  right: 14px;
}

.gallery-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  background: rgba(20, 16, 30, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem;
  background: var(--color-card);
  scrollbar-width: thin;
  scrollbar-color: #5b4b82 transparent;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: #5b4b82;
  border-radius: 999px;
}

.gallery-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-muted);
  flex: 0 0 88px;
  height: 64px;
  opacity: 0.78;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumbs button:hover {
  opacity: 1;
}

.gallery-thumbs button.is-active {
  border-color: var(--color-primary);
  opacity: 1;
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.fact {
  background: var(--color-muted);
  border-radius: 8px;
  padding: 0.75rem;
}

.fact span {
  display: block;
  font-size: 0.75rem;
  color: var(--color-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.fact strong {
  font-size: 1rem;
}

.feature-list {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  gap: 1.5rem;
}

.feature-list li {
  margin-bottom: 0.4rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.info-table th {
  width: 38%;
  color: var(--color-body);
  font-weight: 600;
}

.timeline {
  display: block;
}

.timeline-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timeline-summary > div {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.timeline-summary-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-body);
  margin-bottom: 0.25rem;
}

.timeline-summary strong {
  font-size: 1.1rem;
  color: var(--color-heading);
}

.timeline-track {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 0.25rem;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
  padding: 0 0 1.35rem 0;
  border-bottom: 0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  margin-top: 0.35rem;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--color-muted);
  border: 3px solid var(--color-primary);
  z-index: 1;
}

.timeline-item.is-current .timeline-marker {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.28);
}

.timeline-item.is-current .timeline-content {
  border-color: var(--color-primary);
}

.timeline-content {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.15rem;
}

.timeline-content h3 {
  font-size: 1.05rem;
  margin: 0.15rem 0 0.35rem;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-change {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-heading);
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.timeline-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 0.35rem;
}

.timeline-images {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.timeline-thumb {
  appearance: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.timeline-thumb:hover,
.timeline-thumb:focus-visible {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  outline: none;
}

.timeline-thumb img,
.timeline-images img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  display: block;
}

body.lightbox-open {
  overflow: hidden;
}

.timeline-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.timeline-lightbox[hidden] {
  display: none;
}

.timeline-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 15, 0.88);
  cursor: pointer;
}

.timeline-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-lightbox-image {
  max-width: 100%;
  max-height: min(80vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #120e1c;
}

.timeline-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.timeline-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1428;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.timeline-lightbox-nav:hover {
  background: #fff;
}

.timeline-lightbox-prev {
  left: 0.35rem;
}

.timeline-lightbox-next {
  right: 0.35rem;
}

.timeline-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: -2.25rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.local-map {
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-muted);
}

.local-map iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.local-map-actions {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.local-intro {
  margin: 0 0 1rem;
  color: var(--color-body);
}

.local-card {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.calc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.calc-tabs button {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-muted);
  color: var(--color-text);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.calc-tabs button.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.calc-pane[hidden] {
  display: none;
}

.local-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.local-card {
  margin-bottom: 0 !important;
}

.local-card h3 {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.local-card ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--color-body);
}

.agent-card {
  position: sticky;
  top: 5rem;
}

.agent-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--color-muted);
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-border);
}

.agent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 1rem 0 0.75rem;
  align-items: stretch;
}

.agent-actions .btn,
.agent-call-swap {
  width: 100%;
  text-align: center;
}

.agent-call-swap {
  position: relative;
  display: grid;
  min-height: 2.75rem;
}

.agent-call-swap > .agent-call-face,
.agent-call-swap > .agent-phone-face {
  grid-area: 1 / 1;
  width: 100%;
  margin: 0;
  transition:
    opacity 0.38s ease,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.38s ease;
}

.agent-call-swap > .agent-call-face {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

.agent-call-swap > .agent-phone-face {
  opacity: 0;
  transform: scale(0.92) translateY(6px);
  filter: blur(2px);
  pointer-events: none;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-call-swap.is-revealed > .agent-call-face {
  opacity: 0;
  transform: scale(0.94) translateY(-6px);
  filter: blur(2px);
  pointer-events: none;
}

.agent-call-swap.is-revealed > .agent-phone-face {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

.agent-phone-face.is-unavailable {
  cursor: default;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .agent-call-swap > .agent-call-face,
  .agent-call-swap > .agent-phone-face {
    transition: opacity 0.15s ease;
    filter: none !important;
    transform: none !important;
  }
}

.agent-view-link {
  margin: 0.5rem 0 0;
}

.agent-email-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.agent-email-form h3 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .agent-actions {
    grid-template-columns: 1fr;
  }
}

.form-field {
  margin-bottom: 0.85rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.calc-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--color-muted);
}

.calc-result.aff-results {
  background: transparent;
  padding: 0;
  text-align: left;
}

.calc-result strong {
  display: block;
  font-size: 1.55rem;
  color: var(--color-heading);
}

.calc-result.aff-results strong {
  font-size: 1.35rem;
  margin-top: 0;
}

.site-footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-grid h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.45rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  font-size: 0.9rem;
}

#cookieBanner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--color-card);
  color: var(--color-text);
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--color-border);
  padding: 1rem 1.15rem;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.empty-state,
.loading-state {
  padding: 2rem;
  text-align: center;
  color: var(--color-body);
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.legal-content {
  max-width: 820px;
  line-height: 1.65;
}

.legal-content .legal-updated {
  font-size: 0.92rem;
  color: var(--color-body);
  margin-bottom: 1.25rem;
}

.legal-content h2 {
  margin-top: 1.85rem;
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
}

.legal-content h2:first-of-type {
  margin-top: 1.25rem;
}

.legal-content ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--color-body);
}

.legal-content li + li {
  margin-top: 0.4rem;
}

.legal-content p {
  margin-bottom: 0.9rem;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.legal-table th {
  background: var(--color-muted);
  color: var(--color-heading);
  font-weight: 800;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table code {
  font-size: 0.85em;
  word-break: break-word;
}

/* Zoopla-style tools cards */
.tools-intro {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.tools-intro h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  margin-bottom: 0.55rem;
}

.tools-intro p {
  margin: 0;
  font-size: 1.05rem;
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: transparent;
}

.tool-card-media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
  background: var(--color-muted);
}

.tool-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.tool-card p {
  flex: 1;
  margin-bottom: 0.85rem;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}

.tool-card-link:hover {
  text-decoration: underline;
}

.tool-card-link::after {
  content: "→";
  font-size: 1.05rem;
}

.tool-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: start;
}

.tool-benefits-media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: -0.15rem -0.15rem 1rem;
  background: var(--color-muted);
}

.tool-benefits-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-card--media {
  padding: 0;
  overflow: hidden;
  animation: fade-up 0.7s ease both;
}

.info-card--media:nth-child(2) {
  animation-delay: 0.08s;
}

.info-card--media:nth-child(3) {
  animation-delay: 0.16s;
}

.info-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-muted);
}

.info-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.info-card--media:hover .info-card-media img {
  transform: scale(1.04);
}

.info-card-body {
  padding: 1.05rem 1.15rem 1.2rem;
}

.info-card-body h3 {
  margin-top: 0;
}

.split-media {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  animation: fade-up 0.7s ease both;
}

.split-media-visual {
  min-height: 100%;
  background: var(--color-muted);
}

.split-media-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 280px;
}

.split-media-copy {
  padding: 1.35rem 1.4rem 1.45rem;
}

.media-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  animation: fade-up 0.7s ease both;
}

.media-cta-visual {
  min-height: 260px;
  background: var(--color-muted);
}

.media-cta-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}

.media-cta-copy {
  padding: 1.5rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.media-cta-copy h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.media-cta-copy .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.local-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .split-media,
  .media-cta,
  .local-grid--two {
    grid-template-columns: 1fr;
  }

  .page-hero--media {
    min-height: 280px;
  }

  .page-hero-scrim {
    background:
      linear-gradient(0deg, rgba(18, 12, 28, 0.88) 0%, rgba(18, 12, 28, 0.45) 55%, rgba(18, 12, 28, 0.25) 100%);
  }
}

.benefit-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--color-body);
  line-height: 1.55;
}

.benefit-list li + li {
  margin-top: 0.55rem;
}

.tool-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-body);
  line-height: 1.5;
}

.tool-note a {
  color: var(--color-primary);
  font-weight: 700;
}

@media (max-width: 960px) {
  .tool-page-grid {
    grid-template-columns: 1fr;
  }
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.info-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.info-card p {
  margin-bottom: 0;
  color: var(--color-body);
}

.info-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.benefit-list-wide {
  columns: 1;
  max-width: 52rem;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 800;
  color: var(--color-heading);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--color-primary);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.1rem;
  color: var(--color-body);
}

.aff-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  text-align: left;
}

.aff-results > div {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.aff-results span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-body);
  margin-bottom: 0.3rem;
}

.aff-results strong {
  font-size: 1.15rem;
  color: var(--color-heading);
}

@media (max-width: 960px) {
  .info-cards,
  .aff-results {
    grid-template-columns: 1fr;
  }
}

/* Articles */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.article-grid:has(.article-card:nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1100px) {
  .article-grid:has(.article-card:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.article-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.article-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card a:hover h3 {
  color: var(--color-primary);
}

.article-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-muted);
}

.article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.article-card a:hover .article-media img {
  transform: scale(1.04);
}

.article-body {
  padding: 1rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.4rem;
  flex: 1;
}

.article-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-body h3 {
  font-size: 1.05rem;
  margin: 0;
}

.article-body p {
  margin: 0;
  font-size: 0.95rem;
}

.article-detail {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.75rem;
  animation: fade-up 0.65s ease both;
}

.article-detail h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.article-lede {
  font-size: 1.08rem;
  color: var(--color-body);
  margin: 0 0 1.25rem;
}

.article-hero-figure {
  margin: 0 0 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-muted);
}

.article-detail .article-hero-img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-section + .article-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.article-prose h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.article-prose p {
  margin: 0 0 0.9rem;
  line-height: 1.65;
}

.article-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--color-body);
  line-height: 1.55;
}

.article-prose li + li {
  margin-top: 0.4rem;
}

.article-inline-figure {
  margin: 1rem 0 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-muted);
}

.article-inline-figure img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-tips,
.article-cta {
  margin-top: 1.5rem;
}

.article-tips h2,
.article-cta h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.article-tips ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-body);
  line-height: 1.55;
}

.article-tips li + li {
  margin-top: 0.45rem;
}

.article-cta .btn {
  margin-top: 0.25rem;
}

.article-back {
  margin: 1.5rem 0 0;
}

.article-related {
  margin-top: 2.5rem;
}

.article-related h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.article-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-page {
  max-width: 1100px;
}

.article-page .article-detail {
  max-width: 820px;
}

/* Featured grid on homepage can stay multi-column */
.home-featured .listing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-featured .listing-card {
  grid-template-columns: 1fr;
  min-height: 0;
}

.home-featured .listing-media {
  aspect-ratio: 4 / 3;
  min-height: 0;
}

@media (max-width: 960px) {
  .search-panel,
  .filters-bar {
    grid-template-columns: 1fr 1fr;
  }

  .listing-card {
    grid-template-columns: 1fr;
  }

  .listing-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .home-featured .listing-grid,
  .local-grid,
  .facts,
  .tool-cards,
  .article-grid,
  .article-grid:has(.article-card:nth-child(4)),
  .article-grid--related,
  .timeline-summary {
    grid-template-columns: 1fr 1fr;
  }

  .property-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .agent-card {
    position: static;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .search-panel,
  .filters-bar,
  .home-featured .listing-grid,
  .local-grid,
  .facts,
  .form-row,
  .calc-grid,
  .timeline-item,
  .timeline-summary,
  .tool-cards,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .feature-list {
    columns: 1;
  }

  .gallery-main {
    height: 280px;
  }

  .gallery-arrow {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .timeline-lightbox-close {
    top: 0.35rem;
    right: 0.35rem;
    z-index: 3;
    background: rgba(8, 6, 15, 0.55);
    border-radius: 50%;
    width: 40px;
    height: 40px;
  }

  .timeline-lightbox-counter {
    bottom: 0.5rem;
  }

  .timeline-lightbox-prev {
    left: 0.15rem;
  }

  .timeline-lightbox-next {
    right: 0.15rem;
  }
}
