/* ARE brand: Blue #065CBA, Silver #A7A9AC, Graphite #807B80, White, Black. Montserrat. */
:root {
  --blue: #065CBA;
  --blue-dark: #054c9a;
  --silver: #A7A9AC;
  --graphite: #807B80;
  --line: #e3e4e6;
  --white: #FFFFFF;
  --black: #000000;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sticky-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: var(--sticky-h);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Demo notice */
.demo-bar {
  margin: 0;
  padding: 8px 16px;
  background: var(--blue);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

/* Header and logo: big, never in a box */
.site-header {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  background: var(--white);
}
.logo {
  height: 128px;
  width: auto;
  max-width: 100%;
}

/* Carousel */
.carousel { position: relative; background: var(--black); }

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 78vh;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.slide figcaption {
  position: absolute;
  left: 12px;
  bottom: 40px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
}

.ai-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 3px;
  pointer-events: none;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  font-size: 30px;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.nav-arrow:hover { background: var(--white); color: var(--blue); }
.nav-arrow:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.nav-arrow.prev { left: 10px; }
.nav-arrow.next { right: 10px; }

.counter {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 60px;
}
.dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.dot[aria-selected="true"] { background: var(--white); transform: scale(1.25); }
.dot:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* Key facts */
.facts { padding-top: 24px; padding-bottom: 8px; }
.facts-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4px 24px;
}
.facts h1 { font-size: 26px; font-weight: 700; }
.city { margin: 4px 0 0; color: var(--graphite); font-weight: 500; }
.price { margin: 8px 0 0; font-size: 28px; font-weight: 700; color: var(--blue); }

.stats {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stats li {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.stats li:nth-child(odd) { border-right: 1px solid var(--line); }
.stats li:nth-last-child(-n+2) { border-bottom: 0; }
.stats strong { display: block; font-size: 22px; font-weight: 700; }
.stats span { display: block; font-size: 13px; color: var(--graphite); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.btn:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }

.inline-btn { display: none; margin-top: 20px; }

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
}
.sticky-bar .btn { width: 100%; }

/* Content blocks */
.block { padding-top: 32px; }
.block h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--blue);
  display: inline-block;
}
.block > p { margin: 0 0 12px; max-width: 70ch; }

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
.features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.features li span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--graphite);
}

.floorplan {
  position: relative;
  margin: 0;
  max-width: 820px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.hood {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.hood li {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
}
.hood h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.hood p { margin: 0; }
.hood .source {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.map {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.map iframe { display: block; width: 100%; height: 300px; border: 0; }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 28px 16px;
  background: var(--black);
  color: var(--white);
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer .listed { font-weight: 600; }
.site-footer .tagline { margin-top: 6px; color: var(--silver); font-weight: 500; }
.site-footer .fine { margin-top: 14px; font-size: 12px; color: var(--silver); }

/* Showing dialog */
.showing-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  color: var(--black);
  font-family: var(--font);
}
.showing-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.showing-dialog form, .showing-dialog .thanks { padding: 20px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { font-size: 20px; font-weight: 700; }
.close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--graphite);
}
.close:hover { color: var(--black); }
.dialog-sub { margin: 2px 0 16px; font-size: 14px; color: var(--graphite); }

.fields { display: grid; gap: 12px; }
.fields label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.fields em { font-style: normal; font-weight: 500; color: var(--graphite); }
.fields .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .fields .row { grid-template-columns: 1fr 1fr; } }
.fields input, .fields textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--silver);
  border-radius: 6px;
  color: var(--black);
  background: var(--white);
}
.fields input:focus, .fields textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.fields textarea { resize: vertical; }
.showing-dialog form .btn { width: 100%; margin-top: 16px; }
.form-error { margin: 12px 0 0; color: #b00020; font-size: 14px; font-weight: 500; }
.thanks { text-align: center; }
.thanks p { margin: 8px 0 18px; font-size: 18px; font-weight: 600; }

/* Tablet and up */
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats li { border-bottom: 0; border-right: 1px solid var(--line); }
  .stats li:last-child { border-right: 0; }
  .features { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .hood { grid-template-columns: 1fr 1fr; }
  .map iframe { height: 380px; }
}

/* Desktop */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .demo-bar { font-size: 13.5px; }
  .site-header { padding: 32px 16px; }
  .logo { height: 176px; }
  .sticky-bar { display: none; }
  .inline-btn { display: inline-block; }
  .facts { padding-top: 32px; }
  .facts h1 { font-size: 34px; }
  .price { font-size: 34px; }
  .nav-arrow { width: 52px; height: 52px; font-size: 36px; }
  .nav-arrow.prev { left: 20px; }
  .nav-arrow.next { right: 20px; }
  .block { padding-top: 44px; }
  .block h2 { font-size: 24px; }
}
