/* ———— geology for kids: bright, friendly, entirely innocent ———— */
:root {
  --sky: #e8f4fb;
  --paper: #ffffff;
  --text: #2f3a44;
  --soft: #6b7a88;
  --sun: #f4a62a;
  --leaf: #4f9e5f;
  --stone: #8d7a66;
  --berry: #d2554f;
  --ocean: #3a86c8;
}

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

body {
  background: var(--sky);
  color: var(--text);
  font-family: "Trebuchet MS", "Verdana", "Segoe UI", sans-serif;
  line-height: 1.65;
}

/* ———— header ———— */
.site-head {
  background: linear-gradient(160deg, #fff6e4 0%, #ffe9c4 100%);
  text-align: center;
  padding: 2.6rem 1.2rem 2.2rem;
  border-bottom: 5px solid var(--sun);
}

.site-head h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
  color: #4a3a22;
  letter-spacing: -0.01em;
}

.rock-emoji {
  display: inline-block;
  animation: wobble 4s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}

.tagline {
  color: #7a6440;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ———— layout ———— */
main {
  width: min(62rem, 100%);
  margin: 0 auto;
  padding: 2rem 1.2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.6rem;
}

section h2 {
  font-size: 1.5rem;
  color: var(--ocean);
  margin-bottom: 1rem;
}

/* ———— rock of the day ———— */
.spotlight-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
  box-shadow: 0 4px 14px rgba(47, 58, 68, 0.08);
}

.spotlight-emoji { font-size: 3.4rem; line-height: 1; }
.spotlight-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; color: var(--berry); }

.fun-btn {
  margin-top: 0.9rem;
  background: var(--sun);
  color: #4a3a22;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.fun-btn:hover { background: #ffb941; transform: translateY(-2px); }
.fun-btn:active { transform: translateY(0); }

/* ———— rock types ———— */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.2rem;
}

.type-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 1.4rem;
  border-top: 6px solid var(--stone);
  box-shadow: 0 4px 14px rgba(47, 58, 68, 0.08);
}

.type-card.igneous { border-top-color: var(--berry); }
.type-card.sedimentary { border-top-color: var(--sun); }
.type-card.metamorphic { border-top-color: var(--leaf); }

.specimen {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.specimen.clickable {
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease;
}

.specimen.clickable:hover { transform: scale(1.08) rotate(-4deg); }
.specimen.clickable:active { transform: scale(0.9); }
.specimen.clickable.squeezed { transform: scale(0.82) rotate(6deg); }

.type-card h3 { font-size: 1.25rem; }

.type-sub {
  color: var(--soft);
  font-style: italic;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.examples {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  color: var(--soft);
}

/* ———— facts & tips ———— */
.fact-list, .tip-list {
  background: var(--paper);
  border-radius: 18px;
  padding: 1.3rem 1.3rem 1.3rem 2.6rem;
  box-shadow: 0 4px 14px rgba(47, 58, 68, 0.08);
}

.fact-list li, .tip-list li { margin-bottom: 0.6rem; }
.fact-list li:last-child, .tip-list li:last-child { margin-bottom: 0; }
.fact-list { list-style: "🔎  "; }

/* ———— quiz ———— */
#quiz-box {
  background: var(--paper);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: 0 4px 14px rgba(47, 58, 68, 0.08);
}

.quiz-q { font-weight: bold; margin-bottom: 0.9rem; font-size: 1.08rem; }

.quiz-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.quiz-option {
  background: #eef4f8;
  border: 2px solid #d4e2ec;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.quiz-option:hover { background: #dceaf4; }
.quiz-option.right { background: #dff3e1; border-color: var(--leaf); }
.quiz-option.wrong { background: #fae0de; border-color: var(--berry); }

.quiz-feedback { margin-top: 0.9rem; font-weight: bold; }
.quiz-feedback.good { color: var(--leaf); }
.quiz-feedback.bad { color: var(--berry); }
.quiz-progress { margin-top: 0.8rem; color: var(--soft); font-size: 0.85rem; }

/* ———— footer ———— */
.site-foot {
  background: #dfe9f0;
  text-align: center;
  padding: 1.8rem 1.2rem;
  color: var(--soft);
  font-size: 0.9rem;
}

.fine-print { margin-top: 0.4rem; font-size: 0.78rem; color: #9aa8b4; }

@media (max-width: 34rem) {
  .spotlight-card { flex-direction: column; align-items: center; text-align: center; }
  main { gap: 2rem; }
}
