/* ============================================================
   REMODELING EXPERTS — Custom Brand Tokens & Styles
   Tailwind (via CDN) handles layout/utilities.
   This file holds brand colors, fonts, and small custom bits.
   ============================================================ */

/* ---- BRAND TOKENS ---------------------------------------- */
:root {
  --cream:      #F7F4EF;  /* page background            */
  --brass:      #BF9B54;  /* primary gold accent        */
  --brass-dark: #A6843F;  /* gold hover / darker        */
  --charcoal:   #1A1A1A;  /* dark sections              */
  --ink:        #141414;  /* headings                   */
  --muted:      #6E6E6E;  /* body text                  */
  --white:      #FFFFFF;  /* cards                      */
  --line:       #E8E2D8;  /* soft borders               */

  --shadow-card: 0 10px 30px -12px rgba(20, 20, 20, 0.15);
  --shadow-lift: 0 24px 48px -18px rgba(20, 20, 20, 0.28);
}

/* ---- BASE ------------------------------------------------ */
html { scroll-behavior: smooth; }

/* Offset in-page anchor targets so the fixed nav doesn't cover them.
   Works for native anchor jumps even if JavaScript is disabled. */
section[id], #hero { scroll-margin-top: 88px; }

body {
  background: var(--cream);
  color: var(--muted);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings use Inter (matches directflowmarketing.com), tight + bold */
h1, h2, h3, h4, .font-display {
  font-family: "Inter", -apple-system, "system-ui", "Segoe UI", sans-serif;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Highlight one key phrase per headline in brass gold */
.gold { color: var(--brass); }

/* ---- REUSABLE UTILITY CLASSES (brand-colored) ------------ */
.bg-cream    { background: var(--cream); }
.bg-charcoal { background: var(--charcoal); }
.bg-white-c  { background: var(--white); }
.text-ink    { color: var(--ink); }
.text-muted  { color: var(--muted); }
.text-brass  { color: var(--brass); }
.border-line { border-color: var(--line); }

/* Primary gold CTA button */
.btn-gold {
  background: var(--brass);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 8px 20px -8px rgba(191, 155, 84, 0.6);
}
.btn-gold:hover {
  background: var(--brass-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(191, 155, 84, 0.7);
}

/* Outline / ghost button (for dark sections) */
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 9999px;
  font-weight: 600;
  transition: border-color .25s ease, background .25s ease;
}
.btn-ghost:hover { border-color: var(--brass); background: rgba(191,155,84,0.12); }

/* White card w/ soft shadow + hover lift */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

/* Small gold section label */
.eyebrow {
  color: var(--brass);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* ---- STICKY NAV ------------------------------------------ */
#navbar {
  transition: background .3s ease, box-shadow .3s ease,
              padding .3s ease, backdrop-filter .3s ease;
}
/* .scrolled is toggled by script.js after scrolling down */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 6px 24px -14px rgba(20,20,20,0.25);
  border-bottom: 1px solid var(--line);
}

/* ---- SCROLL REVEAL (IntersectionObserver) ---------------- */
/* Elements start hidden + shifted; .is-visible reveals them.
   Hiding is gated behind html.js (added by JS) so that if the script
   never runs, all content stays fully visible instead of blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger helpers — add .delay-1/2/3 alongside .reveal */
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

/* ---- HERO FLOAT / PARALLAX ------------------------------- */
.hero-float {
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ---- GALLERY ITEMS --------------------------------------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;  /* wide tiles suit before/after photos; all uniform → no gaps */
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover img { transform: scale(1.08); }

/* Gold caption overlay slides up on hover */
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(to top, rgba(191,155,84,0.96), rgba(191,155,84,0));
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}
.gallery-item:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* ---- LIGHTBOX -------------------------------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  padding: 1.5rem;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}
#lightbox .lb-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}
#lightbox .lb-close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .2s ease, transform .2s ease;
}
#lightbox .lb-close:hover { opacity: 1; transform: scale(1.1); }

/* ---- FORM ------------------------------------------------ */
.field {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-size: 0.98rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: #A9A29A; }
.field:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(191,155,84,0.18);
}
.field.invalid {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.14);
}
.field-error {
  color: #C0392B;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}
.field-error.show { display: block; }

/* Gold checkmark bullet */
.check-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 500;
}
.check-bullet svg { flex: none; color: var(--brass); margin-top: 2px; }

/* ---- ACCESSIBILITY: reduced motion ----------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-float { animation: none !important; }
  .card-lift:hover { transform: none; }
  .gallery-item:hover img { transform: none; }
  * { scroll-behavior: auto !important; }
}
