/* =========================================================
   Tim Gladwill Construction — styles.css
   Rustic-premium: forest green + metallic gold
   ========================================================= */

:root {
  /* Greens */
  --green-950: #0b160e;
  --green-900: #0e1c12;
  --green-850: #122417;
  --green-800: #16281a;
  --green-700: #1c3423;
  --green-600: #24422c;
  --green-line: rgba(200, 162, 74, 0.16);

  /* Gold */
  --gold: #c8a24a;
  --gold-light: #e3c477;
  --gold-deep: #a37f2f;

  /* Neutrals */
  --cream: #f3eede;
  --cream-dim: #cfc9b6;
  --muted: #9aa08f;

  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --shadow-soft: 0 14px 34px -18px rgba(0, 0, 0, 0.55);

  --ease: cubic-bezier(0.25, 0.8, 0.3, 1);

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--green-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  letter-spacing: 0.01em;
  color: var(--cream);
}

.section-head { max-width: 640px; margin: 0 auto clamp(2.4rem, 5vw, 3.6rem); text-align: center; }
.section-intro { color: var(--cream-dim); margin-top: 1.1rem; font-size: 1.05rem; }

.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 1.05em 2.3em; font-size: 1rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #221a06;
  box-shadow: 0 12px 30px -12px rgba(200, 162, 74, 0.7);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -12px rgba(200, 162, 74, 0.85); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 238, 222, 0.35);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); transform: translateY(-3px); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  padding: 0.9rem 0;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 22, 14, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--green-line);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  padding: 0.55rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); transition: width 0.35s var(--ease), height 0.35s var(--ease); }
.site-header.scrolled .brand-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.04em; color: var(--gold-light); }
.brand-sub { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.34em; font-size: 0.6rem; color: var(--cream-dim); margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a { font-size: 0.9rem; font-weight: 500; letter-spacing: 0.03em; color: var(--cream); position: relative; transition: color 0.2s var(--ease); }
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width 0.28s var(--ease);
}
.main-nav a:not(.nav-cta):hover { color: var(--gold-light); }
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
  color: #221a06 !important; font-weight: 600;
  padding: 0.6em 1.3em; border-radius: 999px;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(200,162,74,0.8); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url("../assets/images/hero-bg.png") center 30% / cover no-repeat, #0c1d12;
  animation: heroFade 1.2s var(--ease) both;
}
@keyframes heroFade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(7,16,10,0.34) 0%,
    rgba(7,16,10,0.34) 45%,
    rgba(7,16,10,0.62) 72%,
    rgba(7,16,10,0.86) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 840px; margin: 0 auto; text-align: center; padding-bottom: clamp(72px, 12vh, 120px); }
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.45rem, 3.4vw, 2.4rem); line-height: 1.18; letter-spacing: 0.01em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.55);
}
.hero-tagline {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-light); margin: 1.1rem 0 1.4rem;
  display: inline-flex; align-items: center; gap: 1rem;
}
.hero-tagline::before, .hero-tagline::after {
  content: ""; height: 1px; width: clamp(28px, 6vw, 60px); background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-lead { color: var(--cream-dim); font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.7rem; justify-content: center; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 2px solid rgba(243,238,222,0.4); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--gold-light); animation: scrollDot 1.7s var(--ease) infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: linear-gradient(180deg, var(--green-900), var(--green-850)); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
  background: linear-gradient(160deg, var(--green-800), var(--green-850));
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(200,162,74,0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: var(--shadow-soft); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.3rem;
  color: var(--gold-light);
  background: radial-gradient(circle at 30% 25%, rgba(200,162,74,0.22), rgba(200,162,74,0.05));
  border: 1px solid rgba(200,162,74,0.3);
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.24rem; margin-bottom: 0.6rem; color: var(--cream); letter-spacing: 0.01em; }
.card p { color: var(--cream-dim); font-size: 0.97rem; }

/* =========================================================
   WORK / GALLERY
   ========================================================= */
.work { background: linear-gradient(180deg, var(--green-850), var(--green-900)); }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid var(--green-line);
  background: var(--green-800);
}
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11,22,14,0.85));
  opacity: 0.55; transition: opacity 0.35s var(--ease);
}
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1rem 1.1rem; font-size: 0.9rem; font-weight: 600; color: var(--cream);
  letter-spacing: 0.02em; transform: translateY(6px); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.gallery-item figcaption::before {
  content: ""; display: block; width: 26px; height: 2px; background: var(--gold); margin-bottom: 0.5rem;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item:hover::after { opacity: 0.8; }
.gallery-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* =========================================================
   ABOUT + STATS
   ========================================================= */
.about { background: linear-gradient(180deg, var(--green-900), var(--green-850)); }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--green-line); }
.about-media img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; }
.about-media-badge {
  position: absolute; bottom: 20px; left: 20px;
  background: rgba(11,22,14,0.82); backdrop-filter: blur(6px);
  border: 1px solid rgba(200,162,74,0.4); border-radius: 12px;
  padding: 0.9rem 1.3rem; display: flex; flex-direction: column; line-height: 1;
}
.badge-word { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.62rem; color: var(--cream-dim); }
.badge-legend { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--gold-light); margin-top: 5px; }

.about-copy p { color: var(--cream-dim); margin-top: 1.1rem; }
.about-copy .section-title { margin-bottom: 0.4rem; }

.stats { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2.2rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.7rem); color: var(--gold-light); line-height: 1; }
.stat-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 0.5rem; }
.stat-label sup { color: var(--gold); }
.stats-note { font-size: 0.78rem; color: var(--muted); margin-top: 1.2rem; font-style: italic; }
.stats-note sup { color: var(--gold); }

/* =========================================================
   PROCESS
   ========================================================= */
.process { background: linear-gradient(180deg, var(--green-850), var(--green-900)); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; counter-reset: step; }
.step {
  position: relative; padding: 2rem 1.7rem 1.8rem;
  background: linear-gradient(160deg, var(--green-800), var(--green-850));
  border: 1px solid var(--green-line); border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step:hover { transform: translateY(-5px); border-color: rgba(200,162,74,0.35); }
.step-num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: rgba(200,162,74,0.35); display: block; margin-bottom: 0.6rem; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.14rem; color: var(--cream); margin-bottom: 0.5rem; }
.step p { color: var(--cream-dim); font-size: 0.95rem; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { position: relative; overflow: hidden; text-align: center; }
.contact-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,22,14,0.9), rgba(11,22,14,0.97)),
              url("../assets/images/new-construction-tower.jpeg") center 30% / cover no-repeat;
}
.contact-inner { position: relative; z-index: 2; max-width: 760px; }
.contact-lead { color: var(--cream-dim); font-size: 1.08rem; margin: 1.2rem auto 0; max-width: 560px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.2rem; }

.contact-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-top: 3rem; }
.contact-detail {
  display: flex; align-items: center; gap: 0.85rem; text-align: left;
  background: rgba(18,36,23,0.7); border: 1px solid var(--green-line);
  padding: 0.9rem 1.2rem; border-radius: 12px; min-width: 240px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
a.contact-detail:hover { border-color: rgba(200,162,74,0.5); transform: translateY(-3px); }
.cd-icon { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--gold-light); background: rgba(200,162,74,0.12); border: 1px solid rgba(200,162,74,0.28); }
.cd-icon svg { width: 20px; height: 20px; }
.contact-detail > span:last-child { display: flex; flex-direction: column; font-size: 0.92rem; color: var(--cream); overflow-wrap: anywhere; }
.cd-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 2px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--green-950); border-top: 1px solid var(--green-line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: center; padding-top: 3rem; padding-bottom: 2.4rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-logo { width: 62px; height: 62px; object-fit: contain; }
.footer-legend { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.82rem; color: var(--gold-light); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-nav a { font-size: 0.9rem; color: var(--cream-dim); transition: color 0.2s var(--ease); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-contact { display: flex; flex-direction: column; gap: 0.35rem; text-align: right; font-size: 0.9rem; }
.footer-contact a { color: var(--cream); }
.footer-contact a:hover { color: var(--gold-light); }
.footer-license { color: var(--muted); font-size: 0.8rem; }
.footer-bar { border-top: 1px solid var(--green-line); }
.footer-bar-inner { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: space-between; padding: 1.1rem 0; font-size: 0.78rem; color: var(--muted); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 13, 8, 0.94); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s var(--ease); padding: 4vw;
}
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-figure { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow); }
.lb-figure figcaption { color: var(--cream); font-size: 0.95rem; letter-spacing: 0.02em; }
.lb-close { position: absolute; top: 18px; right: 24px; font-size: 2.4rem; line-height: 1; background: none; border: 0; color: var(--cream); cursor: pointer; transition: color 0.2s var(--ease); }
.lb-close:hover { color: var(--gold-light); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(18,36,23,0.7); border: 1px solid var(--green-line); color: var(--cream);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lb-nav:hover { background: rgba(200,162,74,0.2); border-color: var(--gold); }
.lb-prev { left: 3vw; }
.lb-next { right: 3vw; }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards .card:nth-child(2), .steps .step:nth-child(2), .gallery-item:nth-child(2) { transition-delay: 0.05s; }
.cards .card:nth-child(3), .steps .step:nth-child(3), .gallery-item:nth-child(3) { transition-delay: 0.1s; }
.cards .card:nth-child(4), .steps .step:nth-child(4), .gallery-item:nth-child(4) { transition-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; transform: none; }
  .scroll-cue span { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item.wide { grid-column: span 2; }
  .gallery-item.tall { grid-row: span 1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 520px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; z-index: 120; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.6rem;
    background: rgba(11,22,14,0.98); backdrop-filter: blur(14px);
    padding: 2rem 2.2rem; transform: translateX(100%); transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--green-line);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.1rem; }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contact { text-align: left; }
}

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-item.wide { grid-column: span 1; }
  .hero-content { padding-top: 110px; }
  .btn { width: 100%; }
  .hero-actions, .contact-actions { width: 100%; }
  .contact-detail { min-width: 100%; }
}
