/* Homepage — rich sections below hero */

.home-page {
  --home-accent: var(--theme-teal);
  --home-accent-2: var(--theme-blue);
  --home-soft: color-mix(in srgb, var(--home-accent) 8%, var(--color-bg));
  --home-line: color-mix(in srgb, var(--color-border) 70%, transparent);
}

#main-content:has(.home-page) {
  background:
    radial-gradient(ellipse 85% 55% at 10% -5%, rgba(var(--rgb-green), 0.08), transparent 58%),
    radial-gradient(ellipse 70% 45% at 92% 8%, rgba(var(--rgb-blue), 0.07), transparent 52%),
    linear-gradient(180deg, var(--home-soft) 0%, var(--color-bg) 28%, var(--color-bg) 100%);
}

.home-page {
  position: relative;
  background: transparent;
}

.home-page .hero {
  min-height: clamp(520px, 86vh, 880px);
}

/* Hero layout — copy + animated digital-twin tunnel */
.home-page .hero-inner--home {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.85fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}

.home-page .hero-content {
  max-width: none;
  position: relative;
  z-index: 2;
}

.home-page .hero-bg {
  opacity: 0.5;
  animation: hero-bg-drift 28s ease-in-out infinite alternate;
}

.home-page .hero-bg--pulse {
  opacity: 1;
  background:
    radial-gradient(ellipse 55% 45% at 78% 42%, rgba(var(--rgb-blue), 0.14), transparent 68%),
    radial-gradient(ellipse 40% 35% at 72% 48%, rgba(var(--rgb-green), 0.1), transparent 70%);
  animation: hero-bg-pulse 6s ease-in-out infinite;
  mix-blend-mode: multiply;
}

@keyframes hero-bg-drift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.04) translate(-1.5%, 1%); }
}

@keyframes hero-bg-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.home-page .hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
}

.home-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: 0.75;
}

.home-scroll-hint span {
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, var(--home-accent), transparent);
  animation: home-scroll-pulse 2s ease-in-out infinite;
}

@keyframes home-scroll-pulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Stats — sits below interest banner on homepage */
.home-stats {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-bottom: 0.5rem;
}

.home-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  padding: 1.15rem 1.25rem;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  border: 1px solid var(--home-line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--color-shadow-lg);
  backdrop-filter: blur(12px);
}

.home-stats__item {
  text-align: center;
  padding: 0.35rem 0.5rem;
}

.home-stats__item + .home-stats__item {
  border-inline-start: 1px solid var(--home-line);
}

.home-stats__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--home-accent);
  line-height: 1.1;
}

.home-stats__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* Quick explore */
.home-explore {
  padding: 2.5rem 0 1rem;
}

.home-explore__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.home-explore-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--home-line);
  background: var(--color-surface);
  box-shadow: var(--color-shadow);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.home-explore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--color-shadow-lg);
  border-color: color-mix(in srgb, var(--home-accent) 35%, var(--color-border));
  text-decoration: none;
}

.home-explore-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.1rem;
  background: color-mix(in srgb, var(--home-accent) 12%, var(--color-bg));
  color: var(--home-accent);
}

.home-explore-card--learning .home-explore-card__icon {
  background: color-mix(in srgb, var(--theme-blue) 12%, var(--color-bg));
  color: var(--theme-blue);
}

.home-explore-card--consulting .home-explore-card__icon {
  background: color-mix(in srgb, var(--theme-teal) 12%, var(--color-bg));
  color: var(--theme-teal);
}

.home-explore-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.home-explore-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.home-explore-card__link {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--home-accent-2);
}

/* Section shell */
.home-section {
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}

.home-section--alt {
  background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  border-block: 1px solid var(--home-line);
}

.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.home-section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-accent);
  margin-bottom: 0.5rem;
}

.home-section__label::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.home-section__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 500;
  line-height: 1.15;
  max-width: 20ch;
}

.home-section__lead {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  max-width: 48ch;
  font-size: 0.98rem;
}

.home-section__action {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--home-accent-2);
  white-space: nowrap;
}

.home-section__action:hover {
  color: var(--home-accent);
}

/* Card grids */
.home-grid {
  display: grid;
  gap: 1rem;
}

.home-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.home-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.home-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Unified home cards */
.home-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--home-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--color-shadow);
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--color-shadow-lg);
}

.home-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg);
}

.home-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.home-card:hover .home-card__media img {
  transform: scale(1.04);
}

.home-card__badge {
  position: absolute;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  border: 1px solid var(--home-line);
  color: var(--color-text);
}

.home-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.home-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.home-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 600;
}

.home-card__title a {
  color: inherit;
  text-decoration: none;
}

.home-card__title a:hover {
  color: var(--home-accent);
}

.home-card__summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.home-card__foot {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--home-accent-2);
}

a.home-card {
  text-decoration: none;
  color: inherit;
}

a.home-card:hover {
  text-decoration: none;
}

/* Event list (compact) */
.home-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-event-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--home-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-event-item:hover {
  border-color: color-mix(in srgb, var(--home-accent) 30%, var(--color-border));
  box-shadow: var(--color-shadow);
  text-decoration: none;
}

.home-event-item__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--home-accent) 10%, var(--color-bg));
  color: var(--home-accent);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.home-event-item__date small {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.home-event-item__type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

.home-event-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  line-height: 1.3;
}

.home-event-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-muted);
}

/* Blog mini cards */
.home-blog-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.home-blog-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--home-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.home-blog-item:hover {
  box-shadow: var(--color-shadow);
  text-decoration: none;
}

.home-blog-item img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
}

.home-blog-item__meta {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}

.home-blog-item h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

/* Team strip */
.home-team-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.home-team-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.15rem 1rem;
  border: 1px solid var(--home-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.home-team-mini:hover {
  box-shadow: var(--color-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.home-team-mini__photo,
.home-team-mini__initial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--home-accent) 12%, var(--color-bg));
}

.home-team-mini__photo {
  object-fit: cover;
  object-position: center;
}

.home-team-mini__initial {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--home-accent);
}

.home-team-mini__body {
  display: block;
  min-width: 0;
}

.home-team-mini strong {
  display: block;
  font-size: 0.92rem;
}

.home-team-mini__role {
  display: block;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 0.15rem;
}

/* Home carousels */
.home-carousel {
  position: relative;
}

.home-carousel__viewport {
  overflow: hidden;
  margin-inline: -2px;
  padding-inline: 2px;
}

.home-carousel__track {
  display: flex;
  gap: 1rem;
  will-change: transform;
}

.home-carousel__slide {
  flex-shrink: 0;
  min-width: 0;
}

.home-carousel--cards .home-carousel__slide .home-card {
  height: 100%;
}

.home-carousel--team .home-team-mini {
  height: 100%;
}

.home-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.home-carousel.is-static .home-carousel__nav {
  display: none;
}

.home-carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}

.home-carousel__btn:hover {
  border-color: color-mix(in srgb, var(--home-accent) 35%, var(--color-border));
  color: var(--home-accent);
  transform: translateY(-1px);
}

.home-carousel__btn:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 2px;
}

.home-carousel__dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 1rem;
}

.home-carousel__dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-muted) 35%, var(--color-border));
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.home-carousel__dot.is-active {
  width: 1.35rem;
  background: var(--gradient-brand);
}

.home-carousel__dot:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 2px;
}

/* Consulting on home — reuse consult cards in grid */
.home-page .consult-card {
  height: 100%;
}

/* CTA */
.home-cta {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.home-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid color-mix(in srgb, var(--home-accent) 22%, var(--color-border));
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(var(--rgb-blue), 0.1), transparent 55%),
    radial-gradient(ellipse 70% 100% at 0% 100%, rgba(var(--rgb-green), 0.08), transparent 50%),
    var(--color-surface);
  box-shadow: var(--color-shadow-lg);
}

.home-cta__inner h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  max-width: 22ch;
}

.home-cta__inner p {
  margin: 0;
  color: var(--color-muted);
  max-width: 46ch;
}

.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .home-page .hero-inner--home {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .home-page .hero-lead {
    margin-inline: auto;
  }

  .home-page .hero-cta {
    justify-content: center;
  }

  .home-page .dt-visual {
    min-height: clamp(200px, 52vw, 300px);
    max-width: min(100%, 340px);
    margin-inline: auto;
  }

  .home-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-stats__item:nth-child(3) {
    border-inline-start: none;
  }

  .home-stats__item:nth-child(even) {
    border-inline-start: 1px solid var(--home-line);
  }

  .home-explore__grid,
  .home-grid--3,
  .home-team-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-page .hero {
    min-height: clamp(480px, 92vh, 720px);
  }

  .home-page .dt-visual {
    min-height: 180px;
    max-width: 280px;
  }

  .home-stats__grid,
  .home-explore__grid,
  .home-grid--3,
  .home-grid--2,
  .home-team-strip {
    grid-template-columns: 1fr;
  }

  .home-stats__item,
  .home-stats__item:nth-child(even) {
    border-inline-start: none;
    border-top: 1px solid var(--home-line);
    padding-top: 0.75rem;
  }

  .home-stats__item:first-child {
    border-top: none;
    padding-top: 0.35rem;
  }

  .home-scroll-hint {
    display: none;
  }
}
