/* ============================================================
   298 Convent Avenue — Shared styles
   Mobile-first; desktop layout kicks in at 720px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=DM+Serif+Display&display=swap');

:root {
  --blue: #9AADBD;
  --rose: #C4A49B;
  --sand: #D1C6AD;
  --sage: #A8B5A0;
  --ink: #3A3A3A;
  --ink-light: #7A7A7A;
  --ink-faint: #A8A49C;
  --bg: #FAFAF8;
  --white: #FFFFFF;
  --dotted: 1px dotted #C8C4BC;
  --dotted-heavy: 1px dotted #A8A49C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

/* ── Page container ─────────────────────────────────────────── */
.page {
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  position: relative;
}

@media (min-width: 720px) {
  body {
    background: linear-gradient(180deg, #F4F2EC 0%, var(--bg) 600px);
  }
  .page {
    max-width: 1080px;
    margin: 32px auto;
    box-shadow: 0 4px 40px rgba(58,58,58,0.06);
    border-radius: 8px;
    overflow: hidden;
  }
}

/* ── Top nav (desktop hub link) ─────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: var(--dotted);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topnav-brand {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.topnav-brand .num { color: var(--rose); }
.topnav-links {
  display: none;  /* hidden on mobile — page is short, scrolling handles wayfinding */
  gap: 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}
.topnav-links a {
  text-decoration: none;
  color: var(--ink-light);
  transition: color 0.15s;
}
.topnav-links a:hover { color: var(--ink); }

@media (min-width: 720px) {
  .topnav { padding: 18px 40px; }
  .topnav-brand { font-size: 18px; }
  .topnav-links { display: flex; gap: 28px; font-size: 12px; }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--sand);
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--white);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 24px 28px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  color: var(--white);
}
.hero-overlay h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.hero-overlay .tagline {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.92;
}

@media (min-width: 720px) {
  .hero {
    aspect-ratio: 21/9;
    max-height: 70vh;
  }
  .hero-badge {
    bottom: 28px;
    left: 40px;
    padding: 9px 18px;
    font-size: 12px;
  }
  .hero-overlay {
    padding: 80px 40px 40px;
  }
  .hero-overlay h1 { font-size: 56px; }
  .hero-overlay .tagline { font-size: 15px; margin-top: 12px; }
}

/* ── Sections ───────────────────────────────────────────────── */
section {
  padding: 24px;
  border-bottom: var(--dotted);
}
section:last-of-type { border-bottom: none; }

@media (min-width: 720px) {
  section { padding: 40px 56px; }
}

/* Address (just below hero on unit pages) */
.address {
  padding: 28px 24px 8px;
  border-bottom: none;
}
.address h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.address .neighborhood {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
}

@media (min-width: 720px) {
  .address {
    padding: 48px 56px 8px;
  }
  .address h1 { font-size: 40px; }
  .address .neighborhood { font-size: 14px; margin-top: 10px; }
}

/* Quick facts */
.quick-facts {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px 20px;
  border-bottom: var(--dotted);
}
.fact { text-align: center; flex: 1; }
.fact + .fact { border-left: var(--dotted); }
.fact-value {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  color: var(--ink);
}
.fact-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  margin-top: 3px;
}

@media (min-width: 720px) {
  .quick-facts { padding: 28px 56px 32px; }
  .fact-value { font-size: 32px; }
  .fact-label { font-size: 11px; margin-top: 6px; }
}

/* Description */
.description p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 300;
}
@media (min-width: 720px) {
  .description p { font-size: 17px; max-width: 720px; }
}

/* Section label */
.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  margin-bottom: 14px;
  font-weight: 500;
}
@media (min-width: 720px) {
  .section-label { font-size: 11px; margin-bottom: 20px; }
}

/* Detail rows */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: var(--dotted);
}
.detail-row:last-child { border-bottom: none; }
.detail-key {
  font-size: 13px;
  color: var(--ink-light);
  font-weight: 300;
}
.detail-val {
  font-size: 13px;
  color: var(--ink);
  font-weight: 400;
  text-align: right;
}
@media (min-width: 720px) {
  .detail-row { padding: 12px 0; }
  .detail-key, .detail-val { font-size: 14px; }
}

/* Pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 7px 14px;
  border: var(--dotted-heavy);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .pill { font-size: 13px; padding: 8px 16px; }
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 3px;
}
.gallery-row-2 { grid-template-columns: 1fr 1fr; }
.gallery-row-1 { grid-template-columns: 1fr; }
.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--sand);
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(154,173,189,0.15);
  touch-action: manipulation;
  transition: opacity 0.15s;
}
.gallery-img:hover { opacity: 0.92; }
.gallery-grid + .gallery-grid { margin-top: 3px; }
.gallery-caption {
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  margin-top: 14px;
  text-align: center;
}

@media (min-width: 720px) {
  .gallery-grid { gap: 6px; }
  .gallery-grid + .gallery-grid { margin-top: 6px; }
  .gallery-caption { font-size: 12px; margin-top: 20px; }
}

/* Neighborhood band */
.neighborhood-band {
  background: linear-gradient(135deg,
    rgba(154,173,189,0.12) 0%,
    rgba(168,181,160,0.12) 50%,
    rgba(209,198,173,0.12) 100%);
}
.neighborhood-band p {
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--ink);
}
@media (min-width: 720px) {
  .neighborhood-band p { font-size: 17px; max-width: 720px; }
}

/* Transit */
.transit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.transit-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
}
.transit-badge.a { background: #0039A6; }
.transit-badge.b { background: #FF6319; }
.transit-badge.c { background: #0039A6; }
.transit-badge.d { background: #FF6319; }
.transit-badge.one { background: #EE352E; }
.transit-note {
  font-size: 12px;
  color: var(--ink-light);
}

/* Contact */
.contact-section {
  text-align: center;
  padding: 36px 24px 44px;
  background: var(--white);
}
.contact-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  color: var(--ink);
}
.contact-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-light);
  margin-top: 4px;
}
.contact-links {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  min-height: 48px;
  border: var(--dotted-heavy);
  border-radius: 24px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  min-width: 240px;
  justify-content: center;
  background: var(--white);
  transition: background 0.15s, border-color 0.15s;
}
.contact-link:hover {
  background: rgba(154,173,189,0.08);
  border-color: var(--ink-light);
}
.contact-link:active { background: rgba(154,173,189,0.16); }
.contact-icon { font-size: 15px; opacity: 0.6; }

@media (min-width: 720px) {
  .contact-section { padding: 56px 56px 72px; }
  .contact-name { font-size: 26px; }
  .contact-links {
    flex-direction: row;
    justify-content: center;
    margin-top: 28px;
  }
  .contact-link { min-width: 200px; }
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px 24px 28px;
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.06em;
}
.footer .dot { margin: 0 6px; opacity: 0.4; }

/* ── Two-column desktop layout (unit page) ─────────────────── */
.unit-grid {
  display: block;
}
@media (min-width: 720px) {
  .unit-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
  }
  .unit-grid > .unit-grid-left {
    border-right: var(--dotted);
  }
  .unit-grid > .unit-grid-right {
    background: var(--bg);
  }
  .unit-grid section { border-bottom: var(--dotted); }
  .unit-grid .gallery { padding: 24px 32px; }
}

/* ── Building hub: availability cards ──────────────────────── */
.avail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (min-width: 720px) {
  .avail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 12px;
  }
}

.unit-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: var(--dotted-heavy);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.unit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(58,58,58,0.08);
  border-color: var(--rose);
}
.unit-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--sand);
}
.unit-card-body {
  padding: 18px 20px 22px;
}
.unit-card-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rose);
  font-weight: 500;
}
.unit-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.2;
}
.unit-card-meta {
  font-size: 13px;
  color: var(--ink-light);
  margin-top: 8px;
  letter-spacing: 0.02em;
}
.unit-card-cta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--dotted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.unit-card-cta::after {
  content: "→";
  opacity: 0.5;
}

.unit-card.placeholder {
  background: rgba(209,198,173,0.18);
  cursor: default;
}
.unit-card.placeholder:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ink-faint);
}
.unit-card.placeholder .unit-card-img {
  background: linear-gradient(135deg, rgba(209,198,173,0.4), rgba(168,181,160,0.3));
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', Georgia, serif;
  color: rgba(58,58,58,0.35);
  font-size: 28px;
}
.unit-card.placeholder .unit-card-cta::after { content: ""; }

/* ── Building story (hub page) ─────────────────────────────── */
.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 720px) {
  .story {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}
.story-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 300;
}
.story-text p + p { margin-top: 14px; }
@media (min-width: 720px) {
  .story-text p { font-size: 16px; }
}
.story-img {
  width: 100%;
  border-radius: 6px;
  background: var(--sand);
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  background: none;
  cursor: pointer;
  padding: 12px;
  min-height: 44px;
}
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 300;
}

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