/* =========================================================
   The Brixton — Editorial real estate site
   ========================================================= */

:root {
  --bg:        #F6F2EC;     /* warm off-white */
  --bg-alt:    #EFE9DF;     /* slightly warmer panel */
  --ink:       #1B1A18;     /* near-black */
  --ink-soft:  #4A4842;     /* secondary text */
  --rule:      #D9D2C4;     /* hairline rule */
  --brass:     #A38456;     /* warm metallic accent */
  --brass-dk:  #8C6F45;
  --navy:      #122A3F;     /* CTA pill — matches the original site */
  --header-bg: #0F0F0F;     /* solid black header */
  --header-h:  84px;

  --serif: 'Fraunces', 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1240px;
  --pad-x: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 10vw, 140px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brass); }

/* ---------- Typography ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.05;
  margin: 0 0 .4em;
  font-size: clamp(2.2rem, 5vw, 4rem);
}
h2.display { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 .4em;
  letter-spacing: -0.005em;
}
.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.65;
}
.kicker, .eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-dk);
  margin-bottom: 1.5em;
}

/* ---------- Layout helpers ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.section-narrow {
  max-width: 880px;
}
.section-head { max-width: 720px; margin-bottom: 60px; }
.section-head-centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head-centered .lede { margin-left: auto; margin-right: auto; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  height: var(--header-h);
  background: var(--header-bg);
  transition: height .25s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  height: 64px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}

.brand { display: inline-flex; align-items: center; }
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  color: #fff;
}
.brand-the {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  margin-left: 2px;
  color: #fff;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
.site-header.scrolled .brand-name { font-size: 1.35rem; }

.site-nav { display: flex; gap: 30px; align-items: center; }
.site-nav a {
  font-size: 13px;
  letter-spacing: 0.05em;
  font-weight: 300;
  color: rgba(255,255,255,.92);
  position: relative;
}
.site-nav a:hover { color: #fff; }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: #fff;
  margin: 6px 0;
  transition: transform .25s ease, opacity .2s ease;
}

/* ---------- Hero (split layout) ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 5fr) 7fr;
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  background: var(--bg);
  overflow: hidden;
}

.hero-copy {
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vw, 110px) clamp(28px, 6vw, 90px);
  background: var(--bg);
}
.hero-copy-inner { max-width: 540px; }
.hero-copy .eyebrow { color: var(--brass-dk); }
.hero-copy .display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  color: var(--ink);
}
.hero-sub {
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 50ch;
  font-weight: 400;
}

.hero-cta {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 16px 38px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: background .25s ease, transform .25s ease;
}
.hero-cta:hover {
  background: #1A3A57;
  color: #fff;
  transform: translateY(-1px);
}

.hero-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 480px;
  transform: scale(1.04);
  animation: heroPan 22s ease-out forwards;
}
@keyframes heroPan {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.4));
  z-index: 3;
}
.scroll-cue span {
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue {
  0%,100% { transform: translateY(0); opacity: 0; }
  20%     { opacity: 1; }
  100%    { transform: translateY(20px); opacity: 0; }
}

/* ---------- Meta strip ---------- */
.meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: var(--maxw);
  margin: 0 auto;
}
.meta-strip > div {
  padding: 36px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-right: 1px solid var(--rule);
}
.meta-strip > div:last-child { border-right: 0; }
.meta-num {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--ink);
}
.meta-label {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Image break ---------- */
.image-break {
  width: 100%;
  height: clamp(320px, 50vh, 560px);
  overflow: hidden;
}
.image-break img { width: 100%; height: 100%; object-fit: cover; }
.image-break-tall { height: clamp(420px, 70vh, 720px); }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.feature {
  padding: 44px 32px 44px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding-left: 32px;
  position: relative;
}
.feature:nth-child(3n) { border-right: 0; padding-right: 0; }
.feature-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--brass);
  font-size: 1rem;
  margin-bottom: 18px;
}
.feature h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .98rem;
  line-height: 1.6;
}

/* ---------- Gallery / Masonry ---------- */
.gallery-section {
  padding: var(--section-y) var(--pad-x);
  background: var(--bg-alt);
}
.gallery-section .section-head { margin-bottom: 56px; }

.masonry {
  column-count: 3;
  column-gap: 14px;
  max-width: 1480px;
  margin: 0 auto;
}
.masonry .m-item {
  break-inside: avoid;
  margin-bottom: 14px;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  background: #ddd;
}
.masonry .m-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .8s ease, filter .4s ease;
  filter: saturate(.96);
}
.masonry .m-item:hover img {
  transform: scale(1.03);
  filter: saturate(1.05);
}

/* ---------- Homes ---------- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}
.home-card {
  background: #fff;
  overflow: hidden;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: transform .4s ease, box-shadow .4s ease;
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.18);
}
.home-img {
  height: 320px;
  background-size: cover;
  background-position: center;
}
.home-body {
  padding: 28px 30px 32px;
}
.home-addr {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass-dk);
  display: block;
  margin-bottom: 10px;
}
.home-card h3 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.home-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .98rem;
}

/* ---------- Floor plan ---------- */
.floorplan-section {
  background: var(--ink);
  color: #EFE9DF;
  padding: var(--section-y) var(--pad-x);
}
.floorplan-section .display { color: #EFE9DF; }
.floorplan-section .lede { color: rgba(239, 233, 223, 0.78); }
.floorplan-section .kicker { color: var(--brass); }

.floorplan-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}
.floorplan-image {
  display: block;
  position: relative;
  background: #fff;
  padding: 28px;
  transition: transform .4s ease;
}
.floorplan-image:hover { transform: translateY(-3px); }
.floorplan-image img { width: 100%; height: auto; }
.floorplan-cta {
  position: absolute;
  bottom: 16px;
  right: 24px;
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Neighbourhood ---------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 64px;
}
.amenity-col h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.amenity-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.amenity-col li {
  font-size: .96rem;
  color: var(--ink-soft);
  padding: 6px 0;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.team-card {
  background: var(--bg);
  padding: 36px 32px;
}
.team-card h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.team-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .96rem;
  line-height: 1.65;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(239,233,223,.85);
  padding: 80px var(--pad-x) 32px;
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .brand-mark {
  color: #fff;
  font-size: 1.6rem;
  display: block;
  margin-bottom: 18px;
}
.footer-brand p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 500;
}
.footer-col a {
  color: rgba(255,255,255,.78);
  font-size: .94rem;
}
.footer-col a:hover { color: var(--brass); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-bottom p {
  margin: 0;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}
.disclaimer { line-height: 1.6; max-width: 70ch; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,14,12,.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.12); }
.lb-close { top: 18px; right: 18px; font-size: 26px; }
.lb-prev  { left: 24px;  top: 50%; transform: translateY(-50%); font-size: 40px; }
.lb-next  { right: 24px; top: 50%; transform: translateY(-50%); font-size: 40px; }
.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-image {
    order: -1;
    min-height: clamp(320px, 50vh, 560px);
  }
  .hero-copy {
    padding: clamp(48px, 8vw, 90px) var(--pad-x);
  }
  .hero-copy-inner { max-width: 700px; }
  .scroll-cue { display: none; }
}

@media (max-width: 960px) {
  .site-nav { gap: 22px; }
  .site-nav a { font-size: 12px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(3n)  { border-right: 1px solid var(--rule); padding-right: 32px; }
  .feature:nth-child(2n)  { border-right: 0; padding-right: 0; }
  .home-grid { grid-template-columns: 1fr; gap: 24px; }
  .floorplan-wrap { grid-template-columns: 1fr; gap: 40px; }
  .amenity-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .masonry { column-count: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .meta-strip > div:nth-child(2) { border-right: 0; }
  .meta-strip > div:nth-child(1), .meta-strip > div:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }

  /* Mobile menu drawer */
  .site-nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--header-bg);
    padding: 16px var(--pad-x) 28px;
    box-shadow: 0 12px 30px -16px rgba(0,0,0,.4);
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .site-nav.open a {
    color: rgba(255,255,255,.92) !important;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 15px;
  }
  .site-nav.open a:last-child { border-bottom: 0; }
  .site-nav.open a::after { display: none; }
  .site-header.scrolled .site-nav.open { top: 64px; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(n) {
    border-right: 0;
    padding: 32px 0;
  }
  .amenity-grid { grid-template-columns: 1fr; gap: 36px; }
  .team-grid { grid-template-columns: 1fr; }
  .masonry { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .meta-strip > div { padding: 24px var(--pad-x); }
  .hero-copy { padding: 56px var(--pad-x); }
  .hero-copy .display { font-size: clamp(2.2rem, 9vw, 3.4rem); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

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