:root {
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --bg-card: #212121;
  --bg-footer: #262626;
  --accent: #ff9900;
  --accent-soft: #ffb340;
  --on-accent: #1a1200;
  --text: #ffffff;
  --text-muted: #c2c2c2;
  --text-dim: #9d9d9d;
  --line: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --max-width: 1200px;
  --measure: 68ch;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Ubuntu", "Roboto", system-ui, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem); text-align: center; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); text-align: center; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { color: var(--text-muted); margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-soft); }

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: var(--on-accent); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 30px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  border: 2px solid transparent;
  cursor: pointer;
  margin: 6px;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--accent-soft);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255, 153, 0, 0.25);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.btn-with-icon { display: inline-flex; align-items: center; gap: 10px; }
.btn-with-icon img { width: 20px; height: 20px; }

/* Header / nav */
.site-header {
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo img { height: 40px; width: auto; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle-label span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }
.nav-toggle:focus-visible ~ .nav-toggle-label { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.main-nav ul { display: flex; list-style: none; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 10px 14px;
  color: #e9e9e9;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.main-nav a.nav-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 8px 18px;
  border-bottom: none;
}
.main-nav a.nav-cta:hover { background: var(--accent-soft); color: var(--on-accent); }
.nav-cta-icon { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(64px, 10vw, 112px) 0;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.8));
}
.hero.shaded::before { background: rgba(0, 0, 0, 0.6); }
.hero-compact { padding: 56px 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero-logo { width: 100%; max-width: 420px; margin: 0 auto 24px; }
.hero-text {
  max-width: 62ch;
  margin: 0 auto 24px;
  font-size: 1.1rem;
  color: #f0f0f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.social-row a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.social-row a:hover { background: var(--accent); transform: translateY(-2px); }
.social-row img { width: 22px; height: 22px; }
.social-row svg { width: 20px; height: 20px; fill: #fff; }

/* Sections */
section { padding: clamp(48px, 7vw, 80px) 0; }
.section-alt { background: var(--bg-alt); }
.feature { max-width: 62ch; margin: 0 auto; text-align: center; }
.feature p { font-size: 1.05rem; }

/* Video embed */
.video-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
  background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 36px; }
.gallery a { border-radius: var(--radius); overflow: hidden; display: block; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 0.25s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery a { cursor: zoom-in; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--accent); color: var(--on-accent); }

/* Blog cards */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 36px; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.blog-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.blog-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.blog-card-body :is(h2, h3) { text-align: left; font-size: 1.2rem; margin-bottom: 6px; }
.blog-card-body :is(h2, h3) a { color: var(--text); }
.blog-card-body :is(h2, h3) a:hover { color: var(--accent); }
.blog-card-body .date { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 10px; }
.blog-card-body p { font-size: 0.95rem; margin-bottom: 18px; }
.blog-card-body .btn { margin: auto 0 0; align-self: flex-start; }

/* Post page */
.post-body { max-width: var(--measure); margin: 0 auto; }
.post-body h1 { margin-bottom: 0.3em; }
.post-body h2, .post-body h3, .post-body h4 { text-align: left; margin-top: 1.6em; }
.post-hero img { border-radius: var(--radius); margin-bottom: 28px; width: 100%; }
.post-meta { text-align: center; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 28px; }
.post-body ul { color: var(--text-muted); padding-left: 1.2em; }
.post-body li { margin-bottom: 8px; }
.post-nav { margin-top: 40px; text-align: center; }

/* Legal pages */
.legal-body { max-width: var(--measure); margin: 0 auto; }
.legal-body h1 { text-align: left; }
.legal-body h2 { text-align: left; font-size: 1.3rem; margin-top: 1.8em; }
.legal-body ul { color: var(--text-muted); padding-left: 1.2em; }
.legal-body li { margin-bottom: 6px; }
.legal-body .updated { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 2em; }

/* Links page */
.callout {
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
}
.callout p { color: var(--text-muted); }
.links-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 36px; }

/* Press kit */
.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; text-align: center; margin-top: 24px; }
.press-grid h2 { font-size: 1.3rem; }

.subtitle { text-align: center; color: var(--text-muted); margin-top: -8px; }

.color-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 20px; }
.color-chip { width: 130px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.color-chip .swatch { height: 70px; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--line); }

/* Leaderboard */
.table-state { text-align: center; color: var(--text-muted); padding: 24px 0; }
.table-wrap { overflow-x: auto; margin-top: 28px; border-radius: var(--radius); border: 1px solid var(--line); }
.table-wrap:has(> table[hidden]) { border: 0; margin-top: 0; }
table.leaderboard { width: 100%; border-collapse: collapse; min-width: 560px; }
table.leaderboard th, table.leaderboard td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.leaderboard th {
  font-family: "Ubuntu", system-ui, sans-serif;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-alt);
  position: sticky;
  top: 0;
}
table.leaderboard tbody tr:hover { background: var(--bg-card); }
table.leaderboard tbody tr:first-child td { color: var(--accent); font-weight: 700; }
table.leaderboard tbody tr:last-child td { border-bottom: 0; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-footer);
  border-top: 1px solid var(--line);
  padding: 32px 0 20px;
  text-align: center;
}
.site-footer .social-row { margin-top: 0; gap: 12px; }
.site-footer .social-row a { width: 36px; height: 36px; }
.site-footer .social-row img { width: 18px; height: 18px; }
.site-footer .social-row svg { width: 16px; height: 16px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: 620px;
  margin: 24px auto 0;
  gap: 20px;
  text-align: center;
}
.footer-cols h4 {
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.footer-cols a { display: block; color: var(--text-muted); padding: 3px 0; font-size: 0.92rem; }
.footer-cols a:hover { color: var(--accent); }
.copyright { margin-top: 20px; color: var(--text-dim); font-size: 0.82rem; }

/* Responsive */
@media (max-width: 860px) {
  .gallery, .blog-grid, .press-grid, .footer-cols { grid-template-columns: 1fr; }
  .footer-cols { gap: 16px; }

  .nav-toggle-label { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 15px 24px; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .main-nav { max-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
