/* ==========================================================================
   Aurum Estates — Design tokens (ported from tailwind.config.js)
   ========================================================================== */
:root {
  --midnight: #050810;
  --deep: #0a0f1e;
  --sapphire: #1b3a6b;
  --royal: #274b8f;
  --gold: #d4af37;
  --gold-light: #f2d675;
  --glass-bg: rgba(10, 15, 30, 0.45);
  --glass-border: rgba(212, 175, 55, 0.25);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  background: var(--midnight);
  color: #f5f1e6;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
}

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

/* Lenis smooth scroll requires this */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

::-webkit-scrollbar { width: 0px; background: transparent; }

/* ==========================================================================
   Glass panel / gold accents
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}

.gold-border { border: 1px solid var(--gold); }

.font-display { font-family: var(--font-display); }
.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6%;
  background: linear-gradient(to bottom, rgba(5,8,16,0.85), transparent);
}
.site-header .logo { display: flex; align-items: center; gap: 10px; }
.site-header .logo img { height: 36px; width: auto; }
.site-header .logo span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}
.site-header nav a {
  margin-left: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,241,230,0.8);
  transition: color .2s;
}
.site-header nav a:hover { color: var(--gold-light); }
.nav-toggle { display: none; background: none; border: none; color: #f5f1e6; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .site-header nav { display: none; }
  .nav-toggle { display: block; }
  .site-header nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; right: 6%; background: var(--deep); padding: 20px;
    border-radius: 12px; border: 1px solid var(--glass-border);
  }
  .site-header nav.open a { margin: 8px 0; }
}

/* ==========================================================================
   Hero / 3D scroll scene
   ========================================================================== */
.scroll-scene { position: relative; width: 100%; height: 100vh; height: 100svh; overflow: hidden; }
.pin-canvas { position: relative; top: 0; height: 100vh; height: 100svh; width: 100%; }
.pin-canvas canvas, .pin-canvas video { display: block; width: 100%; height: 100%; }

.hero-overlay-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4rem;
  pointer-events: none;
}
.hero-overlay-text p {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .4 } 50% { opacity: 1 } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; z-index: 10; padding: 6rem 6%; }
.section.bg-midnight { background: var(--midnight); }
.section.bg-deep { background: var(--deep); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  color: var(--gold-light);
  margin: 0 0 1rem;
}
.section-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.5);
  max-width: 40rem;
  margin: 0 auto 3.5rem;
}

/* ==========================================================================
   Properties grid + cards
   ========================================================================== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}
.property-card {
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform;
}
.property-card:hover { box-shadow: 0 0 40px rgba(212,175,55,0.2); }
.property-card .card-media { position: relative; height: 14rem; overflow: hidden; }
.property-card .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s ease;
}
.property-card:hover .card-media img { transform: scale(1.1); }
.property-card .card-media .placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--sapphire), var(--midnight));
}
.property-card .card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,8,16,0.9), transparent 60%);
}
.property-card .price-tag {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
.property-card .card-body { padding: 1.5rem; transform: translateZ(30px); }
.property-card .card-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; color: #fff; margin: 0 0 0.25rem;
}
.property-card .card-body .location {
  font-size: 0.8rem; color: rgba(212,175,55,0.8);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.75rem;
}
.property-card .card-body .excerpt {
  font-size: 0.875rem; color: rgba(255,255,255,0.6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0;
}
.property-card .card-body .view-link {
  display: inline-block; margin-top: 1rem;
  font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold-light); border-bottom: 1px solid rgba(212,175,55,0.4);
  padding-bottom: 0.25rem; transition: border-color .2s;
}
.property-card .card-body .view-link:hover { border-color: var(--gold); }

.empty-state {
  max-width: 32rem; margin: 0 auto; border-radius: 1rem;
  padding: 2rem; text-align: center; color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   About / timeline
   ========================================================================== */
.about-content {
  max-width: 48rem; margin: 0 auto; border-radius: 1rem; padding: 2.5rem;
}
.about-content p { color: rgba(255,255,255,0.7); line-height: 1.7; }

/* ==========================================================================
   Map placeholder
   ========================================================================== */
.map-placeholder {
  max-width: 56rem; margin: 0 auto; border-radius: 1rem; padding: 2.5rem;
  text-align: center; color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-box { max-width: 36rem; margin: 0 auto; border-radius: 1rem; padding: 2.5rem; }
.contact-box h2 { text-align: center; margin-bottom: 1.5rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea {
  width: 100%; background: transparent; border: 1px solid rgba(212,175,55,0.3);
  border-radius: 0.5rem; padding: 0.75rem 1rem; color: #fff;
  font-family: var(--font-body); font-size: 0.95rem; outline: none;
  transition: border-color .2s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,0.3); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold); }
.contact-form button {
  width: 100%; background: linear-gradient(to right, var(--gold), var(--gold-light));
  color: var(--midnight); font-weight: 600; padding: 0.85rem; border: none;
  border-radius: 0.5rem; letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer; transition: filter .2s;
}
.contact-form button:hover { filter: brightness(1.1); }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.form-status { text-align: center; font-size: 0.875rem; min-height: 1.2rem; }
.form-status.success { color: #7fd18a; }
.form-status.error { color: #e08a8a; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative; z-index: 10; background: var(--midnight);
  border-top: 1px solid rgba(212,175,55,0.15);
  padding: 2.5rem 6%; text-align: center;
}
.site-footer .social-links { margin-top: 1rem; }
.site-footer .social-links a {
  margin: 0 10px; font-size: 0.8rem; color: var(--gold-light);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.site-footer p { color: rgba(255,255,255,0.4); font-size: 0.85rem; margin: 0.25rem 0; }

/* Admin notice styling for missing dependencies */
.aurum-admin-notice { font-size: 14px; line-height: 1.6; }

/* ==========================================================================
   RESPONSIVE — tablets & small laptops (≤1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .site-header { padding: 16px 5%; }
  .properties-grid { gap: 1.5rem; }
  .section { padding: 4.5rem 5%; }
  .contact-box, .about-content, .map-placeholder { max-width: 90%; }
}

/* ==========================================================================
   RESPONSIVE — tablets & large phones (≤768px)
   ========================================================================== */
@media (max-width: 768px) {
  .site-header { padding: 14px 5%; }
  .site-header .logo img { height: 28px; }
  .site-header .logo span { font-size: 1.15rem; }

  .hero-overlay-text { padding-bottom: 2.5rem; }
  .hero-overlay-text p { font-size: 0.65rem; letter-spacing: 0.2em; padding: 0 1rem; text-align: center; }

  .section { padding: 3.5rem 6%; }
  .section-title { font-size: 1.75rem; margin-bottom: 0.75rem; }
  .section-subtitle { margin-bottom: 2.5rem; font-size: 0.9rem; }

  .properties-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .property-card .card-media { height: 12rem; }
  .property-card .card-body { padding: 1.25rem; }
  .property-card .card-body h3 { font-size: 1.3rem; }
  /* Tilt effect relies on precise hover tracking — skip it on touch screens. */
  .property-card { transform: none !important; }

  .about-content, .contact-box, .map-placeholder { padding: 1.75rem; border-radius: 0.75rem; }
  .contact-box h2, .about-content .section-title { font-size: 1.6rem; }

  .site-footer { padding: 2rem 6%; }
  .site-footer .social-links a { margin: 0 6px; display: inline-block; }
}

/* ==========================================================================
   RESPONSIVE — phones (≤480px)
   ========================================================================== */
@media (max-width: 480px) {
  .site-header .logo span { font-size: 1rem; }
  .nav-toggle { font-size: 1.3rem; }

  .section { padding: 3rem 5.5%; }
  .section-title { font-size: 1.5rem; }

  .property-card .card-media { height: 10rem; }
  .property-card .price-tag { font-size: 0.95rem; padding: 0.25rem 0.7rem; top: 0.75rem; right: 0.75rem; }

  .contact-form input, .contact-form textarea { padding: 0.65rem 0.85rem; font-size: 0.9rem; }
  .contact-form button { padding: 0.75rem; font-size: 0.85rem; }
}

/* ==========================================================================
   RESPONSIVE — short/landscape viewports (hero readability)
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .scroll-scene, .pin-canvas { height: 100vh; }
  .hero-overlay-text { padding-bottom: 1.25rem; }
}

/* Respect users who've asked for reduced motion: skip the tilt/hover transforms. */
@media (prefers-reduced-motion: reduce) {
  .property-card { transition: none !important; transform: none !important; }
  .card-media img { transition: none !important; }
}
