/* ========================================
   J9 Builders — Styles
   ======================================== */

/* ---------- Custom Properties ---------- */
:root {
  --color-primary: #1a1a2e;
  --color-primary-light: #16213e;
  --color-accent: #c8a44e;
  --color-accent-hover: #b8933e;
  --color-bg: #f7f7f8;
  --color-bg-alt: #ffffff;
  --color-text: #3a3a4a;
  --color-text-light: #6b6b7b;
  --color-white: #ffffff;
  --color-border: #e4e4e8;

  --font-heading: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1200px;
  --header-height: 72px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --transition: 0.3s ease;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-primary);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 164, 78, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

/* ========================================
   HEADER / NAV
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(26, 26, 46, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  z-index: 1001;
}

.logo img {
  border-radius: 6px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link--cta {
  background: var(--color-accent);
  color: var(--color-primary) !important;
  font-weight: 600;
}

.nav-link--cta:hover {
  background: var(--color-accent-hover);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger active state */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Swap gradient for a real construction photo: background-image: url('hero.jpg'); */
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 30%, #16213e 60%, #1a2640 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200, 164, 78, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(200, 164, 78, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   SECTIONS (shared)
   ======================================== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ========================================
   ABOUT
   ======================================== */
.about {
  background: var(--color-bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin-bottom: 18px;
  color: var(--color-text);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--color-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
}

/* ========================================
   SERVICES
   ======================================== */
.services {
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-desc {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ========================================
   WHY CHOOSE US
   ======================================== */
.why-us {
  background: var(--color-primary);
}

.why-us .section-tag {
  color: var(--color-accent);
}

.why-us .section-title {
  color: var(--color-white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.why-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}

.why-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(200, 164, 78, 0.3);
  transform: translateY(-4px);
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(200, 164, 78, 0.12);
  border-radius: 50%;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.why-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 10px;
}

.why-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  background: var(--color-bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.contact-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.contact-item a {
  color: var(--color-accent);
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.6);
  padding-top: 64px;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 340px;
}

.footer h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.55);
}

.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 0.82rem;
}

.back-to-top {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition);
}

.back-to-top:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.fade-in-up:nth-child(5) { transition-delay: 0.35s; }
.fade-in-up:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-primary);
    padding: 100px 32px 40px;
    transition: right var(--transition);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link--cta {
    text-align: center;
    margin-top: 8px;
  }

  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-content {
    padding: 100px 16px 60px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 20px 12px;
  }
}

