/**
 * Hero showcase — large side carousel with fade transitions.
 */

.hero-showcase {
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-showcase {
    max-width: none;
    margin-inline: 0;
  }
}

.hero-showcase-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(26, 46, 26, 0.18);
  background: var(--bg-card);
}

.hero-showcase-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0.85s step-end;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.hero-showcase-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transition:
    opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0s step-start;
}

.hero-showcase-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 46, 26, 0.88) 0%,
    rgba(26, 46, 26, 0.2) 42%,
    transparent 72%
  );
  pointer-events: none;
}

.hero-showcase-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.hero-showcase-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
}

.hero-showcase-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.hero-showcase-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero-showcase-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-showcase-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--bg-dark);
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease;
}

.hero-showcase-viewport:hover .hero-showcase-nav,
.hero-showcase-viewport:focus-within .hero-showcase-nav {
  opacity: 1;
}

.hero-showcase-nav:hover {
  background: #fff;
}

.hero-showcase-nav--prev {
  left: 0.75rem;
}

.hero-showcase-nav--next {
  right: 0.75rem;
}

@media (max-width: 1023px) {
  .hero-showcase-nav {
    opacity: 0.92;
  }
}

.hero-showcase-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.hero-showcase-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(61, 122, 79, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-showcase-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.hero-showcase-dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Hero typography (screenshot-style) ─────────────────────────────────── */

.hero-copy {
  text-align: center;
  padding-top: 0;
}

@media (min-width: 1024px) {
  .hero-copy {
    text-align: left;
  }
}

.hero-headline {
  margin-top: 0.75rem;
  font-size: clamp(1.875rem, 3.8vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-headline-main {
  font-style: italic;
  font-weight: 700;
  display: block;
}

.hero-headline-keywords {
  font-style: italic;
  font-weight: 700;
  color: var(--primary);
  text-shadow:
    0 2px 4px rgba(26, 46, 26, 0.18),
    0 4px 14px rgba(61, 122, 79, 0.35),
    0 0 24px rgba(168, 201, 87, 0.28);
}

html[data-theme="dark"] .hero-headline-keywords {
  color: var(--accent-strong);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(246, 34, 189, 0.42),
    0 0 32px rgba(51, 109, 243, 0.28);
}

/* Light shimmer band across italic headline (clip to glyphs, multi-line) */
html.can-clip-text .hero-headline-main.text-gradient-animated {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(
    105deg,
    #1a2e1a 0%,
    #1a2e1a 34%,
    #8fb86a 44%,
    #e8f4c8 50%,
    #8fb86a 56%,
    #1a2e1a 66%,
    #1a2e1a 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: heroHeadlineShimmer 7.2s ease-in-out infinite;
  white-space: normal;
}

html.no-clip-text .hero-headline-main.text-gradient-animated {
  color: #1a2e1a;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  --fallback-gradient-start: #1a2e1a;
  --fallback-gradient-mid: #e8f4c8;
  --fallback-gradient-end: #3d5a32;
}

@keyframes heroHeadlineShimmer {
  0% {
    background-position: 115% 50%;
  }
  100% {
    background-position: -15% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.can-clip-text .hero-headline-main.text-gradient-animated {
    animation: none;
    background-position: 50% 50%;
  }
}

.hero-lead-wrap {
  position: relative;
  margin-top: 1.35rem;
  max-width: 38rem;
  margin-inline: auto;
  isolation: isolate;
  overflow: visible;
}

.hero-lead-wrap .hero-lead {
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.hero-lead-particles {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: soft-light;
  opacity: 0.9;
}

/* iOS WebKit: mix-blend-mode on canvas inside isolation often renders invisible. */
html.ios-webkit .hero-lead-wrap {
  isolation: auto;
}

html.ios-webkit .hero-lead-particles {
  mix-blend-mode: normal;
  opacity: 1;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

html[data-theme="dark"] .hero-lead-particles {
  mix-blend-mode: screen;
  opacity: 0.82;
}

.hero-lead {
  max-width: none;
  margin-inline: 0;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 2px solid rgba(61, 122, 79, 0.32);
  background: linear-gradient(
    90deg,
    rgba(168, 201, 87, 0.1) 0%,
    rgba(168, 201, 87, 0.03) 42%,
    transparent 78%
  );
  font-family: "Cormorant Garamond", "PT Serif", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.68rem, 3.36vw, 2.28rem);
  line-height: 1.16;
  letter-spacing: 0.02em;
  font-feature-settings: "liga" 1, "kern" 1;
  color: #3f5242;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.42),
    0 2px 14px rgba(61, 122, 79, 0.14);
  animation: heroLeadGlow 16s ease-in-out infinite;
}

@keyframes heroLeadGlow {
  0%,
  100% {
    border-left-color: rgba(61, 122, 79, 0.28);
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.4),
      0 2px 12px rgba(61, 122, 79, 0.1);
  }
  50% {
    border-left-color: rgba(61, 122, 79, 0.48);
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.5),
      0 2px 18px rgba(61, 122, 79, 0.2),
      0 0 26px rgba(168, 201, 87, 0.12);
  }
}

@media (min-width: 768px) {
  .hero-lead {
    line-height: 1.14;
    letter-spacing: 0.025em;
    padding-left: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .hero-lead-wrap {
    margin-inline: 0;
    max-width: 34rem;
  }
}

html[data-theme="dark"] .hero-lead {
  color: #b8ccef;
  font-weight: 600;
  border-left-color: rgba(51, 109, 243, 0.42);
  background: linear-gradient(
    90deg,
    rgba(51, 109, 243, 0.14) 0%,
    rgba(246, 34, 189, 0.06) 46%,
    transparent 80%
  );
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 16px rgba(51, 109, 243, 0.22);
  animation-name: heroLeadGlowDark;
}

@keyframes heroLeadGlowDark {
  0%,
  100% {
    border-left-color: rgba(51, 109, 243, 0.34);
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.05),
      0 2px 14px rgba(51, 109, 243, 0.16);
  }
  50% {
    border-left-color: rgba(246, 34, 189, 0.52);
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.08),
      0 2px 20px rgba(51, 109, 243, 0.28),
      0 0 28px rgba(246, 34, 189, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-lead {
    animation: none;
  }
}

.hero-stats {
  display: none;
  gap: 2rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .hero-stats {
    display: flex;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero-stats {
    justify-content: flex-start;
    gap: 2.5rem;
  }
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero-stat-value {
    font-size: 2rem;
  }
}

.hero-stat-label {
  margin-top: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

html[data-theme="dark"].can-clip-text .hero-headline-main.text-gradient-animated {
  background: linear-gradient(
    105deg,
    #dce9ff 0%,
    #dce9ff 34%,
    #7eb0ff 44%,
    #ffffff 50%,
    #7eb0ff 56%,
    #dce9ff 66%,
    #dce9ff 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: heroHeadlineShimmer 7.2s ease-in-out infinite;
}

html[data-theme="dark"].no-clip-text .hero-headline-main.text-gradient-animated {
  color: #dce9ff;
  --fallback-gradient-start: #dce9ff;
  --fallback-gradient-mid: #ffffff;
  --fallback-gradient-end: #7eb0ff;
}

html[data-theme="dark"] .hero-showcase-viewport {
  box-shadow: var(--night-surface-glow);
}

html[data-theme="dark"] .hero-showcase .tag-pill {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .hero-showcase-nav {
  background: rgba(3, 25, 86, 0.88);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .hero-showcase-slide {
    transition: none;
  }
}
