/* ============================================================
   Homepage page-specific styles.
   Source: /docs/mockups/homepage-v2.html.

   Patterns here that may grow into shared components later:
   - .strip / .strip-logo (social proof strip — also used on About hero)
   - .numbers-strip / .number-item (tenure stats — reused on About)
   - .testimonial / .testimonial-grid (used on About + service pages too)
   Refactor into components/ when their second use lands.
   ============================================================ */

/* === HERO ===
   The hero is composed once on the homepage. Service detail pages get
   their own hero treatment per /docs/02-design-system.md ("Service detail
   page heroes use a photographic topo treatment").                       */

.home-hero {
  position: relative;
  background-color: #0a1828;
  background-image:
    radial-gradient(ellipse 700px 450px at 88% 10%, rgba(220, 115, 76, 0.18), transparent 65%),
    radial-gradient(ellipse 600px 420px at 5% 95%, rgba(22, 93, 148, 0.18), transparent 65%);
  color: var(--text-light);
  overflow: hidden;
  /* Pulled up under the transparent .nav-wrap--over-hero so the topo runs
     edge-to-edge behind the nav. Driven by --nav-h in tokens.css. */
  margin-top: calc(var(--nav-h) * -1);
  padding-top: var(--nav-h);
}

.home-hero-topo {
  position: absolute;
  inset: -15%;
  background-image: var(--topo-dark-blue);
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  z-index: 0;
  animation: topoDriftPhoto 24s ease-in-out infinite alternate;
}

@keyframes topoDriftPhoto {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.15) rotate(-0.5deg); }
  33%  { transform: translate3d(3%, 1%, 0)  scale(1.20) rotate(0.3deg); }
  66%  { transform: translate3d(-1%, 3%, 0) scale(1.18) rotate(-0.2deg); }
  100% { transform: translate3d(2%, -3%, 0) scale(1.22) rotate(0.4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-topo { animation: none; transform: scale(1.1); }
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 24, 40, 0.35) 0%,
    rgba(10, 24, 40, 0.15) 50%,
    rgba(10, 24, 40, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 100px;
  max-width: 720px;
}

.home-hero .eyebrow {
  color: var(--orange-bright);
  margin-bottom: 24px;
  display: block;
}

.home-hero h1 {
  font-size: 64px;
  line-height: 1.05;
  color: var(--text-light);
  margin-bottom: 24px;
}

.home-hero-sub {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 580px;
  color: var(--text-light-2);
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* === SOCIAL PROOF STRIP ===
   .strip / .strip-inner / .strip-label are shared in components/strip.css.
   Below are homepage-specific items (the client logo styling). */

.strip-logos {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.strip-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
  cursor: default;
}
.strip-logo:hover { color: rgba(255, 255, 255, 0.75); }

/* Image logos on the dark strip: render as near-white silhouettes by
   default so the row reads as a consistent band rather than a parade
   of competing brand colors. Hover restores the original. */
.strip-logo-img {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.7);
  transition: filter 0.25s ease;
}
.strip-logo-img:hover { filter: none; }

/* === BY THE NUMBERS STRIP === */

.numbers-strip {
  background: var(--bg-light-2);
  border-bottom: 1px solid var(--border-on-light);
  padding: 36px 0;
}
.numbers-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
.numbers-label {
  font-size: 11px;
  letter-spacing: var(--tracking-strip);
  text-transform: uppercase;
  color: var(--text-dark-3);
  font-weight: var(--weight-medium);
}
.number-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--orange);
  padding-left: 18px;
}
.number-item:nth-child(3) { border-left-color: var(--blue); }
.number-item:nth-child(4) { border-left-color: var(--orange); }
.number-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.03em;
  color: var(--text-dark);
  line-height: 1;
}
.number-label {
  font-size: 12px;
  color: var(--text-dark-2);
  line-height: 1.4;
}

/* === SERVICES GRID (what-we-do) === */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-on-light);
  border: 1px solid var(--border-on-light);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.service-card {
  background: var(--bg-light);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out);
}
.service-card:nth-child(even)::before { background: var(--blue); }
.service-card:hover { background: var(--bg-light-2); }
.service-card:hover::before { transform: scaleX(1); }
.service-card:nth-child(odd) .service-icon { color: var(--orange); }
.service-card:nth-child(even) .service-icon { color: var(--blue); }
.service-card:nth-child(odd) .btn-link { color: var(--orange); }
.service-card:nth-child(even) .btn-link { color: var(--blue); }

.service-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  transition: transform 0.4s var(--ease-out);
}
.service-card:hover .service-icon { transform: translateY(-2px) rotate(-3deg); }

.service-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
  letter-spacing: var(--tracking-h3);
}
.service-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark-2);
  margin-bottom: 20px;
  flex: 1;
}

/* === PROCESS GRID (homepage 4-step variant) === */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.process-grid::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(91, 168, 220, 0.3) 25%,
    rgba(91, 168, 220, 0.4) 45%,
    rgba(232, 129, 96, 0.4) 55%,
    rgba(232, 129, 96, 0.3) 75%,
    transparent 100%);
  z-index: 0;
}
.process-step {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-card);
  padding: 28px;
  position: relative;
  z-index: 1;
  border-top: 2px solid rgba(91, 168, 220, 0.4);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, background 0.3s ease;
}
.process-step:nth-child(2) { border-top-color: rgba(91, 168, 220, 0.55); }
.process-step:nth-child(3) { border-top-color: rgba(232, 129, 96, 0.55); }
.process-step:nth-child(4) { border-top-color: rgba(232, 129, 96, 0.7); }
.process-step:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
}
.process-step:nth-child(1):hover,
.process-step:nth-child(2):hover { border-top-color: var(--blue-bright); }
.process-step:nth-child(3):hover,
.process-step:nth-child(4):hover { border-top-color: var(--orange-bright); }

.process-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--blue-bright);
  margin-bottom: 36px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.process-num::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.process-step:nth-child(3) .process-num,
.process-step:nth-child(4) .process-num { color: var(--orange-bright); }

.process-step h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-light);
  letter-spacing: var(--tracking-h3);
}
.process-step p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-light-2);
}

/* === WHY TRAILGUIDE TEASE === */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--bg-light);
  border: 1px solid var(--border-on-light);
  border-left: 2px solid var(--orange);
  border-radius: 12px;
  padding: 32px 28px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}
.why-card:nth-child(2) { border-left-color: var(--blue); }
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -12px rgba(26, 24, 21, 0.12);
}
.why-card-label {
  font-size: 11px;
  letter-spacing: var(--tracking-strip);
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  font-weight: var(--weight-medium);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.why-card-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.why-card:nth-child(2) .why-card-label { color: var(--blue); }
.why-card h3 {
  font-size: 21px;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}
.why-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-dark-2);
}
/* Why-trailguide tease section gets the deeper cream tint. */
.section-light--tinted { background: var(--bg-light-2); }
/* The "it's worth doing it right" accent on the why-trailguide title is a
   solid orange (not the gradient) per the mockup. */
.accent-light--solid { color: var(--orange); }

/* Industries grid styles moved to components/industries.css when the
   services hub became the second use (see file header comment there). */

/* === TESTIMONIALS === */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  background: var(--bg-light);
  border: 1px solid var(--border-on-light);
  border-radius: 12px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.testimonial::before {
  content: "\201D"; /* Right double quotation mark */
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: var(--orange);
  opacity: 0.15;
  font-weight: var(--weight-medium);
}
.testimonial:nth-child(2)::before { color: var(--blue); }
.testimonial:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong-on-light);
}
.testimonial-quote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 24px;
  flex: 1;
  position: relative;
}
.testimonial-attr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-on-light);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: var(--weight-medium);
  font-family: var(--font-display);
  flex-shrink: 0;
}
.avatar.orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-pale) 100%);
}
.testimonial-logo {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}
.testimonial-quote > p {
  margin: 0;
}
.testimonial-quote > p + p {
  margin-top: 0.7em;
}
.testimonial-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--text-dark);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.testimonial-role {
  font-size: 12px;
  color: var(--text-dark-3);
  margin-top: 2px;
}

/* CTA section moved to components/cta-section.css (shared with About). */

/* === RESPONSIVE === */

@media (max-width: 980px) {
  .services-grid,
  .testimonial-grid,
  .why-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-grid::before { display: none; }
  .numbers-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .numbers-grid .numbers-label { grid-column: 1 / -1; margin-bottom: 4px; }
  .home-hero h1 { font-size: 44px; }
}

@media (max-width: 760px) {
  .home-hero { padding: 56px 0 0; }
  .home-hero-content { padding: 56px 0 72px; }
  .home-hero h1 { font-size: 38px; line-height: 1.1; letter-spacing: -0.025em; }
  .home-hero-sub { font-size: 16px; margin-bottom: 28px; }
  .home-hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .home-hero-actions .btn-primary,
  .home-hero-actions .btn-secondary-dark {
    width: 100%;
    padding: 14px 22px;
  }

  .strip-logos { gap: 28px; justify-content: flex-start; }
  .strip-logo { font-size: 14px; }

  .services-grid,
  .testimonial-grid,
  .why-grid,
  .process-grid { grid-template-columns: 1fr; }
  .service-card { padding: 28px 24px; }
  .process-grid { gap: 14px; }
  .process-step { padding: 24px; }

  .numbers-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 var(--container-pad-mobile);
  }
  .numbers-grid .numbers-label { margin-bottom: 0; }

  .testimonial { padding: 24px 22px; }
}
