/* SideQuest marketing/legal site — tokens mirror src/theme/tokens.ts in the app repo,
   so this site reads as the same product rather than a generic legal-page template. */

:root {
  --bg: #12131a;
  --surface: #1b1d29;
  --surface-raised: #23253a;
  --border: #2a2d40;
  --accent: #ed6d5d;
  --accent-dim: #b8503f;
  --secondary: #2a5053;
  --text: #f5f6fa;
  --text-dim: #8a8fa3;
  --gold: #e3b34e;
  --max-width: 780px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--gold);
}

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.3px;
}

.brand .mark {
  font-size: 1.4rem;
  color: var(--accent);
}

.mark svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: currentColor;
}

.site-header .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-header .links a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-header .links a:hover,
.site-header .links a[aria-current='page'] {
  color: var(--text);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  margin: 0 0 8px;
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  margin: 40px 0 12px;
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
  color: var(--text);
}

p,
li {
  color: var(--text-dim);
}

.lede {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-top: 0;
}

.effective-date {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 32px;
  display: inline-block;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-top: 16px;
}

.card + .card {
  margin-top: 20px;
}

ul {
  padding-left: 20px;
}

.hero {
  text-align: center;
  padding: 64px 24px 32px;
}

.hero .mark {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
}

.hero h1 {
  font-size: 2.4rem;
}

.hero p {
  max-width: 520px;
  margin: 16px auto 28px;
  font-size: 1.1rem;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #12131a;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.button:hover {
  background: var(--gold);
  color: #12131a;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer.site-footer a {
  color: var(--text-dim);
  text-decoration: underline;
}

footer.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.notice {
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------- Homepage teaser sections */

/* How-it-works: a connected horizontal timeline rather than a card grid, since these are
   sequential steps (send -> accept -> verify -> feed), not independent features. */

.flow-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.flow-track::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent-dim) 50%, var(--border));
  z-index: 0;
}

.flow-node {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.flow-circle {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.flow-circle svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
}

.flow-circle .flow-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #12131a;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-node h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--text);
}

.flow-node p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 175px;
}

@media (max-width: 720px) {
  .flow-track {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .flow-track::before {
    display: none;
  }

  .flow-node {
    flex-direction: row;
    text-align: left;
    gap: 14px;
  }

  .flow-node p {
    max-width: none;
  }
}

/* Legendary "resets monthly" panel: a fanned two-card stack showing a different month's
   pick behind the current one, so the rotation is something you see, not just read. */

.legendary-panel {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(227, 179, 78, 0.1), var(--surface) 65%);
  border: 1px solid rgba(227, 179, 78, 0.35);
  border-radius: 20px;
  padding: 32px;
  margin-top: 40px;
}

.legendary-panel-copy {
  flex: 1;
  min-width: 240px;
}

.legendary-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.legendary-tag svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.legendary-panel-copy h3 {
  margin: 0 0 8px;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--text);
}

.legendary-panel-copy p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 420px;
}

.legendary-stack {
  position: relative;
  width: 230px;
  height: 140px;
  flex-shrink: 0;
}

.legendary-stack-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid rgba(227, 179, 78, 0.4);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.55);
}

.legendary-stack-card.back {
  transform: rotate(-7deg) translate(-6px, 4px);
  opacity: 0.55;
}

.legendary-stack-card.front {
  transform: rotate(3deg);
}

.legendary-stack-card .lg-month {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.legendary-stack-card .lg-title {
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

/* The Feed mockup */

.feed-mock {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 440px;
  margin: 0 auto;
}

.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tier-color, var(--accent));
  border-radius: 14px;
  padding: 16px;
}

.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.feed-names strong {
  color: var(--text);
  font-size: 0.85rem;
  display: block;
}

.feed-names span {
  display: block;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-top: 2px;
}

.feed-proof {
  position: relative;
  width: 100%;
  height: 130px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--tier-color, var(--accent)), var(--surface-raised) 85%);
  overflow: hidden;
}

.feed-proof svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  fill: rgba(255, 255, 255, 0.4);
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feed-title svg {
  width: 13px;
  height: 13px;
  fill: var(--text-dim);
  flex-shrink: 0;
}

.feed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tier-color, var(--accent));
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.feed-tier svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.feed-date {
  font-size: 0.72rem;
  color: var(--text-dim);
}

main.wide {
  max-width: 1040px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(237, 109, 93, 0.12);
  border: 1px solid rgba(237, 109, 93, 0.35);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}

.section-heading {
  text-align: center;
  margin: 72px 0 6px;
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  margin: 0 auto 36px;
  font-size: 0.98rem;
  max-width: 520px;
}

/* Sneak peek: phone mockup + tier chips side by side */

.sneak-peek {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.phone-mock {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1e2030, #15161f);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.phone-notch {
  width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 auto 14px;
}

.phone-screen {
  background: var(--bg);
  border-radius: 20px;
  padding: 18px 16px 20px;
}

.mock-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mock-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 14px 2px rgba(227, 179, 78, 0.55);
  flex-shrink: 0;
}

.mock-name-row {
  flex: 1;
  min-width: 0;
}

.mock-name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-level {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: var(--gold);
  background: rgba(227, 179, 78, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.mock-xpbar {
  margin-top: 7px;
  height: 6px;
  border-radius: 999px;
  background: var(--track, #23253a);
  overflow: hidden;
}

.mock-xpfill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
}

.mock-streak {
  font-size: 0.85rem;
  color: #ffc861;
  font-weight: 700;
  white-space: nowrap;
}

.mock-quest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tier-color, var(--accent));
  border-radius: 14px;
  padding: 14px 16px;
}

.mock-quest-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tier-color, var(--accent));
  margin-bottom: 10px;
}

.mock-quest-head svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.mock-quest-title {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
}

.mock-quest-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.mock-quest-cat svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.mock-quest-cta {
  text-align: center;
  background: var(--accent);
  color: #12131a;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 9px;
  border-radius: 999px;
}

.showcase-col {
  flex: 1;
  min-width: 280px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tier-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tier-chip {
  flex: 1;
  min-width: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}

.tier-chip svg {
  width: 22px;
  height: 22px;
  fill: var(--chip-color, var(--accent));
  margin-bottom: 8px;
}

.tier-chip .tier-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.tier-chip .tier-xp {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.ladder-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* Rank ladder: one badge line climbing green -> blue -> purple -> orange */

.rank-ladder {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rank-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--rank-color);
  color: var(--rank-color);
  flex-shrink: 0;
}

.rank-dot svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.rank-arrow {
  color: var(--border);
  font-size: 1rem;
}

/* Avatar frame ladder: same five colours, standard ring then a glowing ring at higher
   levels. The glow tier reproduces the app's actual three-layer falloff exactly (see
   Avatar's `layer()` helper in src/components/ui.tsx) rather than a flat CSS blur --
   bloom (1.52x, 10%), glow (1.24x, 22%), rim (1.09x, 60% border-only) -- so this is a
   true preview of the real effect, not a web-only approximation of it. */

.frame-ladder {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.frame-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.frame-demo {
  position: relative;
  width: 44px;
  height: 44px;
}

.frame-demo .fr-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--ring-color);
}

.frame-demo .fr-bloom {
  width: 67px;
  height: 67px;
  opacity: 0.1;
}

.frame-demo .fr-glow {
  width: 55px;
  height: 55px;
  opacity: 0.22;
}

.frame-demo .fr-rim {
  width: 48px;
  height: 48px;
  background: none;
  border: 1.5px solid var(--ring-color);
  opacity: 0.6;
}

.frame-demo .fr-disc {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--ring-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.frame-demo.glow .fr-disc {
  border-width: 3px;
}

.frame-col .frame-level {
  font-size: 0.66rem;
  color: var(--text-dim);
}

/* Legendary quest showcase */

.legendary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.legendary-card {
  background: linear-gradient(160deg, rgba(227, 179, 78, 0.1), var(--surface) 60%);
  border: 1px solid rgba(227, 179, 78, 0.35);
  border-radius: 16px;
  padding: 20px 22px;
}

.legendary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.legendary-head svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.legendary-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

.legendary-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 20px;
}

/* Badge wall */

.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px;
}

.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 10px;
}

.badge-tile svg {
  width: 26px;
  height: 26px;
  fill: var(--badge-color, var(--accent));
}

.badge-tile span {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.badge-tile.legacy {
  border-color: rgba(227, 179, 78, 0.4);
  box-shadow: 0 0 0 1px rgba(227, 179, 78, 0.15) inset;
}

.badge-tile.legacy span {
  color: var(--gold);
  font-weight: 600;
}

/* Category strip */

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.category-pill svg {
  width: 15px;
  height: 15px;
  fill: var(--accent);
  flex-shrink: 0;
}

.category-pill.more {
  color: var(--text-faint, var(--text-dim));
  border-style: dashed;
}
