/* ════════════════════════════════════════════
   Design Tokens
════════════════════════════════════════════ */
:root {
  --red:        #C0392B;
  --red-dark:   #96281B;
  --red-light:  #E74C3C;
  --cream:      #FAF8F5;
  --charcoal:   #1C1C1E;
  --mid:        #4A4A4F;
  --border:     #E0DBD5;
  --white:      #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  overflow-x: hidden;
}

/* ════════════════════════════════════════════
   Utility
════════════════════════════════════════════ */
.font-display  { font-family: var(--font-display); }
.text-red      { color: var(--red) !important; }
.bg-red        { background-color: var(--red) !important; }
.bg-red-dark   { background-color: var(--red-dark) !important; }

/* ════════════════════════════════════════════
   Navbar
════════════════════════════════════════════ */
#mainNav {
  background: rgba(28,28,30,0.97);
  backdrop-filter: blur(8px);
  transition: background 0.3s;
  z-index: 1030;
}
#mainNav .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
#mainNav .navbar-brand span { color: var(--red-light); }
#mainNav .nav-link {
  color: rgba(255,255,255,0.78) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem !important;
  transition: color 0.2s;
}
#mainNav .nav-link:hover { color: var(--white) !important; }
#mainNav .nav-link.active-nav { color: var(--red-light) !important; }
.navbar-toggler { border-color: rgba(255,255,255,0.3); }
.navbar-toggler-icon { filter: invert(1); }

/* ════════════════════════════════════════════
   Hero
════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  background:
    linear-gradient(to bottom right, rgba(28,28,30,0.72) 40%, rgba(192,57,43,0.45) 100%),
    url('https://images.unsplash.com/photo-1570129477492-45c003edd2be?w=1800&auto=format&fit=crop') center/cover no-repeat;
  display: flex;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-light);
  border-top: 2px solid var(--red-light);
  padding-top: 0.4rem;
  margin-bottom: 1.4rem;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  line-height: 1.7;
}
.btn-primary-red {
  background: var(--red);
  border: none;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 0;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary-red:hover { background: var(--red-dark); transform: translateY(-2px); color: #fff; }
.btn-outline-light-custom {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 0;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
  text-decoration: none;
}
.btn-outline-light-custom:hover { border-color: #fff; color: #fff; }

/* ════════════════════════════════════════════
   Section Chrome
════════════════════════════════════════════ */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
}
.red-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--red);
  margin: 1rem 0 1.8rem;
}

section { padding: 6rem 0; }

/* ════════════════════════════════════════════
   About
════════════════════════════════════════════ */
#about { background: var(--white); }
.about-stat {
  border-left: 3px solid var(--red);
  padding-left: 1.1rem;
}
.about-stat .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}
.about-stat .label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.about-img-wrap {
  position: relative;
  overflow: hidden;
  height: 480px;
}
.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ════════════════════════════════════════════
   Services
════════════════════════════════════════════ */
#services { background: var(--cream); }
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2.2rem 1.8rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.service-card:hover {
  border-color: var(--red);
  box-shadow: 0 8px 30px rgba(192,57,43,0.10);
  transform: translateY(-4px);
}
.service-icon {
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 1rem;
}
.service-card h5 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.7;
  margin: 0;
}

/* ════════════════════════════════════════════
   Agents
════════════════════════════════════════════ */
#agents { background: var(--white); }
.agent-card {
  cursor: pointer;
  overflow: hidden;
}
.agent-photo-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #ddd;
}
.agent-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  filter: grayscale(20%);
}
.agent-card:hover .agent-photo-wrap img {
  transform: scale(1.04);
  filter: grayscale(0%);
}
.agent-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,28,30,0.75) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.4rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.agent-card:hover .agent-overlay { opacity: 1; }
.agent-overlay .btn-view {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
  padding: 0.45rem 1.1rem;
  background: transparent;
  transition: background 0.2s;
}
.agent-overlay .btn-view:hover { background: var(--red); border-color: var(--red); }
.agent-info { padding: 1.1rem 0 0; }
.agent-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.agent-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

/* Placeholder headshot */
.headshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0dbd5 0%, #ccc8c2 100%);
}
.headshot-placeholder i { font-size: 5rem; color: rgba(28,28,30,0.25); }

/* ════════════════════════════════════════════
   Testimonials
════════════════════════════════════════════ */
#testimonials { background: var(--charcoal); }
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.2rem;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.testimonial-text {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  font-style: italic;
}
.testimonial-author {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-top: 1.2rem;
}
.testimonial-location {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ════════════════════════════════════════════
   Contact
════════════════════════════════════════════ */
#contact { background: var(--cream); }
.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2.8rem;
}
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  color: var(--charcoal);
  background: var(--cream);
  transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--red);
  box-shadow: none;
  background: var(--white);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.contact-info-icon {
  width: 40px;
  height: 40px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.contact-info-text .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
}
.contact-info-text .value {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-top: 0.1rem;
}

/* ════════════════════════════════════════════
   Footer
════════════════════════════════════════════ */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.55);
}
footer .brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
}
footer .brand span { color: var(--red-light); }
footer a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
footer a:hover { color: var(--red-light); }
footer hr { border-color: rgba(255,255,255,0.1); }
.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

/* ════════════════════════════════════════════
   Agent Bio Page (slide-in full page)
════════════════════════════════════════════ */
#bioPage {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 2000;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#bioPage.open { transform: translateX(0); }
.bio-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.bio-back-btn:hover { color: var(--red); }
.bio-photo-col {
  position: sticky;
  top: 90px;
}
.bio-photo-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}
.bio-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bio-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}
.bio-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.4rem;
}
.bio-body p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--mid);
  margin-bottom: 1.2rem;
}
.bio-detail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 0.6rem;
}
.bio-detail i { color: var(--red); font-size: 1rem; }
.bio-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.bio-spec {
  border-left: 3px solid var(--red);
  padding-left: 0.9rem;
}
.bio-spec .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
}
.bio-spec .lbl {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ════════════════════════════════════════════
   Scroll Reveal Animation
════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════
   Responsive
════════════════════════════════════════════ */
@media (max-width: 767px) {
  section { padding: 4rem 0; }
  .contact-form-wrap { padding: 1.8rem; }
  .bio-spec-grid { grid-template-columns: 1fr 1fr; }

  /* About image: shorter on mobile, no awkward crop */
  .about-img-wrap {
    height: 260px;
  }

  /* Agent cards: side-by-side on mobile instead of full-width */
  #agents .row.justify-content-center {
    justify-content: flex-start !important;
  }
  #agents .col-sm-10 {
    width: 50% !important;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  /* Reduce photo aspect ratio so cards aren't towering */
  .agent-photo-wrap {
    aspect-ratio: 2/3;
  }

  /* On touch devices the overlay hover never fires — keep it visible */
  .agent-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(28,28,30,0.65) 0%, transparent 50%);
  }

  /* Smaller text inside agent info below the photo */
  .agent-name { font-size: 1rem; }
  .agent-title { font-size: 0.7rem; }
}

/* Hover effects only on devices that support it */
@media (hover: hover) {
  .agent-overlay { opacity: 0; }
  .agent-card:hover .agent-overlay { opacity: 1; }
}
