@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Work+Sans:wght@400;500;700;800&display=swap');

:root {
  --paper: #F2EFE6;
  --ink: #14120F;
  --ink-soft: #4A463E;
  --accent: #FF4E24;
  --accent2: #FFC94A;
  --card-bg: #FFFFFF;
  --line: rgba(20,18,15,0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20,18,15,0.10) 1.6px, transparent 1.6px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 60px;
}

/* ---------- Hero / title ---------- */

.title {
  position: relative;
  z-index: 1;
  font-family: 'Bangers', cursive;
  font-weight: 400;
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  text-align: center;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--accent);
  padding: 24px 8px 0;
}

.title-bar {
  width: 110px;
  height: 7px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 3px;
  margin: 6px auto 36px;
}

.tagline {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
  margin: 4px 0 36px;
}

/* ---------- Comic panels ---------- */

.card {
  background: var(--card-bg);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 6px 6px 0 var(--ink);
}

.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }

.card p a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.card p a:hover { color: var(--ink); }

.card.quote {
  background: var(--accent2);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-1.2deg);
  text-align: center;
}

.card.quote p {
  font-family: 'Bangers', cursive;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  font-family: 'Work Sans', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--ink);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent); }

.nav-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.nav-btn {
  flex: 1;
  min-width: 90px;
  text-align: center;
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 10px 10px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.nav-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.nav-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer .egg {
  color: var(--ink-soft);
  text-decoration: none;
  cursor: default;
}

.footer .egg:hover { color: var(--ink-soft); }

.legal-link {
  color: var(--ink-soft);
  text-decoration: underline;
}

.legal-link:hover { color: var(--ink); }

/* ---------- Modal ---------- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,18,15,0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--card-bg);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 440px;
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal p {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.6;
}

.modal .btn { margin-top: 0; }

/* ---------- Reveal panels (About / Use Cases / Resources) ---------- */

.reveal-panel { position: relative; }

.reveal-panel[hidden] { display: none; }

@keyframes popIn {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  55% { transform: scale(1.08) rotate(3deg); opacity: 1; }
  75% { transform: scale(0.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes flashPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(10); opacity: 0; }
}

.reveal-panel.show::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 50%;
  width: 30px;
  height: 30px;
  background: var(--accent2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: flashPop 0.35s ease-out forwards;
  z-index: 0;
  pointer-events: none;
}

.reveal-panel.show > .card,
.reveal-panel.show.card {
  position: relative;
  z-index: 1;
  animation: popIn 0.4s cubic-bezier(.2,.9,.3,1.3) both;
}

.reveal-panel.show .card + .card { animation-delay: 0.12s; }
.reveal-panel.show .card + .card + .card { animation-delay: 0.24s; }

/* Use-cases carousel */

.carousel-card.pop {
  position: relative;
  z-index: 1;
  animation: popIn 0.35s cubic-bezier(.2,.9,.3,1.3) both;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
}

.btn-small {
  font-family: 'Work Sans', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--ink);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-small:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent); }
.btn-small:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent); }

.carousel-dots { display: flex; gap: 6px; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--ink);
  padding: 0;
  cursor: pointer;
}

.dot.active { background: var(--accent); }

/* Resource cards reuse .nav-buttons/.nav-btn for paired links */

.card h3 {
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

@media (max-width: 400px) {
  .title-bar { width: 90px; }
}
