:root {
  color-scheme: light;
  --ink: #1c1a14;
  --muted: #6a5d4c;
  --accent: #c56b2c;
  --accent-deep: #8d3f12;
  --sky: #e7f1f3;
  --sand: #f4efe6;
  --stone: #d1c7b7;
  --shadow: 0 20px 50px rgba(34, 28, 20, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f7f2e8 0%, #eef4f2 60%, #fbeedb 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans MT", "Trebuchet MS", sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: -20vmin;
  background: radial-gradient(circle at 20% 20%, rgba(197, 107, 44, 0.12), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(96, 132, 120, 0.18), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(140, 124, 92, 0.15), transparent 55%);
  z-index: -1;
}

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem 0;
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--muted);
}

.lede {
  font-size: 1.15rem;
  max-width: 38rem;
}

.species-code {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.35rem;
}

.bird-audio {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.bird-audio__player {
  width: 100%;
}

.site-hero {
  display: grid;
  gap: 2rem;
  padding: 4rem clamp(1.5rem, 4vw, 4rem) 3rem;
  align-items: center;
}

.site-hero__content h1 {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-hero__panel {
  background: var(--sand);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.5rem;
}

.stat {
  display: grid;
  gap: 0.4rem;
}

.stat__label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
}

.index-main {
  padding: 0 clamp(1.5rem, 4vw, 4rem) 4rem;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.collection {
  background: rgba(255, 255, 255, 0.7);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bird-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.bird-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 25px rgba(32, 26, 19, 0.12);
}

.bird-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(32, 26, 19, 0.18);
}

.bird-card__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
}

.bird-card__name {
  font-size: 1.2rem;
  font-weight: 600;
}

.bird-card__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 2rem clamp(1.5rem, 4vw, 4rem) 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-bird {
  padding-bottom: 3rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.2rem;
  color: var(--accent-deep);
  font-weight: 600;
}

.bird-hero {
  display: grid;
  gap: 2rem;
  padding: 3.5rem clamp(1.5rem, 4vw, 4rem) 2rem;
  align-items: start;
}

.bird-hero__media {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

.quick-facts strong {
  display: block;
  color: var(--ink);
}


.species-panel {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(34, 28, 20, 0.12);
}

.species-panel .section-title {
  margin-bottom: 1rem;
}

.carousel {
  position: relative;
  display: grid;
  gap: 1rem;
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #101010;
  min-height: 280px;
}

.carousel__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel__image.is-active {
  opacity: 1;
  position: relative;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  z-index: 2;
}

.carousel__btn[data-dir="prev"] {
  left: 0.6rem;
}

.carousel__btn[data-dir="next"] {
  right: 0.6rem;
}

.carousel__dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.carousel__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: none;
  background: var(--stone);
  cursor: pointer;
}

.carousel__dot.is-active {
  background: var(--accent);
}

.carousel__caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.carousel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.carousel__meta span {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(32, 26, 19, 0.08);
}

.bird-profile,
.image-details {
  margin: 0 clamp(1.5rem, 4vw, 4rem) 2.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.profile-item span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  color: var(--muted);
}

.profile-block {
  margin-top: 1.5rem;
}

.empty-note {
  color: var(--muted);
  font-style: italic;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.image-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(34, 28, 20, 0.12);
}

.image-card__thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.image-card__body {
  padding: 1.2rem 1.4rem 1.6rem;
}

.image-card__body h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.image-card dl {
  margin: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.image-card dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  color: var(--muted);
}

.image-card dd {
  margin: 0.1rem 0 0 0;
  color: var(--ink);
}

.meta-link {
  color: var(--accent-deep);
  font-weight: 600;
}

@media (min-width: 900px) {
  .site-hero {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .bird-hero {
    grid-template-columns: 1.1fr 1fr;
  }
}

@media (max-width: 720px) {
  .bird-card__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .collection,
  .bird-profile,
  .image-details {
    padding: 2rem 1.5rem;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-hero,
.bird-hero,
.collection,
.bird-profile,
.image-details {
  animation: fadeUp 0.6s ease both;
}
