/* The fonts, served from fonts/ beside the page (Latin only; each under the SIL Open Font License,
   its OFL-*.txt there): Cinzel for titles, Spectral for text, Marcellus for the buttons. */
@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url("fonts/cinzel-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 900; font-display: swap; src: url("fonts/cinzel-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-display: swap; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-display: swap; src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Marcellus"; font-weight: 400; font-display: swap; src: url("fonts/marcellus-latin-400-normal.woff2") format("woff2"); }

:root {
  --night: #060403;
  --stone: #17120d;
  --gold: #f2c65a;
  --gold-deep: #b8862e;
  --wow-yellow: #ffd200;
  --ember: #ff7a2f;
  --parchment: #ece0c3;
  --muted: #a4977a;
  --ink: #1e1206;
  --ink-soft: #2c1b0a;
  --bronze: #8c6b45;
  --alliance: #3f6fd8;
  --horde: #c0352b;
  --line: rgba(242, 198, 90, 0.28);

  /* Textures, drawn by SVG noise as the game's are painted: fine grain for every dark surface, worn
     stone (grain on faint warm blotches) behind the page, and parchment for the scrolls. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter color-interpolation-filters='sRGB' id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0 0 0 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --stone-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2560' height='2560'%3E%3Cfilter color-interpolation-filters='sRGB' id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011' numOctaves='5' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.4 0 0 0 0 0.25 0.18 0 0 0 -0.06'/%3E%3C/filter%3E%3Cfilter color-interpolation-filters='sRGB' id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0 0 0 -0.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --parchment-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter color-interpolation-filters='sRGB' id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.018' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.29 0 0 0 0 0.12 0.9 0 0 0 -0.36'/%3E%3C/filter%3E%3Cfilter color-interpolation-filters='sRGB' id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7 0.12' numOctaves='3' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.22 0 0 0 0 0.08 0.6 0 0 0 -0.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%23b6a37b'/%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--parchment);
  font: 18px/1.65 "Spectral", Georgia, serif;
  background: var(--night);
  min-height: 100vh;
  overflow-x: hidden;
}
/* The stone, held still behind the page: one large tile covers the window, so it never shows a seam
   or repeats as the page scrolls. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--stone-tex) center / 2560px 2560px;
}
h1, h2, h3, h4, .brand, .kicker, .stats strong, .sigil {
  font-family: "Cinzel", "Trajan Pro", Georgia, serif;
  letter-spacing: 0.04em;
}
a { color: inherit; }

/* The wisps, drawn by app.js behind everything */
.embers { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

header, main, footer { position: relative; z-index: 1; }

/* Top bar */
.top {
  display: flex; align-items: center; gap: 22px;
  max-width: 1160px; margin: 0 auto; padding: 22px 24px;
}
.mark svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
/* The emblem's sound wave moves as a subtitle card's does while its character speaks. */
.mark .bars path { stroke-width: 2.8; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: speak 1.1s ease-in-out infinite; }
.mark .bars path:nth-child(2) { animation-delay: 0.18s; }
.mark .bars path:nth-child(3) { animation-delay: 0.36s; }
.mark .bars path:nth-child(4) { animation-delay: 0.54s; }
@keyframes speak { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.35); } }
.brand { font-weight: 700; color: var(--gold); margin-right: auto; font-size: 1.05rem; }
.nav-link { text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover { color: var(--gold); }

/* Hero */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  max-width: 1160px; margin: 0 auto; padding: 48px 24px 24px;
}
.kicker { color: var(--ember); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.22em; margin: 0 0 14px; }
h1 {
  margin: 0; line-height: 1.02; font-weight: 900; font-size: clamp(2.8rem, 6.4vw, 5.2rem);
  color: var(--gold); text-shadow: 0 2px 0 #000;
}
h1 span { display: block; font-size: 0.48em; letter-spacing: 0.32em; font-weight: 700; margin-top: 10px; color: var(--parchment); }
.tagline { font-size: 1.3rem; color: var(--parchment); max-width: 30ch; margin: 22px 0 30px; }
.tagline em { color: var(--gold); font-style: italic; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* The game's red button: a bronze frame with a light inner edge, a black gap, and a mottled red face,
   corners cut. Hovered it lights up; held down the face sinks (dark at the top, the label dimmed and
   moved by a pixel). */
.button, .button::before, .button::after, .features article, .how li {
  /* each layer's own corners: set here, so that --cut is its own */
  --octagon: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.button {
  --cut: 6px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 11px 30px 12px;
  font: 400 1.12rem/1 "Friz Quadrata TT", "Friz Quadrata", "Marcellus", Georgia, serif;
  letter-spacing: 0.05em; text-decoration: none;
  color: var(--wow-yellow);
  text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 1px #000;
  clip-path: var(--octagon);
  background: var(--grain), linear-gradient(180deg, #a5865f 0%, #8f6e47 45%, #5e4120 100%);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.button::before, .button::after { content: ""; position: absolute; z-index: -1; clip-path: var(--octagon); }
.button::before {  /* the frame's light inner edge */
  inset: 2px; --cut: 5px;
  background: linear-gradient(180deg, #ddcab0, #b49a77 50%, #7a5c36);
}
.button::after {  /* the face */
  inset: 3px; --cut: 4.5px;
  border: 1px solid #040100;
  background:
    var(--grain),
    linear-gradient(180deg, #9c0705 0, #8a0503 2px, #6c0101 4px, #680000 55%, #590000 82%, #300101 100%);
}
.button:hover::after { filter: brightness(1.28) saturate(1.1); }
.button:active { color: #8f7a00; padding: 12px 29px 11px 31px; }
.button:active::after {
  filter: none;
  background:
    var(--grain),
    linear-gradient(180deg, #050000 0, #050000 3px, #7a0a08 4px, #3a0101 6px, #390101 60%, #260101 100%);
}
.button:focus-visible { outline: none; }
.button:focus-visible::before { background: var(--wow-yellow); }
.button svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(1px 1px 0 #000);
}
.fineprint { color: var(--muted); font-size: 0.9rem; margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
/* The claims apart: a small gold diamond between each, as in the FAQ. */
.fineprint span + span::before { content: "\25C6"; color: var(--gold-deep); font-size: 0.6em; margin: 0 0.9em; vertical-align: 0.2em; }

/* A dark panel in a thin bronze frame, as the game's windows */
.stage, .faction {
  background: var(--grain), rgba(14, 10, 7, 0.88);
  border: 1px solid #000; outline: 2px solid var(--bronze); outline-offset: -3px;
}

/* The subtitle cards, as the addon shows them */
.stage { position: relative; min-height: 360px; padding: 28px; }
.card-slot { display: flex; flex-direction: column; gap: 14px; }
.card {
  --class: var(--gold);
  display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 12px 14px 14px;
  background: rgba(6, 5, 4, 0.82); border: 1px solid rgba(255, 255, 255, 0.07); border-left: 3px solid var(--class);
  border-radius: 3px; position: relative; overflow: hidden;
  animation: card-in 0.5s ease both;
}
.card.out { animation: card-out 0.6s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes card-out { to { opacity: 0; transform: translateX(-16px); } }
.card .icon {
  grid-row: span 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font: 700 0.95rem "Cinzel", serif; color: #0b0a08;
  background: var(--class); border: 2px solid #000; outline: 1px solid var(--bronze);
}
.card .who { display: flex; align-items: baseline; gap: 10px; font-family: "Cinzel", serif; }
.card .name { color: var(--class); font-weight: 700; }
.card .where { color: #7fa7ff; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.card .wave { margin-left: auto; display: flex; gap: 3px; align-items: center; height: 14px; }
.card .wave i { width: 3px; background: var(--class); border-radius: 2px; animation: wave 0.9s ease-in-out infinite; }
.card .wave i:nth-child(2) { animation-delay: 0.15s; }
.card .wave i:nth-child(3) { animation-delay: 0.3s; }
.card .wave i:nth-child(4) { animation-delay: 0.45s; }
.card.done .wave i { animation: none; height: 3px; opacity: 0.4; }
@keyframes wave { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.card .text { color: rgba(236, 224, 195, 0.45); font-size: 1rem; line-height: 1.45; }
.card .text b { font-weight: 400; transition: color 0.2s; }
.card .text b.said { color: #fffaf0; }
.card .progress { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--class); width: 0; opacity: 0.8; }

/* Stats */
.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1160px; margin: 34px auto 0; padding: 22px 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats li { text-align: center; }
.stats strong { display: block; font-size: 2.2rem; color: var(--gold); line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
main { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
section { padding: 70px 0 10px; }
h2 { text-align: center; color: var(--gold); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 36px; }
h2 span { display: inline-block; position: relative; padding: 0 56px; }
h2 span::before, h2 span::after {
  content: ""; position: absolute; top: 50%; width: 44px; height: 1px; background: var(--gold-deep);
}
h2 span::before { left: 0; }
h2 span::after { right: 0; }

/* Parchment, as quest text and letters in the game: dark ink on worn paper, edges browned, in the
   buttons' frame in silver (its light inner edge, a black gap; corners cut). */
.features article, .how li {
  --cut: 6px;
  color: var(--ink-soft);
  border: 3px solid transparent;
  background:
    var(--parchment-tex) padding-box,
    var(--grain) border-box,
    linear-gradient(180deg, #9aa0a7 0%, #6f767e 45%, #3c4147 100%) border-box;
  box-shadow: inset 0 0 0 1px #b9bfc6, inset 0 0 0 2px #040100, inset 0 0 18px rgba(105, 62, 20, 0.45);
  clip-path: var(--octagon);
}

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.features article { padding: 26px 22px; }
.sigil {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 14px; line-height: 1;
  color: #7a1408; border: 1px solid #7a1408; transform: rotate(45deg); font-size: 0.9rem;
}
.features h3 { color: var(--ink); font-size: 1.1rem; margin: 0 0 8px; }
.features p { margin: 0; font-size: 0.98rem; }

.how ol { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0; margin: 0; }
.how li { counter-increment: step; position: relative; padding: 76px 22px 24px; }
.how li::before {  /* inside the frame: its cut corners clip whatever reaches out */
  content: counter(step); position: absolute; top: 18px; left: 22px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; font: 900 1.2rem "Cinzel", serif;
  color: var(--wow-yellow); background: var(--grain), #6a0101;
  border: 1px solid #000; outline: 3px solid var(--bronze);
}
.how b { display: block; color: var(--ink); font-family: "Cinzel", serif; margin-bottom: 6px; }

.factions { display: grid; grid-template-columns: 1fr 0.7fr 1fr; gap: 18px; }
.faction { padding: 22px; }
.faction h4 { margin: 0 0 8px; font-size: 1.15rem; }
.faction p { margin: 0; color: var(--muted); }
.alliance { border-top: 4px solid var(--alliance); }
.alliance h4 { color: #8fb0ff; }
.horde { border-top: 4px solid var(--horde); }
.horde h4 { color: #ff8a7e; }
.neutral { border-top: 4px solid var(--gold-deep); }
.neutral h4 { color: var(--gold); }
.note { text-align: center; color: var(--muted); font-style: italic; margin-top: 20px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 4px; }
.faq summary { cursor: pointer; font-family: "Cinzel", serif; color: var(--parchment); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "\25C6"; color: var(--gold-deep); margin-right: 12px; font-size: 0.8rem; display: inline-block; transition: transform 0.2s; }
.faq details[open] summary::before { transform: rotate(45deg); color: var(--gold); }
.faq p { color: var(--muted); margin: 8px 0 0 26px; }

.final { text-align: center; padding-bottom: 80px; }
.final h2 { margin-bottom: 26px; }

footer { text-align: center; color: #6f6550; font-size: 0.8rem; padding: 28px 24px 40px; border-top: 1px solid rgba(242, 198, 90, 0.12); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .factions { grid-template-columns: 1fr; }
  .nav-link { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .top, .hero-grid, main { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 18px 16px; }
  .features, .how ol { grid-template-columns: 1fr; }
  .how ol { gap: 20px; }
  .stage { padding: 18px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .embers { display: none; }
  .card, .card.out { animation: none; }
  .card .wave i { animation: none; height: 8px; }
  .mark .bars path { animation: none; }
  html { scroll-behavior: auto; }
}
