/* ============================================
   CASTILLO REALTY — MAIN STYLESHEET
   Design: Luxury / Art Deco — Gold + Charcoal
   ============================================ */

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

/* ─── CSS VARIABLES ─── */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8D294;
  --gold-dark:   #A07830;
  --charcoal:    #1C1C1C;
  --charcoal-mid:#2E2E2E;
  --charcoal-soft:#3D3D3D;
  --off-white:   #F9F6F0;
  --white:       #FFFFFF;
  --light-gray:  #EBEBEB;
  --text-muted:  #888888;
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'Jost', system-ui, sans-serif;
  --max-w:       1280px;
  --nav-h:       80px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── LAYOUT ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── NAVIGATION ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--gold);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 52px;
  width: auto;
  display: block;
  /* The logo has black text — needs special treatment on gold nav */
  /* Gold nav background: black text is fine, crown gold blends naturally */
  transition: opacity var(--transition);
  /* Slightly reduce file-rendered size so crown stays crisp */
  image-rendering: -webkit-optimize-contrast;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.85;
}

/* Footer logo */
.footer-logo-img {
  height: 60px;
  width: auto;
  display: block;
  /* Footer is dark charcoal — invert logo to white/gold version */
  /* Since we only have the dark-text version, use CSS filter to make it work */
  filter: brightness(0) invert(1) sepia(1) saturate(1.5) hue-rotate(3deg);
  opacity: 0.9;
  margin-bottom: 12px;
}

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

.nav-links a {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  position: relative;
  padding-bottom: 4px;
  transition: opacity var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--charcoal);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover { opacity: 0.7; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--charcoal);
  transition: all var(--transition);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 2px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-gold {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--charcoal);
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--charcoal);
}

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  padding-top: var(--nav-h);
  background: var(--gold);
  min-height: 260px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 30px,
    rgba(0,0,0,0.03) 30px,
    rgba(0,0,0,0.03) 31px
  );
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--charcoal);
  opacity: 0.6;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.15;
}

/* ─── SECTION HEADERS ─── */
.section-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
}

.section-title-light {
  color: var(--white);
}

/* ─── DIVIDER ─── */
.gold-rule {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 20px 0 32px;
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--charcoal);
  color: var(--white);
  padding: 64px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer-brand .brand-name {
  /* Kept for fallback — hidden when logo image is present */
  display: none;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
  max-width: 260px;
  line-height: 1.7;
}

.footer-dre {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 16px;
  letter-spacing: 0.05em;
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.footer-bottom a {
  color: rgba(255,255,255,0.3);
  transition: color var(--transition);
}
.footer-bottom a:hover { color: var(--gold); }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── UTILITY ─── */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }

/* ─── MOBILE MENU OPEN STATE ─── */
.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--gold);
  padding: 32px 40px;
  gap: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 68px; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .page-hero { min-height: 200px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
