/* ── Design Tokens ─────────────────────────────────── */
:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2129;
  --text: #e6e6e6;
  --text-muted: #999;
  --brand-orange: #ff5a33;
  --brand-gold: #ffa136;
  --brand-yellow: #f3c53d;
  --navy: #022536;
  --lcd-bg: #0a1f0a;
  --lcd-text: #72d857;
  --radio-dark: #2a2a2a;
  --radio-light: #3a3a3a;
  --focus-color: #ff5a33;
  --section-gap: 5rem;
  --content-max: 900px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Skip Link ────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--brand-orange);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ── Focus Styles ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* ── Main Content ─────────────────────────────────── */
.main-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section Base ─────────────────────────────────── */
.section {
  padding: var(--section-gap) 0;
}

.section + .section {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 0 var(--section-gap);
}

.hero__headline {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-gold), var(--brand-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__text {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Feature Cards ────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 520px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(255, 90, 51, 0.3);
}

.feature-card__icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  background: rgba(255, 90, 51, 0.1);
  border-radius: 8px;
}

.feature-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.feature-card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ── Self-Host Section ────────────────────────────── */
.self-host__cta {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1.5rem;
}

.self-host__code {
  display: block;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--lcd-text);
  overflow-x: auto;
  white-space: pre;
}

.self-host__note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Apps Section ─────────────────────────────────── */
.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.app-badge:hover {
  border-color: rgba(255, 90, 51, 0.4);
  text-decoration: none;
}

.app-badge__label-small {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
}

.app-badge__label-big {
  display: block;
  font-weight: 600;
}

/* ── Placeholder Sections ─────────────────────────── */
.placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.placeholder a {
  font-style: normal;
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--brand-orange);
}

/* ── Button Utility ───────────────────────────────── */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-gold));
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}
