@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

:root {
  --bg: #0b0f14;
  --bg-elev: #121820;
  --bg-hover: #1a222d;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-faint: #475569;
  --border: #1e293b;
  --border-hover: #334155;
  --accent: #38bdf8;
  --accent-dim: #0284c7;
  --accent-faint: rgba(56, 189, 248, 0.05);
  --maxw: 1040px;
  --font: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.625;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

p strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--text);
}

/* Links */
a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

a[target="_blank"]::after {
  content: "\2197";
  display: inline-block;
  margin-left: 0.25em;
  color: var(--text-faint);
  font-size: 0.85em;
  transition: var(--transition);
}

a[target="_blank"]:hover::after {
  color: var(--accent);
  transform: translate(1px, -1px);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  flex: 1;
  padding: 4rem 0 6rem;
}

/* Symmetrical Grid System */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    position: relative;
  }
  
  .main-grid::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--border);
    transform: translateX(-50%);
    pointer-events: none;
  }
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Site Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  position: relative;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border: none;
}

.brand:hover {
  color: var(--accent);
  border: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: lowercase;
  color: var(--text-dim);
  border: none;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::before {
  content: '●';
  font-size: 0.5rem;
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: var(--transition);
}

.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 1rem;
    z-index: 100;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a.active::before {
    display: none;
  }
  .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1rem;
    height: 1px;
    background: var(--accent);
  }
}

/* Intro block */
.intro-block {
  margin-bottom: 1rem;
}

.intro-block h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.intro-block p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Sections */
.section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Dynamic Cards / Lists */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.25rem;
  border-radius: 6px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.list-item:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.list-item:hover .item-title {
  color: var(--accent);
}

.list-item-content {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.list-item-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  object-fit: cover;
  flex-shrink: 0;
  transition: var(--transition);
}

.list-item:hover .list-item-icon {
  border-color: var(--accent);
}

.list-item-text {
  flex: 1;
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.item-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.item-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.item-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Badges */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid transparent;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.badge-live {
  background: rgba(143, 168, 143, 0.08);
  color: var(--accent);
  border-color: rgba(143, 168, 143, 0.2);
}

.badge-soon {
  background: rgba(80, 90, 80, 0.08);
  color: var(--text-dim);
  border-color: rgba(80, 90, 80, 0.2);
}

.badge-cancelled {
  background: rgba(150, 95, 95, 0.1);
  color: #b78787;
  border-color: rgba(150, 95, 95, 0.28);
}

/* Buttons (DRY implementation) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  margin-top: 0.75rem;
}

.btn::after {
  content: none !important; /* Prevent external link arrow on buttons */
}

.btn:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-secondary:hover {
  background: var(--bg-elev);
  border-color: var(--accent);
  color: var(--text);
}

/* Button group (inline row) */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-group .btn {
  margin-top: 0;
}

/* Social link buttons (small inline) */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-links .btn {
  margin-top: 0;
}

/* Support guidelines */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dim);
  font-size: 0.925rem;
}

.checklist li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Legal Pages Styling (Sticky Symmetrical Layout) */
.legal-sidebar {
  position: sticky;
  top: 3rem;
}

.legal-sidebar h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.legal-sidebar .updated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 2.5rem;
}

.legal-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .legal-toc {
    display: flex;
  }
}

.legal-toc a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  border: none;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-content h2 {
  font-size: 1.15rem;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-content h2::before {
  content: '#';
  color: var(--accent-dim);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.9em;
}

.legal-content h3 {
  font-size: 0.95rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.legal-content ul {
  padding-left: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.legal-content ul li {
  margin-bottom: 0.4rem;
  font-size: 0.925rem;
}

.legal-content p {
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
  background: #070a0e;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  border: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Selection and Focus */
::selection {
  background: var(--accent);
  color: var(--bg);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
