/* ===== VARIABLES ===== */
:root {
  --navy: #1a2744;
  --navy-light: #2a3f66;
  --gold: #c9952b;
  --gold-light: #e8b84b;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 12px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-800);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-cta {
  background: var(--gold);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--gold-light);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('images/stivo-headshot.jpg') center/cover no-repeat;
  opacity: 0.15;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content h1 .highlight {
  color: var(--gold);
}

.hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 280px;
  height: 350px;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
  border: 5px solid var(--gold);
  box-shadow: var(--shadow-lg);
}

/* ===== SECTIONS ===== */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== HOME VALUE SECTION ===== */
.home-value {
  background: var(--gray-50);
}

.home-value-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.home-value-card h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
  text-align: center;
}

.home-value-card > p {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 43, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.form-submit:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 16px;
}

.thank-you-message {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.thank-you-message h3 {
  color: var(--navy);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.thank-you-message p {
  color: var(--gray-600);
  font-size: 1.1rem;
}

/* ===== SELLER COSTS ===== */
.seller-costs {
  background: linear-gradient(180deg, #fff8ec 0%, #ffffff 100%);
}

.seller-costs-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 32px;
  align-items: start;
}

.seller-costs-panel,
.seller-costs-results {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.seller-costs-panel h3 {
  color: var(--navy);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.savings-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
}

.bottom-savings-banner {
  margin-top: 24px;
  margin-bottom: 0;
}

.savings-label {
  display: block;
  opacity: 0.85;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

#savings-amount {
  display: block;
  font-size: 2rem;
  color: var(--gold-light);
}

.expense-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-800);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.expense-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.expense-row span {
  color: var(--gray-800);
}

.expense-row strong {
  color: var(--navy);
  white-space: nowrap;
}

.total-row {
  margin-top: 8px;
  border-top: 2px solid var(--gold);
  border-bottom: none;
  padding-top: 18px;
}

/* ===== MORTGAGE PARTNER ===== */
.prequalify-section {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}

.prequalify-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 32px;
  align-items: center;
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.prequalify-content h3 {
  color: var(--navy);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.prequalify-content > p {
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.prequalify-points {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.prequalify-point {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--gray-50);
  border-left: 4px solid var(--gold);
  font-weight: 500;
}

.prequalify-outline {
  border-color: var(--navy);
  color: var(--navy);
}

.prequalify-aside {
  display: flex;
  justify-content: center;
}

.partner-card {
  width: 100%;
  max-width: 320px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  padding: 28px 24px;
}

.partner-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center top;
  background: var(--white);
  margin: 0 auto 16px;
  padding: 6px;
  border: 3px solid var(--gray-200);
}

.partner-logo {
  max-width: 180px;
  max-height: 70px;
  width: auto;
  margin: 0 auto 16px;
}

.partner-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.partner-title {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.about-content h3 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.about-content p {
  color: var(--gray-600);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.stat-item .label {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 4px;
}

/* ===== LISTINGS ===== */
.listings {
  background: var(--gray-50);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.listing-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.listing-image {
  height: 220px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-photo {
  background-size: cover;
  background-position: center;
  background-color: var(--navy-light);
}

.listing-placeholder {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  flex-direction: column;
  gap: 8px;
}

.listing-icon {
  font-size: 3rem;
  opacity: 0.8;
}

.listing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.listing-info {
  padding: 20px;
}

.listing-info .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
}

.listing-info .address {
  color: var(--gray-600);
  margin-top: 4px;
}

.listing-details {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--gray-800);
  font-weight: 500;
}

.listing-meta {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--gray-600);
}

.listing-info .details {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}

.testimonial-card .quote {
  font-size: 1.05rem;
  color: var(--gray-800);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.7;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--navy);
}

/* ===== CONTACT ===== */
.contact {
  background: var(--gray-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.contact-info p {
  color: var(--gray-600);
  margin-bottom: 24px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--gray-800);
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: var(--transition);
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 43, 0.1);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-brand p {
  opacity: 0.8;
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--gold);
}

.footer-links a {
  display: block;
  opacity: 0.8;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--gold);
}

.footer-contact p {
  opacity: 0.8;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    width: 200px;
    height: 200px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image img {
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .listings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .seller-costs-grid {
    grid-template-columns: 1fr;
  }

  .prequalify-card {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .home-value-card {
    padding: 24px;
  }

  .seller-costs-panel,
  .seller-costs-results {
    padding: 22px;
  }

  .prequalify-card {
    padding: 24px;
  }

  .expense-row {
    flex-direction: column;
    align-items: flex-start;
  }

  section {
    padding: 60px 0;
  }
}
