/* Backchannel Landing Page Styles
   Color palette sourced from the game client */

/* ---------- Self-hosted Saira font (GDPR: no Google Fonts CDN) ---------- */

@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/saira-300.ttf') format('truetype');
}

@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/saira-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/saira-800.ttf') format('truetype');
}

:root {
  --tc-blue: rgb(21, 101, 192);
  --tc-orange: rgb(255, 152, 0);
  --tc-red: rgb(180, 0, 0);
  --tc-green: rgb(0, 150, 136);
  --tc-yellow: rgb(247, 217, 67);
  --tc-black: rgb(20, 20, 20);
  --tc-card-surface: rgb(30, 32, 38);
  --tc-text-muted: rgb(160, 170, 180);
  --tc-border: rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--tc-black);
  color: #e8e8e8;
  line-height: 1.6;
  letter-spacing: 0.02em;
  word-spacing: 0.02em;
}

/* ---------- Site Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tc-border);
}

.nav-brand {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--tc-text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(21, 101, 192, 0.12) 0%, transparent 60%),
    var(--tc-black);
}

.studio-mark {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--tc-text-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.title {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-logo {
  display: block;
  width: clamp(320px, 60vw, 760px);
  aspect-ratio: 4 / 1;
  margin: 0 auto 1.5rem;
}

/* ---------- Cipher Decode Title ---------- */

.cipher-title {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.cipher-char {
  display: inline-block;
  width: 1ch;
  text-align: center;
  transition: color 80ms ease;
}

.cipher-char.locked {
  color: #fff;
}

.tagline {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--tc-orange);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.subtitle {
  max-width: 540px;
  margin: 0 auto 2.5rem;
  color: var(--tc-text-muted);
  font-size: 1.05rem;
}

.about {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 2rem;
}

.about p {
  color: var(--tc-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--tc-blue);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--tc-border);
  transition: background 150ms ease, border-color 150ms ease;
}

.cta:hover {
  background: rgb(30, 120, 220);
  border-color: var(--tc-blue);
}

/* ---------- Features ---------- */

.features {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--tc-card-surface);
  border: 1px solid var(--tc-border);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  transition: border-color 150ms ease;
}

.feature-card:hover {
  border-color: var(--tc-blue);
}

.feature-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tc-orange);
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--tc-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- CTA Section ---------- */

.cta-section {
  text-align: center;
  padding: 5rem 2rem;
}

.cta-section h2 {
  font-size: 1.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  color: #fff;
}

.cta-section p {
  color: var(--tc-text-muted);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--tc-border);
  color: var(--tc-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ---------- Single Page ---------- */

.single-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.single-page h1 {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.single-page .updated {
  color: var(--tc-text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.single-page h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tc-orange);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.single-page p {
  margin-bottom: 1rem;
  color: var(--tc-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.single-page ul {
  margin: 0 0 1rem 1.5rem;
  color: var(--tc-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.single-page li {
  margin-bottom: 0.5rem;
}

.single-page strong {
  color: #fff;
}

.single-page a {
  color: var(--tc-blue);
  text-decoration: none;
}

.single-page a:hover {
  color: rgb(30, 120, 220);
}

/* ---------- Footer ---------- */

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--tc-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: #fff;
}

/* ---------- Blog ---------- */

.blog-listing,
.blog-post {
  max-width: 700px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.blog-header {
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 2rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.blog-description {
  color: var(--tc-text-muted);
  font-size: 1rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-summary {
  padding: 1.5rem;
  background: var(--tc-card-surface);
  border: 1px solid var(--tc-border);
  border-radius: 10px;
  transition: border-color 150ms ease;
}

.post-summary:hover {
  border-color: var(--tc-blue);
}

.post-summary time {
  font-size: 0.8rem;
  color: var(--tc-text-muted);
  letter-spacing: 0.05em;
}

.post-summary h2 {
  font-size: 1.15rem;
  margin: 0.5rem 0;
}

.post-summary h2 a {
  color: #fff;
  text-decoration: none;
}

.post-summary h2 a:hover {
  color: var(--tc-orange);
}

.post-summary p {
  color: var(--tc-text-muted);
  font-size: 0.95rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header time {
  font-size: 0.8rem;
  color: var(--tc-text-muted);
}

.post-header h1 {
  font-size: 1.75rem;
  margin: 0.5rem 0;
}

.post-summary-text {
  color: var(--tc-text-muted);
  font-size: 1.05rem;
  font-style: italic;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.25rem;
  color: var(--tc-orange);
  letter-spacing: 0.08em;
  margin: 2rem 0 1rem;
}

.post-content p {
  margin-bottom: 1rem;
  color: var(--tc-text-muted);
}

.post-content strong {
  color: #fff;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--tc-text-muted);
}

.post-content li {
  margin-bottom: 0.5rem;
}

.blog-nav,
.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tc-border);
}

.blog-nav a,
.post-nav a {
  color: var(--tc-blue);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.blog-nav a:hover,
.post-nav a:hover {
  color: rgb(30, 120, 220);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem;
  }

  .features {
    padding: 3rem 1rem 2rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Field Manual ---------- */

.fm-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 1rem;
}

.fm-label {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--tc-orange);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.fm-title {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.fm-intro {
  color: var(--tc-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}

.fm-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--tc-blue);
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.fm-back:hover {
  color: rgb(30, 120, 220);
}

/* Chapter content — wider than blog for screenshots */
.fm-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  line-height: 1.8;
}

.fm-content h2 {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tc-orange);
  letter-spacing: 0.08em;
  margin: 2.5rem 0 1rem;
}

.fm-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.75rem;
}

.fm-content p {
  margin-bottom: 1rem;
  color: var(--tc-text-muted);
}

.fm-content strong {
  color: #fff;
}

.fm-content ul,
.fm-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
  color: var(--tc-text-muted);
}

.fm-content li {
  margin-bottom: 0.4rem;
}

/* Card-style reference tables */
.fm-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.fm-content th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--tc-orange);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--tc-border);
}

.fm-content td {
  padding: 0.6rem 1rem;
  color: var(--tc-text-muted);
  border-bottom: 1px solid var(--tc-border);
}

.fm-content tr:last-child td {
  border-bottom: none;
}

/* Screenshot figure — dark card treatment */
.figure {
  margin: 1.5rem 0;
  background: var(--tc-card-surface);
  border: 1px solid var(--tc-border);
  border-radius: 10px;
  overflow: hidden;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--tc-text-muted);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--tc-border);
}

.fm-hero {
  margin-bottom: 2rem;
}

/* TOC card list */
.fm-toc {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.fm-toc a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--tc-card-surface);
  border: 1px solid var(--tc-border);
  border-left: 3px solid var(--tc-orange);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 150ms ease;
}

.fm-toc a:hover {
  border-color: var(--tc-blue);
  border-left-color: var(--tc-orange);
}

.fm-toc-num {
  display: block;
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--tc-orange);
}

.fm-toc-title {
  display: block;
  font-size: 1.05rem;
  color: #fff;
  margin-top: 0.15rem;
}

.fm-toc-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--tc-text-muted);
  margin-top: 0.2rem;
}

/* Prev/next chapter navigation */
.fm-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  border-top: 1px solid var(--tc-border);
}

.fm-nav a {
  color: var(--tc-blue);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 150ms ease;
}

.fm-nav a:hover {
  color: rgb(30, 120, 220);
}

.fm-nav-next {
  margin-left: auto;
}

/* Callout box for tips/warnings */
.fm-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--tc-card-surface);
  border-left: 3px solid var(--tc-blue);
  border-radius: 0 10px 10px 0;
}

.fm-callout p {
  margin: 0;
}

/* Field manual responsive */
@media (max-width: 480px) {
  .fm-header {
    padding: 5rem 1rem 1rem;
  }

  .fm-content {
    padding: 1rem 1rem 3rem;
  }

  .fm-nav {
    padding: 1.5rem 1rem 3rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
  }

  .fm-nav-next {
    margin-left: 0;
  }
}

/* ============================================================ */
/* Tester landing page (/testers/) — unlisted page styling      */
/* ============================================================ */

.tester-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  color: #e8eaed;
}

.tester-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--tc-border);
  padding-bottom: 2rem;
}

.tester-label {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--tc-orange);
  margin: 0 0 0.5rem;
}

.tester-title {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-weight: 600;
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0.01em;
}

.tester-intro {
  color: var(--tc-text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.tester-content {
  font-size: 1.02rem;
  line-height: 1.65;
}

.tester-content h2 {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.tester-content h3 {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.tester-content p,
.tester-content li {
  color: #d6dadf;
}

.tester-content a {
  color: var(--tc-orange);
  text-decoration: underline;
  text-decoration-color: rgba(255, 152, 0, 0.4);
}

.tester-content a:hover {
  text-decoration-color: var(--tc-orange);
}

/* "Start Here" two-card grid */
.tester-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

@media (max-width: 720px) {
  .tester-cards {
    grid-template-columns: 1fr;
  }
}

.tester-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--tc-card-surface);
  border: 1px solid var(--tc-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease;
}

.tester-card:hover {
  border-color: var(--tc-orange);
  text-decoration: none;
}

.tester-card h3 {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: #e8eaed;
}

.tester-card p {
  margin: 0 0 0.75rem;
  color: var(--tc-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tester-card-cta {
  font-family: 'Rajdhani', 'Saira', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--tc-orange);
  text-transform: uppercase;
}

/* Reuse the .figure styling for tester-page screenshots — no override needed. */
