/* =========================================================
   Platform Home — Phase 1 Stylesheet
   Design tokens live at the top. Everything else consumes them.
   ========================================================= */

:root {
  /* --- Color --- */
  --bg: #14171a;
  --surface: #1b1f23;
  --surface-raised: #21262b;
  --hairline: #2c3238;
  --text: #ece9e3;
  --text-muted: #9299a1;
  --text-faint: #5c636b;
  --accent: #c89b3c;
  --accent-dim: #8c6f2c;
  --accent-soft: rgba(200, 155, 60, 0.1);
  --focus-ring: #e8c977;

  /* --- Type --- */
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* --- Layout --- */
  --max-width: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --header-height: 72px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

ul {
  margin: 0;
  padding: 0;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(20, 23, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
  background: var(--accent-soft);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.primary-nav a:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.primary-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .primary-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .primary-nav a {
    padding: 12px 14px;
  }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--hairline);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

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

.hero-copy h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  margin-top: 14px;
}

.hero-copy p {
  font-size: 17px;
  max-width: 46ch;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 2px;
}

.hero-scroll:hover {
  color: var(--accent);
}

.pegboard-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 14px;
  letter-spacing: 0.04em;
}

/* =========================================================
   Sections / Cards
   ========================================================= */

.section {
  padding: clamp(48px, 7vw, 88px) 0;
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-top: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.card {
  background: var(--surface);
  padding: 28px 26px;
}

.card .card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.card h3 {
  font-size: 18px;
  margin-top: 10px;
}

.card p {
  font-size: 14.5px;
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

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

.split-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 36px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

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

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: 40px 0 32px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-faint);
  max-width: 34ch;
  margin-top: 10px;
}

.footer-nav {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.footer-nav-group h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.footer-nav-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-group a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--hairline);
  margin-top: 32px;
  padding-top: 20px;
}

.footer-bottom .container {
  font-size: 13px;
  color: var(--text-faint);
}

/* =========================================================
   Inner pages (About / Contact / Privacy / Terms)
   ========================================================= */

.page-hero {
  padding: clamp(40px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--hairline);
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 14px;
}

.page-hero p {
  max-width: 60ch;
  font-size: 16px;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 20px;
  margin-top: 2em;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 15px;
}

.prose li {
  margin-bottom: 0.4em;
}

.notice {
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 32px;
}

.notice strong {
  color: var(--accent);
}

.config-slot {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-faint);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: inline-block;
}

/* --- Form (Contact) --- */

.form-grid {
  display: grid;
  gap: 18px;
  max-width: 480px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent-dim);
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg);
  justify-self: start;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--focus-ring);
}

.form-status {
  font-size: 13px;
  color: var(--text-faint);
}
