/* ==========================================================================
   Tabletop Teachings — stylesheet
   Plain CSS, no build step. Organised in sections:
   1. Design tokens (colours, fonts)
   2. Reset / base
   3. Layout helpers
   4. Components (nav, buttons, cards, hero, steps, footer)
   5. Adventures page (campaign switcher, tabs, timeline, objectives)
   6. Responsive tweaks
   ========================================================================== */

/* ---- 1. Design tokens ---------------------------------------------------- */
:root {
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2.5rem;
  --radius-2xl: 3rem;

  --background: oklch(0.968 0.018 85);
  --foreground: oklch(0.245 0.032 60);
  --card: oklch(0.985 0.012 88);
  --primary: oklch(0.72 0.16 68);
  --primary-foreground: oklch(0.99 0.006 90);
  --secondary: oklch(0.955 0.024 88);
  --secondary-foreground: oklch(0.36 0.05 62);
  --muted: oklch(0.955 0.014 90);
  --muted-foreground: oklch(0.53 0.028 70);
  --accent: oklch(0.63 0.19 18);
  --accent-foreground: oklch(0.99 0.006 90);
  --border: oklch(0.9 0.026 84);

  /* Quest tones: bold icon colour + soft card wash for each */
  --quest-1: oklch(0.72 0.13 235);
  --quest-1-soft: oklch(0.965 0.022 235);
  --quest-2: oklch(0.65 0.16 300);
  --quest-2-soft: oklch(0.965 0.022 300);
  --quest-3: oklch(0.72 0.14 158);
  --quest-3-soft: oklch(0.965 0.024 158);
  --quest-4: oklch(0.74 0.15 55);
  --quest-4-soft: oklch(0.965 0.026 62);
  --quest-5: oklch(0.7 0.16 355);
  --quest-5-soft: oklch(0.965 0.02 355);
  --quest-6: oklch(0.62 0.16 275);
  --quest-6-soft: oklch(0.965 0.022 275);

  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, sans-serif;
  --shadow-parchment: 0 10px 30px -16px color-mix(in oklab, oklch(0.4 0.06 60) 45%, transparent);
}

/* ---- 2. Reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---- 3. Layout helpers ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: 64rem; /* 1024px */
  margin-inline: auto;
  padding: 3rem 1.5rem;
}
.site-nav .container { padding-block: 0; }
.min-h-screen { min-height: 100vh; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- 4. Nav ---------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 4px dotted color-mix(in oklab, var(--primary) 30%, transparent);
  background: color-mix(in oklab, var(--background) 90%, transparent);
  backdrop-filter: blur(6px);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--primary);
}
.brand-mark span {
  width: 1rem;
  height: 1rem;
  transform: rotate(45deg);
  border-radius: 3px;
  border: 2px solid var(--primary-foreground);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--secondary-foreground);
}
.nav-links a {
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  transition: background-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--muted);
}
.nav-cta {
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-foreground) !important;
  padding: 0.375rem 1rem;
  transition: transform 0.1s ease;
}
.nav-cta:active { transform: translateY(2px); }

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-block;
  cursor: pointer;
  border-radius: 1rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  transition: all 0.1s ease;
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-foreground);
  box-shadow: 0 6px 0 0 color-mix(in oklab, var(--accent) 60%, black);
}
.btn-accent:active {
  transform: translateY(4px);
  box-shadow: none;
}
.btn-primary {
  display: block;
  width: 100%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 1.125rem;
  box-shadow: 0 6px 0 0 color-mix(in oklab, var(--primary) 60%, black);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* ---- Hero -------------------------------------------------------------- */
.hero {
  margin-bottom: 5rem;
  border-radius: var(--radius-2xl);
  border: 4px dashed color-mix(in oklab, var(--primary) 40%, transparent);
  background: var(--secondary);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.hero h1 {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  line-height: 1.15;
  color: var(--primary);
}
.hero p {
  margin-inline: auto;
  margin-bottom: 2rem;
  max-width: 42rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

/* ---- Section headings ---------------------------------------------------- */
.section { margin-bottom: 6rem; scroll-margin-top: 6rem; }
.section-title {
  margin-bottom: 3rem;
  text-align: center;
  font-size: 1.875rem;
  color: var(--secondary-foreground);
}
.section-cta-wrap { margin-top: 0.5rem; text-align: center; }
.section-cta {
  display: inline-block;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.625rem 1.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: transform 0.1s ease;
}
.section-cta:active { transform: translateY(2px); }

/* ---- Tenets / quest cards -------------------------------------------------- */
.tenets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.tenet-card {
  border-radius: var(--radius-lg);
  border: 3px solid;
  padding: 2rem;
  transition: transform 0.15s ease;
}
.tenet-card:nth-child(odd):hover { transform: rotate(1deg); }
.tenet-card:nth-child(even):hover { transform: rotate(-1deg); }
.tenet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
}
.tenet-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.tenet-card p {
  line-height: 1.6;
  color: var(--secondary-foreground);
}

/* shape marks used inside tenet icons */
.shape-diamond { width: 1.25rem; height: 1.25rem; transform: rotate(45deg); border-radius: 3px; border: 2px solid var(--primary-foreground); }
.shape-circle  { width: 1.25rem; height: 1.25rem; border-radius: 9999px; background: var(--primary-foreground); }
.shape-bar     { width: 1.5rem; height: 0.375rem; border-radius: 9999px; background: var(--primary-foreground); }
.shape-corner  { width: 1.25rem; height: 1.25rem; border-bottom: 4px solid var(--primary-foreground); border-right: 4px solid var(--primary-foreground); border-radius: 0 0 3px 0; }
.shape-spark   { width: 1rem; height: 1rem; transform: rotate(45deg); background: var(--primary-foreground); }
.shape-pill    { width: 1.5rem; height: 0.625rem; border-radius: 9999px; background: var(--primary-foreground); }

/* Soft tone card background — used on tenet cards, campaign switcher
   cards, and character cards. Solid tone fills, tinted headings and
   skill tags are set inline per-element since they vary by context. */
.tone-quest-1 { background: var(--quest-1-soft); border-color: color-mix(in oklab, var(--quest-1) 35%, white); }
.tone-quest-2 { background: var(--quest-2-soft); border-color: color-mix(in oklab, var(--quest-2) 35%, white); }
.tone-quest-3 { background: var(--quest-3-soft); border-color: color-mix(in oklab, var(--quest-3) 35%, white); }
.tone-quest-4 { background: var(--quest-4-soft); border-color: color-mix(in oklab, var(--quest-4) 35%, white); }
.tone-quest-5 { background: var(--quest-5-soft); border-color: color-mix(in oklab, var(--quest-5) 35%, white); }
.tone-quest-6 { background: var(--quest-6-soft); border-color: color-mix(in oklab, var(--quest-6) 35%, white); }

/* ---- How to join / steps -------------------------------------------------- */
.join-section {
  border-radius: var(--radius-2xl);
  background: var(--muted);
  padding: 2.5rem 1.5rem;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
.step-item { display: contents; }
.step { flex: 1; text-align: center; max-width: 18rem; }
.step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
  border: 4px solid;
  background: var(--card);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-parchment);
}
.step h3 { margin-bottom: 0.5rem; font-size: 1.25rem; color: var(--secondary-foreground); }
.step p { padding-inline: 1rem; color: var(--muted-foreground); }
.step-connector {
  display: none;
  width: 3rem;
  height: 1px;
  border-top: 4px dotted var(--border);
}

/* ---- Contact card -------------------------------------------------------- */
.contact-card {
  position: relative;
  overflow: hidden;
  max-width: 36rem;
  margin-inline: auto;
  border-radius: var(--radius-xl);
  border: 4px solid var(--muted);
  background: var(--card);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-parchment);
}
.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 0 0 0 9999px;
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}
.contact-card h2 {
  position: relative;
  margin-bottom: 1rem;
  font-size: 1.875rem;
  color: var(--secondary-foreground);
}
.contact-card p {
  position: relative;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  padding-top: 3.5rem;
  padding-bottom: 3rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ==========================================================================
   5. Adventures page
   ========================================================================== */
.quest-board-header {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-2xl);
  border: 4px dashed color-mix(in oklab, var(--primary) 40%, transparent);
  background: var(--secondary);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.quest-board-header h1 {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  color: var(--primary);
}
.quest-board-header p {
  margin-inline: auto;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

.campaign-switcher {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.campaign-card {
  border-radius: var(--radius-lg);
  border: 3px solid;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.15s ease;
  width: 100%;
}
.campaign-card:hover { transform: translateY(-4px); }
.campaign-card.is-active { transform: translateY(-4px); }
.campaign-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.campaign-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
}
.campaign-tag {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-foreground);
}
.campaign-card h2 { margin-bottom: 0.25rem; font-size: 1.25rem; }
.campaign-card p { font-size: 0.875rem; color: var(--secondary-foreground); }
.campaign-card-tagline { margin-bottom: 0.75rem; }
.campaign-card-latest {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}
.campaign-card-latest strong { color: var(--foreground); }
.latest-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
}
.campaign-card-progress {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 0.5rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: var(--muted);
}
.campaign-card-progress-fill {
  display: block;
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.campaign-card-meta {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.campaign-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}
.campaign-card-cta::after { content: "\2192"; transition: transform 0.15s ease; }
.campaign-card:hover .campaign-card-cta::after,
.campaign-card:focus-visible .campaign-card-cta::after { transform: translateX(3px); }

.campaign-panel {
  border-radius: var(--radius-xl);
  border: 4px solid;
  background: var(--card);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-parchment);
}
.panel-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.panel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
}
.panel-heading { flex: 1; min-width: 12rem; }
.panel-session-tag {
  border-radius: 9999px;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-foreground);
}
.campaign-eyebrow {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.campaign-panel h2 { margin-bottom: 0.75rem; font-size: 1.875rem; }
.campaign-blurb {
  margin-bottom: 2rem;
  max-width: 48rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--muted);
  color: var(--secondary-foreground);
  transition: background-color 0.15s ease;
}
.tab-btn:hover { background: var(--secondary); }
.tab-btn.is-active { color: var(--primary-foreground); }
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.375rem;
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* World log timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 1.5rem;
  border-left: 4px dotted var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 4px solid var(--card);
  background: var(--border);
}
.timeline li.is-latest::before { background: var(--current-tone, var(--primary)); }
.timeline-session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.timeline-latest-badge {
  border-radius: 9999px;
  padding: 0.0625rem 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.03em;
  color: var(--primary-foreground);
  background: var(--current-tone, var(--primary));
}
.timeline li h3 { font-size: 1.125rem; color: var(--secondary-foreground); }
.timeline li p { line-height: 1.6; color: var(--muted-foreground); }

/* Characters grid */
.characters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.character-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: var(--radius-md);
  border: 3px solid;
  padding: 1.25rem;
}
.character-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-foreground);
}
.character-card-body { flex: 1; min-width: 0; }
.character-card h3 { font-size: 1.125rem; color: var(--secondary-foreground); }
.character-role {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted-foreground);
}
.character-note {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

/* Learning objectives */
.progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.progress-header p { font-family: var(--font-display); font-size: 1.125rem; color: var(--secondary-foreground); }
.progress-pct { font-size: 0.875rem; font-weight: 700; color: var(--muted-foreground); }
.progress-track {
  overflow: hidden;
  width: 100%;
  height: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 9999px;
  background: var(--muted);
}
.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--current-tone, var(--primary));
  transition: width 0.3s ease;
}
.objectives-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.objective {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  padding: 1rem;
}
.objective.is-done {
  border-color: transparent;
  background: var(--muted);
}
.objective-check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: 2px solid;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-foreground);
}
.objective-label { flex: 1; color: var(--secondary-foreground); }
.skill-tag {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-foreground);
}
.objectives-note { font-size: 0.875rem; color: var(--muted-foreground); }

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (min-width: 768px) {
  .hero { padding: 3.5rem; }
  .hero h1 { font-size: 4.5rem; }
  .hero p { font-size: 1.5rem; }
  .tenets-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-direction: row; align-items: flex-start; justify-content: space-around; }
  .step-connector { display: block; margin-top: 2rem; }
  .campaign-switcher { grid-template-columns: repeat(3, 1fr); }
  .characters-grid { grid-template-columns: repeat(2, 1fr); }
  .join-section, .campaign-panel, .quest-board-header { padding: 3rem; }
}
@media (min-width: 1024px) {
  .tenets-grid { grid-template-columns: repeat(3, 1fr); }
}
