/* ============================================
   ENDOZI DESIGN SYSTEM — Shared Styles
   ============================================ */

:root {
  --bg: #faf8f4;
  --bg-alt: #f3eee5;
  --surface: #ffffff;
  --ink: #1a1814;
  --ink-soft: #4d4940;
  --ink-muted: #8a857a;
  --line: #e7e1d4;
  --accent: #2d5f3f;
  --accent-soft: #e8f0e9;
  --accent-ink: #1a3d28;
  --warm: #c87852;
  --warm-soft: #f7eae0;
  --warning: #b8860b;
  --warning-soft: #faf3dc;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.eyebrow { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-muted); }

/* ============================================
   BRAND PORTAL (endozi.com root)
   ============================================ */

.brand-portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.portal-header {
  text-align: center;
  margin-bottom: 56px;
}

.logo {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.portal-tagline {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 12px;
}
.portal-tagline strong { font-weight: 600; }

.portal-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  width: 100%;
}

@media (max-width: 768px) {
  .brand-grid { grid-template-columns: 1fr; max-width: 400px; }
  .brand-portal { padding: 48px 20px; }
}

.brand-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  cursor: pointer;
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,24,20,0.08), 0 4px 12px rgba(26,24,20,0.04);
  border-color: transparent;
}

.brand-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.brand-card--homes .brand-card__icon { background: var(--accent-soft); color: var(--accent); }
.brand-card--designs .brand-card__icon { background: var(--warm-soft); color: var(--warm); }
.brand-card--studios .brand-card__icon { background: #eee8f5; color: #6366f1; }

.brand-card__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.brand-card__name {
  font-size: 28px;
  margin-bottom: 12px;
}

.brand-card__desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.brand-card__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-card__link .arrow {
  transition: transform 0.2s;
}
.brand-card:hover .brand-card__link .arrow {
  transform: translateX(4px);
}
.brand-card--homes:hover .brand-card__link { color: var(--accent); }
.brand-card--designs:hover .brand-card__link { color: var(--warm); }
.brand-card--studios:hover .brand-card__link { color: #6366f1; }

.portal-footer {
  margin-top: 64px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.portal-footer__contact {
  margin-top: 4px;
  color: var(--ink-soft);
}

/* ============================================
   HOMES SHOWCASE (endozi.com/homes)
   ============================================ */

.nav-pub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-pub .logo { font-size: 22px; }
.nav-pub .logo .slash { color: var(--ink-muted); margin: 0 2px; }
.nav-pub .logo em { font-style: italic; color: var(--ink-muted); font-weight: 400; }

.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.nav-links a { cursor: pointer; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-ink); }

.nav-burger { display: none; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 640px) {
  .nav-pub { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-image {
  width: 100%;
  height: 480px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,24,20,0) 40%, rgba(26,24,20,0.65));
}
@media (max-width: 640px) { .hero-image { height: 320px; } }

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 40px;
  z-index: 2;
  color: #faf8f4;
}
@media (max-width: 640px) { .hero-content { padding: 28px 20px; } }

.hero-content .eyebrow { color: rgba(250,248,244,0.7); }
.hero-content h1 { font-size: 48px; margin-top: 8px; color: #faf8f4; }
.hero-content h1 em { font-style: italic; font-weight: 400; }
@media (max-width: 640px) { .hero-content h1 { font-size: 30px; } }

.hero-sub {
  font-size: 15px;
  color: rgba(250,248,244,0.8);
  max-width: 560px;
  margin-top: 16px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  align-items: center;
}
.hero-meta .stat strong { font-family: var(--serif); font-size: 28px; display: block; color: #faf8f4; }
.hero-meta .stat span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: rgba(250,248,244,0.6); }
.hero-meta .divider { width: 1px; height: 40px; background: rgba(250,248,244,0.2); }
@media (max-width: 640px) {
  .hero-meta .stat strong { font-size: 22px; }
  .hero-meta { gap: 16px; }
}

.available-pill {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  background: rgba(26,24,20,0.75);
  color: var(--warm);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}
.available-pill--open { color: #4ade80; }

/* Sections */
.homes-section { padding: 64px 40px; }
@media (max-width: 640px) { .homes-section { padding: 44px 20px; } }
.homes-section + .homes-section { border-top: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: 36px; margin-top: 8px; }
@media (max-width: 640px) { .section-head h2 { font-size: 26px; } }

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 960px;
}
.about p { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.7; font-size: 15px; }
.about p strong { color: var(--ink); font-weight: 500; }
@media (max-width: 768px) { .about { grid-template-columns: 1fr; gap: 24px; } }

/* Neighborhood Grid */
.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 960px;
}
.nbh-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
.nbh-card h3 { font-size: 20px; margin: 8px 0 12px; }
.nbh-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.nbh-card.nbh-feature { grid-column: span 2; }
.nbh-list { list-style: none; font-size: 14px; color: var(--ink-soft); }
.nbh-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.nbh-list li:last-child { border: none; }
.nbh-list li strong { color: var(--ink); font-weight: 500; }
@media (max-width: 640px) {
  .neighborhood-grid { grid-template-columns: 1fr; }
  .nbh-card.nbh-feature { grid-column: span 1; }
}

/* Amenities */
.amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 960px;
  margin-bottom: 32px;
}
.amenity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}
.amenity-num {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-muted);
  width: 32px;
}
.amenity-name { font-size: 14px; font-weight: 500; }
@media (max-width: 640px) { .amenities { grid-template-columns: repeat(2, 1fr); } }

/* Section 8 Banner */
.program-banner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid #c8dcc9;
  border-radius: 12px;
  padding: 28px;
  max-width: 960px;
}
.program-banner-icon {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.program-banner h3 { font-size: 18px; margin-bottom: 8px; }
.program-banner p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* Photo Gallery */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.gallery-filter {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.gallery-filter:hover { border-color: var(--ink-muted); color: var(--ink); }
.gallery-filter.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item--portrait { aspect-ratio: 3/4; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,0.92);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(250,248,244,0.7);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  z-index: 201;
}
.lightbox-close:hover { color: #faf8f4; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250,248,244,0.1);
  border: none;
  color: rgba(250,248,244,0.7);
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.lightbox-nav:hover { background: rgba(250,248,244,0.2); color: #faf8f4; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250,248,244,0.7);
  font-size: 14px;
  text-align: center;
  max-width: 600px;
}

/* CTA Section */
.cta-section {
  background: var(--ink);
  padding: 80px 40px;
  text-align: center;
}
@media (max-width: 640px) { .cta-section { padding: 56px 24px; } }
.cta-section h2 { font-size: 42px; margin-bottom: 20px; color: var(--bg); }
@media (max-width: 640px) { .cta-section h2 { font-size: 28px; } }
.cta-section p { color: #c8b8a0; max-width: 540px; margin: 0 auto 36px; font-size: 16px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--warm);
  color: #1a1814;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,120,82,0.3); }

/* Footer */
.homes-footer {
  padding: 32px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.homes-footer .logo { font-size: 20px; margin-bottom: 8px; }
.homes-footer p { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }

/* Map */
.map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 960px;
}
.map-wrap iframe { display: block; }
