/* =========================
  File: styles.css
  External stylesheet for Racket Rivals Codes site
========================= */

/* Design tokens */
:root {
  --bg: #0b0b0e;
  --bg-2: #131318;
  --card: #17171d;
  --text: #e7e7ee;
  --muted: #a7a7b1;
  --brand: #24d07b;
  --brand-2: #19b568;
  --border: rgba(255, 255, 255, 0.08);
  --ring: rgba(36, 208, 123, 0.35);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

/* Resets / base */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Pills / chip */
.chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 14, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.nav-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  font-size: 20px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero */
.hero {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(
    1000px 400px at 50% -10%,
    rgba(36, 208, 123, 0.12),
    transparent
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    display: flex;
    justify-content: center;
  }
}

.hero h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 12px 0 8px;
  font-weight: 800;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero p {
  color: var(--muted);
  max-width: 780px;
}

/* Buttons */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  justify-content: center;
}

.hero-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  /* justify-content: center; */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 600;
}

.btn-primary {
  background: var(--brand);
  color: #08130e;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--brand-2);
}

.btn:hover {
  box-shadow: 0 0 0 6px var(--ring);
}

/* Notices */
.notices {
  display: grid;
  gap: 10px;
  margin: 16px 0 4px;
}

.notice {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.notice.warn {
  border-color: rgba(255, 199, 0, 0.35);
  background: rgba(255, 199, 0, 0.08);
}

.notice.info {
  border-color: rgba(0, 156, 255, 0.35);
  background: rgba(0, 156, 255, 0.08);
}

/* Sections / headings */
section {
  padding: 48px 0;
}

h2 {
  font-size: 26px;
  margin: 0 0 8px;
}

.sub {
  color: var(--muted);
  margin: 0 0 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.check input {
  accent-color: var(--brand);
}

.select label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: #eaeaf1;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.copy-active {
  background: rgba(36, 208, 123, 0.12);
  border-color: rgba(36, 208, 123, 0.35);
  color: #8df0bf;
}

.copy-disputed {
  background: rgba(255, 199, 0, 0.12);
  border-color: rgba(255, 199, 0, 0.35);
  color: #ffe091;
}

.badge.ok {
  background: rgba(36, 208, 123, 0.12);
  border-color: rgba(36, 208, 123, 0.35);
  color: #8df0bf;
}

.badge.exp {
  background: rgba(255, 73, 97, 0.12);
  border-color: rgba(255, 73, 97, 0.25);
  color: #ff95a4;
}

.badge.warn {
  background: rgba(255, 199, 0, 0.12);
  border-color: rgba(255, 199, 0, 0.35);
  color: #ffe091;
}

/* Code cells */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-weight: 700;
}

.copy {
  cursor: pointer;
}

.codecell {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Source badges + tooltip */
.src-badges {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
}

.src-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 11px;
}

.src-badges .tip {
  position: absolute;
  inset: auto auto 115% 0;
  transform: translateY(-6px);
  white-space: nowrap;
  background: #101015;
  color: #eaeaf1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
}

.src-badges .tip.show {
  opacity: 1;
}

/* Cards / layout */
.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 18px;
  box-shadow: var(--shadow);
}

.steps ol {
  margin: 10px 0 0;
  padding-left: 18px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

/* Changelog */
.changelog table {
  min-width: 520px;
}

/* Redeem section */
.redeem-steps {
  margin: 18px 0;
  padding-left: 22px;
  line-height: 1.9;
}

.redeem-steps li {
  margin: 6px 0;
}

.redeem-image-wrap {
  margin: 16px 8px;
  display: flex;
  justify-content: center;
}

.redeem-image {
  width: 100%;
  max-width: 720px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.redeem-notes {
  margin-top: 12px;
}

/* Legal pages */
.legal-page {
  padding: 48px 0;
  min-height: calc(100vh - 200px);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.legal-content h1 {
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--text);
}

.legal-content h2 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.legal-content p {
  margin: 12px 0;
  color: var(--muted);
}

.legal-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.legal-content li {
  margin: 8px 0;
  color: var(--muted);
}

.legal-content strong {
  color: var(--text);
}

.legal-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 24px;
}

.legal-footer p {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* FAQ spacing */
.faq-card {
  padding: 22px;
}

.faq-card details {
  margin: 8px 0;
}

/* Footer */
footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 720px) {
  .navbar .container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 20px;
  }

  .nav-links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 13px;
    padding: 6px 10px;
  }

  .hero h1 {
    font-size: 32px;
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
