/* 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;

  /* Shared motion curves -- the ease-out below is the one this file already reached for by
     hand on every hover lift; naming it means every future addition reaches for the same
     strong curve instead of a fresh literal (or the weak built-in `ease-in-out`, which is
     what the hero glow and legendary panel were using before this). */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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);
  transition: color 0.15s ease;
}

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

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(27, 29, 41, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.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: 2.15rem;
  line-height: 1.15;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
}

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: 32px 36px;
  margin-top: 16px;
}

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

/* Updates page: collapsible history entries, newest expanded by default. */

.update-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 16px;
}

.update-entry + .update-entry {
  margin-top: 20px;
}

.update-entry summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 48px 20px 24px;
  position: relative;
}

.update-entry summary::-webkit-details-marker {
  display: none;
}

.update-entry summary::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.15s ease;
}

.update-entry[open] summary::after {
  transform: translateY(-35%) rotate(-135deg);
}

.update-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.update-title-row svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex-shrink: 0;
}

.update-title {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.update-entry summary .effective-date {
  margin-bottom: 0;
  flex-shrink: 0;
}

.update-entry > p {
  margin: 0;
  padding: 0 24px 24px;
}

.update-entry > p:has(+ .update-fix-list),
.update-entry > p:has(+ .update-feature-grid) {
  padding-bottom: 8px;
}

/* Fix entries: a formal checklist of what got fixed, not another paragraph. */

.update-fix-list {
  list-style: none;
  margin: 0;
  padding: 4px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.update-fix-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.update-fix-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Feature entries: highlight cards instead of plain text. */

.update-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 4px 24px 24px;
}

.update-feature-item {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: transform 0.22s var(--ease-out), border-color 0.18s ease;
}

.update-feature-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .update-feature-item {
    transition: none;
  }
}

ul {
  padding-left: 20px;
}

.hero {
  position: relative;
  padding: 72px 24px 48px;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 1040px;
  margin: 0 auto;
}

.hero-copy {
  flex: 1;
  min-width: 280px;
}

.hero-visual {
  flex-shrink: 0;
}

/* A soft breathing glow behind the phone -- the same opacity/scale pulse the app's own
   useGlowPulse drives for top-rank avatar halos, so the site's hero feels like it belongs
   to the same product rather than a static poster of it. Anchored to the phone (the hero's
   actual visual focus) rather than centered over the whole section. */
.hero::before {
  content: '';
  position: absolute;
  top: 8%;
  right: 8%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(237, 109, 93, 0.32), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
  animation: heroGlowPulse 5s var(--ease-in-out) infinite;
}

@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.hero-copy p {
  max-width: 460px;
  margin: 16px 0 24px;
  font-size: 1.1rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 22px;
}

.hero-trust span[aria-hidden] {
  opacity: 0.5;
}

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

@media (max-width: 860px) {
  .hero-grid {
    flex-direction: column;
    text-align: center;
  }

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

  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row,
  .hero-trust {
    justify-content: center;
  }

  .hero::before {
    top: -10px;
    right: 50%;
    transform: translateX(50%);
  }
}

.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;
  transition: background-color 0.18s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.18s ease;
}

.button:hover {
  background: var(--gold);
  color: #12131a;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -10px rgba(227, 179, 78, 0.55);
}

/* Press feedback: the CTA had a hover lift but nothing confirming a tap actually landed.
   Scale down from wherever the hover lift left it, on a much snappier duration than the
   250ms hover -- a press should read as instant. */
.button:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.1s;
}

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

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--text);
  background: transparent;
  box-shadow: 0 10px 24px -14px rgba(237, 109, 93, 0.4);
}

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;
}

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;
  font-size: 1.55rem;
  letter-spacing: 0.3px;
  margin: 84px 0 8px;
}

.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;
}

/* Hero phone: a slightly larger frame since it's the hero's visual anchor rather than a
   supporting detail. */
.hero-phone {
  width: 280px;
}

.feed-screen-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 12px;
}

/* An infinite vertical marquee: the track holds the feed items twice back-to-back and
   scrolls by exactly half its own height, so the loop point is invisible -- no JS needed to
   measure anything. Paused on hover/focus so it's easy to actually read an item. */
.feed-scroll-viewport {
  position: relative;
  height: 380px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
}

.feed-scroll-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: feedAutoScroll 24s linear infinite;
}

.feed-scroll-viewport:hover .feed-scroll-track,
.feed-scroll-viewport:focus-within .feed-scroll-track {
  animation-play-state: paused;
}

@keyframes feedAutoScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.mini-feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tier-color, var(--accent));
  border-radius: 12px;
  padding: 10px 12px;
  flex-shrink: 0;
}

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

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

.mini-feed-names {
  min-width: 0;
}

.mini-feed-name {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-feed-sender {
  color: var(--text-dim);
  font-size: 0.62rem;
  display: block;
}

.mini-feed-title {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.mini-feed-tier {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--tier-color, var(--accent));
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

.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;
  transition: transform 0.22s var(--ease-out), border-color 0.18s ease;
}

.tier-chip:hover {
  transform: translateY(-3px);
  border-color: var(--chip-color, var(--accent));
}

.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;
}

/* The glow tier (Gold/Blaze) is the one difference from the standard ring that this ladder
   exists to show off, and a static halo undersells it -- the real Avatar in the app breathes
   (useGlowPulse). Same duration/curve as the hero's own glow for consistency, staggered
   between bloom and glow so the two rings don't pulse in flat unison. */
.frame-demo.glow .fr-bloom {
  animation: frameBloomPulse 2.6s var(--ease-in-out) infinite;
}

.frame-demo.glow .fr-glow {
  animation: frameGlowPulse 2.6s var(--ease-in-out) infinite;
  animation-delay: -0.3s;
}

@keyframes frameBloomPulse {
  0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.17; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes frameGlowPulse {
  0%, 100% { opacity: 0.22; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.36; transform: translate(-50%, -50%) scale(1.05); }
}

.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;
  transition: transform 0.22s var(--ease-out), border-color 0.18s ease;
}

.legendary-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.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;
  transition: transform 0.22s var(--ease-out), border-color 0.18s ease;
}

.badge-tile:hover {
  transform: translateY(-3px);
  border-color: var(--badge-color, var(--accent));
}

.badge-tile.legacy:hover {
  border-color: var(--gold);
}

.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);
  transition: transform 0.22s var(--ease-out), border-color 0.18s ease, color 0.18s ease;
}

.category-pill:not(.more):hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}

.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;
}

/* ---------------------------------------------------------------- Scroll reveal
   `reveal.js` adds `js-reveal` to <html> only once it has confirmed IntersectionObserver
   is available -- so a [data-reveal] element's default state (below) is fully visible, and
   only ever starts hidden once JS has actually taken over showing it again. That keeps
   content visible to no-JS visitors and crawlers, per the "don't hide below-the-fold
   content by default" rule this pattern is otherwise prone to. */
[data-reveal] {
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

.js-reveal [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
