/* IC Design System — shared across all pages */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #06090f;
  --surface: #0d1117;
  --surface-2: #111827;
  --border: rgba(45,134,255,0.12);
  --border-hover: rgba(45,134,255,0.3);
  --text: #c8d6e5;
  --text-dim: #6b7c93;
  --text-bright: #e8f0f8;
  --blue: #2d86ff;
  --green: #22c55e;
  --purple: #a78bfa;
  --orange: #f59e0b;
  --red: #ef4444;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  --max-width: 1100px;
  --max-width-narrow: 740px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-bright); }

/* ===== SKIP LINK (accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--blue);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
}

/* ===== SCREEN-READER ONLY (accessibility) ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== NAV ===== */
/* NOTE: close-on-outside-click is handled in ic-nav.js via a document click listener */
.ic-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(6,9,15,0.97);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.ic-nav .logo { color: var(--blue); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.05em; text-decoration: none; }
.ic-nav .logo span { color: var(--text-dim); font-weight: 400; }
.ic-nav .links { display: flex; gap: 1.5rem; align-items: center; }
.ic-nav .links a { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.ic-nav .links a:hover { color: var(--text-bright); }
.ic-nav .links a.active { color: var(--blue); }
.ic-nav .links .cta {
  background: var(--blue); color: #fff !important; padding: 0.5rem 1.2rem;
  border-radius: 6px; font-weight: 600; font-size: 0.85rem;
}
.ic-nav .links .cta:hover { background: #1a6fdd; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: all 0.2s; cursor: pointer; border: none; font-family: var(--font-sans);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1a6fdd; color: #fff; transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid var(--border-hover); color: var(--text); }
.btn-secondary:hover { border-color: var(--blue); color: var(--text-bright); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #1aad50; color: #fff; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-hover); }

/* ===== SECTIONS ===== */
.section { padding: 5rem 2rem; max-width: var(--max-width); margin: 0 auto; }
.section-narrow { max-width: var(--max-width-narrow); }
.section h2 { color: var(--text-bright); font-size: 2rem; margin-bottom: 0.5rem; }
.section .sub { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 2rem; }

/* ===== CODE BLOCKS ===== */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  overflow-x: auto;
}
.code-block .comment { color: var(--text-dim); }
.code-block .cmd { color: var(--green); }
.code-block .flag { color: var(--orange); }
.code-block .str { color: var(--purple); }

/* ===== STATUS BADGES ===== */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-green { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.badge-blue { background: rgba(45,134,255,0.1); color: var(--blue); border: 1px solid rgba(45,134,255,0.2); }
.badge-orange { background: rgba(245,158,11,0.1); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.badge-red { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* ===== STEPS ===== */
.steps { counter-reset: step; }
.step { display: flex; gap: 1.5rem; margin-bottom: 2rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: rgba(45,134,255,0.1);
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-weight: 700; font-size: 1rem;
}
.step-content h3 { color: var(--text-bright); font-size: 1.1rem; margin-bottom: 0.25rem; }
.step-content p { color: var(--text-dim); font-size: 0.95rem; }

/* ===== FORMS ===== */
.input {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,134,255,0.1); }

/* ===== LEGAL PAGE STYLES ===== */
.legal-content h1 {
  color: var(--text-bright);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.legal-content .subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.legal-content h2 {
  color: var(--text-bright);
  font-size: 1.3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.legal-content h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.legal-content p {
  margin-bottom: 1rem;
  color: var(--text);
}
.legal-content ul, .legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.legal-content li {
  margin-bottom: 0.4rem;
  color: var(--text);
}
.legal-content .contact-info {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 3px solid var(--blue);
  margin: 1.5rem 0;
}
.legal-content .important {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.legal-content .privacy-highlight {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
}
.legal-content .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.legal-content .data-table th,
.legal-content .data-table td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
  color: var(--text);
}
.legal-content .data-table th {
  background: var(--surface);
  color: var(--text-bright);
  font-weight: 600;
}
.legal-content .last-updated {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===== UTILITY ===== */
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-dim { color: var(--text-dim); }
.text-bright { color: var(--text-bright); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text-bright); }
.site-footer .footer-links { margin-bottom: 0.75rem; }
.site-footer .footer-links a { margin: 0 0.75rem; }

/* ===== MOBILE NAV ===== */
.ic-nav .menu-toggle {
  display: none;
  background: none; border: none; color: var(--text-dim); font-size: 1.5rem;
  cursor: pointer; padding: 0.25rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ic-nav { padding: 0.75rem 1rem; }
  .ic-nav .menu-toggle { display: block; }
  .ic-nav .links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(6,9,15,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }
  .ic-nav .links.open { display: flex; }
  .ic-nav .links a {
    padding: 0.75rem 1.5rem; font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
  }
  .ic-nav .links a:last-child { border-bottom: none; }
  .section { padding: 3rem 1.25rem; }
  .section h2 { font-size: 1.5rem; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
