:root {
  --bg-dark: #081108;
  --green-dark: #142014;
  --green-mid: #31572c;
  --green-light: #4f7d35;
  --acid: #b7ff3c;
  --yellow: #ffcc2f;
  --earth: #5a3b22;
  --text: #f5f5e8;
  --muted: #c8d6bd;
  --shadow: #050805;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  font-family: Arial, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(183, 255, 60, 0.14), transparent 28rem),
    linear-gradient(180deg, var(--bg-dark), #0b1409 46%, var(--green-dark));
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1,
h2,
h3,
.logo {
  font-family: "Trebuchet MS", "Arial Black", Arial, sans-serif;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1180px, calc(100% - 28px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(245, 245, 232, 0.14);
  border-radius: 999px;
  background: rgba(8, 17, 8, 0.68);
  box-shadow: 0 18px 50px rgba(5, 8, 5, 0.42);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--acid);
  border-radius: 50% 50% 44% 56%;
  background:
    radial-gradient(circle at 60% 34%, var(--yellow) 0 8%, transparent 9%),
    linear-gradient(145deg, var(--green-light), var(--green-mid));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(245, 245, 232, 0.1);
}

.main-nav .nav-cta {
  color: var(--bg-dark);
  background: var(--acid);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 245, 232, 0.2);
  border-radius: 50%;
  background: rgba(245, 245, 232, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: 130px max(18px, calc((100vw - 1180px) / 2)) 80px;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background:
    linear-gradient(135deg, rgba(20, 32, 20, 0.6), rgba(8, 17, 8, 0.9)),
    radial-gradient(circle at 78% 20%, rgba(183, 255, 60, 0.24), transparent 24rem),
    linear-gradient(145deg, var(--green-mid), var(--bg-dark));
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 17, 8, 0.94), rgba(8, 17, 8, 0.56), rgba(8, 17, 8, 0.88)),
    linear-gradient(180deg, rgba(8, 17, 8, 0.12), var(--bg-dark));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(183, 255, 60, 0.35);
  border-radius: 999px;
  color: var(--acid);
  background: rgba(20, 32, 20, 0.64);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(3.6rem, 10vw, 8rem);
  line-height: 0.9;
  text-shadow: 0 16px 34px rgba(5, 8, 5, 0.72);
  overflow-wrap: anywhere;
}

.hero-lead {
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 900;
}

.hero p:not(.hero-lead) {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--acid);
  border-radius: 999px;
  color: var(--bg-dark);
  background: var(--acid);
  box-shadow: 0 16px 34px rgba(183, 255, 60, 0.22);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(183, 255, 60, 0.3);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(245, 245, 232, 0.22);
  background: rgba(245, 245, 232, 0.08);
  box-shadow: none;
}

.hero-fact {
  position: absolute;
  right: max(18px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  z-index: 1;
  max-width: 310px;
  padding: 20px;
  border: 1px solid rgba(245, 245, 232, 0.16);
  border-radius: 8px;
  background: rgba(20, 32, 20, 0.66);
  box-shadow: 0 20px 54px rgba(5, 8, 5, 0.48);
  backdrop-filter: blur(16px);
  animation: float 5s ease-in-out infinite;
}

.hero-fact span {
  display: block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-weight: 900;
}

.hero-fact p {
  color: var(--muted);
  line-height: 1.55;
}

.section,
.relations-inner,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-title {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.section-subtitle,
.macro-copy > p,
.relations-copy > p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.macro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  gap: 42px;
  align-items: center;
}

.micro-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.card {
  border: 1px solid rgba(245, 245, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(245, 245, 232, 0.08), rgba(245, 245, 232, 0.03)),
    rgba(20, 32, 20, 0.72);
  box-shadow: 0 18px 46px rgba(5, 8, 5, 0.24);
}

.micro-card-grid .card {
  padding: 18px;
}

.card h3 {
  margin-bottom: 8px;
  color: var(--yellow);
}

.card p {
  color: var(--muted);
  line-height: 1.6;
}

.macro-image,
.anatomy-image,
.relations-image {
  min-height: 480px;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 232, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 22%, rgba(183, 255, 60, 0.24), transparent 16rem),
    linear-gradient(145deg, var(--green-mid), var(--shadow));
  box-shadow: 0 24px 70px rgba(5, 8, 5, 0.46);
}

.macro-image img,
.anatomy-image img,
.relations-image img {
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.creature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.creature-card {
  overflow: hidden;
  border: 1px solid rgba(245, 245, 232, 0.12);
  border-radius: 8px;
  background: rgba(20, 32, 20, 0.82);
  box-shadow: 0 18px 46px rgba(5, 8, 5, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.creature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(183, 255, 60, 0.55);
  box-shadow: 0 26px 64px rgba(5, 8, 5, 0.46);
}

.creature-image {
  height: 230px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--green-mid), var(--earth));
}

.creature-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.creature-card:hover img {
  transform: scale(1.06);
}

.creature-content {
  padding: 20px;
}

.creature-content span {
  display: block;
  margin-bottom: 8px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.creature-content h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.creature-content p {
  color: var(--muted);
  line-height: 1.6;
}

.creature-content strong {
  display: block;
  margin-top: 16px;
  color: var(--yellow);
  line-height: 1.45;
}

.anatomy-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.tab-panel {
  display: grid;
  gap: 16px;
  align-content: center;
}

.tab-buttons,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button,
.filter-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(245, 245, 232, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(245, 245, 232, 0.06);
  cursor: pointer;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tab-button.active,
.filter-button.active {
  color: var(--bg-dark);
  border-color: var(--acid);
  background: var(--acid);
}

.tab-content {
  min-height: 220px;
  padding: 28px;
}

.tab-content h3 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.relations-section {
  padding: 94px 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(183, 255, 60, 0.16), transparent 24rem),
    linear-gradient(135deg, #060c06, var(--green-dark));
}

.relations-inner {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.relations-copy p {
  margin-bottom: 22px;
}

.did-you-know {
  padding: 22px;
  border: 1px solid rgba(255, 204, 47, 0.34);
  border-radius: 8px;
  background: rgba(90, 59, 34, 0.38);
}

.did-you-know span {
  display: block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-weight: 900;
}

.filter-bar {
  margin-bottom: 26px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 232, 0.12);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--green-mid), var(--shadow));
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 10px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 17, 8, 0.74);
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.image-missing img {
  display: none;
}

.image-missing::before {
  content: "Imagem pendente";
  display: grid;
  width: 100%;
  min-height: inherit;
  place-items: center;
  padding: 22px;
  color: rgba(245, 245, 232, 0.72);
  background:
    linear-gradient(135deg, rgba(183, 255, 60, 0.16), transparent),
    repeating-linear-gradient(45deg, rgba(245, 245, 232, 0.06) 0 10px, transparent 10px 20px),
    linear-gradient(145deg, var(--green-mid), var(--shadow));
  font-weight: 900;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  padding: 44px 0 56px;
  border-top: 1px solid rgba(245, 245, 232, 0.14);
}

.site-footer h2 {
  margin-bottom: 10px;
}

.site-footer p {
  max-width: 700px;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer nav {
  display: flex;
  gap: 14px;
  align-items: start;
}

.site-footer a {
  color: var(--acid);
  font-weight: 800;
}

.credits {
  grid-column: 1 / -1;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    inset: 84px 14px auto;
    display: none;
    padding: 14px;
    border: 1px solid rgba(245, 245, 232, 0.14);
    border-radius: 18px;
    background: rgba(8, 17, 8, 0.94);
    box-shadow: 0 22px 60px rgba(5, 8, 5, 0.56);
  }

  .main-nav.active {
    display: grid;
  }

  .main-nav a {
    border-radius: 10px;
  }

  .menu-toggle {
    display: block;
  }

  .hero-fact {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 1;
    margin-top: 32px;
  }

  .macro-section,
  .anatomy-layout,
  .relations-inner {
    grid-template-columns: 1fr;
  }

  .creature-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .micro-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    width: min(100% - 20px, 1180px);
    border-radius: 20px;
  }

  .logo {
    font-size: 0.96rem;
  }

  .hero {
    padding-top: 118px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section,
  .relations-section {
    padding-block: 72px;
  }

  .creature-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .macro-image,
  .anatomy-image,
  .relations-image {
    min-height: 340px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 10px;
    padding: 10px;
  }

  .logo {
    font-size: 0.86rem;
  }

  .logo-mark {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
  }

  .hero h1 {
    font-size: 3rem;
    line-height: 0.96;
  }

  .hero-lead {
    font-size: 1.22rem;
  }

  .tab-button,
  .filter-button,
  .btn {
    width: 100%;
  }
}
