/* ==========================================================================
   FOUNDRY — a single-listing real estate template
   Design language: architectural blueprint × industrial loft
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Work+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* palette */
  --ink: #1b1a17;
  --ink-soft: #2b2924;
  --concrete: #ede9e0;
  --concrete-dark: #ddd7c9;
  --paper: #f8f6f1;
  --brass: #b08d57;
  --brass-bright: #c9a06a;
  --rust: #8b4a3b;
  --steel: #5b6670;
  --line: rgba(27, 26, 23, 0.14);
  --line-on-ink: rgba(248, 246, 241, 0.18);

  /* type */
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --content-max: 1180px;
  --edge: clamp(20px, 5vw, 64px);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

body {
  font-family: var(--f-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }

.section {
  padding: clamp(40px, 6vw, 80px) var(--edge);
}
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
}

/* dimension-line divider — reads like an architectural measurement */
.dim-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px) var(--edge);
  color: var(--steel);
}
.dim-divider::before,
.dim-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.dim-divider span {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--edge);
  color: var(--paper);
  transition: background-color 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.is-scrolled {
  padding: 14px var(--edge);
  background: rgba(27, 26, 23, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-on-ink);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-mark {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand-mark em { font-style: normal; font-weight: 800; color: var(--brass-bright); }
.brand-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 246, 241, 0.55);
  display: none;
}
@media (min-width: 640px) { .brand-sub { display: inline; } }

.main-nav { display: none; align-items: center; gap: 36px; }
@media (min-width: 900px) { .main-nav { display: flex; } }
.main-nav a {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.main-nav a:hover { border-color: var(--brass-bright); color: var(--brass-bright); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-phone {
  display: none;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
@media (min-width: 640px) { .header-phone { display: inline; } }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
.menu-toggle span { width: 22px; height: 1px; background: var(--paper); transition: transform 0.3s ease, opacity 0.3s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 0 var(--edge);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav a {
  font-family: var(--f-display);
  font-size: 32px;
  color: var(--paper);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink);
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
}
.hero-art svg { width: 100%; height: 100%; }
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,26,23,0.38) 0%, rgba(27,26,23,0.5) 45%, rgba(27,26,23,0.96) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--edge) 56px;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  color: var(--paper);
}
.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(42px, 8vw, 96px);
  font-weight: 700;
  max-width: 16ch;
}
.hero-title .line2 { display: block; font-style: normal; color: var(--concrete-dark); font-weight: 500; }
.hero-address {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(248, 246, 241, 0.75);
}

/* spec plate — signature component */
.spec-plate {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-on-ink);
  border: 1px solid var(--line-on-ink);
  position: relative;
  max-width: 640px;
}
@media (min-width: 640px) { .spec-plate { grid-template-columns: repeat(4, 1fr); } }
.spec-plate::before,
.spec-plate::after,
.spec-plate .rivet-a,
.spec-plate .rivet-b {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
}
.spec-plate::before { top: 7px; left: 7px; }
.spec-plate::after { top: 7px; right: 7px; }
.spec-plate .rivet-a { bottom: 7px; left: 7px; }
.spec-plate .rivet-b { bottom: 7px; right: 7px; }
.spec-cell {
  background: rgba(27, 26, 23, 0.55);
  padding: 18px 20px;
}
.spec-cell .num {
  font-family: var(--f-display);
  font-size: 26px;
  color: var(--paper);
}
.spec-cell .label {
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 246, 241, 0.55);
}

.plate-light { background: var(--concrete); border-color: var(--line); }
.plate-light::before, .plate-light::after, .plate-light .rivet-a, .plate-light .rivet-b { background: var(--brass); }
.plate-light .spec-cell { background: var(--paper); }
.plate-light .spec-cell .num { color: var(--ink); }
.plate-light .spec-cell .label { color: var(--steel); }

.scroll-cue {
  position: absolute;
  right: var(--edge);
  bottom: 28px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 10px;
  color: rgba(248, 246, 241, 0.6);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (min-width: 900px) { .scroll-cue { display: flex; } }
.scroll-cue .stem {
  width: 1px; height: 34px;
  background: linear-gradient(var(--brass-bright), transparent);
  animation: stem-pulse 2.2s ease-in-out infinite;
}
@keyframes stem-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ==========================================================================
   OVERVIEW / DESCRIPTION
   ========================================================================== */
.overview {
  display: grid;
  gap: 56px;
}
@media (min-width: 900px) {
  .overview { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}
.overview h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 24px; }
.overview p { font-size: 16px; line-height: 1.8; color: var(--ink-soft); max-width: 56ch; }
.overview p + p { margin-top: 18px; }

.fact-plate {
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
}
.fact-plate::before, .fact-plate::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  top: 10px;
}
.fact-plate::before { left: 10px; }
.fact-plate::after { right: 10px; }
.fact-plate-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.fact-row:last-child { border-bottom: 0; }
.fact-row dt { color: var(--steel); }
.fact-row dd { font-family: var(--f-mono); font-weight: 500; }

/* ==========================================================================
   FEATURE BAND (neighborhood highlight, dark)
   ========================================================================== */
.feature-band {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.feature-band-art {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}
.feature-band-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.feature-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
}
@media (min-width: 860px) {
  .feature-band-inner { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
}
.feature-band h2 { font-size: clamp(28px, 4vw, 42px); }
.feature-band .eyebrow { color: var(--brass-bright); }
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 28px;
}
.feature-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-on-ink);
}
.feature-list li .tick { color: var(--brass-bright); font-family: var(--f-mono); font-size: 12px; }

/* ==========================================================================
   FLOOR PLAN INDEX (signature — legitimate numbered sequence)
   ========================================================================== */
.plan-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 900px) {
  .plan-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}
.plan-art {
  border: 1px solid var(--line);
  padding: clamp(16px, 3vw, 36px);
  background: var(--concrete);
}
.plan-art img { width: 100%; height: auto; display: block; }
.room-index li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.room-index li:first-child { border-top: 1px solid var(--line); }
.room-index .idx {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--brass);
}
.room-index .name {
  font-family: var(--f-display);
  font-size: 19px;
}
.room-index .dim {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--steel);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .room-index li {
    grid-template-columns: 32px 1fr;
    row-gap: 6px;
  }
  .room-index .dim {
    grid-column: 2;
    white-space: normal;
  }
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--paper);
  overflow: hidden;
}
.gallery-frame svg { width: 100%; height: 100%; }
.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-frame:hover .gallery-photo { transform: scale(1.04); }
.gallery-frame .scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(27,26,23,0.75));
  pointer-events: none;
}
.gallery-frame .scrim + figcaption,
.gallery-frame:has(.scrim) figcaption {
  color: var(--concrete);
}
.gallery-frame .corner {
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--brass-bright);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-frame:hover .corner { opacity: 1; }
.corner.tl { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; transform: translate(4px,4px); }
.gallery-frame:hover .corner.tl { transform: translate(0,0); }
.corner.br { bottom: 8px; right: 8px; border-bottom: 1px solid; border-right: 1px solid; transform: translate(-4px,-4px); }
.gallery-frame:hover .corner.br { transform: translate(0,0); }
.gallery-frame figcaption {
  position: absolute;
  left: 10px; bottom: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ==========================================================================
   VIDEO
   ========================================================================== */
.video-frame {
  position: relative;
  border: 1px solid var(--line);
  aspect-ratio: 16/9;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ==========================================================================
   NEIGHBORHOOD / LOCATION
   ========================================================================== */
.location-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) { .location-grid { grid-template-columns: 1fr 1fr; } }
.map-frame {
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  background: var(--concrete);
  position: relative;
  overflow: hidden;
}
.map-frame svg { width: 100%; height: 100%; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.15) contrast(1.05); }
.walk-plates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.walk-plate {
  border: 1px solid var(--line);
  padding: 16px 10px;
  text-align: center;
}
.walk-plate .score {
  font-family: var(--f-display);
  font-size: 30px;
  color: var(--brass);
}
.walk-plate .label {
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  background: var(--concrete);
}
.contact-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 0.8fr; } }

.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 13px 14px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.field textarea { resize: vertical; min-height: 110px; }

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  padding: 15px 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease;
}
.submit-btn:hover { background: var(--brass); }
.submit-btn svg { width: 14px; height: 14px; }

.form-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--steel);
  display: none;
}
.form-note.is-visible { display: block; }

.agent-plate {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px;
  position: relative;
}
.agent-plate::before, .agent-plate::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  top: 12px;
}
.agent-plate::before { left: 12px; }
.agent-plate::after { right: 12px; }
.agent-portrait {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink);
}
.agent-portrait svg { width: 100%; height: 100%; }
.agent-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agent-name { font-family: var(--f-display); font-size: 22px; margin-top: 16px; }
.agent-role { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--steel); margin-top: 2px; }
.agent-contact {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 13px;
  display: grid;
  gap: 8px;
}
.agent-contact a:hover { color: var(--brass); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(248, 246, 241, 0.65);
  padding: 40px var(--edge) 28px;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-mark { font-family: var(--f-display); color: var(--paper); font-size: 18px; }
.footer-socials { display: flex; gap: 18px; }
.footer-socials a { color: rgba(248,246,241,0.65); transition: color 0.2s ease; }
.footer-socials a:hover { color: var(--brass-bright); }
.footer-socials svg { width: 16px; height: 16px; }
.footer-legal {
  max-width: var(--content-max);
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-on-ink);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(248,246,241,0.4);
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
