/* ============================================================
   Ryan Nie — Main Street Realty Ltd.
   Luxury Real Estate Design System
   ============================================================ */

:root {
  /* Brand Gold — derived from Main Street Realty logo */
  --gold:            #c9a84c;
  --gold-dark:       #a88a2f;
  --gold-light:      #f5ecd7;
  --gold-glow:       rgba(201,168,76,0.15);

  /* Neutrals */
  --black:           #0f0f0f;
  --navy-dark:       #0a0e14;
  --warm-dark:       #1a1815;
  --white:           #ffffff;
  --off-white:       #faf9f7;
  --warm-gray:       #f5f3ef;
  --border:          #e5e0d5;
  --border-light:    #f0ece5;

  /* Text */
  --text-heading:    #111111;
  --text-body:       #4a4744;
  --text-muted:      #8a8780;
  --text-on-dark:    rgba(255,255,255,0.85);
  --text-on-dark-dim: rgba(255,255,255,0.55);

  /* Shadows — Stripe-inspired multi-layer */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.07);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl:       0 24px 60px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-card:     0 1px 0 rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.06);

  /* Layout */
  --max-width:       1200px;
  --nav-height:      72px;

  /* Transitions */
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: 800px; }

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-heading);
  line-height: 1.15;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

.section-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-heading {
  margin-bottom: 24px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 8px var(--gold-glow);
}
.btn-primary:hover {
  background: var(--gold-dark);
  box-shadow: 0 4px 20px rgba(168,138,47,0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-heading);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  box-shadow: var(--shadow-sm);
}

.btn-dark {
  background: var(--navy-dark);
  color: var(--white);
}
.btn-dark:hover {
  background: #151a22;
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-heading);
  padding: 12px 20px;
}
.btn-ghost:hover { color: var(--gold-dark); }

.btn-large {
  padding: 18px 36px;
  font-size: 1rem;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: transparent;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease-out);
}
.nav.scrolled .nav-logo {
  color: var(--text-heading);
}
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-on-dark);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.2s;
}
.nav.scrolled .nav-links a {
  color: var(--text-body);
}
.nav-links a:hover { color: var(--gold); }
.nav.scrolled .nav-links a:hover { color: var(--gold-dark); }
.nav-cta {
  padding: 9px 20px !important;
  background: var(--gold);
  color: var(--white) !important;
  border-radius: 6px;
  font-weight: 600 !important;
}
.nav-cta:hover {
  background: var(--gold-dark) !important;
  color: var(--white) !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.nav.scrolled .nav-toggle span {
  background: var(--text-heading);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy-dark);
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 30% 70%, rgba(201,168,76,0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-dark) 0%, #11151b 100%);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(201,168,76,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.2) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px;
  width: 100%;
}
.hero-text { max-width: 600px; }
.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-text h1 {
  color: var(--white);
  margin-bottom: 20px;
}
.hero-text .accent {
  color: var(--gold);
  position: relative;
}
.hero-text .accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  opacity: 0.3;
  border-radius: 2px;
}
.hero-description {
  font-size: 1.1rem;
  color: var(--text-on-dark-dim);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat { text-align: left; }
.hero-stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-on-dark-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-headshot-wrap {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(201,168,76,0.3);
  box-shadow: 0 0 80px rgba(201,168,76,0.1), 0 30px 60px rgba(0,0,0,0.4);
}
.hero-headshot-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), transparent 60%);
  opacity: 0.15;
  z-index: 0;
}
.hero-headshot-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-badge {
  position: absolute;
  bottom: -16px;
  right: 10px;
  background: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-heading);
  z-index: 5;
}
.hero-badge img { height: 28px; width: auto; }

/* ============================================================
   Sections
   ============================================================ */

.section {
  padding: 120px 0;
}
.section-dark {
  background: var(--warm-dark);
  color: var(--text-on-dark);
}
.section-dark h2 { color: var(--white); }
.section-dark .section-subtitle { color: var(--text-on-dark-dim); }
.section-warm {
  background: var(--off-white);
}
.section-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}
.section-gold,
.section-gold h2,
.section-gold .section-label,
.section-gold .section-subtitle { color: var(--white); }
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ============================================================
   About Section
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: center;
}
.about-image-wrap {
  position: relative;
}
.about-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
}
.about-image-accent {
  position: absolute;
  top: -16px;
  left: -16px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.3;
}
.about-content h2 { text-align: left; margin-bottom: 24px; }
.about-content p {
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.about-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.about-creds span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--gold-light);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--gold-dark);
  font-weight: 500;
}

/* ============================================================
   Value Cards
   ============================================================ */

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}
.value-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.value-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.value-card p { font-size: 0.925rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   Properties / Listings
   ============================================================ */

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.property-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: all 0.4s var(--ease-out);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.property-image {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--warm-gray);
}
.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.property-card:hover .property-image img { transform: scale(1.05); }
.property-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-sold { background: var(--gold); color: var(--white); }
.badge-active { background: #2e7d32; color: var(--white); }
.badge-firm { background: var(--navy-dark); color: var(--gold); }

.property-info { padding: 24px; }
.property-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.property-address {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.property-details {
  display: flex;
  gap: 20px;
  font-size: 0.825rem;
  color: var(--text-body);
}
.property-details span { display: flex; align-items: center; gap: 4px; }

/* Listings CTA card */
.listings-cta {
  text-align: center;
  background: var(--off-white);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 48px 32px;
}
.listings-cta h3 { margin-bottom: 12px; }
.listings-cta p { color: var(--text-muted); margin-bottom: 24px; }

/* ============================================================
   Contact Section
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.contact-info h2 { text-align: left; }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-detail h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-detail p { font-size: 0.925rem; color: var(--text-muted); }
.contact-detail a { color: var(--text-body); text-decoration: none; }
.contact-detail a:hover { color: var(--gold-dark); }
.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.contact-social a {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}
.contact-social a:hover {
  border-color: var(--gold);
  color: var(--white);
  background: var(--gold);
}

/* Contact form card */
.contact-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.contact-form-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.contact-form-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form-card input,
.contact-form-card select,
.contact-form-card textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-heading);
  background: var(--off-white);
  transition: all 0.2s var(--ease-out);
}
.contact-form-card input:focus,
.contact-form-card select:focus,
.contact-form-card textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
  background: var(--white);
}
.contact-form-card input::placeholder,
.contact-form-card textarea::placeholder { color: var(--text-muted); }
.contact-form-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-status {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-status.success { color: #2e7d32; }
.form-status.error { color: #c62828; }

/* ============================================================
   CTA Banner
   ============================================================ */

.cta-banner {
  text-align: center;
  padding: 100px 0;
}
.cta-banner h2 {
  color: var(--white);
  margin-bottom: 16px;
}
.cta-banner p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner .btn-primary {
  background: var(--white);
  color: var(--gold-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-banner .btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 28px rgba(0,0,0,0.2);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--navy-dark);
  padding: 64px 0 32px;
  color: var(--text-on-dark-dim);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  color: var(--text-on-dark-dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 0.825rem; }
.footer-bottom-left { display: flex; align-items: center; gap: 8px; }
.footer-bottom-left img { height: 24px; width: auto; opacity: 0.5; }
.footer-brokerage {
  font-size: 0.8rem;
  color: var(--text-on-dark-dim);
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: var(--text-on-dark-dim); text-decoration: none; font-size: 0.8rem; }
.footer-legal a:hover { color: var(--white); }

/* ============================================================
   Animations
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-text { max-width: 100%; }
  .hero-description { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-headshot-wrap { width: 280px; height: 280px; }
  .hero-badge { right: 50%; transform: translateX(50%); bottom: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-image-wrap { max-width: 380px; margin: 0 auto; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .properties-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 24px 32px;
    box-shadow: var(--shadow-lg);
    gap: 4px;
  }
  .nav-links.open a { padding: 12px 16px; width: 100%; color: var(--text-body) !important; }
  .nav-links.open a:hover { color: var(--gold-dark) !important; }
  .nav-links.open .nav-cta { text-align: center; color: var(--white) !important; }
  .hero h1 { font-size: 2.4rem; }
  .hero-headshot-wrap { width: 220px; height: 220px; }
  .hero-badge { right: 50%; transform: translateX(50%); bottom: -28px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .section { padding: 72px 0; }
  .values-grid { grid-template-columns: 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
  .contact-form-card .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero h1 { font-size: 2rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
