/* ============================================================
   The Amazon Rainforest — styles
   Palette taken from the original design:
   teal cards #00b4ad, white pill headings, big rounded corners
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --teal: #00b4ad;
  --teal-deep: #008f8a;
  --ink: #111418;
  --paper: #ffffff;
  --bg-1: #0b1d15;
  --bg-2: #123326;
  --radius: 30px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  color: var(--paper);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-1) 100%);
  overflow-x: hidden;
}

/* ============ DRIFTING LEAVES ============ */

.leaves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.leaf {
  position: absolute;
  top: -60px;
  animation: leaf-fall var(--fall) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

.leaf svg {
  display: block;
  width: var(--size);
  height: var(--size);
  opacity: var(--alpha);
  animation: leaf-sway var(--sway) ease-in-out infinite alternate;
}

@keyframes leaf-fall {
  to { transform: translateY(115vh); }
}

@keyframes leaf-sway {
  from { transform: translateX(calc(var(--amp) * -1)) rotate(-50deg); }
  to   { transform: translateX(var(--amp)) rotate(50deg); }
}

/* ============ HERO ============ */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.15) translateY(-2%); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(5, 20, 14, 0.25) 0%, rgba(5, 20, 14, 0.55) 100%),
    linear-gradient(to bottom, rgba(5, 20, 14, 0.35) 0%, rgba(5, 20, 14, 0.15) 50%, var(--bg-1) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.hero__eyebrow {
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

/* words are wrapped in spans by script.js and rise in one by one */
.hero__title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(3deg);
  animation: word-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--wd);
}

@keyframes word-rise {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.hero__sub {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 30px;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--paper);
  text-decoration: none;
  opacity: 0.85;
  animation: cue-bob 1.8s ease-in-out infinite;
}

.hero__scroll-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero__scroll-chevron { font-size: 1.4rem; line-height: 1; }

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

/* ============ STATS ============ */

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  padding: 70px 20px 30px;
}

.stat {
  min-width: 230px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 26px 34px;
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, background 0.4s ease;
}

.stat:hover { transform: translateY(-6px) scale(1.03); background: rgba(255, 255, 255, 0.1); }

.stat__big {
  display: block;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  color: var(--teal);
  text-shadow: 0 0 25px rgba(0, 180, 173, 0.45);
}

.stat__small {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  opacity: 0.85;
}

/* ============ CARDS ============ */

.cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 34px;
  padding: 50px 24px 90px;
  max-width: 1280px;
  margin: 0 auto;
}

.card {
  flex: 1 1 340px;
  max-width: 390px;
}

/* --- white pill heading, just like the original design --- */
.card__pill {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 18px 24px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card__pill h2 {
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
}

.card__chevron {
  font-size: 1.1rem;
  transition: transform 0.5s ease;
}

.card:hover .card__pill,
.card.open .card__pill {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 180, 173, 0.35);
}

.card:hover .card__chevron,
.card.open .card__chevron { transform: rotate(180deg); }

/* --- teal panel --- */
.card__panel {
  background: linear-gradient(170deg, var(--teal) 0%, var(--teal-deep) 100%);
  border-radius: var(--radius);
  margin-top: 10px;
  padding: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.card:hover .card__panel,
.card.open .card__panel {
  transform: translateY(-3px);
  box-shadow: 0 26px 60px rgba(0, 180, 173, 0.28);
}

.card__imgwrap {
  border-radius: calc(var(--radius) - 12px);
  overflow: hidden;
}

.card__img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.8s ease;
}

.card:hover .card__img,
.card.open .card__img { transform: scale(1.08); }

/* --- the drop-down: hover the heading and the paragraph rolls open --- */
.card__drop {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.65s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.card:hover .card__drop,
.card.open .card__drop,
.card__pill:focus-visible ~ .card__panel .card__drop {
  grid-template-rows: 1fr;
}

.card__text { overflow: hidden; }

.card__text p {
  padding: 16px 8px 6px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.45s ease 0.12s, transform 0.55s ease 0.12s;
}

.card:hover .card__text p,
.card.open .card__text p {
  opacity: 1;
  transform: translateY(0);
}

/* ============ GALLERY ============ */

.gallery {
  padding: 20px 0 90px;
  text-align: center;
}

.gallery__pill {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 16px 38px;
  margin-bottom: 38px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.gallery__pill h2 { font-size: 1.35rem; font-weight: 800; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding: 10px 0;
  animation: marquee-scroll 45s linear infinite;
}

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

@keyframes marquee-scroll {
  to { transform: translateX(calc(-50% - 11px)); }
}

.marquee__track img {
  height: 215px;
  width: auto;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.marquee__track img:hover {
  transform: scale(1.07) rotate(-1deg);
  box-shadow: 0 18px 45px rgba(0, 180, 173, 0.35);
}

/* ============ FOOTER ============ */

.footer {
  text-align: center;
  padding: 46px 20px 56px;
  background: rgba(0, 0, 0, 0.25);
}

.footer__title { font-weight: 800; font-size: 1.05rem; }

.footer__credit { margin-top: 8px; font-size: 0.85rem; opacity: 0.55; }

/* ============ SCROLL REVEAL ============ */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease var(--d, 0s), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}

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

/* hero pieces are visible immediately but still animate in */
.hero .reveal { transition-delay: 0.9s; }

/* ============ SMALL SCREENS ============ */

@media (max-width: 760px) {
  .card { max-width: 100%; }
  .card__pill h2 { white-space: normal; }
  .marquee__track img { height: 150px; }
  .stat { min-width: 170px; padding: 20px 22px; flex: 1 1 150px; }
}

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg, .hero__scroll, .leaf, .leaf svg, .marquee__track { animation: none; }
  .hero__title .w { animation: none; opacity: 1; transform: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .card__drop { transition: none; }
  .card__text p { transition: none; }
}
