:root {
  --black: #101010;
  --black-soft: #191919;
  --white: #ffffff;
  --paper: #f2f0eb;
  --red: #e63946;
  --red-ink: #b72130;
  --gray: #a8a8a8;
  --line: #353535;
  --font-display: "Syne", Arial, sans-serif;
  --font-body: "Albert Sans", Arial, sans-serif;
  --container: 82rem;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --space: clamp(4.5rem, 9vw, 9rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 20rem; overflow-x: hidden;
  overflow-x: clip; /* avoid body becoming a scroll container (Safari scroll clamp) */ background: var(--black);
  color: var(--white); font-family: var(--font-body); line-height: 1.5;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
a { color: inherit; }
p, h1, h2, h3, ol { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 0.94; letter-spacing: -0.055em; }
h1 { font-size: clamp(3.7rem, 14vw, 10rem); }
h2 { font-size: clamp(3rem, 9vw, 7.5rem); }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000; padding: 0.75rem 1rem;
  background: var(--red); color: var(--black); font-weight: 600; text-decoration: none; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - (var(--gutter) * 2)), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space); }
.index { margin-bottom: 1.5rem; color: var(--red); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }

.site-header {
  position: absolute; z-index: 300; top: 0; left: 0; display: flex; width: 100%;
  align-items: center; justify-content: space-between; padding: 1rem var(--gutter);
  background: rgba(16,16,16,0.84); color: var(--white); backdrop-filter: blur(8px);
}
.wordmark {
  position: relative; z-index: 302; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -0.085em; line-height: 1; text-decoration: none;
}
.wordmark span { color: var(--red); }
.menu-toggle {
  position: relative; z-index: 302; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem;
  border: 1px solid rgba(255,255,255,0.55); background: rgba(16,16,16,0.45);
  color: var(--white); font-weight: 600; cursor: pointer; backdrop-filter: blur(6px);
}
.menu-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.menu-icon { display: grid; gap: 0.34rem; }
.menu-icon i { display: block; width: 1.2rem; height: 2px; background: currentColor; transition: transform 180ms ease; }
.menu-toggle[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(0.18rem) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-0.18rem) rotate(-45deg); }
.drawer {
  position: fixed; z-index: 300; inset: 0; display: grid; visibility: hidden; overflow-y: auto;
  background: var(--red); opacity: 0; transform: translateY(-1rem); transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}
.drawer.is-open { visibility: visible; opacity: 1; transform: none; }
.drawer :focus-visible { outline-color: var(--black); }
.drawer-inner { display: flex; width: min(calc(100% - (var(--gutter) * 2)), 74rem); min-height: 100%; margin: auto; padding-block: 7rem 3rem; flex-direction: column; justify-content: center; }
.drawer-kicker { color: var(--black); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.drawer-inner > a {
  display: flex; align-items: baseline; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(16,16,16,0.28);
  color: var(--black); font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.06em; text-decoration: none;
}
.drawer-inner > a span { width: 1.4rem; font-family: var(--font-body); font-size: 0.62rem; font-weight: 600; letter-spacing: 0; }
.drawer-contact { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 2rem; color: var(--black); }
.drawer-contact a { width: fit-content; font-size: 0.85rem; font-weight: 600; }

.hero { position: relative; display: grid; min-height: 100svh; align-items: end; overflow: hidden; background: #31302d; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.08) 42%, rgba(0,0,0,0.84)); }
.hero-copy { position: relative; z-index: 2; width: min(calc(100% - (var(--gutter) * 2)), var(--container)); margin-inline: auto; padding-bottom: clamp(2rem, 6vw, 5rem); }
.hero-copy > p { margin-bottom: 1rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; }
.hero-copy h1 { position: relative; max-width: 70rem; margin-bottom: 1.75rem; text-transform: lowercase; }
.hero-copy h1::after { display: block; width: min(16rem, 65vw); height: 0.45rem; margin-top: 0.35rem; background: var(--red); content: ""; }
.hero-copy a { font-size: 0.82rem; font-weight: 600; text-underline-offset: 0.35rem; }

.properties { overflow-x: clip; background: var(--paper); color: var(--black); }
.properties .index { color: var(--red-ink); }
.section-header { display: grid; gap: 0.5rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-header h2 { margin-bottom: 1.3rem; }
.section-header > div > p { max-width: 35rem; margin-bottom: 0; color: #555; }
.listing-rail {
  display: flex; width: calc(100% + var(--gutter)); gap: 1rem; overflow-x: auto; overscroll-behavior-inline: contain;
  padding: 0 var(--gutter) 1.2rem 0; scroll-padding-left: 0; scroll-snap-type: x mandatory;
  scrollbar-color: var(--red) #d3d0ca; scrollbar-width: thin;
}
.property-card {
  display: flex; flex: 0 0 min(82vw, 27rem); min-width: 0; min-height: 31rem; flex-direction: column;
  padding-bottom: 0.25rem; border-bottom: 2px solid var(--black); scroll-snap-align: start;
}
.property-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #c9c6c0; }
.property-image img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 52%; transition: filter 250ms ease, transform 450ms ease; }
.property-image--golden img { object-position: 44% 47%; }
.property-image--twilight img { object-position: 60% center; }
.property-card:hover .property-image img { filter: saturate(0.75); transform: scale(1.02); }
.property-image > span { position: absolute; top: 0; right: 0; padding: 0.48rem 0.7rem; background: var(--red); color: var(--black); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.property-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem; align-items: start; margin-top: 1.2rem; }
.property-meta p { margin-bottom: 0.25rem; color: #656565; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.property-meta h3 { margin-bottom: 0.5rem; font-size: clamp(1.55rem, 5vw, 2.35rem); line-height: 1; }
.property-meta .price { color: var(--black); font-size: 0.82rem; letter-spacing: 0; }
.property-card .specs { margin-bottom: 1rem; color: #595959; font-size: 0.75rem; }
.property-card > a { width: fit-content; margin-top: auto; color: var(--black); font-size: 0.75rem; font-weight: 600; text-underline-offset: 0.3rem; }
.scroll-note { margin: 1rem 0 0; color: #676767; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }

.neighborhoods { display: grid; }
.neighborhood-intro { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; padding: var(--space) var(--gutter); background: var(--red); color: var(--black); }
.neighborhood-intro .index { color: var(--black); }
.neighborhood-intro h2 { margin-bottom: 2rem; font-size: clamp(2.9rem, 9vw, 7.3rem); }
.neighborhood-intro > p:not(.index) { max-width: 32rem; margin-bottom: 2rem; }
.red-link { width: fit-content; font-weight: 600; text-underline-offset: 0.4rem; }
.neighborhood-list { margin: 0; padding: var(--space) var(--gutter); list-style: none; background: var(--black); }
.neighborhood-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.75rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.neighborhood-list li > span { color: var(--red); font-size: 0.65rem; }
.neighborhood-list h3 { margin-bottom: 0.5rem; font-size: clamp(2rem, 7vw, 4rem); }
.neighborhood-list p { margin-bottom: 0; color: var(--gray); font-size: 0.75rem; }
.neighborhood-list b { display: none; color: #777; font-size: 0.64rem; font-weight: 500; letter-spacing: 0.08em; }

.stats-strip { padding-block: clamp(3rem, 6vw, 5rem); border-block: 1px solid var(--line); background: var(--black-soft); }
.stats-grid { display: grid; width: min(calc(100% - (var(--gutter) * 2)), var(--container)); margin-inline: auto; gap: 2.3rem; }
.stat strong { display: block; color: var(--white); font-family: var(--font-display); font-size: clamp(2.9rem, 9vw, 6.5rem); line-height: 0.9; letter-spacing: -0.065em; }
.stat .unit { color: var(--red); }
.stat p { margin: 0.7rem 0 0; color: var(--gray); font-size: 0.68rem; letter-spacing: 0.11em; text-transform: uppercase; }

.contact { display: grid; padding: var(--space) var(--gutter); background: var(--black); }
.contact-copy { align-self: start; }
.contact-copy h2 { margin-bottom: 2rem; }
.contact-copy h2 em { color: var(--red); font-style: normal; }
.contact-copy > p:last-child { max-width: 30rem; color: var(--gray); }
.contact-form { display: grid; align-self: stretch; gap: 1.3rem; padding-top: 2.5rem; }
.field { display: grid; gap: 0.4rem; }
label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
input, textarea { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid #777; border-radius: 0; background: transparent; color: var(--white); padding: 0.75rem 0; }
textarea { resize: vertical; }
.contact-form button { display: flex; min-height: 3.5rem; align-items: center; justify-content: space-between; margin-top: 0.7rem; padding: 0.8rem 1rem; border: 0; background: var(--red); color: var(--black); font-weight: 600; cursor: pointer; }
.contact-form button:hover { background: #f0525e; }
.form-status { min-height: 1.5em; margin: 0; color: #ff7b85; font-size: 0.8rem; }
.site-footer { display: grid; gap: 1rem; padding: 2rem var(--gutter); border-top: 1px solid var(--line); background: var(--black); }
.wordmark--footer { font-size: 2rem; }
.site-footer p, .site-footer > a:last-child { margin: 0; color: var(--gray); font-size: 0.75rem; }

.motion-ready .reveal { opacity: 0; transform: translateY(1.4rem); transition: opacity 600ms ease, transform 600ms ease; transition-delay: calc(var(--delay, 0) * 85ms); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 42rem) {
  .section-header { grid-template-columns: 8rem minmax(0, 1fr); }
  .listing-rail { gap: 1.5rem; }
  .property-card { flex-basis: min(60vw, 28rem); }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat + .stat { border-left: 1px solid var(--line); padding-left: clamp(1rem, 3vw, 3rem); }
  .site-footer { grid-template-columns: 1fr auto auto; align-items: end; }
}

@media (min-width: 60rem) {
  .site-header { padding-top: 1.5rem; }
  .hero-copy { padding-bottom: 4rem; }
  .neighborhoods { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: stretch; }
  .neighborhood-intro, .neighborhood-list { height: 100%; padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); }
  .neighborhood-intro { padding-right: clamp(3rem, 7vw, 7rem); padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2)); }
  .neighborhood-list { padding-right: max(var(--gutter), calc((100vw - var(--container)) / 2)); padding-left: clamp(3rem, 6vw, 6rem); }
  .neighborhood-list li { grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: end; }
  .neighborhood-list b { display: block; }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.7fr); gap: clamp(4rem, 10vw, 10rem); padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); }
  .contact-form { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Standard: back-to-top button with scroll-progress ring */
.btt-button {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(17, 17, 17, 0.85); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.btt-button.btt-visible { opacity: 1; visibility: visible; transform: none; }
.btt-button:focus-visible { outline: 3px solid #e63946; outline-offset: 3px; }
.btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.btt-ring circle { fill: none; stroke-width: 3; }
.btt-ring-track { stroke: rgba(255, 255, 255, 0.22); }
.btt-ring-fill { stroke: #e63946; stroke-dasharray: 125.66; stroke-dashoffset: 125.66; stroke-linecap: round; }
.btt-arrow { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .btt-button { transition: none; } }
