/* ============================================================
   CETACEANS WEBSITE — Main Stylesheet
   Created by Kilihea
   Scrapbook aesthetic · Ocean blues · Handmade feel
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Kalam:wght@300;400;700&family=Patrick+Hand&family=Nunito:wght@300;400;600&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Ocean Blue Palette */
  --blue-lightest:  #dff0fb;   /* sky reflection */
  --blue-light:     #a8d8ea;   /* shallow water */
  --blue-mid:       #5ba4cf;   /* open sea */
  --blue-deep:      #2e6d9e;   /* deep ocean */
  --blue-darker:    #1a4a72;   /* midnight blue */
  --blue-darkest:   #0d2e4a;   /* abyss */

  /* Accent & Neutral */
  --cream:          #f5f0e8;   /* aged paper */
  --cream-dark:     #e8dfc8;   /* darker paper */
  --tape-yellow:    #f7e8a0;   /* washi tape gold */
  --tape-pink:      #f5c5c5;   /* washi tape rose */
  --tape-blue:      #b8daf5;   /* washi tape blue */
  --ink:            #2a3a4a;   /* handwritten ink */
  --ink-light:      #4a6a8a;   /* lighter ink */
  --white:          #ffffff;
  --shadow:         rgba(13, 46, 74, 0.18);
  --shadow-soft:    rgba(13, 46, 74, 0.10);

  /* Typography */
  --font-handwritten: 'Caveat', 'Kalam', cursive;
  --font-body:        'Nunito', sans-serif;
  --font-label:       'Patrick Hand', cursive;

  /* Sizing */
  --header-height: 90px;
  --radius-paper:  3px;
  --radius-card:   8px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--blue-lightest);
  color: var(--ink);
  /* Custom cursor */
  cursor: url('assets/cursor-starfish.png') 16 16, auto;
  overflow-x: hidden;
}

/* Interactive elements get pointer cursor with white glow */
a, button, .clickable, [role="button"],
.nav-link, .dropdown-toggle, .pin, .species-card,
.btn-shell, .top-btn {
  cursor: url('assets/cursor-starfish.png') 16 16, pointer;
}

a:hover, button:hover, .clickable:hover,
.nav-link:hover, .species-card:hover, .btn-shell:hover {
  outline: 2px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   BACKGROUND TEXTURE — soft paper grain
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--blue-darker);
  /* Wave cut-out at bottom via clip-path */
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 78%,
    97% 85%, 94% 80%, 91% 88%, 88% 82%,
    85% 90%, 82% 84%, 79% 92%, 76% 85%,
    73% 93%, 70% 86%, 67% 94%, 64% 87%,
    61% 95%, 58% 88%, 55% 96%, 52% 89%,
    49% 97%, 46% 90%, 43% 97%, 40% 90%,
    37% 96%, 34% 88%, 31% 95%, 28% 87%,
    25% 93%, 22% 85%, 19% 91%, 16% 83%,
    13% 89%, 10% 81%, 7% 87%, 4% 79%,
    1% 85%, 0% 80%
  );
  padding-bottom: 22px;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 20px var(--shadow);
}

#site-header.hidden {
  transform: translateY(-110%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--header-height);
  position: relative;
}

/* --- Logo --- */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 10;
}

.site-logo svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.site-logo:hover svg {
  transform: scale(1.08) rotate(-5deg);
}

.logo-label {
  font-family: var(--font-handwritten);
  font-size: 1rem;
  color: var(--blue-light);
  letter-spacing: 0.05em;
}

/* --- Header Center: Title + Nav --- */
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-title {
  font-family: var(--font-handwritten);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue-lightest);
  letter-spacing: 0.08em;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  line-height: 1;
}

/* --- Navigation --- */
#main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-item {
  position: relative;
}

.nav-link,
.dropdown-toggle {
  font-family: var(--font-handwritten);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue-light);
  background: none;
  border: none;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1;
}

.nav-link:hover,
.dropdown-toggle:hover,
.nav-item.active > .nav-link,
.nav-item.active > .dropdown-toggle {
  background: rgba(168, 216, 234, 0.18);
  color: var(--white);
  outline: none;
}

.dropdown-toggle .arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
  display: inline-block;
}

.nav-item.open > .dropdown-toggle .arrow {
  transform: rotate(180deg);
}

/* --- Dropdown Menus --- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--blue-darkest);
  border: 2px solid var(--blue-mid);
  border-radius: 8px;
  min-width: 210px;
  box-shadow: 0 8px 32px var(--shadow);
  z-index: 200;
  padding: 0.4rem 0;
  /* Ripped paper top edge simulation */
  clip-path: polygon(
    0% 6px, 4% 0%, 8% 5px, 12% 1px, 16% 5px, 20% 0%,
    24% 4px, 28% 1px, 32% 5px, 36% 0%, 40% 4px, 44% 1px,
    48% 5px, 52% 0%, 56% 4px, 60% 1px, 64% 5px, 68% 0%,
    72% 4px, 76% 1px, 80% 5px, 84% 0%, 88% 4px, 92% 1px,
    96% 5px, 100% 2px,
    100% 100%, 0% 100%
  );
  padding-top: 10px;
}

.nav-item.open > .dropdown-menu {
  display: block;
  animation: dropIn 0.18s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nested (sub) dropdowns */
.sub-dropdown {
  position: relative;
}

.sub-dropdown > .dropdown-toggle {
  width: 100%;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  font-size: 0.97rem;
  color: var(--blue-light);
  border-radius: 0;
}

.sub-dropdown > .dropdown-toggle:hover {
  background: rgba(91, 164, 207, 0.25);
}

.sub-dropdown > .dropdown-menu {
  top: 0;
  left: 100%;
  min-width: 220px;
}

/* Sub-sub dropdowns (third level) */
.sub-sub-dropdown > .dropdown-menu {
  top: 0;
  left: 100%;
  min-width: 220px;
}

.dropdown-link {
  display: block;
  font-family: var(--font-handwritten);
  font-size: 0.97rem;
  color: var(--blue-lightest);
  padding: 0.45rem 1.1rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: rgba(91, 164, 207, 0.25);
  color: var(--white);
  outline: none;
}

/* Scrollable large dropdowns */
.dropdown-menu.scrollable {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-mid) var(--blue-darkest);
}

/* --- Hamburger (Mobile) --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--blue-light);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Mobile Nav Drawer --- */
#mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 90vw);
  height: 100vh;
  background: var(--blue-darkest);
  z-index: 999;
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 32px var(--shadow);
}

#mobile-nav.open {
  right: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(168, 216, 234, 0.15);
}

.mobile-nav-link,
.mobile-dropdown-toggle {
  font-family: var(--font-handwritten);
  font-size: 1.2rem;
  color: var(--blue-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.5rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mobile-sub-menu {
  display: none;
  padding-left: 1rem;
}

.mobile-sub-menu.open {
  display: block;
}

.mobile-dropdown-link {
  display: block;
  font-family: var(--font-label);
  font-size: 1rem;
  color: var(--blue-lightest);
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(168,216,234,0.08);
}

/* Overlay for mobile nav */
#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

#mobile-overlay.visible {
  display: block;
}

/* ============================================================
   PAGE LAYOUT — content offset for fixed header
   ============================================================ */
.page-content {
  padding-top: calc(var(--header-height) + 20px);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero-section {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Whale jump animation container */
.whale-animation {
  width: 280px;
  height: 200px;
  margin: 0 auto 1.5rem;
  position: relative;
}

/* SVG whale jump keyframes */
@keyframes whaleJump {
  0%   { transform: translateY(0) rotate(0deg) scaleX(1); }
  20%  { transform: translateY(-60px) rotate(-25deg) scaleX(1); }
  40%  { transform: translateY(-100px) rotate(-50deg) scaleX(1); }
  55%  { transform: translateY(-110px) rotate(-90deg) scaleX(-1); }
  70%  { transform: translateY(-70px) rotate(-135deg) scaleX(-1); }
  85%  { transform: translateY(-20px) rotate(-175deg) scaleX(-1); }
  95%  { transform: translateY(5px) rotate(-185deg) scaleX(1); }
  100% { transform: translateY(0) rotate(0deg) scaleX(1); }
}

@keyframes whaleSplash {
  0%, 80% { opacity: 0; transform: scaleX(0.3); }
  90%      { opacity: 1; transform: scaleX(1); }
  100%     { opacity: 0; transform: scaleX(1.3); }
}

.whale-svg {
  width: 160px;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: whaleJump 3.5s cubic-bezier(0.4,0,0.6,1) infinite;
  transform-origin: center bottom;
}

.splash-svg {
  width: 200px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: whaleSplash 3.5s ease infinite;
}

.water-line {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue-mid), transparent);
  border-radius: 50%;
}

/* Hero text */
.hero-title {
  font-family: var(--font-handwritten);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--blue-darker);
  text-shadow: 3px 3px 0 rgba(168,216,234,0.5), 5px 5px 12px var(--shadow);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-family: var(--font-label);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--blue-deep);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   SECTION HEADINGS (scrapbook style)
   ============================================================ */
.section-heading {
  font-family: var(--font-handwritten);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--blue-darker);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue-mid), transparent);
  margin-top: 4px;
  border-radius: 2px;
}

.section-subtext {
  font-family: var(--font-label);
  font-size: 1rem;
  color: var(--blue-deep);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

/* ============================================================
   SCRAPBOOK DECORATIVE ELEMENTS
   ============================================================ */

/* --- Ripped paper edge (top) --- */
.ripped-top {
  position: relative;
}
.ripped-top::before {
  content: '';
  display: block;
  width: 100%;
  height: 24px;
  background: var(--cream);
  clip-path: polygon(
    0% 100%, 2% 60%, 4% 90%, 6% 50%, 8% 80%, 10% 45%,
    12% 75%, 14% 40%, 16% 70%, 18% 35%, 20% 65%, 22% 30%,
    24% 60%, 26% 25%, 28% 55%, 30% 20%, 32% 50%, 34% 18%,
    36% 48%, 38% 22%, 40% 52%, 42% 28%, 44% 58%, 46% 30%,
    48% 62%, 50% 35%, 52% 65%, 54% 40%, 56% 70%, 58% 42%,
    60% 72%, 62% 44%, 64% 74%, 66% 48%, 68% 78%, 70% 50%,
    72% 80%, 74% 52%, 76% 82%, 78% 54%, 80% 84%, 82% 56%,
    84% 86%, 86% 60%, 88% 88%, 90% 62%, 92% 92%, 94% 64%,
    96% 94%, 98% 68%, 100% 90%, 100% 100%
  );
}

/* --- Washi tape strip --- */
.washi-tape {
  display: block;
  height: 18px;
  border-radius: 3px;
  opacity: 0.75;
  position: relative;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 8px,
    rgba(255,255,255,0.25) 8px, rgba(255,255,255,0.25) 16px
  );
}

.washi-tape.yellow { background-color: var(--tape-yellow); }
.washi-tape.pink   { background-color: var(--tape-pink); }
.washi-tape.blue   { background-color: var(--tape-blue); }

/* Diagonal tape (used on cards) */
.tape-strip {
  position: absolute;
  width: 60px;
  height: 16px;
  border-radius: 3px;
  opacity: 0.8;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 6px,
    rgba(255,255,255,0.3) 6px, rgba(255,255,255,0.3) 12px
  );
}

.tape-strip.tl {
  top: -6px; left: 10px;
  transform: rotate(-8deg);
  background-color: var(--tape-blue);
}
.tape-strip.tr {
  top: -6px; right: 10px;
  transform: rotate(8deg);
  background-color: var(--tape-yellow);
}

/* ============================================================
   RIPPED PAPER CARDS (species cards)
   ============================================================ */
.paper-card {
  background: var(--cream);
  border-radius: var(--radius-card);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.08), 0 6px 20px var(--shadow-soft);
  position: relative;
  padding: 1.2rem 1rem 1rem;
  /* Ripped top edge */
  clip-path: polygon(
    0% 12px, 3% 4px, 6% 10px, 9% 2px, 12% 8px, 15% 0%,
    18% 7px, 21% 1px, 24% 9px, 27% 3px, 30% 11px, 33% 2px,
    36% 8px, 39% 0%, 42% 6px, 45% 2px, 48% 10px, 51% 1px,
    54% 7px, 57% 3px, 60% 11px, 63% 2px, 66% 8px, 69% 0%,
    72% 6px, 75% 2px, 78% 10px, 81% 1px, 84% 7px, 87% 3px,
    90% 11px, 93% 2px, 96% 8px, 99% 0%, 100% 6px,
    100% 100%, 0% 100%
  );
}

/* ============================================================
   GLOBE SECTION
   ============================================================ */
.globe-section {
  padding: 2rem 1rem 3rem;
  position: relative;
}

#globe-container {
  width: min(700px, 95vw);
  height: min(700px, 95vw);
  margin: 0 auto 1.5rem;
  position: relative;
  cursor: pointer;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(168,216,234,0.3),
    0 0 60px rgba(91,164,207,0.25),
    0 20px 60px var(--shadow);
}

/* Globe popup */
.globe-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 800;
  width: min(420px, 92vw);
  background: var(--cream);
  border-radius: 8px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.12), 0 16px 40px var(--shadow);
  padding: 1.5rem 1.5rem 1.2rem;
  /* Ripped paper look */
  clip-path: polygon(
    0% 14px, 2% 4px, 4% 12px, 6% 2px, 8% 10px, 10% 0%,
    12% 8px, 14% 1px, 16% 9px, 18% 0%, 20% 7px, 22% 2px,
    24% 11px, 26% 3px, 28% 9px, 30% 0%, 32% 6px, 34% 1px,
    36% 8px, 38% 0%, 40% 6px, 42% 2px, 44% 10px, 46% 1px,
    48% 7px, 50% 0%, 52% 8px, 54% 2px, 56% 10px, 58% 1px,
    60% 7px, 62% 0%, 64% 8px, 66% 2px, 68% 10px, 70% 1px,
    72% 7px, 74% 0%, 76% 8px, 78% 2px, 80% 10px, 82% 1px,
    84% 7px, 86% 0%, 88% 8px, 90% 2px, 92% 10px, 94% 1px,
    96% 7px, 98% 0%, 100% 8px,
    100% 100%, 0% 100%
  );
}

.globe-popup.visible {
  display: block;
  animation: popIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.popup-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-light);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.popup-close:hover { color: var(--ink); }

.popup-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.popup-sticker {
  width: 110px;
  flex-shrink: 0;
  position: relative;
}

.popup-sticker img {
  width: 100%;
  border-radius: 50%;
  background: var(--white);
  padding: 3px;
  box-shadow: 0 0 0 4px var(--white), 0 3px 12px var(--shadow);
  transform: rotate(-5deg);
}

.popup-text h3 {
  font-family: var(--font-handwritten);
  font-size: 1.5rem;
  color: var(--blue-darker);
  line-height: 1.1;
  margin-bottom: 0.15rem;
}

.popup-sci-name {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
}

.popup-facts {
  list-style: none;
  font-family: var(--font-label);
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.8;
}

.popup-facts li::before {
  content: '🐚 ';
  font-size: 0.8rem;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,46,74,0.45);
  z-index: 799;
}

.popup-overlay.visible {
  display: block;
}

/* Shell button */
.btn-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-deep);
  color: var(--white);
  font-family: var(--font-handwritten);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  border: none;
  margin-top: 0.8rem;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px var(--shadow);
  text-decoration: none;
}

.btn-shell:hover {
  background: var(--blue-mid);
  transform: translateY(-2px);
  color: var(--white);
  outline: none;
}

.btn-shell .shell-icon {
  font-size: 1.1em;
}

/* ============================================================
   SIZE PARADE (smallest to largest)
   ============================================================ */
.size-parade-section {
  padding: 2.5rem 1rem 3rem;
  background: linear-gradient(180deg, var(--blue-lightest), #c8e8f5);
  position: relative;
}

.size-parade-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 1200px;
  margin: 1.5rem auto 0;
}

.species-card {
  width: 140px;
  background: var(--cream);
  border-radius: 6px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.08), 0 4px 14px var(--shadow-soft);
  padding: 0.8rem 0.7rem 0.5rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
  /* Ripped top */
  clip-path: polygon(
    0% 8px, 5% 1px, 10% 6px, 15% 0%, 20% 5px, 25% 1px,
    30% 7px, 35% 0%, 40% 5px, 45% 1px, 50% 7px, 55% 0%,
    60% 5px, 65% 1px, 70% 7px, 75% 0%, 80% 5px, 85% 1px,
    90% 7px, 95% 0%, 100% 5px,
    100% 100%, 0% 100%
  );
}

.species-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 4px 6px 0 rgba(0,0,0,0.1), 0 8px 24px var(--shadow);
  outline: none;
}

.species-card img {
  width: 90px;
  height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.4rem;
}

.species-name {
  font-family: var(--font-handwritten);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-darker);
  line-height: 1.2;
  display: block;
}

.species-size-label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--ink-light);
  display: block;
  margin-top: 0.15rem;
}

/* Washi tape under card */
.card-tape {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 12px;
  border-radius: 3px;
  opacity: 0.7;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 5px,
    rgba(255,255,255,0.35) 5px, rgba(255,255,255,0.35) 10px
  );
}

/* ============================================================
   CONSERVATION SECTION
   ============================================================ */
.conservation-section {
  padding: 3rem 1.5rem;
  background: var(--blue-darker);
  position: relative;
  color: var(--blue-lightest);
}

.conservation-section::before {
  content: '';
  display: block;
  width: 100%;
  height: 28px;
  position: absolute;
  top: -1px;
  left: 0;
  background: linear-gradient(180deg, #c8e8f5, transparent);
  clip-path: polygon(
    0% 0%, 3% 70%, 6% 20%, 9% 80%, 12% 30%, 15% 90%,
    18% 40%, 21% 85%, 24% 35%, 27% 75%, 30% 25%, 33% 65%,
    36% 15%, 39% 60%, 42% 10%, 45% 50%, 48% 5%, 51% 45%,
    54% 0%, 57% 40%, 60% 90%, 63% 45%, 66% 100%, 69% 50%,
    72% 95%, 75% 45%, 78% 85%, 81% 30%, 84% 70%, 87% 20%,
    90% 60%, 93% 10%, 96% 50%, 99% 5%, 100% 30%,
    100% 0%
  );
}

.conservation-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.conservation-title {
  font-family: var(--font-handwritten);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--blue-lightest);
  margin-bottom: 1.2rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

.conservation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0 2rem;
}

.conservation-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(168,216,234,0.25);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  transition: background 0.2s;
}

.conservation-card:hover {
  background: rgba(255,255,255,0.12);
}

.conservation-card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.conservation-card h4 {
  font-family: var(--font-handwritten);
  font-size: 1.15rem;
  color: var(--blue-light);
  margin-bottom: 0.4rem;
}

.conservation-card p {
  font-family: var(--font-label);
  font-size: 0.88rem;
  color: var(--blue-lightest);
  opacity: 0.85;
  line-height: 1.5;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.disclaimer-section {
  padding: 1.5rem 2rem;
  text-align: center;
  background: var(--cream-dark);
}

.disclaimer-text {
  font-family: var(--font-label);
  font-size: 0.88rem;
  color: var(--ink-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   WHALE SWIMMING BANNER
   ============================================================ */
.whale-banner {
  height: 140px;
  background: linear-gradient(180deg, var(--blue-mid), var(--blue-deep));
  overflow: hidden;
  position: relative;
}

.whale-banner-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: whaleScroll 28s linear infinite;
  white-space: nowrap;
}

@keyframes whaleScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.whale-banner-track svg {
  height: 80px;
  width: auto;
  margin: 0 3rem;
  opacity: 0.85;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--blue-darkest);
  position: relative;
  padding: 2.5rem 2rem 1.5rem;
  color: var(--blue-lightest);
}

/* Animated wave top */
.footer-waves {
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 50px;
  overflow: hidden;
}

.footer-waves svg {
  width: 200%;
  animation: waveShift 8s linear infinite;
}

@keyframes waveShift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.footer-logo svg {
  width: 40px;
  height: 40px;
}

.footer-logo-label {
  font-family: var(--font-handwritten);
  font-size: 0.95rem;
  color: var(--blue-light);
}

.footer-social {
  display: flex;
  gap: 0.8rem;
}

.social-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(168,216,234,0.12);
  border: 1px solid rgba(168,216,234,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--blue-light);
  text-decoration: none;
  transition: background 0.2s;
}

.social-placeholder:hover {
  background: rgba(168,216,234,0.25);
  outline: none;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.top-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue-deep);
  color: var(--white);
  font-family: var(--font-handwritten);
  font-size: 1rem;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.top-btn:hover {
  background: var(--blue-mid);
  transform: translateY(-2px);
  color: var(--white);
  outline: none;
}

.footer-credit {
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: rgba(168,216,234,0.6);
  text-align: right;
}

/* ============================================================
   SPECIES PAGE LAYOUT
   ============================================================ */
.species-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.species-hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.species-hero-img {
  width: 260px;
  flex-shrink: 0;
  position: relative;
}

.species-hero-img img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.1), 0 8px 24px var(--shadow);
  transform: rotate(-2deg);
}

.sticker-frame {
  display: block;
  background: var(--white);
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 0 0 5px var(--white), 4px 4px 0 rgba(0,0,0,0.1);
  transform: rotate(-2deg);
  transition: transform 0.3s;
}

.sticker-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.species-hero-info {
  flex: 1;
  min-width: 240px;
}

.species-title {
  font-family: var(--font-handwritten);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--blue-darker);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.species-sci {
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-light);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

/* Quick facts panel */
.quick-facts {
  background: var(--cream);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.07), 0 4px 16px var(--shadow-soft);
  position: relative;
}

.quick-facts h4 {
  font-family: var(--font-handwritten);
  font-size: 1.2rem;
  color: var(--blue-darker);
  margin-bottom: 0.5rem;
}

.fact-row {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(91,164,207,0.3);
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-label {
  font-weight: bold;
  color: var(--blue-deep);
  min-width: 90px;
}

/* Content sections */
.species-section {
  background: var(--cream);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.07), 0 4px 16px var(--shadow-soft);
  position: relative;
}

.species-section h3 {
  font-family: var(--font-handwritten);
  font-size: 1.5rem;
  color: var(--blue-darker);
  margin-bottom: 0.7rem;
}

.species-section p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Conservation status badge */
.status-badge {
  display: inline-block;
  font-family: var(--font-handwritten);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-top: 0.5rem;
  box-shadow: 0 2px 8px var(--shadow-soft);
}

.status-lc   { background: #7ec86e; color: #1a3a10; }
.status-nt   { background: #b8dfa8; color: #1a3a10; }
.status-vu   { background: #f7d96b; color: #4a3000; }
.status-en   { background: #f7a45c; color: #4a1500; }
.status-cr   { background: #e05c5c; color: #fff; }
.status-ew   { background: #a05ccc; color: #fff; }
.status-ex   { background: #555; color: #fff; }
.status-dd   { background: #aaa; color: #fff; }

/* ============================================================
   OCEAN PAGES
   ============================================================ */
.ocean-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.ocean-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-deeper, #1a4a72));
  border-radius: 14px;
  margin-bottom: 2.5rem;
  color: var(--blue-lightest);
  position: relative;
  overflow: hidden;
}

.ocean-hero h1 {
  font-family: var(--font-handwritten);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

.ocean-hero p {
  font-family: var(--font-label);
  font-size: 1rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0.5rem auto 0;
}

.ocean-species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.ocean-species-card {
  background: var(--cream);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.08), 0 4px 16px var(--shadow-soft);
  text-align: center;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ocean-species-card:hover {
  transform: translateY(-4px);
  box-shadow: 5px 8px 0 rgba(0,0,0,0.1), 0 10px 28px var(--shadow);
  outline: none;
}

.ocean-species-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.ocean-species-card h4 {
  font-family: var(--font-handwritten);
  font-size: 1rem;
  color: var(--blue-darker);
  line-height: 1.2;
}

.ocean-species-card .sci {
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-light);
  font-family: var(--font-body);
}

/* ============================================================
   ABOUT / CONSERVATION PAGE
   ============================================================ */
.content-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.content-page h1 {
  font-family: var(--font-handwritten);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--blue-darker);
  margin-bottom: 1rem;
  text-align: center;
}

.content-page h2 {
  font-family: var(--font-handwritten);
  font-size: 1.8rem;
  color: var(--blue-deep);
  margin: 2rem 0 0.6rem;
}

.content-page p {
  font-family: var(--font-body);
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1rem;
}

.content-page ul {
  margin: 0.5rem 0 1rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
}

/* ============================================================
   RESPONSIVE — TABLET / MOBILE
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-height: 70px; }

  .header-center { position: static; transform: none; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.5rem 1rem; gap: 0.3rem; }

  #main-nav { display: none; }
  .hamburger { display: flex; }
  #mobile-nav { display: block; }

  .site-title { font-size: 1.6rem; }

  .species-hero { flex-direction: column; }
  .species-hero-img { width: 100%; max-width: 280px; margin: 0 auto; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-right { align-items: center; }

  .size-parade-grid { gap: 0.6rem; }
  .species-card { width: 110px; }

  .ocean-species-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .globe-popup { padding: 1.2rem 1rem; }
  .popup-inner { flex-direction: column; }
  .popup-sticker { width: 80px; margin: 0 auto; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }