/* ============================================================
   DD BuildingTech.ai — Styles (Figma-accurate)
   Design: 1440px canvas → responsive
   Colors: #0158FF (primary), #01143C (heading), #242424 (body)
   Fonts: Plus Jakarta Sans (headings), Poppins (body), Inter (cards)
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #01143C;
  background: #fff;
  overflow-x: hidden;
}

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

/* --- CONTAINER (Figma: 1240px content, 100px padding each side on 1440) --- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 100px;
}

@media (max-width: 1024px) { .container { padding: 0 40px; } }
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* --- BUTTONS (Figma: padding 15px 30px, border-radius 75px, glow shadow) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(14px, 1.47vw, 21px);
  line-height: 130%;
  border-radius: 75px;
  padding: 15px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: #0158FF;
  color: #fff;
  box-shadow: 0px 0px 19px #8BBDFF, inset 0px 0px 15px #E2E7FA;
}

.btn--primary:hover {
  background: #0047d4;
  transform: translateY(-2px);
  box-shadow: 0px 0px 28px #8BBDFF, inset 0px 0px 15px #E2E7FA;
}

.btn--white {
  background: #FFFFFF;
  color: #0158FF;
  box-shadow: 0px 0px 19px #8BBDFF, inset 0px 0px 15px #E2E7FA;
}

.btn--white:hover {
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0px 0px 28px #8BBDFF, inset 0px 0px 15px #E2E7FA;
}

.btn--hero {
  padding: 15px 30px;
  min-width: 170px;
}

.btn--glow {
  background: linear-gradient(135deg, #0158FF, #3388FF);
  color: #fff;
  box-shadow: 0 0 30px rgba(1, 88, 255, 0.5), 0 0 60px rgba(1, 88, 255, 0.2);
  padding: 16px 40px;
  font-size: 18px;
}

.btn--glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(1, 88, 255, 0.7), 0 0 80px rgba(1, 88, 255, 0.3);
}

/* --- PILL / BADGE (Figma: border 0.57px solid #0158FF, border-radius 43px) --- */
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: #0158FF;
  background: #fff;
  border: 0.57px solid #0158FF;
  border-radius: 43px;
  padding: 8px 17px;
  margin-bottom: 16px;
  box-shadow: 0px 0px 10px rgba(139, 189, 255, 0.7), inset 0px 0px 8px #E2E7FA;
}

/* --- SECTION TITLES --- */
.section-title {
  font-size: clamp(30px, 3.33vw, 48px);
  font-weight: 700;
  line-height: 110%;
  margin-bottom: 12px;
  text-align: center;
}

.section-title--blue { color: #0158FF; }

.section-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 500;
  color: #424754;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 150%;
}


/* ============================================================
   1. NAVBAR (Figma: height 70px, gap 120px, top 93px)
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.navbar--scrolled {
  box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 100px 10px;
  gap: 40px;
}

.navbar__logo { flex-shrink: 0; }

.navbar__logo-img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.navbar__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.navbar__link {
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 500;
  color: #000;
  transition: color 0.2s ease;
  position: relative;
}

.navbar__link:hover { color: #0158FF; }

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0158FF;
  transition: width 0.3s ease;
}

.navbar__link:hover::after { width: 100%; }

.navbar__cta {
  padding: 12px 24px;
  font-size: clamp(13px, 1.1vw, 16px);
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #01143C;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar__hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.active span:nth-child(2) { opacity: 0; }
.navbar__hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   2. HERO SECTION (Figma: 1440x1237, bg #FAFAFA, blue blur glow)
   ============================================================ */
.hero {
  position: relative;
  padding-top: 86px;
  background: #FAFAFA;
  overflow: hidden;
}

/* Blue blur glow at bottom (Figma: Ellipse 6, #006FFF, blur 200px) */
.hero__glow {
  position: absolute;
  width: 140%;
  height: 400px;
  left: -20%;
  bottom: -100px;
  background: #006FFF;
  filter: blur(200px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.hero__text-container {
  position: relative;
  z-index: 2;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 1030px;
  margin: 0 auto;
  padding-top: clamp(40px, 5.5vw, 80px);
  text-align: center;
}

/* Figma: 64px, weight 600, line-height 100%, color #01143C */
.hero__title {
  font-size: clamp(32px, 4.44vw, 64px);
  font-weight: 600;
  line-height: 100%;
  color: #01143C;
  letter-spacing: -0.5px;
}

/* Figma: Poppins 24px, weight 500, line-height 120%, color #242424 */
.hero__subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(16px, 1.67vw, 24px);
  font-weight: 500;
  line-height: 120%;
  color: #242424;
  max-width: 844px;
}

/* Figma: gap 24px */
.hero__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* Hero image wrapper — full viewport width, edge to edge */
.hero__image-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: clamp(20px, 2.5vw, 40px);
  z-index: 1;
}

/* Bottom gradient fade */
.hero__image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, #FAFAFA);
  pointer-events: none;
  z-index: 1;
}

.hero__image {
  width: 100%;
  display: block;
}

/* ---- STAT CARDS (Figma: Inter font, #F8FAFC bg, individual sizing) ---- */
.stat-card {
  position: absolute;
  background: #F8FAFC;
  border: 0.75px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  animation: floatCard 5s ease-in-out infinite;
  z-index: 2;
  font-family: 'Inter', sans-serif;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.stat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Icon containers — each card has a unique accent color */
.stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.stat-card__icon--amber {
  width: 28px;
  height: 28px;
  padding: 6px;
  background: rgba(245, 158, 11, 0.1);
}

.stat-card__icon--green {
  width: 26px;
  height: 26px;
  padding: 5px;
  background: rgba(5, 150, 105, 0.1);
}

.stat-card__icon--blue {
  width: 27px;
  height: 27px;
  padding: 6px;
  background: rgba(1, 88, 255, 0.1);
}

/* Badge pills — each card has a unique badge color */
.stat-card__badge {
  font-size: 9px;
  font-weight: 700;
  border-radius: 9999px;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 13px;
}

.stat-card__badge--amber {
  color: #F59E0B;
  background: #FFFBEB;
}

.stat-card__badge--green {
  color: #009966;
  background: #ECFDF5;
}

.stat-card__badge--blue {
  color: #0158FF;
  background: #ECFDF5;
}

.stat-card__label {
  font-weight: 500;
  color: rgba(30, 41, 59, 0.6);
  line-height: 143%;
}

.stat-card__value {
  font-weight: 700;
  color: #1E293B;
  line-height: 133%;
}

.stat-card__value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-card__sub {
  font-weight: 500;
  color: rgba(30, 41, 59, 0.4);
}

/* ---- Individual card sizes & positions (Figma exact, scaled to %) ----
   Figma canvas: 1440px wide, image area starts at ~y478 of 1237px section.
   Positions are % of the image-wrapper.
   Card sizes scale with clamp(). */

/* Grid Export — 244×125, Figma left:66 top:860 */
.stat-card--grid-export {
  width: clamp(180px, 16.9vw, 244px);
  padding: clamp(14px, 1.3vw, 20px);
  top: 50%;
  left: 4.6%;
  animation-delay: 0s;
}

.stat-card--grid-export .stat-card__label { font-size: clamp(9px, 0.77vw, 11px); }
.stat-card--grid-export .stat-card__value { font-size: clamp(14px, 1.32vw, 19px); }

/* Bill Reduction — 176×90, Figma left:839 top:876 (smallest card) */
.stat-card--bill-reduction {
  width: clamp(140px, 12.2vw, 176px);
  padding: clamp(10px, 1vw, 14px);
  top: 52%;
  left: 58.3%;
  animation-delay: 0.5s;
}

.stat-card--bill-reduction .stat-card__label { font-size: clamp(7px, 0.56vw, 8px); }
.stat-card--bill-reduction .stat-card__value { font-size: clamp(11px, 0.95vw, 14px); }
.stat-card--bill-reduction .stat-card__icon--green { width: 21px; height: 21px; padding: 4px; }

/* Self-Consumption — 216×111, Figma left:284 top:1098 */
.stat-card--self-consumption {
  width: clamp(160px, 15vw, 216px);
  padding: clamp(12px, 1.2vw, 18px);
  top: 82%;
  left: 19.7%;
  animation-delay: 1s;
}

.stat-card--self-consumption .stat-card__label { font-size: clamp(8px, 0.68vw, 10px); }
.stat-card--self-consumption .stat-card__value { font-size: clamp(12px, 1.17vw, 17px); }
.stat-card--self-consumption .stat-card__sub { font-size: clamp(8px, 0.68vw, 10px); }

/* Total Production — 230×118, Figma left:1130 top:1039 */
.stat-card--total-production {
  width: clamp(170px, 16vw, 230px);
  padding: clamp(13px, 1.3vw, 19px);
  top: 74%;
  left: 78.5%;
  animation-delay: 1.5s;
}

.stat-card--total-production .stat-card__label { font-size: clamp(9px, 0.73vw, 10.5px); }
.stat-card--total-production .stat-card__value { font-size: clamp(13px, 1.24vw, 18px); }


/* ============================================================
   3. TRUSTED BY (Figma: bg #FFFFFF, 205px tall, logos height ~80px)
   ============================================================ */
.trusted {
  padding: 40px 0;
  background: #FFFFFF;
}

.trusted__text {
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(14px, 1.67vw, 24px);
  font-weight: 400;
  color: #868686;
  margin-bottom: 32px;
}

.trusted__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.trusted__logos img {
  height: clamp(32px, 4.2vw, 56px);
  width: auto;
  transition: opacity 0.3s ease;
}

.trusted__logos img:hover {
  opacity: 0.7;
}


/* ============================================================
   4. SERVICES (Figma: bg #F2F7FF, content 1240px, gap 64px)
   ============================================================ */
.services {
  padding: 100px 0;
  background: #F2F7FF;
  text-align: center;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease;
  text-align: left;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.service-card__img-wrapper { width: 100%; overflow: hidden; background: #fff; }

.service-card__img-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card__img-wrapper img { transform: scale(1.03); }

.service-card__title {
  font-size: 18px;
  font-weight: 700;
  color: #0158FF;
  padding: 20px 20px 8px;
}

.service-card__desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #424754;
  line-height: 1.6;
  padding: 0 20px 20px;
}

.service-card:nth-child(1),
.service-card:nth-child(2),
.service-card:nth-child(3) { grid-column: span 2; }
.service-card:nth-child(4) { grid-column: 1 / 4; }
.service-card:nth-child(5) { grid-column: 4 / 7; }

/* Wide horizontal cards */
.service-card--horizontal { display: flex; align-items: center; }

.service-card--horizontal .service-card__text { flex: 1; padding: 24px; }
.service-card--horizontal .service-card__text .service-card__title { padding: 0 0 8px; }
.service-card--horizontal .service-card__text .service-card__desc { padding: 0; }
.service-card--horizontal .service-card__img-wrapper { width: 50%; flex-shrink: 0; }
.service-card--horizontal .service-card__img-wrapper img { height: 100%; min-height: 200px; }


/* ============================================================
   5. PROCESS (Figma: bg white, blue cards #0158FF)
   ============================================================ */
.process {
  padding: 100px 0;
  background: #fff;
  text-align: center;
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-card {
  background: #0158FF;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: left;
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.process-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(1, 88, 255, 0.3);
}

.process-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  color: #0158FF;
  font-size: 16px;
  font-weight: 800;
  border-radius: 12px;
  margin-bottom: 24px;
}

.process-card__title { font-size: 20px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.process-card__desc { font-family: 'Poppins', sans-serif; font-size: 14px; line-height: 1.7; opacity: 0.9; margin-top: auto; }


/* ============================================================
   6. CAPABILITIES (Figma: bg #F4F6FF)
   ============================================================ */
.capabilities {
  padding: 100px 0;
  background: #F4F6FF;
  text-align: center;
}

.capabilities__rows {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 16px;
}

.capabilities__row { display: flex; align-items: center; gap: 60px; text-align: left; }
/* Row 2 (AI Intelligence): HTML order is already [image, text], no reversal needed */
.capabilities__text { flex: 1; }

.capabilities__title {
  font-size: clamp(24px, 2.22vw, 32px);
  font-weight: 800;
  color: #0158FF;
  margin-bottom: 16px;
}

.capabilities__desc {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #424754;
  line-height: 1.7;
}

.capabilities__image { flex: 1; }
.capabilities__image img { width: 100%; border-radius: 16px; }


/* ============================================================
   7. CTA BANNER (Figma: bg #0A0B1E)
   ============================================================ */
.cta {
  position: relative;
  background: #0A0B1E;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 100%;
  background: radial-gradient(ellipse at top center, rgba(1, 88, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cta__content { position: relative; z-index: 1; }

.cta__title {
  font-size: clamp(28px, 2.92vw, 42px);
  font-weight: 800;
  color: #fff;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.2;
}


/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  background: #fff;
  padding: 64px 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #E5E7EB;
}

.footer__logo img { height: 48px; width: auto; margin-bottom: 16px; }

.footer__tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #424754;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 280px;
}

.footer__copyright { font-size: 13px; color: #868686; }

.footer__heading { font-size: 15px; font-weight: 700; color: #01143C; margin-bottom: 20px; }

.footer__list li { margin-bottom: 12px; }

.footer__list a {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #424754;
  transition: color 0.2s ease;
}

.footer__list a:hover { color: #0158FF; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 32px;
}

.footer__badges { display: flex; align-items: center; gap: 16px; }
.footer__badges img { height: 40px; width: auto; opacity: 0.6; }

.footer__socials { display: flex; align-items: center; gap: 12px; }

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.footer__social:hover { transform: translateY(-2px); }
.footer__social img { width: 36px; height: 36px; object-fit: cover; }


/* ============================================================
   MOBILE OVERLAY NAV
   ============================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.active { opacity: 1; visibility: visible; }


/* ============================================================
   RESPONSIVE — TABLET (1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .navbar__inner { padding: 14px 40px; }
  .navbar__logo-img { height: 44px; max-width: 180px; }

  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(3),
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: span 1; }

  .process__grid { grid-template-columns: repeat(2, 1fr); }
  .capabilities__row { gap: 40px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (768px)
   ============================================================ */
@media (max-width: 768px) {
  .navbar__inner { padding: 12px 16px; gap: 12px; }
  .navbar__logo-img { height: 36px; max-width: 150px; }

  .navbar__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 100px 32px 32px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .navbar__nav.active { right: 0; }
  .navbar__links { flex-direction: column; gap: 24px; align-items: flex-start; }
  .navbar__link { font-size: 18px; }
  .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }

  .hero__buttons { flex-direction: column; gap: 14px; }
  .hero__buttons .btn { width: 100%; max-width: 280px; }

  /* Stat cards — scale down and reposition */
  .stat-card--grid-export { top: 40%; left: 2%; }
  .stat-card--bill-reduction { top: 42%; left: auto; right: 3%; }
  .stat-card--self-consumption { top: 75%; left: 3%; }
  .stat-card--total-production { top: 68%; left: auto; right: 2%; }

  .trusted__logos { gap: 16px; justify-content: center; }
  .trusted__logos img { height: clamp(24px, 8vw, 36px); }

  .services__grid { grid-template-columns: 1fr; }
  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(3),
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: span 1; }
  .service-card--horizontal { flex-direction: column; }
  .service-card--horizontal .service-card__img-wrapper { width: 100%; }
  .service-card--horizontal .service-card__img-wrapper img { height: 200px; }

  .process__grid { grid-template-columns: 1fr; }

  .capabilities__row,
  .capabilities__row--reverse { flex-direction: column; gap: 24px; }

  .cta { padding: 80px 0; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 24px; align-items: center; }
  .footer__badges { justify-content: center; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (480px)
   ============================================================ */
@media (max-width: 480px) {
  .stat-card { display: none; }
  .hero__glow { height: 200px; filter: blur(120px); }
}
