/*
 * Forever Guild Command — marketing site styles.
 *
 * Palette is closed: crimson #b8323c, antique gold #c49a6c, warm neutrals.
 * No yellow and no green anywhere, including glows and focus rings (the
 * build script enforces this). Display type is a bundled-system serif stack so
 * the site degrades gracefully with zero webfont requests.
 */

:root {
  color-scheme: dark;

  --bg: #0b0a0c;
  --bg-alt: #131115;
  --card: #1a171d;

  --text: #f2eee9;
  --muted: #a89f99;

  --crimson: #b8323c;
  --crimson-dark: #a02a33;
  --gold: #c49a6c;

  --hairline: rgba(196, 154, 108, 0.22);
  --hairline-strong: rgba(196, 154, 108, 0.44);
  --crimson-soft: rgba(184, 50, 60, 0.16);
  --gold-soft: rgba(196, 154, 108, 0.1);

  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --wrap: 70rem;
  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 70% at 50% -20%, rgba(184, 50, 60, 0.12), transparent 62%),
    radial-gradient(90% 60% at 100% 0%, rgba(196, 154, 108, 0.07), transparent 66%),
    radial-gradient(80% 60% at 0% 20%, rgba(184, 50, 60, 0.05), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fine grain and a soft vignette, both pure CSS (no image requests). */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

body::before {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(242, 238, 233, 0.035) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.5;
}

body::after {
  background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

img {
  max-width: 100%;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0 0 0.55em;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 5.2vw, 3.5rem);
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 1rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--gold);
}

/* ------------------------------------------------------------------------- */
/* Shared primitives                                                          */
/* ------------------------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--gold);
  font-style: italic;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--gold);
  color: #16110c;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

[id] {
  scroll-margin-top: 6rem;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease;
}

.btn--crimson {
  background-color: var(--crimson);
  border-color: var(--crimson);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(184, 50, 60, 0.28), 0 18px 36px -26px rgba(184, 50, 60, 0.9);
}

.btn--crimson:hover {
  background-color: var(--crimson-dark);
  border-color: var(--crimson-dark);
  transform: translateY(-1px);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--hairline-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background-color: var(--gold-soft);
  border-color: var(--gold);
}

.btn--sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.link-strong {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 0.1em;
}

.link-strong:hover {
  color: var(--text);
  border-bottom-color: var(--gold);
}

/* ------------------------------------------------------------------------- */
/* Header                                                                    */
/* ------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(11, 10, 12, 0.94);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark sup {
  margin-left: 0.1em;
  font-size: 0.5em;
  letter-spacing: 0;
  color: var(--gold);
}

.wordmark--footer {
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1.3rem;
}

.nav a {
  padding-block: 0.3rem;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav a:hover {
  color: var(--text);
  border-bottom-color: var(--hairline-strong);
}

.nav .btn {
  color: var(--text);
  border-bottom: 1px solid var(--crimson);
}

.nav .btn:hover {
  border-bottom-color: var(--crimson-dark);
}

/* ------------------------------------------------------------------------- */
/* Hero                                                                      */
/* ------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

.hero h1 {
  margin-bottom: 0.8rem;
}

.lede {
  max-width: 48ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

/* Frames: 16:9 with a placeholder that shows when the .webp is absent ------ */

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background-color: var(--card);
  background-image:
    radial-gradient(circle at 50% 40%, rgba(184, 50, 60, 0.16), transparent 62%),
    linear-gradient(160deg, var(--card), var(--bg));
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.6);
}

.frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame__placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.25rem;
  text-align: center;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(196, 154, 108, 0.05) 0 6px,
    transparent 6px 12px
  );
}

.frame.is-empty .frame__placeholder {
  display: flex;
}

.frame__placeholder p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.frame__placeholder code {
  color: var(--gold);
}

.frame__sigil {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline-strong);
  background-image: linear-gradient(135deg, var(--crimson-soft), transparent);
  box-shadow: 0 0 26px rgba(184, 50, 60, 0.28);
  transform: rotate(45deg);
}

.frame__file {
  font-family: var(--mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
  color: var(--gold) !important;
}

/* Gold corner ticks used by every placeholder. */
.tick {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--gold);
  opacity: 0.85;
}

.tick--tl {
  top: 8px;
  left: 8px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.tick--tr {
  top: 8px;
  right: 8px;
  border-top-width: 1px;
  border-right-width: 1px;
}

.tick--bl {
  bottom: 8px;
  left: 8px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.tick--br {
  bottom: 8px;
  right: 8px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* ------------------------------------------------------------------------- */
/* Sections                                                                  */
/* ------------------------------------------------------------------------- */

.section {
  padding-block: clamp(3rem, 6vw, 5.25rem);
  border-top: 1px solid rgba(196, 154, 108, 0.14);
}

.section--alt {
  background-color: var(--bg-alt);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.section-lede {
  color: var(--muted);
}

.card {
  position: relative;
  padding: 1.6rem;
  border: 1px solid rgba(196, 154, 108, 0.18);
  border-radius: var(--radius);
  background-color: var(--card);
  box-shadow: 0 26px 60px -52px rgba(0, 0, 0, 0.95);
}

/* Stages ------------------------------------------------------------------ */

.stages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage__num {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--serif);
  font-size: 1.65rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.stage h3 {
  margin-bottom: 0.3rem;
}

.stage__role {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.ticks {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.89rem;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* Connector: hairline plus arrow head, pointing right on wide screens and
   down on narrow ones. Drawn purely in CSS. */
@media (min-width: 900px) {
  .stages {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.6rem;
  }

  .stage:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.35rem;
    right: -2.45rem;
    width: 2.2rem;
    height: 1px;
    background-image: linear-gradient(90deg, rgba(196, 154, 108, 0.05), var(--gold));
  }

  .stage:not(:last-child)::before {
    content: '';
    position: absolute;
    top: calc(2.35rem - 4px);
    right: -2.55rem;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--gold);
    border-right: 1px solid var(--gold);
    transform: rotate(45deg);
  }
}

@media (max-width: 899px) {
  .stage:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1.9rem;
    width: 1px;
    height: 1.55rem;
    background-image: linear-gradient(180deg, rgba(196, 154, 108, 0.05), var(--gold));
  }

  .stage:not(:last-child)::before {
    content: '';
    position: absolute;
    left: calc(50% - 4px);
    bottom: -2.1rem;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid var(--gold);
    border-right: 1px solid var(--gold);
    transform: rotate(45deg);
  }
}

/* Ecosystem strip --------------------------------------------------------- */

.strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(196, 154, 108, 0.18);
  background-color: rgba(196, 154, 108, 0.18);
  list-style: none;
}

.strip__item {
  padding: 1.5rem;
  background-color: var(--bg-alt);
}

.strip__item h3 {
  margin-bottom: 0.45rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.strip__item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Screenshots ------------------------------------------------------------- */

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.shot {
  margin: 0;
}

.shot .frame {
  border-color: var(--hairline);
}

.shot figcaption {
  margin-top: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--hairline-strong);
  color: var(--text);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Self-hosting ------------------------------------------------------------ */

.selfhost {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(196, 154, 108, 0.38);
  background-color: var(--gold-soft);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-card {
  padding: 1.7rem;
  border: 1px solid rgba(184, 50, 60, 0.42);
  border-radius: var(--radius);
  background-image: linear-gradient(160deg, rgba(184, 50, 60, 0.13), rgba(26, 23, 29, 0.92));
}

.live-card h3 {
  margin-bottom: 0.6rem;
}

.live-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.live-card p:last-child {
  margin-bottom: 0;
}

.cta-band {
  margin-top: 3rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background-image:
    radial-gradient(90% 120% at 0% 0%, rgba(184, 50, 60, 0.16), transparent 60%),
    linear-gradient(140deg, var(--card), var(--bg-alt));
}

.cta-band h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}

.cta-band p {
  max-width: 68ch;
  color: var(--muted);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  padding-block: 2.75rem 1.5rem;
  border-top: 1px solid var(--hairline);
  background-color: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand p {
  margin-bottom: 0.35rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.3rem;
  align-content: flex-start;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.credit {
  width: min(100% - 2.5rem, var(--wrap));
  margin: 2.25rem auto 0;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(196, 154, 108, 0.14);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-align: center;
}

/* Reveal (JS enhanced, motion safe) --------------------------------------- */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------------- */
/* Responsive                                                                */
/* ------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .shots {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 720px) {
  .strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 3.25rem;
  }

  .selfhost {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3rem;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding-block: 0.8rem;
  }

  .nav {
    width: 100%;
    gap: 0.45rem 0.95rem;
  }

  .nav .btn {
    margin-top: 0.35rem;
  }

  .credit {
    letter-spacing: 0.22em;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
