/* softwaresoftware design system v2 — site styles */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

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

section { padding: var(--space-8) 0; background: var(--bg); color: var(--fg); }

/* ---------- type ---------- */

h1, h2, h3 { font-weight: 300; letter-spacing: var(--track-display); line-height: 1.15; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: var(--space-4); }
h3 { font-size: 1.15rem; font-weight: 400; letter-spacing: var(--track-tight); }

p { max-width: 38rem; }

.lede { font-size: 1rem; color: var(--muted); margin-top: var(--space-3); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--muted);
  margin-bottom: var(--space-3);
}

a { color: inherit; text-decoration: none; }

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: 0.9rem;
  font-weight: 400;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}
.arrow-link::after { content: "\2192"; font-weight: 300; }
.arrow-link:hover { border-color: var(--fg); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
}

code { background: var(--surface); border: 1px solid var(--line); padding: 0.1em 0.4em; }

pre {
  background: var(--ink);
  color: var(--n-300);
  border: 1px solid var(--n-800);
  padding: var(--space-4);
  overflow-x: auto;
  line-height: 1.7;
}
pre code { background: none; border: none; padding: 0; }

/* Command block — a copyable one-liner. The code scrolls; the button never
   moves. Button sits OUTSIDE the scroll container, full-height, hairline
   divider. Never put the button inside the element that scrolls. */
.cmd {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--surface);
}
.cmd .cmd-code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
}
.cmd .cmd-copy {
  flex-shrink: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  padding: 0 var(--space-4);
  cursor: pointer;
  transition: color var(--ease);
}
.cmd .cmd-copy:hover { color: var(--fg); }
.cmd .cmd-copy.copied { color: var(--accent); }
/* Dark-band variant inherits automatically via the surface tokens. */

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo { font-size: 0.9rem; font-weight: 500; letter-spacing: var(--track-tight); }

.nav-links { display: flex; gap: var(--space-4); }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--n-500);
  transition: color var(--ease);
}
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding: var(--space-8) 0 var(--space-7); }
.hero-actions { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-5); flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--fg);
  cursor: pointer;
  transition: opacity var(--ease), background var(--ease), color var(--ease);
}

.btn::after { content: "\2192"; font-weight: 300; }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { opacity: 0.82; }

.btn-secondary { background: transparent; color: var(--fg); }
.btn-secondary:hover { background: var(--fg); color: var(--bg); }

.btn-bare { border: none; padding: 0.7rem 0; background: none; color: var(--fg); }
.btn-bare:hover { opacity: 0.6; }

/* ---------- badge ---------- */

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--neutral { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* ---------- layout helpers ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1px; }

.section-head { margin-bottom: var(--space-6); }

/* ---------- specimen blocks ---------- */

.specimen { border: 1px solid var(--line); }
.specimen + .specimen { margin-top: var(--space-4); }
.specimen-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--muted);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.specimen-body { padding: var(--space-5) var(--space-4); }

.type-scale div { letter-spacing: var(--track-display); line-height: 1.2; }

/* ---------- swatches ---------- */

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.swatch { background: var(--bg); padding: 0; }
.swatch-chip { height: 5.5rem; }
.swatch-meta { padding: var(--space-2) var(--space-3); display: flex; justify-content: space-between; align-items: baseline; }
.swatch-name { font-size: 0.78rem; font-weight: 400; }
.swatch-value { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ---------- cards ---------- */

.card {
  border: 1px solid var(--line);
  padding: var(--space-5);
  background: var(--bg);
  transition: border-color var(--ease);
}
.card:hover { border-color: var(--fg); }
.card h3 { margin-bottom: var(--space-2); }
.card p { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--space-4); }

/* ---------- stats ---------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: var(--space-5) var(--space-4); }
.stat-number { font-size: 2.4rem; font-weight: 300; letter-spacing: var(--track-tight); line-height: 1.1; }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: var(--space-2); }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: var(--space-2); max-width: 24rem; }
.field label { font-size: 0.78rem; font-weight: 400; }
.input {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  transition: border-color var(--ease);
  width: 100%;
}
.input:focus { outline: none; border-color: var(--fg); }
.input::placeholder { color: var(--n-400); }

/* ---------- table ---------- */

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--muted);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--fg);
}
td { padding: var(--space-3); border-bottom: 1px solid var(--line); font-weight: 300; }

/* ---------- do / don't ---------- */

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--space-5); }
.rules ul { list-style: none; }
.rules li {
  font-size: 0.9rem;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.rules .mark { font-family: var(--font-mono); font-size: 0.8rem; }
.do .mark { color: var(--accent); }
.dont .mark { color: var(--n-400); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #fafafa;
  padding: var(--space-7) 0 var(--space-4);
  overflow: hidden;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.78rem;
  color: var(--n-500);
  padding-bottom: var(--space-7);
}
.footer-meta a { color: var(--n-400); transition: color var(--ease); }
.footer-meta a:hover { color: #fafafa; }

.wordmark {
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.85;
  white-space: nowrap;
  user-select: none;
  color: #fff;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  section { padding: var(--space-7) 0; }
  .nav-links { gap: var(--space-3); }
  .nav-links a:nth-child(n+4) { display: none; }
}
