/* 7 Deadly Sins Test — one stylesheet for all 8 pages.
   Design notes live at the top of README.md. Colors: only the six variables below. */

:root {
  --bg: #141110;      /* deep, near-black, warm */
  --card: #1f1a17;    /* one step lighter */
  --text: #ede6de;    /* off-white body text */
  --muted: #9c928a;   /* secondary text */
  --accent: #ff5a36;  /* warm, saturated: actions, the sin itself */
  --cool: #6cc4c8;    /* cool accent: links, focus, quote rule */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif, .question, .result-sin, .quote, .brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0; }
h2 { font-size: 27px; margin-bottom: 16px; }
p { margin: 0 0 1em; }

a {
  color: var(--cool);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms;
}

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--cool);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 20px; }
.section { margin-top: 64px; }

.card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
  border-radius: 12px;
  padding: 24px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Home: hero + quiz ---------- */

.hero { padding-top: 20px; }
.hero h1 { font-size: clamp(30px, 8vw, 44px); white-space: nowrap; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.quiz, .result { margin-top: 16px; }

.progress { display: flex; align-items: center; gap: 12px; }
.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--muted) 25%, transparent);
}
.progress-fill { display: block; height: 100%; width: 10%; background: var(--accent); }
.progress-text {
  min-width: 3.6em;
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.question {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(1.3em * 4);
  margin: 24px 0;
  font-size: clamp(22px, 5.8vw, 30px);
  line-height: 1.3;
  text-align: center;
}

.options { display: grid; gap: 12px; }

.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  font: inherit;
  font-size: 17px;
  text-align: left;
  color: var(--text);
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms, border-color 150ms, color 150ms, transform 150ms;
}
.opt kbd { font: 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.opt.is-picked { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.opt.is-picked kbd { color: var(--bg); }

@media (hover: none) { .opt kbd { display: none; } }
@media (hover: hover) {
  .opt:hover { border-color: var(--accent); transform: translateY(-1px); }
  .btn:hover { transform: translateY(-1px); }
  a:hover { color: var(--text); }
}

/* returning visitor with a stored result: skip the quiz flash */
.has-result #quiz { display: none; }

/* ---------- Home: result card ---------- */

.result:focus { outline: none; }
.result-sin {
  margin: 6px 0 28px;
  font-size: clamp(56px, 17vw, 96px);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.bar-pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-track {
  height: 10px;
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}
.bar-fill { display: block; height: 100%; background: var(--accent); }

.quote {
  margin: 32px 0;
  padding-left: 16px;
  border-left: 3px solid var(--cool);
  font-size: 22px;
  line-height: 1.35;
}

.actions { display: grid; gap: 12px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms, color 150ms, transform 150ms;
}
.btn-primary { color: var(--bg); background: var(--accent); }
a.btn:hover { color: var(--accent); }
a.btn-primary:hover { color: var(--bg); }

.result-links { margin: 24px 0 0; font-size: 15px; }

/* ---------- Home: about + FAQ ---------- */

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

.faq details { border-top: 1px solid color-mix(in srgb, var(--muted) 28%, transparent); }
.faq details:last-child { border-bottom: 1px solid color-mix(in srgb, var(--muted) 28%, transparent); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Result pages ---------- */

.disclaimer {
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.site-header { padding: 16px 0 0; }
.brand { font-size: 18px; font-weight: 600; color: var(--text); text-decoration: none; }

.page-hero { margin-top: 40px; }
.page-hero h1 { font-size: clamp(60px, 18vw, 104px); line-height: 1; color: var(--accent); }
.lede { margin: 10px 0 0; font-size: 18px; color: var(--muted); }

.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.scenes li { padding-left: 16px; border-left: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.scenes .eyebrow { display: block; margin-bottom: 4px; }

.strength { border-left: 3px solid var(--accent); }

.take-test { margin-top: 64px; }

.sin-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.sin-links h2 { font-size: 20px; }

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

.site-footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  font-size: 14px;
  color: var(--muted);
}
.site-footer ul { list-style: none; margin: 8px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer p { margin: 0 0 6px; }

/* ---------- Wider screens ---------- */

@media (min-width: 560px) {
  .card { padding: 32px; }
  .actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
