/* Home-specific tweaks. The hero and module grid are already
   styled via components.css + layout.css; anything unique lives here. */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--c-black);
  /* Fallback */
}

.hero__slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 3s var(--ease-out);
  /* Slow fade */
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
    rgba(0, 0, 0, 0.4);
  /* Dark shade for readability */
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  text-align: center;
  margin-inline: auto;
}

/* .hero__title is now handled by global h1 style */

/* Forum teaser banner (dark teal with keyvisual mark) */
.forum-teaser {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--sp-6);
  align-items: center;
  padding: clamp(var(--sp-6), 6vw, var(--sp-8));
  background: var(--accent-forum);
  color: var(--c-cream);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
  overflow: hidden;
}

.forum-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.forum-teaser:hover .forum-teaser__cta {
  color: var(--c-cream);
}

.stretched-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.forum-teaser .btn {
  position: relative;
  z-index: 2;
}

/* Marquee Section */
.marquee-section {
  overflow: hidden;
  padding-block: var(--sp-8);
}

.marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  white-space: nowrap;
  display: flex;
  overflow: hidden;
  padding-block: var(--sp-2);
}

.marquee__inner {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.marquee__text {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(3.2rem, 10vw, 8rem);
  line-height: 1.3;
  color: var(--c-gold);
  opacity: 0.4;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: var(--sp-8);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-25%);
  }
}

/* Editorial Sections (matching forum/welcome style) */
.section--editorial h2 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: var(--fw-medium);
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}

.section--editorial .lead {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  line-height: 1.4;
  margin-top: 0;
}

.section--editorial .split {
  column-gap: 10%;
  align-items: start;
}

.split--reverse> :first-child {
  order: 2;
}

.split--reverse> :last-child {
  order: 1;
}

@media (max-width: 768px) {
  .section--editorial .split {
    column-gap: var(--sp-6);
  }

  .split--reverse> :first-child {
    order: 0;
  }

  .split--reverse> :last-child {
    order: 0;
  }
}

.forum-teaser__eyebrow {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-snug);
  font-size: var(--fs-sm);
  opacity: 0.9;
  margin: 0;
}

.forum-teaser__title {
  color: var(--c-cream);
  margin: var(--sp-2) 0 var(--sp-3);
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.4rem);
  max-width: 20ch;
}

.forum-teaser__lead {
  color: color-mix(in srgb, var(--c-cream) 90%, transparent);
  max-width: 58ch;
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-snug);
}

.forum-teaser__cta {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
}

.forum-teaser__mark {
  justify-self: end;
  width: 100%;
  max-width: 240px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .forum-teaser {
    grid-template-columns: 1fr;
  }

  .forum-teaser__mark {
    justify-self: center;
    max-width: 160px;
  }

  .forum-teaser__title {
    max-width: 100% !important;
    font-size: clamp(1.2rem, 6vw, 1.5rem) !important;
    line-height: 1.2 !important;
  }

  .forum-teaser__lead {
    font-size: 0.95rem !important;
  }
}

/* Embla Carousel Base */
.embla {
  position: relative;
}

.embla__viewport {
  overflow: hidden;
  width: 100%;
  padding-block: 10px;
  margin-block: -10px;
}

.embla__container {
  display: flex;
  align-items: stretch;
  /* Ensures all slides have the same height */
  user-select: none;
  -webkit-touch-callout: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin-left: calc(var(--sp-4) * -1);
}

.embla__slide {
  position: relative;
  min-width: 0;
  flex: 0 0 100%;
  /* Mobile */
  padding-left: var(--sp-4);
  display: flex;
  /* Required for card height: 100% */
}

.embla__slide .card {
  width: 100%;
  height: 100%;
  /* Makes cards fill the slide height */
}

@media (min-width: 640px) {
  .embla__slide {
    flex: 0 0 48%;
  }

  /* Tablet */
}

@media (min-width: 1024px) {
  .embla__slide {
    flex: 0 0 32%;
  }

  /* Desktop */
}

/* Talk Card Overrides (match talks.css aspect ratio) */
.talks-card .card__media {
  aspect-ratio: 16 / 8.7;
}

/* Navigation & Collapsing Arrow */
.embla__nav-group {
  gap: var(--sp-3);
  align-items: center;
}

.embla__prev,
.embla__next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  transition:
    width var(--dur-med) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out),
    margin var(--dur-med) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
  overflow: hidden;
  white-space: nowrap;
}

.embla__prev:hover,
.embla__next:hover {
  background: var(--color-bg);
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Collapsed state: Right arrow shrinks and disappears */
.embla__next.is-collapsed {
  width: 0;
  opacity: 0;
  margin: 0;
  border-left-width: 0;
  border-right-width: 0;
  padding: 0;
  pointer-events: none;
}

.embla__prev:disabled {
  opacity: 0.3;
  pointer-events: none;
}