/* ============================================
   Janus Labs — Design System
   Palette: Navy #0B1D3A, Amber #D4A843, Off-white #F5F0E8
   ============================================ */

:root {
  --navy: #0B1D3A;
  --navy-light: #132B52;
  --navy-mid: #1A3A6B;
  --amber: #D4A843;
  --amber-light: #E8C97A;
  --amber-dim: #B8923A;
  --off-white: #F5F0E8;
  --off-white-dim: #E8E2D6;
  --text-primary: #F5F0E8;
  --text-secondary: #B0A898;
  --text-dark: #1A1A1A;
  --text-dark-secondary: #4A4A4A;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Serif 4', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1120px;
  --max-prose: 720px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-light); }

img { max-width: 100%; display: block; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; }
h1 { font-size: 2.8rem; letter-spacing: -0.03em; }
h2 { font-size: 1.8rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); font-weight: 500; }

p { margin-bottom: 1.2em; }

.label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-weight: 500;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(212, 168, 67, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* ---- Layout ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.prose { max-width: var(--max-prose); }

.section {
  padding: 5rem 0;
}

.section--light {
  background: var(--off-white);
  color: var(--text-dark);
}
.section--light .text-secondary { color: var(--text-dark-secondary); }
.section--light a { color: var(--navy-mid); font-weight: 500; }
.section--light a:hover { color: var(--navy); }
.section--light h4 { color: var(--amber-dim); }

.section--alt {
  background: var(--navy-light);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 29, 58, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 67, 0.15);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.nav__logo span { color: var(--amber); }

.nav__links { display: flex; gap: 2rem; list-style: none; }
.nav__links a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--text-primary); }

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  padding: 10rem 0 6rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--amber);
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.8rem;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--amber);
  color: var(--navy);
}
.btn--primary:hover {
  background: var(--amber-light);
  color: var(--navy);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(245, 240, 232, 0.3);
}
.btn--outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--navy-light);
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-radius: 6px;
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(212, 168, 67, 0.3);
  transform: translateY(-2px);
}

.section--light .card {
  background: white;
  border-color: var(--off-white-dim);
}
.section--light .card:hover {
  border-color: var(--amber-dim);
}

.card__number {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.card h3 { margin-bottom: 0.75rem; }

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.section--light .card p { color: var(--text-dark-secondary); }

.card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(212, 168, 67, 0.1);
  color: var(--amber);
  padding: 0.2em 0.6em;
  border-radius: 3px;
  margin-top: 1rem;
}
.section--light .card__tag {
  background: rgba(184, 146, 58, 0.1);
  color: var(--amber-dim);
}

/* ---- Taxonomy Matrix ---- */
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  margin: 2rem 0;
}

.matrix th, .matrix td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid rgba(212, 168, 67, 0.15);
}

.matrix th {
  background: rgba(212, 168, 67, 0.08);
  color: var(--amber);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.matrix td { color: var(--text-secondary); }
.matrix td.filled {
  color: var(--text-primary);
  background: rgba(212, 168, 67, 0.05);
}

.section--light .matrix th {
  background: rgba(184, 146, 58, 0.08);
  color: var(--amber-dim);
}
.section--light .matrix td { color: var(--text-dark-secondary); border-color: var(--off-white-dim); }
.section--light .matrix td.filled { color: var(--text-dark); background: rgba(184, 146, 58, 0.05); }

/* ---- Stats Row ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat__label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.section--light .stat__label { color: var(--text-dark-secondary); }

/* ---- Code Block ---- */
.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 6px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow-x: auto;
  line-height: 1.6;
}

.code-block .comment { color: rgba(245, 240, 232, 0.35); }
.code-block .cmd { color: var(--amber); }

/* ---- Footer ---- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(212, 168, 67, 0.1);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__links { display: flex; gap: 1.5rem; list-style: none; }
.footer__links a { color: var(--text-secondary); font-size: 0.85rem; }
.footer__links a:hover { color: var(--amber); }

/* ---- Divider ---- */
.divider {
  width: 60px;
  height: 2px;
  background: var(--amber);
  margin: 2rem 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 8rem 0 4rem; min-height: auto; }
  .section { padding: 3.5rem 0; }
  .container { padding: 0 1.25rem; }
  .card-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  .nav__links { display: none; }
  .nav__hamburger { display: block; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(11, 29, 58, 0.98);
    padding: 1.5rem 2rem;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero__cta { flex-direction: column; }
  .btn { text-align: center; }
}
