/* QuizJoust website — "Heraldic Glass" (docs/DESIGN.md). Shared by every page. */

/* Fonts are served from this site (no request to Google Fonts: store/DATA_SAFETY.md G10).
   Latin subsets of design/fonts (SIL Open Font License, fonts/OFL.txt). */
@font-face { font-family: "Cinzel"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Cinzel_700Bold.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/Cinzel_800ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 900; font-style: normal; font-display: swap; src: url("/fonts/Cinzel_900Black.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/SourceSans3_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/SourceSans3_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/SourceSans3_700Bold.woff2") format("woff2"); }

:root {
  --sky-top: #1a1428;
  --sky-bottom: #0d0a12;
  --ink: #140f1d;
  --crest-fill: #2a1f3a;
  --parchment: #f5eedf;
  --parchment-muted: #cfc4ae;
  --parchment-faint: #bfb4a0;
  --gold: #e8c578;
  --gold-light: #f2d58e;
  --gold-deep: #c99b3e;
  --gold-on-gold: #1e1405;
  --crimson: #b23a48;
  --glass-fill: rgba(255, 240, 220, 0.06);
  --glass-border: rgba(232, 197, 120, 0.34);
  --glass-highlight: inset 0 1px 0 rgba(255, 236, 200, 0.15);
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85);
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--sky-bottom);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--parchment);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%) fixed;
  overflow-x: hidden;
  position: relative;
}

/* Glow blobs behind the glass. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(115px);
  pointer-events: none;
}
body::before {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -140px;
  background: var(--gold);
  opacity: 0.22;
}
body::after {
  width: 560px;
  height: 560px;
  bottom: -200px;
  left: -180px;
  background: var(--crimson);
  opacity: 0.28;
}

a {
  color: var(--gold);
  text-decoration-color: rgba(232, 197, 120, 0.45);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--gold-light);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header / footer ------------------------------------------------------ */

.site-header {
  padding: 22px 0 10px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--parchment);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand svg {
  width: 26px;
  height: 30px;
  flex: none;
}
.brand:hover {
  color: var(--gold-light);
}

.site-footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(232, 197, 120, 0.18);
  font-size: 14px;
  color: var(--parchment-faint);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 10px;
}
.site-footer a {
  color: var(--parchment-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--gold);
}

/* ---- Type ----------------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(40px, 11vw, 64px);
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 0;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  letter-spacing: 0.04em;
  line-height: 1.25;
}
h1 {
  font-weight: 800;
  font-size: clamp(26px, 6vw, 34px);
  margin: 0 0 6px;
}
h2 {
  font-weight: 800;
  font-size: 19px;
  margin: 40px 0 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Lance divider after section titles. */
h2::after {
  content: "";
  flex: 1;
  height: 8px;
  min-width: 40px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M0 0L10 4L0 8z' fill='%23E8C578'/%3E%3C/svg%3E")
      right center / 10px 8px no-repeat,
    linear-gradient(rgba(232, 197, 120, 0.5), rgba(232, 197, 120, 0.5)) left center / calc(100% - 9px) 1px no-repeat;
}
h3 {
  font-weight: 700;
  font-size: 16px;
  margin: 22px 0 6px;
  color: var(--gold-light);
}
p,
li {
  color: var(--parchment-muted);
}
strong {
  color: var(--parchment);
  font-weight: 600;
}
.lede {
  font-size: 18px;
  color: var(--parchment);
}
.muted {
  color: var(--parchment-faint);
  font-size: 14px;
}

/* Placeholder text the owner must replace before publishing. */
.todo {
  background: rgba(178, 58, 72, 0.28);
  border: 1px dashed rgba(232, 197, 120, 0.7);
  border-radius: 6px;
  padding: 0 6px;
  color: var(--gold-light);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---- Glass ---------------------------------------------------------------- */

.glass {
  position: relative;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-highlight), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  padding: 28px 22px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(30, 22, 40, 0.82);
  }
}
.glass.framed::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(232, 197, 120, 0.13);
  border-radius: 18px;
  pointer-events: none;
}
.glass > :first-child {
  margin-top: 0;
}
.glass > :last-child {
  margin-bottom: 0;
}
@media (min-width: 600px) {
  .glass {
    padding: 36px 40px;
  }
}

.diamond {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto;
  max-width: 180px;
}
.diamond::before,
.diamond::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(232, 197, 120, 0.55);
}
.diamond span {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---- Buttons & badges ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  color: var(--gold-on-gold);
  box-shadow: 0 10px 24px -12px rgba(232, 197, 120, 0.7);
}
.btn-gold:hover {
  color: var(--gold-on-gold);
  filter: brightness(1.06);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--parchment);
  font-family: var(--sans);
  font-weight: 600;
}
.btn-ghost:hover {
  color: var(--parchment);
  border-color: var(--gold);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 176px;
  padding: 9px 18px 9px 14px;
  border-radius: 12px;
  background: rgba(10, 8, 16, 0.75);
  border: 1px solid rgba(232, 197, 120, 0.4);
  color: var(--parchment);
  text-decoration: none;
  line-height: 1.15;
}
.badge:hover {
  border-color: var(--gold);
  color: var(--parchment);
}
.badge svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.badge small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--parchment-faint);
}
.badge b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

/* ---- Landing -------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 26px 0 8px;
}
.hero .scene {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto 6px;
  aspect-ratio: 440 / 330;
}
.hero .scene img,
.invite .knight {
  width: 100%;
  height: 100%;
  display: block;
  /* Let the ground fade into the page instead of ending in a hard edge. */
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 72%, transparent), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.hero .tagline {
  font-size: clamp(17px, 4.4vw, 20px);
  color: var(--parchment);
  max-width: 30ch;
  margin: 14px auto 26px;
}

.facts {
  text-align: center;
  color: var(--parchment);
  opacity: 0.75;
  font-size: 14px;
  max-width: 52ch;
  margin: -14px auto 22px;
}

.features {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 40px;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.features .glass {
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255, 240, 220, 0.05);
  border-color: rgba(232, 197, 120, 0.26);
  box-shadow: var(--glass-highlight);
}
.features h3 {
  margin: 10px 0 4px;
}
.features p {
  margin: 0;
  font-size: 15px;
}
.features svg {
  width: 34px;
  height: 34px;
}

/* ---- Legal pages ---------------------------------------------------------- */

.legal {
  margin-top: 18px;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin: 4px 0;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 10px 0;
  display: block;
  overflow-x: auto;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(232, 197, 120, 0.16);
  color: var(--parchment-muted);
}
.legal th {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.legal td:first-child {
  color: var(--parchment);
  font-weight: 600;
  min-width: 120px;
}
/* Phones: each row becomes a small card. */
@media (max-width: 599px) {
  .legal table,
  .legal tbody,
  .legal tr,
  .legal td {
    display: block;
  }
  .legal thead {
    display: none;
  }
  .legal tr {
    padding: 14px 0;
    border-bottom: 1px solid rgba(232, 197, 120, 0.16);
  }
  .legal td {
    border: 0;
    padding: 2px 0;
  }
  .legal td:first-child {
    font-family: var(--serif);
    color: var(--gold-light);
    margin-bottom: 4px;
  }
  .legal td:nth-child(2)::before,
  .legal td:nth-child(3)::before {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 6px;
  }
  .legal td:nth-child(2)::before {
    content: "What it is";
  }
  .legal td:nth-child(3)::before {
    content: "Why we use it";
  }
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--parchment-faint);
}
.toc {
  columns: 2 220px;
  font-size: 15px;
  padding-left: 1.2em;
}
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: 14px 0;
}
ol.steps li::before {
  content: counter(step, upper-roman);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  font-family: var(--serif);
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}

/* ---- Invite --------------------------------------------------------------- */

.invite {
  text-align: center;
  margin-top: 18px;
}
.invite .knight {
  width: 150px;
  height: auto;
  margin: 0 auto 4px;
  display: block;
}
.code {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 9vw, 44px);
  letter-spacing: 0.16em;
  color: var(--gold-light);
  margin: 6px 0 2px;
  word-break: break-all;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 8px;
}
.hidden {
  display: none !important;
}

/* ---- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 250ms ease-out both;
  }
  .rise:nth-child(2) {
    animation-delay: 40ms;
  }
  .rise:nth-child(3) {
    animation-delay: 80ms;
  }
  .rise:nth-child(4) {
    animation-delay: 120ms;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

.watch{display:inline-flex;align-items:center;gap:6px;margin-top:18px;color:#E8C578;font-weight:600;text-decoration:none;border-bottom:1px solid rgba(232,197,120,.4);padding-bottom:2px}
.watch:hover,.watch:focus-visible{border-bottom-color:#E8C578}
.watch svg{width:1em;height:1em;flex:none}
