/* ==========================================================
   SOWAYA | hero.css
   Home hero: light field, photos masked inside an Africa
   outline (SVG clipPath) with an offset gold copy behind it.
   Pair with templates/partials/hero_home.html.
   ========================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

/* ----- copy ----- */
.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.7rem, 5.6vw, 5rem);
  line-height: 1.04;
  color: var(--green-ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--green);
}
.hero__lead {
  max-width: 33rem;
  margin: 0 0 2.25rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero__points li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--charcoal);
}
.hero__points svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 50%;
  background: var(--green);
  color: var(--cream);
}

/* ----- Africa ----- */
.hero__map {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto 0;
  padding: 0 20px 20px 0;
}
.hero__link {
  position: relative;
  display: block;
  aspect-ratio: 710 / 860;
}
.hero__link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 6px;
  border-radius: 24px;
}
.hero__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hero__shadow {
  fill: var(--gold);
  transform: translate(18px, 18px);
}
.hero__slide {
  opacity: 0;
  animation: heroFade 21s infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.hero__slide:nth-of-type(1) {
  animation-delay: -1.05s;
}
.hero__slide:nth-of-type(2) {
  animation-delay: 5.95s;
}
.hero__slide:nth-of-type(3) {
  animation-delay: 12.95s;
}

.hero__view {
  position: absolute;
  right: 2%;
  top: 3%;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--green-ink);
  color: var(--cream);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.2s,
    color 0.2s,
    transform 0.2s;
}
.hero__link:hover .hero__view {
  background: var(--gold);
  color: var(--green-ink);
  transform: translateY(-2px);
}
.hero__dots {
  position: absolute;
  left: 62%;
  bottom: 24%;
  display: flex;
  gap: 0.4rem;
  transform: translateX(-50%);
}
.hero__dots span {
  width: 26px;
  height: 4px;
  border-radius: 4px;
  background: var(--cream);
  opacity: 0.45;
  animation: heroDot 21s infinite;
}
.hero__dots span:nth-child(1) {
  animation-delay: -1.05s;
}
.hero__dots span:nth-child(2) {
  animation-delay: 5.95s;
}
.hero__dots span:nth-child(3) {
  animation-delay: 12.95s;
}

.hero__card {
  position: absolute;
  z-index: 2;
  left: -1.5rem;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 19rem;
  margin: 0;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 18px 40px -22px rgba(15, 51, 34, 0.5);
}
.hero__card strong {
  font-family: var(--font-head);
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--green);
}
.hero__card span {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ----- motion ----- */
@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1.07);
  }
  5% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  38% {
    opacity: 0;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
@keyframes heroDot {
  0% {
    opacity: 0.45;
  }
  5% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  38% {
    opacity: 0.45;
  }
  100% {
    opacity: 0.45;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__copy > :nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero__copy > :nth-child(3) {
    animation-delay: 0.16s;
  }
  .hero__copy > :nth-child(4) {
    animation-delay: 0.24s;
  }
  .hero__copy > :nth-child(5) {
    animation-delay: 0.32s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide,
  .hero__dots span {
    animation: none;
  }
  .hero__slide:first-of-type {
    opacity: 1;
  }
  .hero__dots span:first-child {
    opacity: 1;
  }
}

/* ----- responsive ----- */
@media (max-width: 1080px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }
  .hero__map {
    max-width: 560px;
    margin-inline: auto;
    padding: 0 18px 18px;
  }
  .hero__card {
    left: -0.5rem;
    bottom: 8%;
  }
}
@media (max-width: 640px) {
  .hero__actions .btn {
    width: 100%;
  }
  .hero__points {
    gap: 0.6rem 1.25rem;
  }
  .hero__tag {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }
  .hero__card {
    left: 0;
    max-width: calc(100% - 1rem);
  }
}
