/* =========================================
   L&D Construction — Design System v2
   Inspired by: Spence (spenceltd.co.uk)
   Awwwards Honorable Mention construction aesthetic
   Re-branded for L&D Construction · Denver, CO
   ========================================= */

/* ---------- Tokens ---------- */
:root {
  /* Backgrounds */
  --bg-dark:      #0e1e2d;
  --bg-dark-2:    #142838;
  --bg-light:     #f5f4f0;
  --bg-white:     #ffffff;

  /* Brand */
  --navy:         #21405d;
  --navy-deep:    #17304a;
  --accent:       #e8734a;
  --accent-hover: #d45f36;
  --accent-muted: rgba(232,115,74,0.15);

  /* Text */
  --text-dark:    #1a2a3a;
  --text-body:    #525c5e;
  --text-muted:   #8a9295;
  --text-light:   #f5f4f0;
  --text-light-muted: rgba(245,244,240,0.6);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width:    1200px;
  --gutter:       clamp(1.5rem, 4vw, 3rem);
  --nav-height:   80px;

  /* Spacing */
  --space-xs:     0.25rem;
  --space-sm:     0.5rem;
  --space-md:     1rem;
  --space-lg:     1.5rem;
  --space-xl:     2rem;
  --space-2xl:    3rem;
  --space-3xl:    4.5rem;
  --space-4xl:    6rem;
  --space-5xl:    clamp(5rem, 10vw, 8rem);

  /* Motion */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0, 1);
  --transition:   0.5s var(--ease-smooth);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
::selection { background: var(--accent-muted); color: var(--navy); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide { max-width: 1400px; }

/* ---------- Typography (Spence-inspired) ---------- */
.t-hero {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.t-xl { font-size: clamp(2.75rem, 6vw, 5rem); }
.t-lg { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.t-md { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.t-sm { font-size: clamp(1.25rem, 2vw, 1.75rem); }

.t-body-xl {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.8;
}
.t-body-lg {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.85;
}
.t-body {
  font-size: 0.9375rem;
  line-height: 1.8;
}
.t-eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

/* ---------- Navigation (Spence-inspired) ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 0 var(--gutter);
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
  transition: background 0.4s, border-color 0.4s;
}
.nav--scrolled {
  background: rgba(14,30,45,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__logo { height: 36px; width: auto; filter: brightness(0) invert(1); transition: filter 0.3s; }
.nav__links { display: none; align-items: center; gap: var(--space-2xl); }
@media (min-width: 768px) { .nav__links { display: flex; } }
.nav__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.nav__link:hover { opacity: 1; }

/* CTA button in nav (Spence pill style) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.5rem 0.625rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  transition: all 0.35s var(--ease-smooth);
  white-space: nowrap;
}
.btn-pill:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-pill__icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s var(--ease-smooth);
}
.btn-pill:hover .btn-pill__icon { transform: rotate(45deg); }
.btn-pill__icon svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; }

/* Large CTA pill */
.btn-pill--lg {
  padding: 0.875rem 2rem 0.875rem 2.25rem;
  font-size: 0.875rem;
}
.btn-pill--lg .btn-pill__icon { width: 36px; height: 36px; }
.btn-pill--lg .btn-pill__icon svg { width: 14px; height: 14px; }

/* Dark surface pill variant */
.btn-pill--dark {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-light);
}
/* Light surface pill variant */
.btn-pill--light {
  border-color: rgba(30,42,56,0.2);
  color: var(--text-dark);
}
.btn-pill--light:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ---------- Hero (Spence full-viewport) ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(14,30,45,0.35) 0%,
    rgba(14,30,45,0.2) 40%,
    rgba(14,30,45,0.7) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%;
  padding: 0 var(--gutter) var(--space-4xl);
}
.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.2vw, 1.0625rem);
  font-weight: 400;
  color: var(--text-light-muted);
  max-width: 480px;
  margin-bottom: var(--space-2xl);
}
.hero__buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---------- Dot Pattern (Spence signature) ---------- */
.dot-pattern {
  position: absolute;
  width: 200px; height: 200px;
  background-image: radial-gradient(circle, rgba(232,115,74,0.35) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Intro / 2-Column Text (Spence dark section) ---------- */
.intro-section {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: var(--space-5xl) 0;
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}
@media (min-width: 768px) {
  .intro-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4xl); }
}
.intro-grid__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.intro-grid__body {
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.85;
  color: var(--text-light-muted);
}

/* ---------- Full-Bleed Image Section ---------- */
.fs-image {
  width: 100%;
  height: 80vh;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}
.fs-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Services Split (Spence signature layout) ---------- */
.service-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 90vh;
}
@media (min-width: 768px) {
  .service-split { grid-template-columns: 1fr 1fr; }
}

.service-split__media {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}
.service-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.service-split:hover .service-split__media img { transform: scale(1.03); }

.service-split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-4xl) var(--space-3xl);
  background: var(--bg-light);
}

/* Dot pattern navigation for services */
.service-nav {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}
.service-nav__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: transparent;
  transition: all 0.3s;
  cursor: pointer;
}
.service-nav__dot--active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Testimonials (dark bg, editorial) ---------- */
.testimonials-section {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: var(--space-5xl) 0;
  overflow: hidden;
}
.testimonial-track {
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-xl);
  scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-slide {
  flex: 0 0 min(500px, 85vw);
  scroll-snap-align: start;
  padding: var(--space-3xl);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s;
}
.testimonial-slide:hover { border-color: rgba(232,115,74,0.4); }
.testimonial-slide blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-light);
  flex: 1;
}
.testimonial-slide cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-top: var(--space-xl);
}

/* ---------- Video Section ---------- */
.video-section {
  background: var(--bg-light);
  padding: var(--space-5xl) 0;
}
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- Process Steps ---------- */
.process-section {
  background: var(--bg-light);
  padding: var(--space-5xl) 0;
}
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 768px) { .process-grid { grid-template-columns: 1fr 1fr; } }
.process-step {
  padding: var(--space-2xl) var(--space-xl);
  border-bottom: 1px solid rgba(30,42,56,0.1);
  transition: background 0.35s;
}
.process-step:hover { background: rgba(232,115,74,0.04); }
@media (min-width: 768px) {
  .process-step { border-right: 1px solid rgba(30,42,56,0.1); }
  .process-step:nth-child(2n) { border-right: none; }
}
.process-step__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--accent-muted);
  line-height: 1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}
.process-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}
.process-step__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--navy);
  color: var(--text-light);
  text-align: center;
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

/* ---------- Footer (Spence dark) ---------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) {
  .footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer__brand-text {
  font-size: 0.875rem;
  color: var(--text-light-muted);
  line-height: 1.7;
  max-width: 300px;
}
.footer__col-title {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--space-md);
}
.footer__link {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-light-muted);
  padding: 0.25rem 0;
  transition: color 0.3s;
}
.footer__link:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  color: var(--text-light-muted);
}

/* ---------- Reveal Animation ---------- */
.reveal { opacity: 0; transform: translateY(40px); }
.hero-reveal { opacity: 0; transform: translateY(50px); }

/* ---------- Utilities ---------- */
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.text-accent { color: var(--accent); }

/* ---------- Mobile Menu ---------- */
.hamburger {
  display: flex; flex-direction: column; gap: 6px; width: 26px;
  cursor: pointer; z-index: 101; padding: 4px 0;
}
.hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--text-light); transition: all 0.3s; transform-origin: center;
}
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger--open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.hamburger--open span:nth-child(2) { opacity: 0; }
.hamburger--open span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; background: var(--bg-dark); z-index: 99;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 0 var(--gutter); gap: var(--space-sm);
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.mobile-menu--open { opacity: 1; pointer-events: all; }
.mobile-menu__link {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 400;
  color: var(--text-light); line-height: 1.3; transition: color 0.3s;
}
.mobile-menu__link:hover { color: var(--accent); }
.mobile-menu__divider { width: 40px; height: 1px; background: rgba(255,255,255,0.15); margin: var(--space-lg) 0; }
.mobile-menu__cta {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  background: var(--accent); color: #fff;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  border-radius: 50px;
  transition: background 0.3s;
}
.mobile-menu__cta:hover { background: var(--accent-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .hero { min-height: 100svh; }
  .hero__content { padding-bottom: var(--space-2xl); }
  .service-split { min-height: auto; }
  .service-split__content { padding: var(--space-2xl) var(--gutter); }
  .service-split__media { min-height: 300px; }
  .service-nav { display: none; }
  .footer__bottom { flex-direction: column; gap: var(--space-sm); align-items: flex-start; }
  .process-step { border-right: none !important; }
}

@media (max-width: 480px) {
  .t-hero { font-size: 2.75rem; }
}

/* Pulse animation for status dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
