/* ═══════════════════════════════════════════════════════════════
   WoodlandPond.ca — Design System
   ═══════════════════════════════════════════════════════════════
   Source: OLY-DESIGN-001-v1, Woodland Pond Design Bible
   ═══════════════════════════════════════════════════════════════ */

/* ── Root Tokens ──────────────────────────────────────────── */
:root {
  /* ── Color Palette ── */
  --green-deep: #1a3a2e;
  --green-moss: #2d5a4b;
  --green-soft: #5a8f7b;
  --green-fresh: #7fb69a;

  --amber: #d4a84b;
  --amber-light: #e8c97a;

  --bark: #6b4c3a;
  --bark-light: #a07d65;

  --cream: #f5efe0;
  --cream-light: #faf7f0;
  --white-soft: #fdfdf9;

  --sky: #c8dce8;

  --ink: #2c2418;
  --ink-soft: #5a4f3e;

  /* ── Shadows ── */
  --shadow: rgba(26, 58, 46, 0.12);
  --shadow-strong: rgba(26, 58, 46, 0.22);

  /* ── Border Radius ── */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-full: 999px;

  /* ── Typography ── */
  --font-display: 'Fredoka One', 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;

  /* ── Layout ── */
  --max-w: 1200px;
  --nav-height: 64px;
}

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--cream-light);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--green-moss);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--amber);
}

a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--green-deep);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

.subtitle {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 600px;
}

/* ── Utilities ────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 48px;
  font-size: 1.1rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  line-height: 1.2;
}

.btn:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(212, 168, 75, 0.35);
}

.btn-primary:hover {
  background: var(--amber-light);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 75, 0.4);
}

.btn-secondary {
  background: var(--green-moss);
  color: white;
  box-shadow: 0 4px 12px rgba(45, 90, 75, 0.3);
}

.btn-secondary:hover {
  background: var(--green-soft);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--green-deep);
  border: 2px solid var(--green-soft);
}

.btn-outline:hover {
  background: var(--green-soft);
  color: white;
  border-color: var(--green-soft);
}

.btn-white {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-white:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--cream);
  border-color: var(--amber-light);
}

/* Button sizes */
.btn-sm {
  padding: 8px 18px;
  font-size: .85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white-soft);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all .3s;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px var(--shadow-strong);
  border-color: var(--amber);
}

/* ── Character Card ──────────────────────────────────────── */
.char-card {
  background: var(--white-soft);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all .3s;
  border: 2px solid transparent;
  cursor: pointer;
}

.char-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px var(--shadow-strong);
  border-color: var(--amber);
}

.char-card .emoji {
  font-size: 3.6rem;
  margin-bottom: 12px;
  display: block;
}

.char-card-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--green-fresh);
  transition: border-color .3s;
}

.char-card:hover .char-card-img {
  border-color: var(--amber);
}

.char-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-card h3 {
  margin-bottom: 4px;
}

.char-card .species {
  color: var(--ink-soft);
  font-size: .9rem;
  margin-bottom: 12px;
}

.char-card p {
  font-size: .92rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.5;
}

.char-card .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.char-card .tag {
  background: var(--green-fresh);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
}

.char-card .card-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.char-card .card-links a {
  font-size: .85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  text-decoration: none;
}

.char-card .card-links .link-video {
  background: var(--amber);
  color: var(--ink);
}

.char-card .card-links .link-video:hover {
  background: var(--amber-light);
}

.char-card .card-links .link-color {
  background: var(--green-soft);
  color: white;
}

.char-card .card-links .link-color:hover {
  background: var(--green-moss);
}

/* ── Grid Layouts ─────────────────────────────────────────── */
.grid-characters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.grid-coloring {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.grid-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Coloring Page Card ──────────────────────────────────── */
.color-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.color-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.color-card-wrap .dl-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--green-moss);
  color: white;
  font-weight: 700;
  font-size: .85rem;
  transition: all .2s;
  text-decoration: none;
  text-align: center;
  margin-top: -8px;
  z-index: 1;
  position: relative;
}

.color-card-wrap .dl-btn:hover {
  background: var(--amber);
  color: var(--ink);
}

.color-card {
  background: var(--white-soft);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
  transition: all .3s;
}

.color-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px var(--shadow-strong);
}

.color-card .preview {
  background: white;
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1.3;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--green-fresh);
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.color-card h4 {
  margin-bottom: 2px;
  font-size: 1rem;
}

.color-card .format {
  color: var(--ink-soft);
  font-size: .8rem;
  margin-bottom: 10px;
}

/* ── Coloring overlay pattern ─────────────────────────────── */
.coloring-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, var(--bark-light) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, var(--bark-light) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, var(--bark-light) 1px, transparent 1px);
  background-size: 40px 40px, 30px 30px, 50px 50px;
  opacity: 0.1;
  pointer-events: none;
}

/* ── YouTube Card ─────────────────────────────────────────── */
.yt-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: all .3s;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.yt-card .emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.yt-card-img {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-card h4 {
  color: var(--cream);
  font-size: 1rem;
  margin-bottom: 4px;
}

.yt-card .yt-link {
  font-size: .82rem;
  color: var(--green-fresh);
  font-weight: 600;
  text-decoration: none;
}

.yt-card .yt-link:hover {
  color: var(--amber-light);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green-moss) 50%, var(--green-soft) 100%);
  color: var(--cream);
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(212, 168, 75, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(127, 182, 154, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero h1 {
  color: var(--cream);
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--amber-light);
}

.hero p {
  font-size: 1.15rem;
  color: var(--green-fresh);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-characters {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero-character {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all .3s;
  cursor: default;
}

.hero-character img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-character:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  border-color: var(--amber-light);
}

/* ── Character Page (detail view) ──────────────────────────── */
.char-page-header {
  background: var(--green-deep);
  color: var(--cream);
  padding: 60px 24px 40px;
  text-align: center;
}

.char-page-header h1 {
  color: var(--cream);
}

.char-page-header .emoji-big {
  font-size: 5rem;
  display: block;
  margin-bottom: 8px;
}

.char-portrait-large {
  width: 280px;
  height: 280px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--amber);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-portrait-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-main-portrait {
  width: 400px;
  height: 400px;
  object-fit: cover;
}

.emoji-inline {
  font-size: 1.5rem;
  vertical-align: middle;
}

.emoji-fallback {
  font-size: 3rem;
  text-align: center;
  line-height: 1;
}

.char-page-header .back {
  display: inline-block;
  color: var(--green-fresh);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.char-page-header .back:hover {
  color: var(--amber-light);
}

.char-content {
  padding: 40px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.char-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.char-content p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.7;
}

.char-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.char-links .btn {
  flex: 1;
  justify-content: center;
  min-width: 180px;
}

/* ── Page Header (for non-hero pages) ──────────────────────── */
.page-header {
  background: var(--green-deep);
  color: var(--cream);
  padding: 80px 24px 60px;
  text-align: center;
}

.page-header h1 {
  color: var(--cream);
  margin-bottom: 12px;
}

.page-header p {
  color: var(--green-fresh);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Content Section (for text-heavy pages) ────────────────── */
.content-section {
  padding: 60px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.content-section h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-section ul,
.content-section ol {
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.7;
}

.content-section li {
  margin-bottom: 8px;
}

/* ── YouTube Section (dark background) ──────────────────────── */
.yt-section {
  background: var(--green-deep);
  color: var(--cream);
}

.yt-section h2 {
  color: var(--cream);
}

.yt-section .section-sub {
  color: var(--green-fresh);
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: var(--bark-light);
  padding: 48px 24px 32px;
  text-align: center;
}

footer .logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.footer-logo-img {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  display: block;
  border-radius: 50%;
}

footer a {
  color: var(--green-fresh);
  text-decoration: none;
}

footer a:hover {
  color: var(--amber-light);
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0;
}

footer .links a {
  font-size: .92rem;
  font-weight: 600;
}

footer .footnote {
  font-size: .85rem;
  margin-top: 24px;
  opacity: .6;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 64px 20px 48px;
  }

  .hero-characters {
    gap: 10px;
  }

  .hero-character {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .grid-characters {
    grid-template-columns: 1fr;
  }

  .grid-coloring {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-videos {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .char-links .btn {
    flex: none;
    width: 100%;
  }

  .page-header {
    padding: 60px 20px 40px;
  }
}

@media (max-width: 480px) {
  .grid-coloring {
    grid-template-columns: 1fr;
  }

  .grid-videos {
    grid-template-columns: 1fr;
  }

  .hero-characters {
    gap: 8px;
  }

  .hero-character {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ── Print styles ──────────────────────────────────────────── */
@media print {
  nav,
  .hero-actions,
  .btn,
  .card-links,
  footer .links {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    background: none !important;
    color: black;
    padding: 20px;
  }

  .hero h1 {
    color: black;
  }

  .hero p {
    color: #555;
  }
}