/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* load the font (put this at very top of your CSS) */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');


:root {
  --forest-green: #316b40;
  --terracotta: #C66B3A;
  --sand: #E8D5B7;
  --charcoal: #2B2B2B;
  --ivory: #FFFFFF;
  --light-sand: #f5efe6;
  --light-green: #e6f0e9;
  --font-heading: 'Merriweather', serif;
  --font-body: 'Open Sans', sans-serif;
    --font-curly: 'Dancing Script', 'Segoe Script', cursive;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--charcoal);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}


/* ===== Fade-in utilities ===== */
.fade-from-top,
.fade-from-left,
.fade-from-right,
.fade-from-bottom {
  opacity: 0;
}

.fade-from-top {
  transform: translateY(-20px);
  transition: opacity 0.8s ease-out 0.2s,
              transform 0.8s ease-out 0.2s;
}

.fade-from-left {
  transform: translateX(-30px);
  transition: opacity 1.2s ease-out 0.4s,
              transform 1.2s ease-out 0.4s;
}

.fade-from-right {
  transform: translateX(30px);
  transition: opacity 1.5s ease-out 0.6s,
              transform 1.5s ease-out 0.6s;
}

.fade-from-bottom {
  transform: translateY(20px);
  transition: opacity 1s ease-out 0.5s,
              transform 1s ease-out 0.5s;
}

/* When in view, clear transforms */
.in-view {
  opacity: 1 !important;
  transform: translate(0,0) !important;
}

.container {
   
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: white;
  border-bottom: 2px solid var(--forest-green);
  z-index: 1000;
}

.site-header .container {
  max-width: 100vw;
  min-width: 100vw;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo-wrap {
  flex: 0 0 auto;
}

.logo {
  display: block;
  height: 70px;
  width: auto;
  padding: 0 1rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  align-items: center;
  font-family: 'Poppins', sans-serif;
}

.nav-left {
  justify-content: flex-end;
}

.nav-right {
  justify-content: flex-start;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  color: black;
  padding: 0.5rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--forest-green);
}

/* Sidebar styles */
/* Mobile dropdown menu */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  transform: scaleY(0);
  transform-origin: top;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-bottom: 2px solid var(--forest-green);
  z-index: 998;
}

/* Show dropdown */
.mobile-nav.open {
  transform: scaleY(1);
  opacity: 1;
}

/* Mobile nav links */
.mobile-nav a {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: black;
  text-decoration: none;
  font-size: 1.2rem;
}

.mobile-nav a:hover {
  color: var(--forest-green);
}


/* Hamburger animation - better "X" alignment */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(11px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-11px);
}


.hamburger span {
  transition: all 0.3s ease;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001; /* above sidebar */
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: black;
  transition: all 0.3s ease;
}



@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
}


/* Responsive Navigation */
@media (max-width: 768px) {
  .site-header .nav {
    display: none;
  }
  .site-header .hamburger {
    display: block;
  }
  .site-header .container {
    justify-content: space-between;
    padding-left: 0;
  }
  .site-header .logo-wrap {
    order: 1;
  }
  .site-header .hamburger {
    order: 2;
  }
}








/* ===== ANIMAL PAGE & CARDS ===== */
#animal-container {
  margin-top: 100px;
  display: grid;
  /* always max 2 columns */
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem 1rem 4rem;
}

@media (max-width: 768px) {
  #animal-container {
    grid-template-columns: 1fr;
  }
}

.animal-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.animal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Curly cursive for all labels */
.animal-name,
.animal-ttt,
.animal-sci,
.animal-stripes,
.animal-purity {
  font-family: var(--font-curly);
  color: var(--ivory);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Name (top-left) */
.animal-name {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-size: 2.6rem;
  font-weight: 700;
}

/* TTT & SCI (same size & weight, center‑right) */
.animal-ttt,
.animal-sci {
  position: absolute;
  right: 1rem;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: right;
}

/* Tip‑to‑Tip: vertical center */
.animal-ttt {
  top: 50%;
  transform: translateY(-50%);
}

/* SCI: just below TTT */
.animal-sci {
  top: calc(50% + 2.2rem);
}

/* Stripes: bottom‑right */
.animal-stripes {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Purity: bottom‑left (percentage + name) */
.animal-purity {
  position: absolute;
  bottom: 0.8rem;
  left: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

/* ===== FRACTION (BREUK) STYLES ===== */
.fraction {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 1em;
}
.frac-whole { margin-right: 0.2em; }
.frac-block { position: relative; width: 0.9em; height: 0.9em; }
.frac-num,
.frac-den,
.frac-slash { position: absolute; display: block; }
.frac-num { top: -0.1em; left: 0; font-size: 0.65em; }
.frac-den { bottom: -0.15em; right: 0; font-size: 0.65em; }
.frac-slash {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 1.1em;
  line-height: 0.7em;
}

/* ===== ERROR MESSAGE ===== */
.error {
  text-align: center;
  padding: 3rem;
  color: #d32f2f;
  font-weight: 600;
  font-size: 1.2rem;
  background: #ffebee;
  border-radius: 8px;
  margin: 2rem 0;
}

/* Full‑width section headings inside the two‑col grid */
#animal-container h2 {
  /* span both columns */
  grid-column: 1 / -1;
  font-size: 2.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: black;
  /* spacing */
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  /* decorative underline */
  border-bottom: 4px solid rgba(255,255,255,0.6);
}

/* Optional: center the text on small screens */
@media (max-width: 768px) {
  #animal-container h2 {
    text-align: center;
  }
}
