/* ——— Global Reset ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Inter', system-ui, sans-serif; line-height: 1.6; color: #121212; }

/* ——— Scroll progress bar ——— */
#scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, #C5A880, #d4bc96); z-index: 100;
  transition: width 0.1s linear; }

/* ——— Film grain ——— */
.grain-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 99; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px; }

/* ——— Scroll to top ——— */
#scroll-top-btn { position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
  border-radius: 9999px; background: #C5A880; color: #121212; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0;
  transform: translateY(20px); transition: opacity .3s ease, transform .3s ease, background .3s ease;
  z-index: 90; pointer-events: none; box-shadow: 0 4px 20px rgba(197,168,128,.3); }
#scroll-top-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scroll-top-btn:hover { background: #d4bc96; }

/* ——— Dark mode toggle ——— */
#dark-mode-btn,
#mobile-menu-btn { background: rgba(255,255,255,.7); border: 1px solid rgba(18,18,18,.12); border-radius: 9999px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .3s, background .3s, color .3s; color: #121212; }
#dark-mode-btn:hover,
#mobile-menu-btn:hover { border-color: #C5A880; background: rgba(197,168,128,.08); }
#dark-mode-btn svg,
#mobile-menu-btn svg { width: 18px; height: 18px; stroke: currentColor; }

body.dark #dark-mode-btn,
body.dark #mobile-menu-btn {
  color: #F4F4F4;
  background: rgba(255,255,255,.08);
  border-color: rgba(244,244,244,.18);
}

body.dark #dark-mode-btn:hover,
body.dark #mobile-menu-btn:hover {
  border-color: #C5A880;
  background: rgba(197,168,128,.16);
}

header {
  background-color: rgba(255,255,255,.9);
  border-color: rgba(18,18,18,.08);
}

body.dark header {
  background-color: rgba(10,10,10,.92) !important;
  border-color: rgba(255,255,255,.12) !important;
}

body.dark header .nav-link,
body.dark header .nav-link:hover,
body.dark header .nav-link.active {
  color: rgba(244,244,244,.9) !important;
}

body.dark header #dark-mode-btn {
  color: #F4F4F4 !important;
  background: rgba(255,255,255,.08);
  border-color: rgba(244,244,244,.16);
}

/* ——— Lightbox ——— */
#portfolio-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200;
  display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; cursor: zoom-out; }
#portfolio-lightbox.active { display: flex; opacity: 1; }
#portfolio-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: .5rem; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; width: 44px; height: 44px;
  border-radius: 9999px; background: rgba(255,255,255,.1); border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  transition: background .2s; }
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; }
.lightbox-caption { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .8rem; text-align: center; letter-spacing: .05em; }

/* ——— Toast ——— */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #C5A880; color: #121212; padding: 1rem 2rem; border-radius: .75rem; font-size: .875rem;
  font-weight: 500; box-shadow: 0 4px 20px rgba(197,168,128,.3); z-index: 300; transition: transform .4s; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ——— Glass panel ——— */
.glass-panel { background: rgba(18,18,18,.25); backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 32px 80px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08); }

/* ——— Text effects ——— */
.text-glow { text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.text-gold-glow { text-shadow: 0 2px 24px rgba(0,0,0,.5), 0 0 40px rgba(197,168,128,.15); }

/* ——— CTA shimmer ——— */
.cta-shimmer { position: relative; overflow: hidden; }
.cta-shimmer::before { content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
  transform: translateX(-100%); transition: none; }
.cta-shimmer:hover::before { animation: shimmer 1.2s ease forwards; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ——— Button press ——— */
.btn-press:active { transform: scale(.97); }

/* ——— Divider gold ——— */
.divider-gold { position: relative; width: 48px; height: 1px;
  background: linear-gradient(90deg, transparent, #C5A880 20%, #C5A880 80%, transparent); margin: 0 auto; }
.divider-gold::before, .divider-gold::after { content: ''; position: absolute; top: -1px;
  width: 3px; height: 3px; border-radius: 50%; background: #C5A880; }
.divider-gold::before { left: -1px; } .divider-gold::after { right: -1px; }

/* ——— Dot pattern ——— */
.pattern-dot { background-image: radial-gradient(circle at 1px 1px, rgba(18,18,18,.03) 1px, transparent 0);
  background-size: 40px 40px; }

/* ——— Nav link underline ——— */
.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: linear-gradient(90deg, #C5A880, #d4bc96); transition: width .3s ease; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #C5A880 !important; }
.nav-link.active::after { width: 100% !important; }

/* ——— Service card ——— */
.service-card { transition: transform .4s ease, box-shadow .4s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,.08); }

/* ——— Contact widget ——— */
.contact-widget { transition: box-shadow .4s ease, transform .4s ease; }
.contact-widget:hover { box-shadow: 0 8px 40px rgba(0,0,0,.06) !important; transform: translateY(-2px); }

/* ——— Form input underline focus ——— */
.form-input { background-image: linear-gradient(to right, #C5A880, #C5A880); background-size: 0% 1px;
  background-position: left bottom; background-repeat: no-repeat; transition: background-size .4s ease; }
.form-input:focus { border-color: #C5A880 !important; background-size: 100% 1px; }

/* ——— Hero background ——— */
.hero-bg { background: url('images/hero.jpg') center/cover no-repeat fixed; }
@media (max-width: 768px) { .hero-bg { background-attachment: scroll; } }

/* ——— Scroll pill ——— */
.scroll-pill { display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: scrollPulse 2.5s ease-in-out infinite; }
.scroll-pill-dot { width: 4px; height: 4px; border-radius: 50%;
  background: rgba(197,168,128,.6); animation: scrollDot 2.5s ease-in-out infinite; }
.scroll-pill-line { width: 1px; height: 24px;
  background: linear-gradient(to bottom, rgba(197,168,128,.6), transparent); }
@keyframes scrollPulse { 0%,100% { opacity: .4; transform: translateY(0); } 50% { opacity: 1; transform: translateY(4px); } }
@keyframes scrollDot { 0%,100% { opacity: .3; transform: scale(1); } 50% { opacity: .8; transform: scale(1.5); } }

/* ——— Mobile menu slide-in ——— */
#mobile-menu { animation: menuSlideIn .3s ease forwards; }
@keyframes menuSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ——— Footer top border ——— */
footer { position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197,168,128,.3) 30%, rgba(197,168,128,.3) 70%, transparent); }

/* ——— Section reveal ——— */
.section-fade { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s ease; }
.section-fade.visible { opacity: 1; transform: translateY(0); }

/* ——— Image card fade-in ——— */
.card-img { opacity: 1; transition: transform .7s ease, filter .5s ease; filter: brightness(.97); }
.service-card:hover .card-img.loaded { filter: brightness(1); }

/* ——— Portfolio grid ——— */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1024px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-item { position: relative; border-radius: .5rem; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease, filter .4s ease; }
.portfolio-item:hover img { transform: scale(1.05); filter: brightness(.85); }
.portfolio-item .overlay { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,18,18,.7) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s ease; display: flex; align-items: flex-end; padding: 1.25rem; }
.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item .overlay span { color: #fff; font-size: .75rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500; }

/* ——— Dark mode ——— */
.dark body { background-color: #0a0a0a; color: #e0e0e0; }
.dark .text-obsidian { color: #e0e0e0 !important; }
.dark .text-obsidian\/70 { color: rgba(224,224,224,.7) !important; }
.dark .text-obsidian\/50 { color: rgba(224,224,224,.5) !important; }
.dark .text-obsidian\/40 { color: rgba(224,224,224,.4) !important; }
.dark .text-obsidian\/30 { color: rgba(224,224,224,.3) !important; }
.dark .text-obsidian\/20 { color: rgba(224,224,224,.2) !important; }
.dark .bg-white { background-color: #1a1a1a !important; }
.dark .bg-off-white { background-color: #0d0d0d !important; }
.dark .border-gray-100 { border-color: #2a2a2a !important; }
.dark .border-gray-200 { border-color: #2a2a2a !important; }
.dark .border-gray-300 { border-color: #3a3a3a !important; }
.dark .border-neutral-200 { border-color: #2a2a2a !important; }
.dark .border-neutral-300 { border-color: #3a3a3a !important; }
.dark .border-b { border-bottom-color: #2a2a2a !important; }
.dark .border-t { border-top-color: #2a2a2a !important; }

/* ——— Dark Mode Overrides for Content Sections ——— */
body.dark h2,
body.dark .what-to-expect-section h2 {
  color: #1a1a1a !important; /* Making the main heading black/very dark */
}
body.dark ul,
body.dark .what-to-expect-section ul {
  color: #e0e0e0 !important; /* Ensuring general text color is visible */
}
body.dark li,
body.dark .bullet-point-list li {
  color: #1a1a1a !important; /* Making the bullet points black/very dark */
}

/* ——— Dark Mode Overrides for Contact Section ——— */
body.dark #contact-heading,
body.dark .contact-text {
  color: #121212 !important; /* Setting general text black */
}
/* Targeting the specific phone number link if it is an anchor tag and needs overriding */
body.dark .tel-link a,
body.dark p a {
    color: #121212 !important;
}

/* ——— Dark Mode Overrides for Contact Section Headings ——— */
body.dark h3.contact-heading {
  color: #121212 !important; /* Making the "Let's talk..." heading black */
}

/* ——— Forced Black Text for Contact Section Elements in Dark Mode ——— */
body.dark #contact h2,
body.dark .contact-card h3:has(span:contains("Let’s talk about your timeline")), /* Targeting the H3 by its visible text content */
body.dark .contact-card p[class*="text-obsidian/70"]:has("Tell me about your property or project") {
  color: #000000 !important; /* Force true black (#000000) */
}
/* Ensure footer elements never get forced to black in dark mode */
body.dark footer p {
  color: rgba(255, 255, 255, 0.2) !important;
}
body.dark footer nav a {
  color: rgba(255, 255, 255, 0.3) !important;
}
body.dark footer nav a:hover {
  color: #C5A880 !important;
}