/* ============================================================
   MASTERCRAFT CONSTRUCTION — Homepage Styles
   Light/dark theme — hero dark, services light, why-us dark
   ============================================================ */

/* ── Hero — dark ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--clr-void);
}

/* ── Hero photo background ───────────────────────────────── */
/* Photo: Men on steel-frame construction site — Pexels / Davide Locatelli (free) */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);

  /* Layer stack (top→bottom):
     1. Citrus scratch lines (decorative)
     2. Dark overlay — dims photo, keeps text readable
     3. Citrus gradient left-edge burn
     4. The photo itself
  */
  background-image:
    /* Decorative citrus scratch lines */
    repeating-linear-gradient(
      -55deg,
      transparent,
      transparent 3px,
      rgba(184,240,0,0.025) 3px,
      rgba(184,240,0,0.025) 4px
    ),
    repeating-linear-gradient(
      35deg,
      transparent,
      transparent 8px,
      rgba(255,122,0,0.012) 8px,
      rgba(255,122,0,0.012) 9px
    ),
    /* Directional fade: near-opaque left (text side) → clear right (photo breathes) */
    linear-gradient(
      to right,
      rgba(13,15,14,0.96) 0%,
      rgba(13,15,14,0.88) 30%,
      rgba(13,15,14,0.55) 60%,
      rgba(13,15,14,0.20) 100%
    ),
    url('../assets/img/pexels-davidelocatelli-2383650.webp');

  background-size: 120px 120px, 80px 80px, 100% 100%, cover;
  background-position: center, center, center, center 40%;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  /* iOS Safari ignores background-attachment:fixed on non-body elements
     and causes scroll jitter. Default to scroll; apply fixed only where
     hover is reliably available (non-touch devices).                    */
  background-attachment: scroll, scroll, scroll, scroll;

  /* Fallback if photo fails to load */
  background-color: var(--clr-void);

  /* Soft vignette at bottom */
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Diagonal citrus slash */
.hero__slash {
  position: absolute;
  top: -10%; right: -5%;
  width: 55%; height: 120%;
  background: linear-gradient(135deg,
    rgba(255,122,0,0.07) 0%,
    rgba(255,180,0,0.04) 40%,
    rgba(184,240,0,0.04) 70%,
    transparent 90%
  );
  transform: skewX(-8deg);
  z-index: var(--z-base);
  pointer-events: none;
}

/* Citrus glow orb */
.hero__glow {
  position: absolute;
  bottom: -20%; right: 10%;
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  background: radial-gradient(circle,
    rgba(255,122,0,0.08) 0%,
    rgba(184,240,0,0.05) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: var(--z-base);
}

.hero__content {
  position: relative;
  z-index: var(--z-local);
  padding-block: var(--sp-16);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-condensed);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-ultra);
  text-transform: uppercase;
  color: var(--clr-lime);
  margin-bottom: var(--sp-5);
  opacity: 0;
  animation: fadeIn var(--t-slow) var(--ease-out) 0.2s forwards;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--gradient-citrus-text);
}

.hero__heading {
  font-family: var(--ff-display);
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--clr-white);
  margin-bottom: var(--sp-6);
  opacity: 0;
  animation: fadeUp var(--t-xslow) var(--ease-out) 0.35s forwards;
}
.hero__heading .line-lime {
  display: block;
  background: var(--gradient-citrus-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--clr-lime);
}
.hero__heading .line-outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 2px var(--clr-white);
}
@supports not (-webkit-text-stroke: 1px black) {
  .hero__heading .line-outline { color: var(--clr-white); opacity: 0.3; }
}

.hero__sub {
  font-size: var(--fs-md);
  font-weight: 300;
  color: var(--clr-muted-dark);
  max-width: 44ch;
  margin-bottom: var(--sp-10);
  line-height: var(--lh-relaxed);
  opacity: 0;
  animation: fadeUp var(--t-xslow) var(--ease-out) 0.5s forwards;
}
.hero__sub strong { color: var(--clr-white); font-weight: 600; }

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: stretch;
  opacity: 0;
  animation: fadeUp var(--t-xslow) var(--ease-out) 0.65s forwards;
}
.hero__actions .btn { justify-content: center; width: 100%; }

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .hero__actions .btn { width: auto; justify-content: flex-start; }
}

.hero__actions .btn--primary {
  animation: pulse-lime 2.5s ease-in-out 1.5s infinite;
}

/* Hero stats bar */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-top: var(--sp-14);
  padding-top: var(--sp-10);
  border-top: 1px solid var(--clr-border-dark);
  opacity: 0;
  animation: fadeUp var(--t-xslow) var(--ease-out) 0.8s forwards;
}
.hero__stat-num {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-none);
  display: block;
  background: var(--gradient-citrus-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--clr-lime);
}
.hero__stat-label {
  font-family: var(--ff-condensed);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--clr-muted-dark);
  display: block;
  margin-top: var(--sp-1);
}

/* ── Trust Bar — dark ────────────────────────────────────── */
.trust-bar {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border-dark);
  border-bottom: 3px solid transparent;
  border-image: var(--gradient-citrus) 1;
  padding-block: var(--sp-5);
}
.trust-bar__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4) var(--sp-6);
  align-items: center;
  justify-items: center;
}
/* 2 columns on small phones+ */
@media (min-width: 480px) {
  .trust-bar__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 3-across via 6-col span grid so the orphaned last 2 items
   center on row 2 (3 top, 2 centered below — pyramid balance) */
@media (min-width: 768px) {
  .trust-bar__inner { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .trust-item { grid-column: span 2; }
  .trust-item:nth-child(4) { grid-column: 2 / span 2; }
  .trust-item:nth-child(5) { grid-column: 4 / span 2; }
}
/* All 5 across on desktop, evenly distributed */
@media (min-width: 1024px) {
  .trust-bar__inner {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--sp-4);
  }
  .trust-item,
  .trust-item:nth-child(4),
  .trust-item:nth-child(5) { grid-column: auto; }
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--ff-condensed);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--clr-muted-dark);
  text-align: center;
}
.trust-item i {
  color: var(--clr-lime);
  flex-shrink: 0;
  display: block;
  line-height: var(--lh-none);
}

/* ── Services Preview — light ────────────────────────────── */
.services-preview {
  background: var(--clr-light-bg);
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-gap);
  margin-top: var(--sp-10);
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Service cards on light background */
.service-card {
  background: var(--clr-light-surface);
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--t-base) var(--ease-out),
    transform var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-citrus-glow);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.service-card:hover {
  border-color: var(--clr-lime-dim);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-lime);
}
.service-card:hover::before { opacity: 1; }

/* Icon box — stays accent-colored regardless of card bg */
.service-card__icon {
  width: 3rem;
  height: 3rem;
  background: var(--clr-void);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  position: relative;
  z-index: var(--z-local);
  transition: background var(--t-base), transform var(--t-base) var(--ease-out);
}
.service-card__icon i {
  background: var(--gradient-citrus-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--clr-lime); /* fallback */
  font-size: var(--fs-md);
  display: block;
  line-height: var(--lh-none);
}
.service-card:hover .service-card__icon {
  background: var(--clr-surface);
  transform: scale(1.08);
}

.service-card__title {
  font-family: var(--ff-condensed);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--clr-light-text);
  margin-bottom: var(--sp-2);
  position: relative;
  z-index: var(--z-local);
}
.service-card__desc {
  font-size: var(--fs-sm);
  color: var(--clr-light-muted);
  line-height: var(--lh-relaxed);
  position: relative;
  z-index: var(--z-local);
  max-width: none;
}

.services-preview__cta {
  text-align: center;
  margin-top: var(--sp-10);
}

/* ── Why Teaser — dark ───────────────────────────────────── */
/* Photo: Industrial concrete pipes/infrastructure — Unsplash / EJ Strat (free) */
.why-teaser {
  background: var(--clr-void);
  position: relative;
  overflow: hidden;

  background-image:
    /* Diagonal: near-opaque bottom-left (text) → image breathes top-right */
    linear-gradient(
      to top right,
      rgba(13,15,14,0.97) 0%,
      rgba(13,15,14,0.90) 35%,
      rgba(13,15,14,0.68) 65%,
      rgba(13,15,14,0.40) 100%
    ),
    url('../assets/img/pexels-rezwan-1078884.webp');
  background-size: 100% 100%, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.why-teaser::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gradient-citrus);
}
.why-teaser__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}
@media (min-width: 768px) {
  .why-teaser__grid {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--sp-20);
  }
}
@media (min-width: 1280px) {
  .why-teaser__grid { column-gap: var(--sp-24); }
}

.why-teaser__text p {
  font-size: var(--fs-md);
  font-weight: 300;
  color: var(--clr-muted-dark);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-6);
}
.why-teaser__text p strong { color: var(--clr-white); font-weight: 600; }

/* Checklist — on dark section */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.checklist__icon {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--gradient-citrus);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.checklist__icon i {
  color: var(--clr-void);
  font-size: 0.6rem;
  display: block;
  line-height: var(--lh-none);
}
.checklist__text {
  margin: 0;
  max-width: none;
  line-height: var(--lh-snug);
}
.checklist__label {
  font-family: var(--ff-condensed);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--clr-white);
  text-transform: uppercase;
  display: block;
}
.checklist__sublabel {
  font-size: var(--fs-sm);
  color: var(--clr-muted-dark);
  display: block;
}
