/* === FILE: assets/css/pages/home.css === */

/* ============================================================
   pages/home.css — Homepage-specific styles
   Trimble Aviation
   ============================================================ */

/* ─── HERO (full-width background image) ─────────────────────── */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(24rem, 60vh, 44rem);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(17, 24, 39, .82) 0%,
    rgba(17, 24, 39, .55) 55%,
    rgba(17, 24, 39, .20) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  max-width: 980px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--color-accent);
  margin-bottom: 16px;
  border-radius: 2px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 1.25rem;
}

.hero-heading {
  font-size: clamp(2rem, 5vw + 0.5rem, 3.75rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.hero-heading .text-accent {
  color: var(--color-accent);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(.9375rem, 1vw + 0.5rem, 1.125rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, .75);
  max-width: 640px;
  margin: 0 0 2.25rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Dual-path audience CTAs (Pilots / Students) ───────────────── */
.hero-paths-label {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin: 0 0 .9rem;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 100%;
}

.hero-path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.6rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.hero-path:hover,
.hero-path:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .34);
  background: rgba(17, 24, 39, .58);
  box-shadow: 0 18px 38px -20px rgba(0, 0, 0, .8);
}

/* Pilots path is the priority action — accent treatment */
.hero-path--pilots {
  border-color: rgba(var(--color-accent-rgb, 232, 151, 26), .55);
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb, 232, 151, 26), .18), rgba(17, 24, 39, .42));
}
.hero-path--pilots:hover,
.hero-path--pilots:focus-visible {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb, 232, 151, 26), .28), rgba(17, 24, 39, .55));
}

.hero-path-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  color: var(--color-accent);
  background: rgba(255, 255, 255, .08);
}
.hero-path--pilots .hero-path-icon {
  color: var(--color-primary);
  background: var(--color-accent);
}

.hero-path-text { display: flex; flex-direction: column; gap: 4px; width: 100%; }

.hero-path-label {
  font-family: var(--font-display, var(--font-body));
  font-size: 1.1875rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.hero-path-desc {
  font-size: .85rem;
  color: rgba(255, 255, 255, .64);
  line-height: 1.45;
}
.hero-path-cta {
  margin-top: auto;
  padding-top: .35rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
}
.hero-path-cta span { transition: transform .18s ease; display: inline-block; margin-left: 2px; }
.hero-path:hover .hero-path-cta span { transform: translateX(4px); }

.hero .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, .30);
  background: transparent;
}
.hero .btn-outline-light:hover,
.hero .btn-outline-light:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .50);
  box-shadow: none;
}

/* ─── STATS BAR ───────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-primary);
  padding: 4rem 0;
}

.stats-bar-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2rem;
}

@media (min-width: 640px) {
  .stats-bar-inner {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .stat { border-right: 1px solid rgba(255, 255, 255, 0.08); }
  .stat:last-child { border-right: none; }
}

.stat {
  text-align: center;
  padding: 0 1.5rem;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.5vw + 0.5rem, 3.75rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: .625rem;
}

.stat-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ─── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 5rem;
}

/* .section-eyebrow is defined globally in components.css. */

.section-sub {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin: 0;
  font-weight: 400;
}

/* ─── SERVICE PILLARS ─────────────────────────────────────────── */
.pillar-section { padding-bottom: var(--space-16); }

.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px)  { .pillar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .pillar-grid { grid-template-columns: repeat(3, 1fr); } }

.pillar-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.pillar-card:hover {
  border-color: rgba(232, 151, 26, .30);
  box-shadow: 0 20px 56px -12px rgba(17, 24, 39, .11);
  transform: translateY(-3px);
}

.pillar-icon {
  width: 52px;
  height: 52px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  transition: background 200ms ease;
}

.pillar-card:hover .pillar-icon {
  background: var(--color-accent);
  color: #fff;
}

.pillar-body { flex: 1; display: flex; flex-direction: column; }

.pillar-body h3 {
  font-size: clamp(1.25rem, 1vw + 0.5rem, 1.625rem);
  color: var(--color-primary);
  margin-bottom: .625rem;
}

.pillar-body > p {
  font-size: .9375rem;
  color: var(--color-text-muted);
  line-height: 1.72;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.pillar-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pillar-list li {
  font-size: .875rem;
  color: var(--color-text-muted);
  font-weight: 400;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.pillar-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

.pillar-cta {
  display: inline-flex;
  align-items: center;
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: auto;
  transition: gap 150ms ease;
  gap: .35rem;
}

.pillar-card:hover .pillar-cta { gap: .6rem; }

/* ─── PROGRAM CARDS ───────────────────────────────────────────── */
.program-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px)  { .program-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .program-grid { grid-template-columns: repeat(4, 1fr); } }

.program-card-img {
  width: 100%;
  /* Most program photos are portrait — a taller frame shows much more
     of each image (far less cropping) and makes them read larger. */
  aspect-ratio: 4 / 5;
  min-height: 240px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.program-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}
.program-card:hover .program-card-img img { transform: scale(1.05); }

.program-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition:
    border-top-color 200ms ease,
    box-shadow       200ms ease,
    transform        200ms ease;
}

.program-card:hover {
  border-top-color: var(--color-accent);
  box-shadow: 0 24px 64px -12px rgba(17, 24, 39, .12);
  transform: translateY(-4px);
}

.program-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  transition: background 200ms ease, color 200ms ease;
}

.program-card:hover .program-icon {
  background: var(--color-accent);
  color: #fff;
}

.program-card h3 {
  font-size: clamp(1.25rem, 1vw + 0.5rem, 1.625rem);
  color: var(--color-primary);
  margin-bottom: .625rem;
}

.program-card p {
  font-size: .9375rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.program-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: auto;
  transition: gap 150ms ease;
}
.program-card:hover .program-link { gap: .65rem; }

/* ─── WHY TRIMBLE ─────────────────────────────────────────────── */
.why-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 900px) {
  .why-split {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.why-visual {
  position: relative;
  width: 100%;
  order: 2;
}

@media (min-width: 900px) { .why-visual { order: 1; } }

.why-visual .img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 400px;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px -16px rgba(17, 24, 39, .12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-visual-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px -16px rgba(17, 24, 39, .14);
}

.why-content { order: 1; }
@media (min-width: 900px) { .why-content { order: 2; } }

.why-intro {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.why-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.why-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why-feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-top: 2px;
}

.why-feature strong {
  display: block;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: .25rem;
}

.why-feature p {
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
  font-weight: 400;
}

/* ─── VIDEO STORY SECTION ─────────────────────────────────────── */
.home-video-section {
  background: var(--color-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-video-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .home-video-inner { grid-template-columns: 1fr 1.1fr; gap: 4rem; }
}

.home-video-text h2 {
  color: #fff;
  font-size: clamp(1.875rem, 2vw + 1rem, 2.75rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
}
.home-video-text p {
  color: rgba(255, 255, 255, .68);
  font-size: 1.0625rem;
  line-height: 1.8;
  margin: 0 0 2rem;
  max-width: 46ch;
}
.home-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Poster / play button */
.home-video-poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6);
}
.home-video-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: .82;
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1), opacity 300ms ease;
}
.home-video-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 20, .5), rgba(8, 12, 20, .05));
}
.home-video-poster:hover img,
.home-video-poster:focus-visible img { transform: scale(1.05); opacity: 1; }

.home-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(232, 151, 26, .5);
  transition: transform 200ms ease;
  animation: home-video-pulse 2.4s ease-out infinite;
}
.home-video-poster:hover .home-video-play { transform: translate(-50%, -50%) scale(1.08); }
.home-video-play svg { margin-left: 4px; }

@keyframes home-video-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 151, 26, .5); }
  70%  { box-shadow: 0 0 0 22px rgba(232, 151, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 151, 26, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .home-video-play { animation: none; }
  .home-video-poster img { transition: none; }
}

/* ─── CTA BANNER ──────────────────────────────────────────────── */
.cta-banner {
  background: var(--color-primary);
  padding: 7rem 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 90% at 100% 50%, rgba(232,151,26,.06) 0%, transparent 55%);
  pointer-events: none;
}

.cta-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .cta-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: .875rem;
}

.cta-banner-text p {
  color: rgba(255, 255, 255, .55);
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 520px;
  margin: 0;
  font-weight: 400;
}

.cta-banner-action {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.cta-phone {
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .40);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color 140ms ease;
}
.cta-phone:hover { color: rgba(255, 255, 255, .80); }

/* ─── TABLET (≤ 899px) ───────────────────────────────────────── */
@media (max-width: 899px) {
  /* Hero — uniform dark overlay for readability on all devices */
  .hero { min-height: 0; }

  .hero-overlay {
    background: rgba(17, 24, 39, .72);
  }

  .hero-inner { max-width: 100%; }

  .hero-sub { max-width: 100%; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .hero-actions .btn {
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  /* Dual-path CTAs stack on smaller screens */
  .hero-paths {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  /* Sections */
  .section-header { margin-bottom: 3rem; }

  /* Why section */
  .why-split { gap: 2.5rem; }
  .why-visual .img-placeholder { min-height: 280px; }

  /* CTA */
  .cta-banner { padding: 4.5rem 0; }
}

/* ─── MOBILE (≤ 639px) ───────────────────────────────────────── */
@media (max-width: 639px) {
  /* Hero */
  .hero-overlay { background: rgba(17, 24, 39, .78); }

  /* Stats — give numbers room to breathe */
  .stats-bar { padding: 2.5rem 0; }
  .stats-bar-inner { gap: 2rem 1rem; }
  .stat { padding: 0 .75rem; }
  .stat-number { font-size: clamp(1.75rem, 8vw, 2.5rem); }

  /* Section headers */
  .section-header { margin-bottom: 2.5rem; }

  /* Pillar cards */
  .pillar-card { padding: 1.5rem; }
  .pillar-body h3 { font-size: 1.25rem; }

  /* Program cards */
  .program-card { padding: 1.25rem; }

  /* Why section */
  .why-feature-icon {
    width: 36px;
    height: 36px;
  }

  /* CTA */
  .cta-banner { padding: 3.5rem 0; }
  .cta-banner-inner { gap: 2rem; }
}

/* ─── SMALL PHONES (≤ 400px) ─────────────────────────────────── */
@media (max-width: 400px) {
  .hero-heading { margin-bottom: 1.25rem; }
  .hero-sub { margin-bottom: 1.75rem; }

  .stats-bar { padding: 2rem 0; }
  .stat-number { font-size: 1.625rem; }
  .stat-label  { font-size: .65rem; letter-spacing: .08em; }

  .pillar-card { padding: 1.25rem; }
  .program-card { padding: 1rem; }

  .cta-banner { padding: 2.5rem 0; }
}