/* ============================================
   HOMESHORE AMERICA — Shared Styles
   styles.css
   ============================================ */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,500&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --navy-deep:   #0A1628;
  --navy:        #0F2138;
  --navy-mid:    #162D4A;
  --navy-light:  #1C3A5E;
  --green:       #2A9D6E;
  --green-dark:  #1F7A54;
  --green-light: #34C884;
  --gold:        #C8923A;
  --gold-light:  #E8B866;
  --off-white:   #F5F7F6;
  --white:       #FFFFFF;
  --text-body:   #3A4A5C;
  --text-light:  #6B7D8D;
  --gray-mid:    #8899A6;
  --border:      #E2E8ED;
}

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

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- NAVIGATION ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo img { height: 44px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-cta {
  background: var(--green);
  color: #fff !important;
  padding: 0.55rem 1.35rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--green-dark); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--navy-deep);
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,0.65);
  padding: 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu a.active { color: #fff; }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  padding: 8rem 2rem 4rem;
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- SECTION LABELS ---- */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

/* ---- SECTION TITLES ---- */
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.15;
  margin-bottom: 1rem;
}

/* ---- GENERIC SECTION ---- */
.section {
  padding: 5rem 2rem;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.06); }

.btn-outline {
  display: inline-block;
  border: 2px solid var(--green);
  color: var(--green);
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--green); color: #fff; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.55);
  padding: 4rem 2rem 2rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img { height: 40px; margin-bottom: 1rem; display: block; }
.footer-brand p { font-size: 0.88rem; line-height: 1.75; color: rgba(255,255,255,0.55); }
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-contact-item { font-size: 0.88rem; margin-bottom: 0.6rem; color: rgba(255,255,255,0.55); }
.footer-contact-item a { color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-contact-item a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ---- FADE IN ANIMATION ---- */
/* FIX: Fallback ensures content is always visible even if JS fails */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Safety net: if JS doesn't run within 3 seconds, show everything */
@keyframes fade-in-fallback {
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-in-fallback 0.8s ease forwards;
  animation-delay: 3s;
}
/* When JS adds .visible, the animation is overridden by the class */
.fade-in.visible {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 2.2rem; }
  .page-hero h1 { font-size: 2.4rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 4rem 1.25rem; }
  .page-hero { padding: 3.5rem 1.25rem 3rem; }
  .section-title { font-size: 1.9rem; }
}
