/* MACH-1 Site — O'Reilly Technical Book Style */

:root {
  --color-bg: #f5f0e8;
  --color-text: #1a1a1a;
  --color-accent: #8b2500;
  --color-muted: #5a5a5a;
  --color-border: #d4c9b0;
  --color-surface: #ede8de;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, sans-serif;
  --max-width: 800px;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

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

/* ---- Layout ---- */

.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 2px solid var(--color-text);
  padding: 1rem 0;
  margin-bottom: 3rem;
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

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

.lang-switch {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border: 1.5px solid var(--color-text);
  border-radius: 3px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s;
}

.lang-switch:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---- Hero ---- */

.hero {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 600px;
  margin-bottom: 1.5rem;
}

.hero-quote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 1rem;
  font-style: italic;
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 3px;
  transition: opacity 0.15s;
}

.cta-button:hover {
  opacity: 0.85;
}

/* ---- Sections ---- */

.section {
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-border);
}

.section p {
  margin-bottom: 1rem;
  max-width: 680px;
}

/* ---- Mach Scale Table ---- */

.mach-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.mach-table th {
  text-align: left;
  border-bottom: 2px solid var(--color-text);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  background: var(--color-surface);
}

.mach-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.mach-table tr:last-child td {
  border-bottom: none;
}

.mach-badge {
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Four Layers ---- */

.layers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.layer-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
}

.layer-item:last-child {
  border-bottom: none;
}

.layer-label {
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 1rem;
}

.layer-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ---- Quick Start Steps ---- */

.steps-list {
  list-style: none;
  counter-reset: steps;
  margin: 1.5rem 0;
}

.steps-list li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.steps-list li:last-child {
  border-bottom: none;
}

.steps-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 2px solid var(--color-text);
  padding: 1.5rem 0;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.site-footer .site-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero-tagline {
    font-size: 1.8rem;
  }

  .layer-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
