
/* ==============================
   1. FONTS
============================== */

@font-face {
  font-family: "Shantell Sans";
  src: url("assets/fonts/ShantellSans-Medium.ttf")
    format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shantell Sans";
  src: url("assets/fonts/ShantellSans-Bold.ttf")
    format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("../assets/fonts/ComicRelief-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("../assets/fonts/ComicRelief-Bold.ttf")
    format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==============================
   2. WARM MONEY COLOUR THEME
============================== */

:root {
  font-family: "Comic Relief", Arial, sans-serif;

  --bg: #f5f4e8;
  --panel: #fffef8;
  --text: #35473e;
  --muted: #667b70;

  --primary: #579c80;
  --primary-hover: #3f8067;

  --secondary: #e0f0e6;
  --secondary-hover: #cce6d7;

  --border: #cce3d4;
  --soft-pink: #e4f4e8;
  --pale-pink: #f2f9ef;
  --accent: #427e62;

  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 10% 5%,
      #dcefd7,
      transparent 35%
    ),
    radial-gradient(
      circle at 90% 80%,
      #e6edd4,
      transparent 35%
    ),
    var(--bg);
}

button {
  font-family: "Comic Relief", Arial, sans-serif;
  font-weight: 500;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

/* ==============================
   3. HEADER
============================== */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-link {
  font-family: "Shantell Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand-link:visited {
  color: var(--text);
}

.brand-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.pill {
  background: #e4f4e8;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 12px;
  color: #3f735c;
}

/* ==============================
   4. MAIN PANEL
============================== */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: clamp(22px, 5vw, 38px);
  box-shadow: 0 12px 40px #427e6214;
}

/* ==============================
   5. TYPOGRAPHY
============================== */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}

.chapter-info {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

h1 {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.12;
  margin: 12px 0;
}

h2 {
  font-size: clamp(24px, 5vw, 32px);
  margin: 10px 0 16px;
}

h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

p {
  line-height: 1.75;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.intro-text {
  font-family: "Shantell Sans", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  white-space: pre-line;
}

/* ==============================
   6. STORY TEXT
============================== */

.story {
  font-family: "Shantell Sans", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.narration {
  margin: 10px 0;
  font-family: "Shantell Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.dialogue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.dialogue-avatar {
  width: 55px;
  height: 55px;
  object-fit: contain;
  flex-shrink: 0;
}

.dialogue-text {
  flex: 1;
  min-width: 0;
  font-family: "Shantell Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

/* ==============================
   7. IMAGES
============================== */

.story-image,
.cover-image {
  display: block;
  width: 100%;
  height: 350px;
  object-fit: contain;
  border-radius: 18px;
  margin: 18px 0;
}

/* ==============================
   8. QUESTION & CHOICES
============================== */

.question-heading {
  margin-top: 35px;
  margin-bottom: 18px;
}

.choices {
  display: grid;
  gap: 11px;
  margin-top: 20px;
  margin-bottom: 35px;
}

.choice {
  width: 100%;
  font-family: "Comic Relief", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-align: left;

  background: #fafff9;
  border: 1.5px solid var(--border);
  border-radius: 15px;

  padding: 17px;
  cursor: pointer;
  color: var(--text);
  transition: .15s;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--primary);
  background: var(--soft-pink);
  transform: translateY(-1px);
}

.choice strong {
  color: var(--accent);
}

/* ==============================
   9. ACTION BUTTONS
============================== */

.primary,
.secondary {
  border: 0;
  border-radius: 13px;
  padding: 14px 18px;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s;
}

.primary {
  background: var(--primary);
  color: white;
}

.primary:hover {
  background: var(--primary-hover);
}

.secondary {
  background: var(--secondary);
  color: #37664f;
}

.secondary:hover {
  background: var(--secondary-hover);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button:focus-visible,
.brand-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* ==============================
   10. PROGRESS
============================== */

.progress {
  height: 8px;
  background: #dcefe1;
  border-radius: 50px;
  overflow: hidden;
  margin: 16px 0 8px;
}

.progress > div {
  height: 100%;
  background: var(--primary);
  transition: width .2s;
}

/* ==============================
   11. RESULT PAGE
============================== */

.result-eyebrow {
  text-align: center;
}

.result-title {
  text-align: center;
}

.mascot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.mascot-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.animal-name {
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  margin: -8px 0 8px;
  text-align: center;
}

.result-quote {
  text-align: center;
}

.result-summary {
  text-align: center;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 25px 0;
}

/* ==============================
   12. PROFILE CARDS
============================== */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini {
  min-width: 0;
  border: 1px solid var(--border);
  background: #fafff9;
  border-radius: 16px;
  padding: 16px;
}

.profile-label,
.match-label {
  display: inline-block;
  background: var(--soft-pink);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3f735c;
  margin-bottom: 12px;
}

.profile-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.profile-list li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.profile-list li:last-child {
  margin-bottom: 0;
}

/* ==============================
   13. COMPATIBILITY
============================== */

.match-character {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.match-character h3 {
  margin: 0;
  flex: 1;
}

.match-mascot {
  width: 75px;
  height: 75px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-character + p {
  font-size: 14px;
  line-height: 1.6;
}

/* ==============================
   14. ENDING
============================== */

.ending-card {
  background: var(--pale-pink);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.ending-card p {
  font-family: "Shantell Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}

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

/* ==============================
   15. SURVIVAL KIT
============================== */

.tag {
  display: inline-block;
  background: var(--soft-pink);
  border-radius: 50px;
  padding: 7px 12px;
  font-size: 12px;
  margin: 3px;
  color: #37664f;
}

.weekend-text {
  font-size: 14px;
  line-height: 1.5;
}

/* ==============================
   16. FOOTER
============================== */

footer {
  text-align: center;
  color: var(--muted);
  margin-top: 25px;
}

.footer-copyright {
  font-family: "Comic Relief", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ==============================
   17. MOBILE RESPONSIVE
============================== */

@media (max-width: 520px) {

  body {
    min-height: 100dvh;
  }

  main {
    width: 100%;
    max-width: 100%;
    padding: 5px 8px 10px;
  }

  .top {
    gap: 5px;
    margin-bottom: 5px;
  }

  .brand-link {
    font-size: 18px;
  }

  .pill {
    font-size: 10px;
    padding: 4px 8px;
  }

  .panel {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .chapter-info {
    font-size: 12px;
    letter-spacing: .04em;
  }

  .eyebrow {
    font-size: 10px;
  }

  h1 {
    font-size: 23px;
    margin: 6px 0;
  }

  h2 {
    font-size: 18px;
    margin: 5px 0 8px;
  }

  h3 {
    font-size: 15px;
  }

  .story-image,
  .cover-image {
    width: 100%;
    height: clamp(80px, 17dvh, 140px);
    object-fit: contain;
    margin: 4px 0;
  }

  .story,
  .narration,
  .dialogue-text,
  .intro-text {
    font-size: 12px;
    line-height: 1.4;
  }

  .story {
    margin-bottom: 6px;
  }

  .narration {
    margin: 5px 0;
  }

  .dialogue {
    gap: 6px;
    margin: 6px 0;
  }

  .dialogue-avatar {
    width: 28px;
    height: 28px;
  }

  .question-heading {
    margin-top: 22px;
    margin-bottom: 12px;
  }

  .choices {
    gap: 5px;
    margin-top: 15px;
    margin-bottom: 25px;
  }

  .choice {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 9px;
  }

  .primary,
  .secondary {
    padding: 9px 11px;
    font-size: 12px;
  }

  .actions {
    gap: 6px;
    margin-top: 8px;
  }

  .progress {
    height: 5px;
    margin: 6px 0 4px;
  }

  .divider {
    margin: 14px 0;
  }

  /* Result */

  .mascot-container {
    margin: 6px 0;
  }

  .mascot-image {
    width: 100px;
    max-height: 100px;
  }

  .result-title {
    font-size: 20px;
  }

  .animal-name {
    font-size: 13px;
    margin: 0 0 3px;
  }

  .result-quote {
    font-size: 12px;
    line-height: 1.3;
    margin: 5px 0;
  }

  .result-summary {
    font-size: 12px;
    line-height: 1.4;
    margin: 5px 0;
  }

  .grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mini {
    padding: 9px;
    border-radius: 10px;
  }

  .mini h3 {
    font-size: 12px;
    line-height: 1.25;
    margin-bottom: 5px;
  }

  .mini p,
  .mini li {
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .profile-list {
    margin: 5px 0 0;
    padding-left: 14px;
  }

  .profile-list li {
    margin-bottom: 4px;
  }

  .profile-label,
  .match-label {
    font-size: 9px;
    padding: 4px 6px;
    letter-spacing: .03em;
    margin-bottom: 5px;
  }

  .match-character {
    flex-direction: column-reverse;
    align-items: center;
    gap: 4px;
    text-align: center;
  }

  .match-mascot {
    width: 45px;
    height: 45px;
  }

  .ending-card {
    padding: 10px;
  }

  .ending-card p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .tag {
    font-size: 10px;
    padding: 4px 7px;
    margin: 2px;
  }

  .weekend-text {
    font-size: 12px;
    line-height: 1.4;
  }

  .small {
    font-size: 10px;
    line-height: 1.3;
  }

  footer {
    margin-top: 10px;
  }

  .footer-copyright {
    font-size: 9px;
  }
}

/* Desktop */
.logo img {
  display: block;
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Mobile */
@media (max-width: 768px) {
  .logo img {
    height: 35px;
  }
}
