/* ==========================================================================
   SERVICES PAGE — services.css
   Gibeon Builders Construction | Exhibit 2
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. HERO BANNER
   -------------------------------------------------------------------------- */
.services-hero {
  position: relative;
  min-height: 60vh;
  background: var(--color-ink);
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  overflow: hidden;
}

/* Giant ghost background text */
.services-hero-bg-text {
  position: absolute;
  bottom: -20px;
  left: -10px;
  font-family: var(--font-display);
  font-size: clamp(160px, 20vw, 260px);
  font-weight: 700;
  line-height: 0.85;
  color: rgba(255, 255, 255, 0.03);
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* Breadcrumb — absolute positioned */
.services-hero-breadcrumb {
  position: absolute;
  top: 96px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0; /* revealed by GSAP */
}

.services-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.2s ease;
}

.services-hero-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.65);
}

.services-hero-breadcrumb .bc-sep {
  color: var(--color-red);
}

.services-hero-breadcrumb .bc-current {
  color: rgba(255, 255, 255, 0.7);
}

/* Foreground content */
.services-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

/* Small red label */
.services-hero-content .hero-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 20px;
  opacity: 0; /* revealed by GSAP */
}

/* Page heading */
.services-hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 700;
  color: white;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

/* Char-split animation elements (JS-injected, mirrors gallery style) */
.services-hero-title .char {
  display: inline-block;
  overflow: hidden;
}

.services-hero-title .char-inner {
  display: inline-block;
}

/* Animated red underline */
.services-hero-content .title-underline {
  width: 0;
  height: 3px;
  background: var(--color-red);
  margin-top: 28px;
  animation: svcDrawUnderline 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

@keyframes svcDrawUnderline {
  to { width: 64px; }
}

/* Subtext */
.services-hero-sub {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  max-width: 480px;
  margin-top: 24px;
  opacity: 0; /* revealed by GSAP */
}


/* --------------------------------------------------------------------------
   2. SERVICE BLOCKS (full-width alternating grid)
   -------------------------------------------------------------------------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  overflow: hidden;
  border-top: 1px solid rgba(17, 17, 16, 0.07);
}

/* Image on right: visually swap columns via order */
.service-block.img-right .service-img-panel { order: 2; }
.service-block.img-right .service-text-panel { order: 1; }

/* Image panel */
.service-img-panel {
  position: relative;
  overflow: hidden;
}

.service-img-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.service-block:hover .service-img-panel img {
  opacity: 1;
  transform: scale(1.04);
}

/* Gradient overlay — image-left blocks: dark on right edge */
.service-block:not(.img-right) .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 60%,
    rgba(14, 14, 13, 0.4) 100%
  );
  pointer-events: none;
}

/* Gradient overlay — image-right blocks: dark on left edge */
.service-block.img-right .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0) 60%,
    rgba(14, 14, 13, 0.4) 100%
  );
  pointer-events: none;
}

/* Text panel */
.service-text-panel {
  padding: 88px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-white);
}

/* Service 2 (design) uses stone background */
.service-block[data-service="design"] .service-text-panel {
  background: var(--color-stone);
}

/* Number + label row */
.svc-num-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.svc-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-red);
}

.svc-num-sep {
  flex-shrink: 0;
  width: 40px;
  height: 1px;
  background: rgba(17, 17, 16, 0.2);
}

.svc-num-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Service heading */
.service-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.1;
  margin-bottom: 24px;
}

/* Service body */
.service-body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: #4a4845;
  margin-bottom: 36px;
  max-width: 480px;
}

/* Feature list */
.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-ink);
}

.service-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
  flex-shrink: 0;
}

/* CTA link */
.service-cta-link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.25s ease;
}

.service-cta-link:hover {
  gap: 14px;
}


/* --------------------------------------------------------------------------
   3. PROCESS SECTION
   -------------------------------------------------------------------------- */
.section-process {
  background: var(--color-ink);
  padding: 130px 0;
}

.process-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.process-header {
  max-width: 560px;
  margin-bottom: 80px;
}

.process-h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
  margin-top: var(--space-3);
}

/* Timeline wrapper — position relative for the line */
.process-timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

/* Static background line */
.process-line-track {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
}

/* Animated red fill line — GSAP sets width 0→100% */
.process-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--color-red);
}

/* Individual step */
.process-step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-red);
  margin-bottom: 28px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(184, 19, 26, 0.2);
  transform: scale(0); /* popped in by GSAP */
}

.step-num {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 12px;
  display: block;
}

.step-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

.step-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.45);
  max-width: 160px;
}


/* --------------------------------------------------------------------------
   4. WHY CHOOSE US
   -------------------------------------------------------------------------- */
.section-why {
  background: var(--color-stone);
  padding: 80px 0;
}

.why-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

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

.reason-cell {
  background: var(--color-white);
  padding: 40px 36px;
  border-top: 2px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.reason-cell:hover {
  border-color: var(--color-red);
  background: var(--color-stone);
}

/* Geometric icon shapes */
.reason-icon {
  width: 40px;
  height: 40px;
  background: var(--color-red);
  opacity: 0.85;
  margin-bottom: 20px;
}

.reason-icon--circle {
  border-radius: 50%;
}

.reason-icon--square {
  border-radius: 0;
}

.reason-icon--diamond {
  transform: rotate(45deg);
  width: 28px;
  height: 28px;
  margin-top: 6px;
  margin-bottom: 26px;
}

.reason-icon--triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-radius: 0;
}

.reason-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.reason-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-muted);
}


/* --------------------------------------------------------------------------
   5. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .service-block {
    min-height: auto;
  }

  .service-text-panel {
    padding: 64px 52px;
  }
}

@media (max-width: 768px) {
  /* Hero */
  .services-hero {
    min-height: 50vh;
    padding-bottom: 56px;
  }

  .services-hero-breadcrumb {
    top: 60px;
    left: 28px;
  }

  .services-hero-title {
    font-size: clamp(40px, 9vw, 68px);
  }

  .services-hero-bg-text {
    font-size: clamp(100px, 22vw, 160px);
  }

  /* Service blocks — stack */
  .service-block {
    grid-template-columns: 1fr;
  }

  .service-block .service-img-panel {
    height: 55vw;
    min-height: 260px;
    /* Reset order so image always comes first when stacked */
    order: 1 !important;
  }

  .service-block .service-text-panel {
    order: 2 !important;
  }

  /* Fix Service 2: text should appear before image on mobile */
  .service-block.img-right .service-text-panel {
    order: 1 !important;
  }

  .service-block.img-right .service-img-panel {
    order: 2 !important;
  }

  .service-text-panel {
    padding: 56px 28px;
  }

  /* Process — vertical stack */
  .process-timeline {
    flex-direction: column;
    gap: 40px;
  }

  .process-line-track {
    display: none;
  }

  .process-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }

  .step-dot {
    margin-bottom: 0;
    margin-top: 4px;
    flex-shrink: 0;
  }

  .step-desc {
    max-width: none;
  }

  /* Reasons — 2 column */
  .reasons-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .reasons-grid {
    grid-template-columns: 1fr;
  }
}


/* --------------------------------------------------------------------------
   1. HERO BANNER
   -------------------------------------------------------------------------- */
.services-hero {
  position: relative;
  min-height: 50vh;
  background: var(--color-ink);
  display: flex;
  align-items: flex-end;
  padding: var(--space-16) var(--space-8) var(--space-12);
  padding-top: calc(var(--nav-height) + var(--space-16));
  overflow: hidden;
}

.services-hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(100px, 18vw, 200px);
  font-weight: 900;
  color: var(--color-white);
  opacity: 0.025;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
  line-height: 1;
}

.services-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  width: 100%;
  margin-inline: auto;
}

.services-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 640px;
  margin-top: var(--space-4);
}


/* --------------------------------------------------------------------------
   2. SERVICE BLOCKS (alternating)
   -------------------------------------------------------------------------- */
.section-service-block {
  padding: var(--space-24) 0;
}

.section-service-block:nth-child(odd) {
  background: var(--color-white);
}

.section-service-block:nth-child(even) {
  background: var(--color-stone);
}

.service-block-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

/* Image-right variant */
.service-block-inner.img-right {
  direction: rtl;
}

.service-block-inner.img-right > * {
  direction: ltr;
}

.service-block-img {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4/3;
}

.service-block-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-xslow) var(--ease-smooth);
}

.service-block-img:hover img {
  transform: scale(1.04);
}

.service-block-content {
  padding: var(--space-4);
}

.service-num-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: var(--space-4);
  display: block;
}

.service-block-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.service-block-body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(14, 14, 13, 0.7);
  line-height: 1.85;
  margin-bottom: var(--space-6);
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.service-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   3. PROCESS SECTION
   -------------------------------------------------------------------------- */
.section-process {
  background: var(--color-ink);
  padding: var(--space-32) 0;
}

.process-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.process-header {
  margin-bottom: var(--space-16);
}

.process-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
  margin-top: var(--space-3);
}

/* Horizontal timeline */
.process-timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

/* Connecting red line */
.process-timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(to right, var(--color-red), rgba(184, 19, 26, 0.3));
  z-index: 0;
}

.process-step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--space-2);
}

.process-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-ink);
  border: 2px solid var(--color-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-red);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.process-step-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.process-step-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 160px;
}


/* --------------------------------------------------------------------------
   4. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .service-block-inner,
  .service-block-inner.img-right {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--space-8);
  }

  .process-timeline {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .process-timeline::before {
    top: 20px;
    left: 20px;
    bottom: 20px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom, var(--color-red), rgba(184, 19, 26, 0.3));
  }

  .process-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: var(--space-5);
    padding-top: 0;
    padding-left: 0;
  }

  .process-step-num {
    margin-bottom: 0;
  }

  .process-step-desc {
    max-width: none;
  }
}
