/* ═══════════════════════════════════════════════════
   GIY Architecture Inc. — Home Page Styles
   ═══════════════════════════════════════════════════ */

/* ─── HERO V2 — Sliding image strips + mix-blend-mode wordmark ─── */

.hero2 {
  padding: 0; /* override global section padding */
  background: var(--bg);
}

/* Centered container — all hero content is clipped and constrained here */
.hero2-container {
  position: relative;
  max-width: var(--container-hero);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/*
 * Image panel — right 60% of the hero container.
 * Contains a flex rail of image strips separated by 2px lines.
 * The lines extend full height from the start; images slide in behind them.
 */
.hero2-images {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  z-index: 1;
  pointer-events: none;
}

/* Flex rail — strips + separators sit side-by-side, filling the panel */
.hero2-image-rail {
  display: flex;
  align-items: stretch;
  height: 100%;
  width: 100%;
}

/*
 * Each strip clips its sliding image.
 * height: 60% limits the image to 60% of hero height.
 * align-self: flex-start lets margin-top position it vertically.
 * --mt (set inline per strip) controls the vertical offset.
 * Seps are not overridden so they keep align-self: stretch (full height).
 */
.hero2-strip {
  flex: 1;
  height: 60%;
  align-self: flex-start;
  margin-top: var(--mt, 0);
  overflow: hidden;
}

.hero2-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.08) brightness(0.92);
}

/* 2px separator lines — stretch to full hero height, fade at top/bottom */
.hero2-sep {
  width: 2px;
  flex-shrink: 0;
  background: var(--border);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 104px,
    black 170px,
    black calc(100% - 70px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 104px,
    black 170px,
    black calc(100% - 70px),
    transparent 100%
  );
}

/*
 * Alternating slide directions.
 * Using ±200vh instead of ±105% so every strip starts fully off-screen
 * regardless of its --mt vertical offset.
 */
.hero2-strip--top {
  transform: translateY(-200vh);
  animation: hero2Top 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.2s + 0.3s);
}

.hero2-strip--bottom {
  transform: translateY(200vh);
  animation: hero2Bottom 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.2s + 0.3s);
}

@keyframes hero2Top {
  to {
    transform: translateY(0);
  }
}
@keyframes hero2Bottom {
  to {
    transform: translateY(0);
  }
}

/*
 * Wordmark — two layers for clean black/white snap (no blend-mode artifacts).
 *
 * --dark: the original black SVG, always visible across the full width.
 * --light: the same SVG inverted to white, clipped to the right 60%
 *   (exactly where the image panel sits). The clip-path gives a hard,
 *   pixel-perfect black→white transition at the 40% boundary.
 */
.hero2-wordmark-wrap {
  position: relative;
  z-index: 2;
  padding: 32px 10px;
}

/* Inline SVG fills the full wordmark-wrap width */
.hero2-wordmark-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* White group fill override — parent CSS beats SVG internal .cls rules */
#hero-wordmark-light-group .cls-1,
#hero-wordmark-light-group .cls-2,
#hero-wordmark-light-group .cls-3 {
  fill: #fff;
}

/* Subtle shadow behind white letterforms over the image panel */
#hero-wordmark-light-group {
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.5));
}

/*
 * SVG clipPath rects animated as CSS geometry properties.
 * Dark rect width shrinks left→right; white rect x advances right→left.
 * The two boundaries meet exactly — zero overlap, zero fringe.
 * 651.02 = 40% of viewBox width (1627.55 × 0.4).
 */
#hero-dark-rect {
  animation: hero2DarkShrink 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
}

@keyframes hero2DarkShrink {
  from {
    width: 1627.55px;
  }
  to {
    width: 651.02px;
  }
}

#hero-white-rect {
  animation: hero2WhiteReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
}

@keyframes hero2WhiteReveal {
  from {
    x: 1627.55px;
  }
  to {
    x: 651.02px;
  }
}

/* Body content — pinned to bottom of hero, outside flex flow so the
   wordmark can be the sole flex child and sit at true center */
.hero2-body {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 40%;
  z-index: 3;
  padding: 0 4vw 0 10px;
  box-sizing: border-box;
}

.hero2-body-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero2-partnership {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 40px;
}

/* ─── HERO V1 (preserved, not currently used) ─── */
/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--px) 80px;
  position: relative;
}

.hero-image-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 8s ease;
}

.hero-image-container:hover .hero-image {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-logo {
  height: 220px;
  width: auto;
  display: block;
  margin-bottom: 40px;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .hero-logo {
  mix-blend-mode: normal;
}

.hero-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 440px;
  margin-bottom: 16px;
}

.hero-partnership {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 440px;
  margin-bottom: 40px;
  font-style: italic;
}

/* ─── PROFESSIONAL ASSOCIATIONS ─── */
.associations {
  padding: 40px var(--px);
  border-bottom: 1px solid var(--border);
}

.associations-img {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  mix-blend-mode: multiply; /* renders white PNG bg transparent on light surfaces */
}

[data-theme="dark"] .associations-img {
  mix-blend-mode: normal;
  filter: invert(1) hue-rotate(180deg); /* approximate inversion for dark mode */
  opacity: 0.85;
}

/* ─── EMPOWERING SECTION ─── */
.empowering {
  padding: 120px var(--px);
  background: var(--bg-alt);
}

.empowering-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.empowering-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.empowering-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.02);
  border-radius: 2px;
}

.empowering-text p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.empowering-text p:last-child {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 400;
}

/* ─── MISSION STATEMENT BANNER ─── */
.mission-banner {
  padding: 120px var(--px);
  text-align: center;
}

.mission-content {
  max-width: 900px;
  margin: 0 auto;
}

.mission-text {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 40px;
  color: var(--text);
}

/* ─── SERVICES GRID ─── */
.services-section {
  padding: 120px var(--px);
  background: var(--bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

/* Cards 4–6 form a second row of 3 */
.services-grid .service-card:nth-child(n+4) {
  grid-column: auto;
}
.services-grid .service-card:nth-child(4) {
  grid-column: 1;
}
/* 12-col grid: row 1 = three span-4 tall cards, row 2 = three span-4 cards */
.services-grid {
  grid-template-columns: repeat(12, 1fr);
}
.service-card--tall {
  grid-column: span 4;
}
.services-grid .service-card:nth-child(n+4) {
  grid-column: span 4;
}

/* ─── Service card ─── */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* pin content to the bottom; card grows if text is tall */
  overflow: hidden;
  border-radius: 3px;
  text-decoration: none;
  color: #fff;
  min-height: 320px;
}

.service-card--tall {
  min-height: 420px;
}

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.05);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover img {
  transform: scale(1.06);
  filter: saturate(0.9) contrast(1.05);
}

/* Gradient overlay — dark at bottom for text legibility */
.service-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );
  transition: background 0.6s;
}

.service-card:hover .service-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.62) 45%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

/* Content sits at the bottom via the card's flex column; relative so it
   layers above the image/overlay and lets the card grow if text is tall */
.service-card__content {
  position: relative;
  padding: 28px;
  z-index: 2;
}

.service-card__number {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  margin-bottom: 8px;
  opacity: 0.85;
}

.service-card__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 8px;
}

.service-card--tall .service-card__title {
  font-size: 30px;
}

.service-card__desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  /* Reserve 2 lines so titles line up regardless of description length */
  min-height: calc(2 * 1.6 * 15px);
}

.services-footer {
  margin-top: 48px;
}

/* ─── OUR APPROACH ─── */
.approach-section {
  padding: 120px var(--px);
}

.approach-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.approach-step {
  display: flex;
  gap: 40px;
  align-items: baseline;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.approach-step:first-child {
  border-top: 1px solid var(--border);
}

.approach-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--accent);
  min-width: 80px;
  flex-shrink: 0;
}

.approach-content {
  max-width: 700px;
}

.approach-content h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 16px;
}

.approach-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
}
