/* ==========================================================================
   3Lions.ca — Homepage Styles (Rebuilt)
   Hero, tool marquee, stats, hub grid, differentiator,
   portfolio preview, final CTA — all with angled dividers
   ========================================================================== */

/* ----------------------------------------------------------------
   HOMEPAGE HERO
   ---------------------------------------------------------------- */
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #012169 0%, #000F3D 45%, #0A1E5C 70%, #012169 100%);
  color: var(--color-white);
  padding: var(--space-4xl) 0 calc(var(--space-4xl) + 60px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);
}

/* Radial glow behind the SVG — lighter zone on right */
.home-hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 140%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(27, 58, 140, 0.5) 0%,
    rgba(1, 33, 105, 0.2) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* Cross-hatch texture overlay */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'%3E%3Cpath d='M0 24h48M24 0v48'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Hero inner layout */
.home-hero .hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .home-hero {
    padding: var(--space-4xl) 0 calc(var(--space-4xl) + 80px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 80px), 0 100%);
  }
  .home-hero .hero-inner {
    grid-template-columns: 55% 45%;
  }
}

@media (min-width: 1024px) {
  .home-hero {
    padding: 7rem 0 calc(7rem + 100px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 100px), 0 100%);
  }
}

/* Floating geometric shapes */
.home-hero .hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-lg);
  opacity: 0.08;
  animation: heroFloat 12s var(--ease-in-out) infinite;
}

.hero-shape--1 {
  width: 200px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  top: 10%;
  right: 8%;
  animation-delay: 0s;
  transform: rotate(15deg);
}

.hero-shape--2 {
  width: 120px;
  height: 120px;
  background-color: var(--color-red);
  opacity: 0.08;
  top: 60%;
  right: 25%;
  animation-delay: -3s;
  border-radius: var(--radius-full);
}

.hero-shape--3 {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  top: 30%;
  right: 40%;
  animation-delay: -6s;
  transform: rotate(-20deg);
}

.hero-shape--4 {
  width: 160px;
  height: 160px;
  background-color: var(--color-red);
  opacity: 0.06;
  bottom: 10%;
  right: 5%;
  animation-delay: -9s;
  transform: rotate(45deg);
}

.hero-shape--5 {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.05);
  top: 20%;
  left: 60%;
  animation-delay: -4s;
  border-radius: var(--radius-full);
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0) rotate(var(--shape-rotation, 0deg));
  }
  33% {
    transform: translateY(-15px) rotate(calc(var(--shape-rotation, 0deg) + 5deg));
  }
  66% {
    transform: translateY(10px) rotate(calc(var(--shape-rotation, 0deg) - 3deg));
  }
}

/* Hero label */
.home-hero .hero-label {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--color-red-light, #E8293E);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-md);
  background: rgba(207, 8, 31, 0.12);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(207, 8, 31, 0.25);
}

/* Hero title */
.home-hero .hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: var(--fw-black);
  color: var(--color-white);
  line-height: 1.05;
  margin-bottom: var(--space-lg);
}

/* Hero description */
.home-hero .hero-desc {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-light);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: var(--space-xl);
}

/* Hero actions */
.home-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.home-hero .hero-actions .btn-primary {
  padding: 1.125rem 3rem;
  font-size: 1rem;
  font-weight: var(--fw-black);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  box-shadow: 0 4px 20px rgba(207, 8, 31, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.home-hero .hero-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(207, 8, 31, 0.4);
}

/* Hero secondary button — ghost style on dark bg */
.home-hero .hero-actions .btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}
.home-hero .hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* Hero trust line */
.home-hero .hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.5);
}

.home-hero .hero-trust svg {
  width: 16px;
  height: 16px;
  color: #28CA41;
  flex-shrink: 0;
}

/* Hero graphic area */
.home-hero .hero-graphic {
  position: relative;
}

.home-hero .hero-graphic-container {
  position: relative;
  /* Radial glow behind the SVG on dark bg */
  background: radial-gradient(
    circle at 50% 50%,
    rgba(207, 8, 31, 0.08) 0%,
    rgba(27, 58, 140, 0.15) 40%,
    transparent 70%
  );
  border-radius: var(--radius-full);
  padding: var(--space-lg);
}

.home-hero .hero-graphic-anim {
  animation: heroGraphicPulse 8s var(--ease-in-out) infinite;
}

@keyframes heroGraphicPulse {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.02) translateY(-8px);
  }
}

/* Hero stat badges floating around the graphic */
.home-hero .hero-badge {
  position: absolute;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  animation: badgeFloat 6s var(--ease-in-out) infinite;
  white-space: nowrap;
  z-index: 2;
}

.home-hero .hero-badge--1 {
  top: 15%;
  right: -10%;
  animation-delay: -1s;
}

.home-hero .hero-badge--2 {
  bottom: 20%;
  left: -10%;
  animation-delay: -3s;
}

.home-hero .hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
}

@keyframes badgeFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}


/* ----------------------------------------------------------------
   TOOL MARQUEE (Navy strip)
   ---------------------------------------------------------------- */
.tool-marquee {
  overflow: hidden;
  padding: var(--space-lg) 0;
  background-color: var(--color-navy);
  position: relative;
  z-index: 2;
  margin-top: -60px;
}

@media (min-width: 768px) {
  .tool-marquee {
    margin-top: -80px;
    padding: var(--space-xl) 0;
  }
}

@media (min-width: 1024px) {
  .tool-marquee {
    margin-top: -100px;
  }
}

.tool-marquee-track {
  display: flex;
  gap: var(--space-xl);
  animation: toolMarquee 25s linear infinite;
  width: max-content;
}

.tool-marquee-track:hover {
  animation-play-state: paused;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-default);
}

.tool-badge:hover {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes toolMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


/* ----------------------------------------------------------------
   STATS SECTION (Off-white, angled top)
   ---------------------------------------------------------------- */
.home-stats {
  background-color: var(--color-off-white);
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-section) + 40px) 0 var(--space-section);
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
}

@media (min-width: 768px) {
  .home-stats {
    clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--space-section) + 60px);
  }
}

/* Dot pattern background */
.home-stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(1, 33, 105, 0.06) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  pointer-events: none;
}

.home-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

@media (min-width: 768px) {
  .home-stats .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-stats .stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.home-stats .stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.home-stats .stat-icon svg {
  width: 40px;
  height: 40px;
}

.home-stats .stat-number {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: var(--fw-black);
  color: var(--color-navy);
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-stats .stat-suffix {
  color: var(--color-red);
}

.home-stats .stat-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}


/* ----------------------------------------------------------------
   SERVICE HUB GRID
   ---------------------------------------------------------------- */
.home-hubs {
  position: relative;
  background-color: var(--color-white);
  padding: calc(var(--space-section) + 40px) 0 var(--space-section);
  clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 100%);
}

@media (min-width: 768px) {
  .home-hubs {
    clip-path: polygon(0 0, 100% 60px, 100% 100%, 0 100%);
    padding-top: calc(var(--space-section) + 60px);
  }
}

.home-hubs .section-header {
  margin-bottom: var(--space-2xl);
}

.home-hubs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .home-hubs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-hubs-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
  }
}

/* Hub card */
.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border-top: 3px solid transparent;
  transition: transform 0.3s ease,
              box-shadow 0.3s ease,
              border-top-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.hub-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(1, 33, 105, 0.12);
  border-top-color: var(--color-red);
}

.hub-card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-card-icon--navy {
  background-color: var(--color-navy);
}

.hub-card-icon--red {
  background-color: var(--color-red);
}

.hub-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-card-title {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin: 0;
}

.hub-card-count {
  font-size: var(--fs-small);
  color: var(--color-text-light);
}

.hub-card-desc {
  font-size: var(--fs-small);
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
}

.hub-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-red);
  margin-top: auto;
  padding-top: var(--space-sm);
}

.hub-card-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-red);
  transition: transform 0.2s ease;
}

.hub-card:hover .hub-card-arrow svg {
  transform: translateX(4px);
}


/* ----------------------------------------------------------------
   DIFFERENTIATOR SECTION (Navy bg)
   ---------------------------------------------------------------- */
.home-diff {
  background-color: var(--color-navy);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-section) + 60px) 0 calc(var(--space-section) + 60px);
  clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
}

@media (min-width: 768px) {
  .home-diff {
    clip-path: polygon(0 80px, 100% 0, 100% calc(100% - 80px), 0 100%);
    padding: calc(var(--space-section) + 80px) 0 calc(var(--space-section) + 80px);
  }
}

/* Diagonal line pattern overlay */
.home-diff::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255, 255, 255, 0.02) 40px,
    rgba(255, 255, 255, 0.02) 42px
  );
  pointer-events: none;
}

.home-diff .diff-label {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
  text-align: center;
}

.home-diff .diff-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--fw-black);
  color: var(--color-white);
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.diff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .diff-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

.diff-col {
  padding-left: var(--space-lg);
  border-left: 3px solid var(--color-red);
  position: relative;
  z-index: 1;
}

.diff-col-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
}

.diff-col-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--color-white);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diff-col h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.diff-col p {
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  color: var(--color-gray-300);
  line-height: var(--lh-relaxed);
}



/* ----------------------------------------------------------------
   PORTFOLIO PREVIEW (Off-white)
   ---------------------------------------------------------------- */
.home-portfolio {
  background-color: var(--color-off-white);
  position: relative;
  padding: calc(var(--space-section) + 40px) 0 var(--space-section);
  clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 100%);
}

@media (min-width: 768px) {
  .home-portfolio {
    clip-path: polygon(0 0, 100% 60px, 100% 100%, 0 100%);
    padding-top: calc(var(--space-section) + 60px);
  }
}

.home-portfolio .section-header {
  margin-bottom: var(--space-2xl);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(1, 33, 105, 0.12);
}

.portfolio-card-media {
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: var(--color-off-white);
}

.portfolio-card-media svg {
  width: 100%;
  height: 100%;
  display: block;
}

.portfolio-card-body {
  padding: var(--space-lg);
}

.portfolio-card-tag {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-xs);
}

.portfolio-card-tag--red {
  color: var(--color-red);
}

.portfolio-card-tag--navy {
  color: var(--color-navy);
}

.portfolio-card-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.portfolio-card-metric {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-light);
}

.portfolio-view-all {
  text-align: center;
  margin-top: var(--space-2xl);
}


/* ----------------------------------------------------------------
   FINAL CTA SECTION (Navy)
   ---------------------------------------------------------------- */
.home-cta {
  background-color: var(--color-navy);
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-section) + 60px) 0 var(--space-section);
  clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
  text-align: center;
}

@media (min-width: 768px) {
  .home-cta {
    clip-path: polygon(0 80px, 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--space-section) + 80px);
  }
}

/* Cross-hatch pattern */
.home-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 30px,
      rgba(255, 255, 255, 0.015) 30px,
      rgba(255, 255, 255, 0.015) 31px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 30px,
      rgba(255, 255, 255, 0.015) 30px,
      rgba(255, 255, 255, 0.015) 31px
    );
  pointer-events: none;
}

.home-cta .cta-content {
  position: relative;
  z-index: 1;
}

.home-cta .cta-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--fw-black);
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.home-cta .cta-subtitle {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-light);
  color: var(--color-gray-300);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-inline: auto;
}

.home-cta .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.home-cta .cta-or {
  color: var(--color-gray-400);
  font-size: var(--fs-small);
}


/* ----------------------------------------------------------------
   SCROLL REVEAL ANIMATIONS
   ---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}


/* ----------------------------------------------------------------
   SVG ANIMATION KEYFRAMES (Hero ecosystem)
   ---------------------------------------------------------------- */
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes nodePulse {
  0%, 100% { r: 6; opacity: 0.8; }
  50% { r: 9; opacity: 1; }
}

@keyframes nodePulseSm {
  0%, 100% { r: 4; opacity: 0.6; }
  50% { r: 6; opacity: 1; }
}
