/* ===== iClassQuest About — Chalkboard × Adventure Bestiary ===== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Chalkboard palette */
  --board-deep: #0d1f0d;
  --board-mid: #1a2e1a;
  --board-light: #243524;
  --board-surface: #1e2f1e;

  /* Chalk colors */
  --chalk-white: #e8dcc8;
  --chalk-yellow: #f5d76e;
  --chalk-pink: #e88ca5;
  --chalk-blue: #7ec8e3;
  --chalk-green: #8fd9a8;

  /* Paper / bestiary */
  --paper: #f4ead5;
  --paper-dark: #e6d5b8;
  --paper-border: #c4a882;
  --ink: #3a2a1a;
  --ink-light: #6b5740;

  /* Accents */
  --star-gold: #fbbf24;
  --badge-red: #dc2626;

  --text-primary: var(--chalk-white);
  --text-secondary: rgba(232,220,200,0.65);
  --text-dim: rgba(232,220,200,0.35);
  --border-chalk: rgba(232,220,200,0.12);

  --font-chalk: 'Chalkboard SE', 'Comic Sans MS', 'STKaiti', 'KaiTi', KaiTi, 'Noto Sans SC', sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--board-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--chalk-yellow); color: var(--board-deep); }
a { color: inherit; text-decoration: none; }

/* ===== CHALK TEXT EFFECT ===== */
.chalk {
  font-family: var(--font-chalk);
  color: var(--chalk-white);
  text-shadow:
    0 0 5px rgba(232,220,200,0.15),
    0 0 20px rgba(232,220,200,0.06),
    1px 1px 0 rgba(0,0,0,0.3);
  letter-spacing: 1px;
}
.chalk-yellow { color: var(--chalk-yellow);
  text-shadow: 0 0 5px rgba(245,215,110,0.2), 0 0 20px rgba(245,215,110,0.08), 1px 1px 0 rgba(0,0,0,0.3);
}
.chalk-pink { color: var(--chalk-pink);
  text-shadow: 0 0 5px rgba(232,140,165,0.2), 0 0 20px rgba(232,140,165,0.08), 1px 1px 0 rgba(0,0,0,0.3);
}

/* ===== NAV — Chalk Tray ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  padding: 1rem 2.5rem;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  background: transparent;
}
.nav.scrolled {
  background: rgba(13,31,13,0.95);
  border-bottom: 1px solid var(--border-chalk);
  backdrop-filter: blur(12px);
}
/* Chalk tray decoration */
.nav::after {
  content: '';
  position: absolute; bottom: 0; left: 5%; right: 5%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(232,220,200,0.08) 20%, rgba(232,220,200,0.12) 50%, rgba(232,220,200,0.08) 80%, transparent);
  opacity: 0; transition: opacity .4s;
}
.nav.scrolled::after { opacity: 1; }

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-chalk);
  font-size: 1.4rem; font-weight: 400;
  color: var(--chalk-yellow);
  text-shadow: 0 0 8px rgba(245,215,110,0.15);
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--text-secondary);
  transition: color .3s; position: relative;
}
.nav-links a:hover { color: var(--chalk-white); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--chalk-yellow), transparent);
  transform: scaleX(0); transition: transform .3s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.lang-btn {
  font-size: .8rem; font-weight: 700; padding: .35rem .9rem;
  border: 1px solid var(--border-chalk); border-radius: 99px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  transition: all .3s;
}
.lang-btn:hover { background: rgba(232,220,200,.08); color: var(--chalk-white); }

/* ===== HERO — The Chalkboard ===== */
.hero {
  position: relative; min-height: 100vh; display: flex;
  align-items: center; justify-content: center; text-align: center;
  padding: 6rem 2rem 4rem; overflow: hidden;
}
/* Board texture via CSS gradients */
.hero-board {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 40%, rgba(36,53,36,0.6), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
    linear-gradient(180deg, var(--board-mid), var(--board-deep));
}
/* Subtle chalk smudge marks */
.hero-board::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 200px 80px at 20% 30%, rgba(232,220,200,0.03), transparent),
    radial-gradient(ellipse 300px 100px at 75% 60%, rgba(232,220,200,0.02), transparent),
    radial-gradient(ellipse 150px 60px at 50% 80%, rgba(232,220,200,0.025), transparent);
}
/* Chalk dust particles container */
.hero-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.chalk-particle {
  position: absolute; width: 2px; height: 2px;
  background: rgba(232,220,200,0.3); border-radius: 50%;
  animation: chalkDrift linear infinite; opacity: 0;
  will-change: transform, opacity;
}
@keyframes chalkDrift {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-5vh) translateX(20px); opacity: 0; }
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-badge {
  display: inline-block; font-size: .85rem; font-weight: 500;
  padding: .5rem 1.5rem; border-radius: 99px;
  background: rgba(232,220,200,.06); border: 1px solid rgba(232,220,200,.15);
  color: var(--chalk-green); margin-bottom: 2rem;
  letter-spacing: 3px; font-family: var(--font-body);
}
.hero-title {
  font-family: var(--font-chalk);
  font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 400;
  line-height: 1.4; margin-bottom: 1.5rem;
  color: var(--chalk-white);
  text-shadow:
    0 0 10px rgba(232,220,200,0.12),
    0 0 40px rgba(232,220,200,0.05),
    2px 2px 0 rgba(0,0,0,0.4);
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary);
  line-height: 1.9; max-width: 680px; margin: 0 auto 2rem;
  text-wrap: balance;
}
/* Evolution preview animation in hero */
.hero-evolution {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin: 2.5rem 0 1rem; font-size: 2.5rem;
}
.hero-evo-arrow {
  color: var(--chalk-yellow); font-size: 1.2rem; opacity: .5;
  animation: arrowPulse 2s ease-in-out infinite;
}
@keyframes arrowPulse {
  0%,100% { opacity: .3; transform: translateX(0); }
  50% { opacity: .8; transform: translateX(4px); }
}
.hero-evo-item {
  transition: transform .3s;
  filter: drop-shadow(0 0 8px rgba(232,220,200,0.1));
}
.hero-evo-item:hover { transform: scale(1.3); }
.hero-evo-max {
  filter: drop-shadow(0 0 15px rgba(251,191,36,0.3));
}

.scroll-hint { margin-top: 3rem; animation: fadeInUp 1s 1.5s both; }
.scroll-arrow {
  font-family: var(--font-chalk);
  color: var(--text-dim); font-size: 1.5rem;
  animation: scrollBob 2s ease-in-out infinite;
}
@keyframes scrollBob {
  0%,100% { transform: translateY(0); opacity: .3; }
  50% { transform: translateY(10px); opacity: .7; }
}

/* ===== SECTION COMMON ===== */
.section {
  padding: 6rem 2rem; position: relative;
  max-width: 1100px; margin: 0 auto;
}
.section-full { padding: 6rem 2rem; position: relative; }
.section-label {
  font-family: var(--font-chalk);
  font-size: .9rem; letter-spacing: 3px;
  color: var(--chalk-yellow); margin-bottom: .8rem;
  text-shadow: 0 0 5px rgba(245,215,110,0.1);
}
.section-title {
  font-family: var(--font-chalk);
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 400;
  line-height: 1.3; margin-bottom: 1rem;
  color: var(--chalk-white);
  text-shadow: 0 0 8px rgba(232,220,200,0.08), 1px 1px 0 rgba(0,0,0,0.3);
}
.section-subtitle {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 720px; line-height: 1.8;
  text-wrap: balance;
}
.centered { text-align: center; }
.section-subtitle.centered { margin: 0 auto; }

/* Chalk line divider */
.chalk-divider {
  height: 2px; max-width: 900px; margin: 0 auto;
  background: linear-gradient(90deg,
    transparent,
    rgba(232,220,200,0.06) 15%,
    rgba(232,220,200,0.1) 50%,
    rgba(232,220,200,0.06) 85%,
    transparent
  );
  position: relative;
}

/* ===== CONTRAST SECTION (Before/After) ===== */
.contrast-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  margin-top: 2.5rem; align-items: stretch;
}
.contrast-card {
  padding: 2.5rem; border-radius: var(--radius); position: relative;
  transition: transform .3s;
}
.contrast-card:hover { transform: translateY(-4px); }
.contrast-old {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
  filter: grayscale(0.3);
}
.contrast-new {
  background: rgba(232,220,200,0.04);
  border: 1px solid rgba(245,215,110,0.15);
}
.contrast-badge {
  font-family: var(--font-chalk);
  font-size: .75rem; letter-spacing: 2px;
  padding: .3rem .8rem; border-radius: 99px;
  display: inline-block; margin-bottom: 1.2rem;
}
.contrast-old .contrast-badge {
  background: rgba(255,255,255,0.06); color: var(--text-dim);
}
.contrast-new .contrast-badge {
  background: rgba(245,215,110,0.12); color: var(--chalk-yellow);
}
.contrast-items { list-style: none; display: flex; flex-direction: column; gap: .8rem; }
.contrast-items li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .95rem; color: var(--text-secondary); line-height: 1.5;
}
.contrast-items .icon { font-size: 1.1rem; flex-shrink: 0; }

/* ===== FEATURE CARDS (Teacher Toolbox) ===== */
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-top: 2.5rem;
}
.tool-card {
  background: rgba(232,220,200,0.03);
  border: 1px solid var(--border-chalk);
  border-radius: var(--radius); padding: 2rem 1.5rem;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.tool-card:hover {
  border-color: rgba(232,220,200,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
/* Sticky-note tilt effect */
.tool-card:nth-child(odd) { transform: rotate(-0.5deg); }
.tool-card:nth-child(even) { transform: rotate(0.5deg); }
.tool-card:hover { transform: rotate(0) translateY(-4px) !important; }

.tool-icon {
  font-size: 2rem; margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.tool-title {
  font-family: var(--font-chalk);
  font-size: 1.15rem; margin-bottom: .5rem;
  color: var(--chalk-white);
}
.tool-desc {
  font-size: .9rem; color: var(--text-secondary); line-height: 1.6;
}
.tool-tags { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tool-tag {
  font-size: .72rem; font-weight: 600; padding: .25rem .7rem;
  border-radius: 99px;
  background: rgba(232,220,200,0.06);
  border: 1px solid rgba(232,220,200,0.1);
  color: var(--text-dim);
}

/* ===== BESTIARY — Pet Evolution Field Guide ===== */
.bestiary-section {
  background: linear-gradient(180deg, var(--board-deep), rgba(30,47,30,0.5), var(--board-deep));
}

/* Track tabs */
.bestiary-tabs {
  display: flex; justify-content: center; gap: 1rem; margin: 2rem 0;
}
.bestiary-tab {
  font-family: var(--font-chalk);
  font-size: 1rem; padding: .6rem 1.5rem;
  border: 1px solid var(--border-chalk); border-radius: 99px;
  background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: all .3s;
}
.bestiary-tab.active, .bestiary-tab:hover {
  background: rgba(232,220,200,0.08);
  border-color: rgba(232,220,200,0.25);
  color: var(--chalk-white);
}
.bestiary-tab[data-track="dragon"].active { color: var(--chalk-yellow); border-color: rgba(245,215,110,0.3); }
.bestiary-tab[data-track="plant"].active { color: var(--chalk-green); border-color: rgba(143,217,168,0.3); }
.bestiary-tab[data-track="mythical"].active { color: var(--chalk-pink); border-color: rgba(232,140,165,0.3); }

/* Evolution track container */
.bestiary-track { display: none; }
.bestiary-track.active { display: block; }

/* Card grid — the actual bestiary entries */
.bestiary-cards {
  display: flex; justify-content: center; gap: 1.2rem;
  flex-wrap: wrap; padding: 1rem 0;
}
.bestiary-card {
  width: 180px; height: 280px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--paper), var(--paper-dark));
  border: 2px solid var(--paper-border);
  box-shadow: 2px 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform .3s, box-shadow .3s;
  cursor: default; position: relative;
  color: var(--ink);
  display: flex; flex-direction: column;
}
.bestiary-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 4px 8px 24px rgba(0,0,0,0.5);
}
.bestiary-card-header {
  text-align: center; padding: 1.2rem .8rem .6rem;
  border-bottom: 1px dashed var(--paper-border);
}
.bestiary-emoji {
  font-size: 3rem; display: block; margin-bottom: .4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transition: transform .3s;
}
.bestiary-card:hover .bestiary-emoji { transform: scale(1.15); }
.bestiary-name {
  font-family: var(--font-chalk);
  font-size: 1.1rem; color: var(--ink);
}
.bestiary-card-body {
  padding: .8rem; font-size: .75rem; color: var(--ink-light);
  line-height: 1.6; min-height: 60px;
  font-style: italic;
  flex: 1;
}
.bestiary-card-footer {
  padding: .5rem .8rem; font-size: .7rem;
  border-top: 1px dashed var(--paper-border);
  display: flex; justify-content: space-between;
  color: var(--ink-light); font-weight: 600;
  margin-top: auto;
}
/* Max-stage card glow */
.bestiary-card.max-stage {
  border-color: var(--star-gold);
  box-shadow: 2px 4px 12px rgba(0,0,0,0.4), 0 0 20px rgba(251,191,36,0.15);
}
.bestiary-card.max-stage .bestiary-emoji {
  filter: drop-shadow(0 0 12px rgba(251,191,36,0.3));
}

/* ===== BULLETIN BOARD (Reassurance) ===== */
.bulletin-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  margin-top: 2.5rem;
}
.sticky-note {
  padding: 1.8rem 1.5rem; border-radius: 4px;
  position: relative; transition: transform .3s;
  box-shadow: 2px 3px 12px rgba(0,0,0,0.3);
  color: var(--ink);
}
.sticky-note:hover { transform: translateY(-4px) rotate(0deg) !important; }
.sticky-note:nth-child(1) { background: #fff9c4; transform: rotate(-2deg); }
.sticky-note:nth-child(2) { background: #c8e6c9; transform: rotate(1.5deg); }
.sticky-note:nth-child(3) { background: #bbdefb; transform: rotate(-1deg); }
.sticky-note:nth-child(4) { background: #f8bbd0; transform: rotate(2deg); }
/* Pin */
.sticky-note::before {
  content: '📌';
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.sticky-icon { font-size: 1.8rem; margin-bottom: .8rem; display: block; }
.sticky-title {
  font-family: var(--font-chalk);
  font-size: 1rem; margin-bottom: .4rem; color: var(--ink);
}
.sticky-desc {
  font-size: .82rem; color: var(--ink-light); line-height: 1.5;
}

/* ===== ADVENTURE STEPS (Workflow) ===== */
.quest-steps {
  display: flex; gap: 0; margin-top: 2.5rem;
  position: relative; justify-content: center;
}
/* Dotted path connecting steps */
.quest-steps::before {
  content: '';
  position: absolute; top: 50px; left: 12%; right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--chalk-yellow) 0, var(--chalk-yellow) 6px, transparent 6px, transparent 12px);
  opacity: .3;
}
.quest-step {
  flex: 1; text-align: center; position: relative; z-index: 1;
  max-width: 240px; padding: 0 .8rem;
}
.quest-num {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-chalk); font-size: 1.4rem;
  background: var(--board-light);
  border: 2px solid var(--chalk-yellow);
  color: var(--chalk-yellow);
  box-shadow: 0 0 15px rgba(245,215,110,0.1);
}
.quest-icon { font-size: 1.8rem; margin-bottom: .8rem; display: block; }
.quest-title {
  font-family: var(--font-chalk);
  font-size: 1.1rem; margin-bottom: .4rem;
}
.quest-desc {
  font-size: .9rem; color: var(--text-secondary); line-height: 1.6;
  max-width: 220px; margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem; text-align: center;
  border-top: 1px solid var(--border-chalk);
}
.footer-logo {
  font-family: var(--font-chalk);
  font-size: 1.2rem; margin-bottom: .5rem;
  color: var(--chalk-yellow);
  text-shadow: 0 0 5px rgba(245,215,110,0.1);
}
.footer-slogan {
  font-family: var(--font-chalk);
  font-size: 0.95rem;
  color: var(--chalk-yellow);
  margin: 0.8rem auto 1.8rem;
  max-width: 600px;
  line-height: 1.6;
  opacity: 0.9;
  letter-spacing: 1px;
}
.footer-action {
  margin-bottom: 2.5rem;
}
.footer-feedback-btn {
  display: inline-block;
  padding: 0.6rem 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  border: 1.5px solid rgba(232, 220, 200, 0.25);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.footer-feedback-btn:hover {
  background: rgba(232, 220, 200, 0.06);
  border-color: var(--chalk-yellow);
  color: var(--chalk-yellow);
  box-shadow: 0 0 15px rgba(245, 215, 110, 0.15);
  transform: translateY(-2px) scale(1.02);
  border-radius: 225px 15px 255px 15px / 15px 255px 15px 225px;
  text-decoration: none;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-chalk);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-copy,
.footer-icp,
.footer-gongan {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color 0.3s;
  text-decoration: none;
  margin-bottom: 0 !important;
  line-height: 1.5;
}
.footer-icp:hover,
.footer-gongan:hover {
  color: var(--text-secondary);
}
.footer-icp,
.footer-gongan {
  position: relative;
}
.gongan-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  filter: grayscale(1) opacity(0.6);
  transition: filter 0.3s, opacity 0.3s;
}
.footer-gongan:hover .gongan-icon {
  filter: grayscale(0) opacity(1);
}

@media (min-width: 768px) {
  .footer-icp::before,
  .footer-gongan::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: var(--text-dim);
    opacity: 0.35;
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 1.2rem;
  }
  .footer-slogan {
    font-size: 0.85rem;
    padding: 0 1rem;
  }
}

/* ===== HERO HIGHLIGHTS ===== */
.hero-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-top: 2.5rem;
  font-size: .9rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  animation: fadeInUp .8s 1.2s both;
}
.hero-highlight-item {
  transition: color .3s;
}
.hero-highlight-item:hover {
  color: var(--text-secondary);
}
.hero-highlight-dot {
  color: var(--text-dim);
  opacity: .4;
}

/* ===== STORY ===== */
.story-content {
  max-width: 680px;
  margin: 2rem auto 0;
  padding: 2.5rem;
  background: rgba(232,220,200,0.03);
  border: 1px solid var(--border-chalk);
  border-radius: var(--radius);
}
.story-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.2rem;
}
.story-text:last-of-type {
  margin-bottom: 1.5rem;
}
.story-author {
  text-align: right;
  font-family: var(--font-chalk);
  font-size: .95rem;
  color: var(--chalk-yellow);
  letter-spacing: 1px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.hero-title { animation: fadeInUp .8s .3s both; }
.hero-subtitle { animation: fadeInUp .8s .8s both; }
.hero-evolution { animation: fadeInUp .8s 1.1s both; }

/* Scroll reveal */
.reveal {
  --p: 0;
  opacity: var(--p);
  transform: translateY(calc(30px * (1 - var(--p))));
  will-change: opacity, transform;
}
.reveal-delay-1 { --reveal-offset: 30px; }
.reveal-delay-2 { --reveal-offset: 60px; }
.reveal-delay-3 { --reveal-offset: 90px; }
.reveal-delay-4 { --reveal-offset: 120px; }

/* ===== HAMBURGER ===== */
.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 110;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--text-secondary);
  margin: 5px auto; transition: all .3s;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== CHANGELOG — Quest Log ===== */
.changelog-timeline-container {
  max-width: 800px;
  margin: 3rem auto 1rem;
  position: relative;
  padding-left: 2.5rem;
  text-align: left;
}
.chalk-timeline-line {
  position: absolute;
  left: 1.25rem;
  top: 1.4rem;
  bottom: 0.5rem;
  width: 2px;
  border-left: 2px dashed rgba(232, 220, 200, 0.15);
  pointer-events: none;
}
.changelog-list {
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}
.changelog-item {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1.8rem;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-bottom 0.4s ease;
}
.changelog-item:last-child {
  margin-bottom: 0;
}
.changelog-node-container {
  position: absolute;
  left: -2.5rem;
  top: 1.4rem;
  width: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.changelog-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0d1f0d;
  border: 2px solid rgba(232, 220, 200, 0.4);
  box-shadow: 0 0 4px rgba(232, 220, 200, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}
.changelog-item:hover .changelog-node {
  border-color: var(--chalk-yellow);
  background: var(--chalk-yellow);
  box-shadow: 0 0 10px var(--chalk-yellow);
  transform: scale(1.2);
}
.changelog-item:hover {
  z-index: 10;
}
.changelog-card {
  background: rgba(232, 220, 200, 0.02);
  border: 1.5px solid rgba(232, 220, 200, 0.12);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.changelog-card:hover {
  background: rgba(232, 220, 200, 0.05);
  border-color: rgba(245, 215, 110, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}
.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.changelog-version {
  font-family: var(--font-chalk);
  font-size: 1.15rem;
  color: var(--chalk-yellow);
  letter-spacing: 0.5px;
}
.changelog-date {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.changelog-item-title {
  font-family: var(--font-chalk);
  font-size: 1.1rem;
  color: var(--chalk-white);
  margin-bottom: 0.8rem;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.changelog-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.changelog-body p {
  margin: 0;
}
.changelog-body ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.changelog-body li {
  position: relative;
  padding-left: 1.2rem;
}
.changelog-body li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  color: var(--chalk-yellow);
  font-weight: bold;
}
.changelog-body strong {
  color: var(--chalk-white);
  font-weight: 500;
}

/* Collapsible states */
.changelog-item.collapsed-item {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.4s ease, margin-bottom 0.4s ease;
}
.changelog-list.expanded .changelog-item.collapsed-item {
  max-height: 800px;
  opacity: 1;
  pointer-events: auto;
  margin-bottom: 1.8rem;
  overflow: visible;
}
.changelog-list.expanded .changelog-item.collapsed-item:last-child {
  margin-bottom: 0;
}

.chalk-btn {
  display: inline-block;
  padding: 0.65rem 2.2rem;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-chalk);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1.5px dashed rgba(232, 220, 200, 0.25);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0.5rem;
}
.chalk-btn:hover {
  background: rgba(232, 220, 200, 0.06);
  border: 1.5px solid var(--chalk-yellow);
  color: var(--chalk-yellow);
  box-shadow: 0 0 15px rgba(245, 215, 110, 0.15);
  transform: translateY(-2px) scale(1.02);
  border-radius: 225px 15px 255px 15px / 15px 255px 15px 225px;
}
.changelog-action {
  margin-top: 1.5rem;
}

/* ===== SHOWCASE ===== */
.showcase-tabs {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}
.showcase-tab {
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-chalk);
  font-size: 0.85rem;
  border: 1px dashed rgba(232, 220, 200, 0.25);
  border-radius: 20px 4px 18px 4px / 4px 18px 4px 20px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}
.showcase-tab:hover, .showcase-tab.active {
  color: var(--chalk-yellow);
  border: 1px solid var(--chalk-yellow);
  box-shadow: 0 0 10px rgba(245, 215, 110, 0.1);
  background: rgba(232, 220, 200, 0.04);
}
.showcase-desc {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  height: 2.5rem; /* Reserve space to prevent layout shifting on change */
}
.showcase-viewports {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
}
.showcase-board-view {
  background: var(--board-mid);
  border: 4px solid var(--board-light);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 15px 30px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 3rem 4rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
}

/* PC Mockup */
.pc-mockup {
  width: 65%;
  aspect-ratio: 16 / 10;
  background: #111;
  border: 4px double var(--text-dim);
  border-radius: 6px;
  position: relative;
  margin-right: auto;
  margin-left: 2%;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.pc-screen-content {
  width: 100%;
  height: 100%;
  background: #1e293b;
}
.pc-screen-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.pc-chalk-ledge {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 6px;
  background: #5c4033; /* Wood texture chalk ledge */
  border-radius: 3px 3px 0 0;
}
.mini-chalk {
  position: absolute;
  bottom: 6px;
  width: 16px;
  height: 4px;
  border-radius: 2px;
}
.mini-chalk.white {
  background: #f4ead5;
  left: 20%;
  transform: rotate(5deg);
}
.mini-chalk.yellow {
  background: #f5d76e;
  left: 30%;
  transform: rotate(-10deg);
}
.mini-eraser {
  position: absolute;
  bottom: 6px;
  left: 60%;
  width: 20px;
  height: 8px;
  background: #b22222;
  border-radius: 1px;
}
/* Phone Mockup */
.phone-mockup {
  width: auto;
  height: 85%;
  aspect-ratio: 9 / 19.5;
  background: #000;
  border: 3px solid rgba(232, 220, 200, 0.25);
  border-radius: 28px;
  position: absolute;
  right: 8%;
  bottom: 8%;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  z-index: 10;
  cursor: zoom-in;
  animation: phoneFloat 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.phone-screen-content {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0f172a;
}
.phone-screen-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 45px;
  height: 12px;
  background: #000;
  border-radius: 6px;
  z-index: 20;
}
/* Premium Status Connection Badge */
.connection-badge {
  position: absolute;
  left: 68%;
  top: 35%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(13, 31, 13, 0.75);
  border: 1px solid rgba(232, 220, 200, 0.2);
  border-radius: 30px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 15;
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--chalk-white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.connection-badge::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(232, 220, 200, 0.2), transparent 50%, rgba(232, 220, 200, 0.05));
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* Glowing Pulse Dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Emerald green pulse */
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #10b981;
  opacity: 0;
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.3);
    opacity: 0.8;
  }
  80%, 100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(0.5deg); }
  50% { transform: translateY(-10px) rotate(-0.5deg); }
}
/* Hover effect for mockups */
.pc-mockup:hover {
  transform: scale(1.01);
  border-color: var(--chalk-yellow);
}
.phone-mockup:hover {
  animation-play-state: paused;
  transform: scale(1.03) translateY(-10px);
  border-color: var(--chalk-yellow);
}

/* ===== TEACHER TESTIMONIALS ===== */
.testimonials-board {
  width: 100%;
  max-width: 1050px;
  margin: 1.5rem auto 0;
  padding: 3rem 2.5rem;
  background: var(--board-mid);
  border: 3px double var(--border-chalk);
  border-radius: 16px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}
.testimonials-board-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}
.testimonial-card {
  background: var(--paper-dark);
  color: var(--ink);
  padding: 1.8rem 1.5rem;
  border-radius: 4px;
  box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--paper-border);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--font-body);
}
.testimonial-card:nth-child(1) { transform: rotate(-1.5deg); }
.testimonial-card:nth-child(2) { transform: rotate(1.2deg); }
.testimonial-card:nth-child(3) { transform: rotate(-0.8deg); }

.testimonial-card:hover {
  transform: scale(1.03) rotate(0deg) !important;
  box-shadow: 4px 12px 25px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--paper-border);
  z-index: 5;
}
.testimonial-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.2rem;
  font-weight: 400;
}
.testimonial-author {
  font-size: 0.85rem;
  color: var(--ink-light);
  font-weight: 500;
  text-align: right;
  font-style: italic;
}
/* Tape decoration */
.tape {
  position: absolute;
  width: 80px;
  height: 25px;
  background: rgba(244, 234, 213, 0.35); /* semi-transparent masking tape */
  backdrop-filter: blur(1px);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}
.tape.top-left {
  top: -12px;
  left: -20px;
  transform: rotate(-35deg);
  border-left: 2px dashed rgba(0,0,0,0.05);
  border-right: 2px dashed rgba(0,0,0,0.05);
}
.tape.top-right {
  top: -12px;
  right: -20px;
  transform: rotate(35deg);
  border-left: 2px dashed rgba(0,0,0,0.05);
  border-right: 2px dashed rgba(0,0,0,0.05);
}
.tape.top-center {
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 90px;
  border-left: 2px dashed rgba(0,0,0,0.05);
  border-right: 2px dashed rgba(0,0,0,0.05);
}

/* ===== PRO TOOLBOX ===== */
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1050px;
  margin: 2rem auto 0;
}
.toolbox-card {
  background: var(--board-surface);
  border: 1px solid var(--border-chalk);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.toolbox-card:hover {
  transform: translateY(-5px);
  border-color: var(--chalk-yellow);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.toolbox-card-title {
  font-family: var(--font-chalk);
  color: var(--chalk-white);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}
.toolbox-img-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #000;
  border: 1px solid rgba(232, 220, 200, 0.1);
  margin-bottom: 1rem;
  cursor: zoom-in;
}
.toolbox-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
  display: block;
}
.toolbox-img-container:hover img {
  transform: scale(1.03);
}
.zoom-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.6);
  color: var(--chalk-white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.toolbox-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  margin-top: auto;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
}
.lightbox-content {
  margin: 0;
  display: block;
  width: 90%;
  max-width: 1100px;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--border-chalk);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.25s ease-out;
}
@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--chalk-yellow);
  text-decoration: none;
  cursor: pointer;
}
.lightbox-caption {
  margin: 15px 0 0 0;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--font-chalk);
  font-size: 1.1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-hamburger { display: block; position: relative; z-index: 10; }
  .nav-links {
    display: none; position: fixed; inset: 0;
    background: var(--board-deep);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2.5rem; z-index: 5;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { backdrop-filter: none !important; background: transparent !important; transition: none; }
  body.menu-open .nav::after { display: none; }
  .nav-links a { font-size: 1.3rem; }
  .nav-logo { position: relative; z-index: 10; }
  .lang-btn { position: relative; z-index: 10; }
  .contrast-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .bulletin-grid { grid-template-columns: 1fr 1fr; }
  .bestiary-cards { gap: .8rem; }
  .bestiary-card { width: 150px; }
  .quest-steps { flex-direction: column; align-items: center; gap: 1.5rem; }
  .quest-steps::before { display: none; }
  .section, .section-full { padding: 3.5rem 1.2rem; }
  .hero { padding: 5rem 1rem 3rem; }
  .hero-title { letter-spacing: 0; }
  .hero-highlights { font-size: .8rem; gap: .4rem; margin-top: 2rem; }
  .story-content { padding: 1.8rem 1.2rem; margin: 1.5rem auto 0; }
  .section-title { font-size: 1.6rem; }
  .tool-card:nth-child(odd), .tool-card:nth-child(even) { transform: none; }
  .changelog-timeline-container { padding-left: 1.8rem; margin-top: 2rem; }
  .chalk-timeline-line { left: 0.9rem; }
  .changelog-node-container { left: -1.8rem; width: 1.8rem; }
  .changelog-card { padding: 1.1rem; }

  /* Showcase tablet */
  .showcase-board-view {
    padding: 1.5rem;
    min-height: 420px;
  }
  .pc-mockup {
    width: 80%;
    position: relative;
    margin-left: 5%;
    margin-right: auto;
    left: auto;
    top: auto;
  }
  .phone-mockup {
    width: auto;
    height: 80%;
    aspect-ratio: 9 / 19.5;
    position: absolute;
    right: 5%;
    bottom: 5%;
  }
  .connection-badge {
    left: 78%;
    top: 32%;
    font-size: 0.65rem;
    padding: 6px 12px;
  }
  
  /* Testimonials mobile */
  .testimonials-board {
    padding: 1.5rem;
  }
  .testimonials-board-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .testimonial-card {
    transform: none !important;
  }
  .tape.top-left, .tape.top-right {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) rotate(-3deg) !important;
    top: -15px;
  }
  
  /* Toolbox mobile */
  .toolbox-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 480px) {
  .bulletin-grid { grid-template-columns: 1fr; }
  .bestiary-card { width: 140px; }
  .bestiary-tabs { flex-wrap: wrap; }
  .hero { padding: 5rem 1rem 2.5rem; min-height: auto; }
  .hero-evolution { font-size: 2rem; gap: .6rem; }
  .hero-highlights { flex-wrap: wrap; font-size: .75rem; margin-top: 1.5rem; }
  .story-content { padding: 1.5rem 1rem; }
  .story-text { font-size: .9rem; line-height: 1.8; }

  /* Showcase small screens */
  .showcase-board-view {
    flex-direction: column;
    height: auto;
    min-height: 380px;
    padding: 1rem;
  }
  .pc-mockup {
    position: relative;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: auto;
    top: auto;
    aspect-ratio: 16 / 10;
    margin-bottom: 1.5rem;
  }
  .phone-mockup {
    position: relative;
    width: 50%;
    height: auto;
    right: auto;
    bottom: auto;
    margin: 0 auto;
    aspect-ratio: 9 / 19.5;
    animation: none;
  }
  .connection-badge {
    display: none;
  }
  .showcase-desc {
    font-size: 0.85rem;
    height: auto;
    margin-bottom: 1.5rem;
  }
}
