/* ==========================================================================
   Warrimoo Blog — coastal sunshine design system
   Mirrors warrimoo.net: waves, fish, clay cards, reveal animations
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --sand-50: #FFFBF1;
  --sand-100: #FBF2DF;
  --sand-200: #F4E6C8;
  --sand-300: #EAD7AE;
  --ink: #16384C;
  --ink-800: #1D4660;
  --ink-soft: #3E647C;
  --body-color: #2C536B;
  --ocean: #0E7FA8;
  --lagoon: #13A89E;
  --lagoon-700: #0C7B74;
  --coral: #FF6F5E;
  --coral-600: #E85643;
  --link: #C03A28;
  --sun: #FFC247;
  --sun-deep: #F5A623;
  --cream: #FFF9EE;
  --card: #FFFEF9;

  --font-display: "Fredoka", "Cabin", sans-serif;
  --font-body: "Cabin", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --r-lg: 28px;
  --r-md: 20px;
  --r-pill: 999px;
  --shadow-clay:
    0 2px 0 rgba(22, 56, 76, 0.04),
    0 18px 34px -16px rgba(22, 56, 76, 0.25),
    inset 0 -8px 14px rgba(22, 56, 76, 0.05),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
  --shadow-soft: 0 12px 30px -14px rgba(22, 56, 76, 0.3);
  --shadow-float: 0 30px 60px -28px rgba(22, 56, 76, 0.45);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.25s;

  --header-h: 72px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body-color);
  background: var(--sand-50);
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.5rem, 5.5vw + 1.1rem, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.4vw + 0.9rem, 3rem); }
h3 { font-size: clamp(1.3rem, 1.2vw + 1rem, 1.6rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--coral-600); }

button { font: inherit; cursor: pointer; }

::selection { background: var(--sun); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. Layout ---------- */
.container {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, 740px);
  margin-inline: auto;
}

.section { padding-block: clamp(4rem, 9vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lagoon-700);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 3px;
  border-radius: 2px;
  background: var(--coral);
}

.lead { font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem); color: var(--ink-soft); }

/* decorative drifting blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blob-drift 18s ease-in-out infinite alternate;
}
.blob--teal  { background: radial-gradient(circle at 35% 35%, rgba(19,168,158,0.22), transparent 70%); }
.blob--coral { background: radial-gradient(circle at 35% 35%, rgba(255,111,94,0.2), transparent 70%); }
.blob--sun   { background: radial-gradient(circle at 35% 35%, rgba(255,194,71,0.28), transparent 70%); }

@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(22px, -26px) scale(1.08); }
}

/* ---------- 4. Header & nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--cream);
  transition: color 0.3s ease;
}
.brand--sub {
  font-size: 1.15rem;
  color: var(--sun);
  transition: color 0.3s ease;
}
.brand__glyph { width: 38px; height: 38px; border-radius: 12px; box-shadow: var(--shadow-soft); }

.brand-sep {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: rgba(255, 249, 238, 0.35);
  user-select: none;
  transition: color 0.3s ease;
}

.site-nav { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 52px;
  height: 52px;
  padding: 14px;
  background: rgba(22, 56, 76, 0.28);
  border: 0;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--cream);
  transition: transform 0.35s var(--ease-spring), opacity 0.2s ease, background-color 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* scrolled state */
.site-header.is-scrolled {
  background: rgba(255, 251, 241, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -16px rgba(22, 56, 76, 0.35);
  height: 64px;
}
.site-header.is-scrolled .brand { color: var(--ink); }
.site-header.is-scrolled .brand--sub { color: var(--ocean); }
.site-header.is-scrolled .brand-sep { color: rgba(22, 56, 76, 0.25); }
.site-header.is-scrolled .nav-toggle { background: var(--sand-200); }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* full-screen mobile nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(19, 168, 158, 0.25), transparent 70%),
    radial-gradient(50% 40% at 15% 90%, rgba(255, 111, 94, 0.22), transparent 70%),
    var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.mobile-nav a {
  display: block;
  padding: 0.55rem 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), color 0.2s ease;
}
.mobile-nav.is-open a { opacity: 1; transform: none; }
.mobile-nav.is-open a:nth-child(1) { transition-delay: 0.08s; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: 0.14s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: 0.26s; }
.mobile-nav.is-open a:nth-child(5) { transition-delay: 0.32s; }
.mobile-nav a:hover { color: var(--sun); }
body.nav-locked { overflow: hidden; }

/* desktop nav */
@media (min-width: 900px) {
  .nav-toggle, .mobile-nav { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .site-nav a {
    position: relative;
    padding: 0.55rem 0.95rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.02rem;
    color: var(--cream);
    text-decoration: none;
    border-radius: var(--r-pill);
    transition: color 0.25s ease, background-color 0.25s ease;
  }
  .site-nav a::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 4px;
    width: 0; height: 3px;
    border-radius: 2px;
    background: var(--sun);
    transform: translateX(-50%);
    transition: width 0.3s var(--ease-spring);
  }
  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after { width: 55%; }
  .site-header.is-scrolled .site-nav a { color: var(--ink); }
  .site-header.is-scrolled .site-nav a:hover { color: var(--ink-800); }
}

/* ---------- 5. Blog hero ---------- */
.blog-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 5rem)) 0 clamp(4rem, 8vw, 6rem);
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(19, 168, 158, 0.3), transparent 70%),
    radial-gradient(45% 55% at 5% 100%, rgba(255, 111, 94, 0.22), transparent 70%),
    var(--ink);
  color: rgba(255, 249, 238, 0.88);
  overflow: clip;
  text-align: center;
}
.blog-hero h1 { color: var(--cream); margin-bottom: 0.4rem; }
.blog-hero .lead { color: rgba(255, 249, 238, 0.78); max-width: 600px; margin-inline: auto; }

.blog-hero__foam {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  z-index: 2;
  pointer-events: none;
}
.blog-hero__foam svg {
  width: 260%;
  max-width: none;
  height: clamp(60px, 10vw, 120px);
  animation: foam-drift 13s ease-in-out infinite alternate;
}
@keyframes foam-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-14%); }
}

/* ---------- 6. Wave dividers ---------- */
.wave-divider { display: block; width: 100%; height: clamp(48px, 8vw, 110px); }
.wave-divider--flip { transform: scaleY(-1); }
.wave-divider path { animation: wave-slide 26s linear infinite; }
.wave-divider--flip path { animation-direction: reverse; }
@keyframes wave-slide {
  to { transform: translateX(-2880px); }
}

/* ---------- 7. Under-water fish ---------- */
[data-fish] { position: relative; }
[data-fish] > .container,
[data-fish] > .container--narrow { position: relative; z-index: 1; }

.fish-layer {
  position: absolute;
  inset: 0;
  overflow: clip;
  z-index: 0;
  pointer-events: none;
}

.fish {
  position: absolute;
  left: 0;
  width: var(--fs, 48px);
  animation: fish-cross linear infinite;
  will-change: transform;
}
.fish svg {
  width: 100%;
  height: auto;
  animation: fish-bob var(--bob, 4s) ease-in-out infinite alternate;
}
.fish--flip svg { scale: -1 1; }

.fish__tail {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: tail-wag 0.7s ease-in-out infinite alternate;
}
.fish:nth-child(even) .fish__tail { animation-duration: 1s; animation-delay: -0.35s; }

@keyframes fish-cross {
  from { transform: translateX(-14vw); }
  to   { transform: translateX(106vw); }
}
@keyframes fish-bob {
  from { transform: translateY(-7px) rotate(-3deg); }
  to   { transform: translateY(7px) rotate(3deg); }
}
@keyframes tail-wag {
  from { transform: rotate(13deg); }
  to   { transform: rotate(-13deg); }
}

/* ---------- 8. Clay cards & post cards ---------- */
.clay-card {
  position: relative;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-clay);
  overflow: hidden;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.35s ease;
}
.clay-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow:
    0 2px 0 rgba(22, 56, 76, 0.04),
    0 30px 50px -20px rgba(22, 56, 76, 0.32),
    inset 0 -8px 14px rgba(22, 56, 76, 0.05),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

/* post grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.post-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}
.clay-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-categories {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem);
  margin-bottom: 0.4em;
}
.post-card-title a {
  color: var(--ink);
  text-decoration: none;
}
.post-card-title a:hover { color: var(--ocean); }

.post-card-excerpt {
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex: 1;
}

.post-card-meta {
  font-size: 0.82rem;
  color: var(--sand-300);
  font-weight: 600;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--sand-100);
}
.meta-sep { margin: 0 0.4em; opacity: 0.5; }

/* category badges */
.category-badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  background: rgba(14, 127, 168, 0.1);
  color: var(--ocean);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
}
.category-badge:hover {
  background: rgba(14, 127, 168, 0.18);
  color: var(--ocean);
}
.category-badge--sm { font-size: 0.75rem; padding: 0.15em 0.55em; }

/* tag pills */
.tag-pill {
  display: inline-block;
  padding: 0.25em 0.75em;
  background: var(--sand-100);
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem;
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
}
.tag-pill:hover { background: rgba(14, 127, 168, 0.1); color: var(--ocean); }

/* ---------- 9. Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--sand-100);
  position: relative;
  z-index: 1;
}
.pagination-link {
  font-family: var(--font-display);
  font-weight: 500;
  padding: 0.5em 1em;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
}
.pagination-link:hover:not(.disabled) { background: rgba(14, 127, 168, 0.1); }
.pagination-link.disabled { opacity: 0.3; pointer-events: none; }
.pagination-info { font-size: 0.85rem; color: var(--sand-300); font-weight: 600; }

/* ---------- 10. Post page ---------- */
.post-header {
  position: relative;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 5rem)) 0 clamp(2rem, 5vw, 3rem);
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(19, 168, 158, 0.3), transparent 70%),
    radial-gradient(45% 55% at 5% 100%, rgba(255, 111, 94, 0.22), transparent 70%),
    var(--ink);
  color: rgba(255, 249, 238, 0.88);
  overflow: clip;
  text-align: center;
}
.post-header .category-badge {
  background: rgba(255, 249, 238, 0.12);
  color: var(--cream);
  border: 1px solid rgba(255, 249, 238, 0.25);
}
.post-header .category-badge:hover { background: rgba(255, 249, 238, 0.2); color: #fff; }

.post-title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  color: var(--cream);
  max-width: 720px;
  margin-inline: auto;
}

.post-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 249, 238, 0.78);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.post-meta-row {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 249, 238, 0.12);
  border: 1px solid rgba(255, 249, 238, 0.25);
  border-radius: var(--r-pill);
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
}
.reading-time { color: var(--sun); }

.post-header__foam {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  z-index: 2;
  pointer-events: none;
}
.post-header__foam svg {
  width: 260%;
  max-width: none;
  height: clamp(50px, 8vw, 100px);
  animation: foam-drift 13s ease-in-out infinite alternate;
}

/* post hero image */
.post-hero-image {
  margin: -1rem auto 2.5rem;
  position: relative;
  z-index: 1;
}
.post-hero-image img {
  border-radius: var(--r-lg);
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  box-shadow: var(--shadow-float);
}

/* post body */
.post-body {
  font-size: 1.1rem;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}
.post-body h2 { margin-top: 2.5em; margin-bottom: 0.6em; scroll-margin-top: calc(var(--header-h) + 24px); }
.post-body h3 { margin-top: 2em; margin-bottom: 0.5em; }
.post-body img { border-radius: var(--r-md); margin: 2em auto; }
.post-body a {
  text-decoration: underline;
  text-decoration-color: rgba(14, 127, 168, 0.3);
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: var(--ocean); color: var(--ocean); }

.post-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 5px solid var(--lagoon);
  background: rgba(19, 168, 158, 0.06);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--ink-soft);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body ul, .post-body ol { padding-left: 1.3rem; }
.post-body li { margin-bottom: 0.45rem; }
.post-body li::marker { color: var(--coral); }

.post-body hr {
  border: none;
  height: 2px;
  background: var(--sand-200);
  margin: 2.5em 0;
  border-radius: 1px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}
.post-body th, .post-body td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid var(--sand-200);
}
.post-body th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  background: var(--sand-100);
}
.post-body tr:hover td { background: rgba(14, 127, 168, 0.03); }

/* code */
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--sand-100);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  color: var(--ink);
}

.post-body pre {
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  background: var(--ink);
  color: var(--sand-100);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  position: relative;
}
.post-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25em 0.6em;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.8); }

/* post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--sand-100);
  position: relative;
  z-index: 1;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 500px) { .post-nav { grid-template-columns: 1fr; } }

.post-nav-link {
  padding: 1.25rem;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-clay);
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
}
.post-nav-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }
.post-nav-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ocean);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3em;
}
.post-nav-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

/* ---------- 11. Page layout ---------- */
.page-header {
  position: relative;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 5rem)) 0 clamp(2rem, 5vw, 3rem);
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(19, 168, 158, 0.3), transparent 70%),
    radial-gradient(45% 55% at 5% 100%, rgba(255, 111, 94, 0.22), transparent 70%),
    var(--ink);
  color: rgba(255, 249, 238, 0.88);
  overflow: clip;
}
.page-header h1 { color: var(--cream); margin-bottom: 0.4rem; }
.page-header .lead { color: rgba(255, 249, 238, 0.78); }

.page-header__foam {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  z-index: 2;
  pointer-events: none;
}
.page-header__foam svg {
  width: 260%;
  max-width: none;
  height: clamp(50px, 8vw, 100px);
  animation: foam-drift 13s ease-in-out infinite alternate;
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.75;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  z-index: 1;
}
.page-body img { border-radius: var(--r-md); margin: 1.5em auto; }
.page-body a { text-decoration-color: rgba(14, 127, 168, 0.3); text-underline-offset: 3px; }
.page-body a:hover { color: var(--ocean); text-decoration-color: var(--ocean); }
.page-body h2 { margin-top: 2em; }
.page-body ul { padding-left: 1.3rem; }
.page-body li { margin-bottom: 0.45rem; }
.page-body li::marker { color: var(--coral); }

/* ---------- 12. Taxonomy pages ---------- */
.taxonomy-section { padding: 2rem 0 3rem; position: relative; z-index: 1; }
.taxonomy-group { margin-bottom: 3rem; }
.taxonomy-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sand-200);
}
.taxonomy-heading .count {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: rgba(14, 127, 168, 0.6);
  background: rgba(14, 127, 168, 0.08);
  padding: 0.15em 0.55em;
  border-radius: var(--r-pill);
}
.taxonomy-list { list-style: none; padding: 0; margin: 0; }
.taxonomy-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sand-100);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.taxonomy-item a { font-weight: 600; color: var(--ink); text-decoration: none; }
.taxonomy-item a:hover { color: var(--ocean); }
.taxonomy-item time { font-size: 0.82rem; color: var(--sand-300); white-space: nowrap; }

/* ---------- 13. Ink band footer ---------- */
.ink-band {
  background:
    radial-gradient(55% 45% at 85% 8%, rgba(19, 168, 158, 0.22), transparent 70%),
    radial-gradient(45% 40% at 8% 95%, rgba(255, 111, 94, 0.16), transparent 70%),
    var(--ink);
  color: rgba(255, 249, 238, 0.88);
}
.ink-band h2, .ink-band h3, .ink-band h4 { color: var(--cream); }
.ink-band a { color: var(--sun); text-decoration: none; }
.ink-band a:hover { color: #FFD66B; }

.site-footer { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.site-footer .container {
  display: grid;
  gap: 2rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--cream);
  text-decoration: none;
}
.footer-tag { font-size: 0.95rem; color: rgba(255, 249, 238, 0.6); margin-top: 0.5rem; }

.footer-cols { display: grid; gap: 1.6rem; grid-template-columns: repeat(2, 1fr); }
.footer-col h4 {
  color: var(--cream);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: rgba(255, 249, 238, 0.82); text-decoration: none; }
.footer-col a:hover { color: var(--sun); text-decoration: underline; }

.footer-base {
  border-top: 1px solid rgba(255, 249, 238, 0.14);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  font-size: 0.88rem;
  color: rgba(255, 249, 238, 0.55);
}

@media (min-width: 768px) {
  .site-footer .container { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .footer-base { grid-column: 1 / -1; }
}

/* ---------- 14. Paw FAB ---------- */
.paw-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 80;
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--coral-600);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(18px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-spring);
}
.paw-fab.is-show { opacity: 1; transform: none; pointer-events: auto; }
.paw-fab:hover { transform: scale(1.1); }
.paw-fab:active { transform: scale(0.9); }
.paw-fab .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.paw-fab .ring circle {
  fill: none;
  stroke: var(--lagoon);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 163.4;
}
.paw-fab .paw-icon { width: 26px; height: 26px; }

/* ---------- 15. Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease-out) var(--d, 0s),
    transform 0.8s var(--ease-out) var(--d, 0s);
}
[data-reveal="pop"]   { transform: translateY(14px) scale(0.92); }
[data-reveal="left"]  { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal].is-in   { opacity: 1; transform: none; }

/* ---------- 16. Syntax highlighting ---------- */
.highlight pre { margin: 0; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs, .highlight .ch { color: #6a8fa3; font-style: italic; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .sh, .highlight .sx { color: #7ec699; }
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #82c4e6; font-weight: 500; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .il { color: #FFC247; }
.highlight .nf, .highlight .fm { color: #6dcbfa; }
.highlight .nc, .highlight .nn, .highlight .no { color: #13A89E; }
.highlight .o, .highlight .ow { color: #e8a0bf; }
.highlight .n, .highlight .na, .highlight .nb, .highlight .ni, .highlight .ne, .highlight .nv, .highlight .vi, .highlight .vg, .highlight .vm { color: #d4d4d4; }
.highlight .p { color: #a0a0a0; }
.highlight .err { color: #FF6F5E; }
.highlight .gd { color: #FF6F5E; background: rgba(255, 111, 94, 0.1); }
.highlight .gi { color: #7ec699; background: rgba(126, 198, 153, 0.1); }

/* ---------- 17. 404 ---------- */
.lost-section {
  min-height: 80vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  position: relative;
}
.lost-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 600;
  line-height: 1;
  color: var(--sand-300);
  margin: 0 0 0.25em;
}

/* ---------- 18. Helpers ---------- */
.bg-sand-100 { background: var(--sand-100); }
.text-center { text-align: center; }

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .fish-layer, .blob { display: none; }
}
