/* SmashGL site — shared styles
   Type: Saira Condensed (dominant) + IBM Plex Mono (code)
   Palette: bone / ink / triad accents (toggleable via [data-bauhaus="on"]) */

@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500&family=IBM+Plex+Serif:wght@300;400;500&display=swap');

:root {
  --bone: #f3efe6;
  --bone-2: #ebe6da;
  --ink: #0e0e0d;
  --ink-soft: #2a2a27;
  --ink-mute: #6b6a64;
  --rule: rgba(14, 14, 13, 0.14);
  --rule-strong: rgba(14, 14, 13, 0.28);

  --red: #c8281e;
  --blue: #1d3fb6;
  --yellow: #e8b81b;

  --sans: 'Saira Condensed', 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;

  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a.underline,
.prose a { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
a.underline:hover { opacity: 0.65; }

button { font-family: inherit; cursor: pointer; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bone);
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.wordmark .glyph {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--ink);
  transform: translateY(0px);
}
[data-bauhaus="on"] .wordmark .glyph { background: var(--red); }
.wordmark .v {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  align-items: center;
}
.nav a {
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}
[data-bauhaus="on"] .nav a.active::after { background: var(--red); height: 2px; }

.nav .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.nav .cta:hover { background: var(--ink); color: var(--bone); }
[data-bauhaus="on"] .nav .cta { border-color: var(--ink); }

/* ---------- container ---------- */

main {
  flex: 1;
  width: 100%;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 120px;
  padding: 40px 0 56px;
  font-size: 13px;
  color: var(--ink-mute);
}
.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(280px, 2.4fr) 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer h5 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-mark {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.patent-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  align-self: flex-start;
  white-space: nowrap;
}
.patent-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-mute);
}
[data-bauhaus="on"] .patent-badge .dot { background: var(--red); }

.footer-bottom {
  max-width: var(--maxw);
  margin: 32px auto 0;
  padding: 16px var(--gutter) 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

/* ---------- typography ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num {
  color: var(--ink);
}
[data-bauhaus="on"] .eyebrow .mark {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red);
}
.eyebrow .rule {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--ink-mute);
}

.display {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

em, i {
  font-family: var(--sans) !important;
  font-style: italic;
}
.display em, .h1 em, .h2 em, .quote em, .block-quote em {
  font-weight: 300;
}

.h1 {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}
.h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0;
}
.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}
.body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}
.mono { font-family: var(--mono); }
.small { font-size: 13px; }
.ink-mute { color: var(--ink-mute); }

/* ---------- horizontal rule (hairline) ---------- */
.hr {
  height: 1px;
  background: var(--rule);
  margin: 0;
  border: 0;
}
.hr-strong { background: var(--rule-strong); }

/* ---------- sections ---------- */
section {
  padding: clamp(64px, 10vw, 140px) 0;
  border-top: 1px solid var(--rule);
}
section:first-of-type { border-top: 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 56px;
  align-items: start;
}
.section-head .meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 32px; }
  .nav { gap: 16px; }
  .nav a:not(.cta):not(.active-mobile) { display: none; }
  .nav a.cta { display: inline-flex; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- code blocks ---------- */
.code {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  background: transparent;
  border: 1px solid var(--rule-strong);
  padding: 28px 32px;
  position: relative;
  white-space: pre;
  overflow-x: auto;
  color: var(--ink);
}
.code .kw { color: var(--ink); font-weight: 600; }
.code .var { color: var(--ink); }
.code .str { color: var(--ink-soft); font-style: italic; }
.code .num { color: var(--ink); }
.code .com { color: var(--ink-mute); }
.code .op  { color: var(--ink-mute); }

[data-bauhaus="on"] .code .kw { color: var(--red); }
[data-bauhaus="on"] .code .num { color: var(--blue); }
[data-bauhaus="on"] .code .str { color: var(--ink-soft); }

.code-frame {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  border: 1px solid var(--rule-strong);
}
.code-frame .code { border: 0; border-right: 1px solid var(--rule-strong); }
.code-frame .annot {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--bone-2);
}
.code-frame .annot .line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.code-frame .annot .line .key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.code-frame .annot .line .val {
  color: var(--ink-soft);
}

@media (max-width: 880px) {
  .code-frame { grid-template-columns: 1fr; }
  .code-frame .code { border-right: 0; border-bottom: 1px solid var(--rule-strong); }
}

.caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 12px 0 0;
}

/* ---------- bauhaus rule (column lines) ---------- */
[data-bauhaus="on"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(to right,
      transparent 0,
      transparent calc(50% - 0.5px),
      var(--rule) calc(50% - 0.5px),
      var(--rule) calc(50% + 0.5px),
      transparent calc(50% + 0.5px));
  opacity: 0.5;
}

/* glyph mark used as small accent */
.mark-circle, .mark-square, .mark-triangle {
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--ink);
  vertical-align: middle;
}
.mark-circle { border-radius: 50%; }
.mark-triangle {
  background: transparent;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid var(--ink);
}
[data-bauhaus="on"] .mark-circle { background: var(--blue); }
[data-bauhaus="on"] .mark-square { background: var(--red); }
[data-bauhaus="on"] .mark-triangle { border-bottom-color: var(--yellow); }

/* ---------- pill / tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bone); }
.btn .arrow { font-family: var(--mono); }

/* ---------- form ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink); }
.field textarea { min-height: 100px; resize: vertical; }

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-top: 8px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
}
.checks input[type="checkbox"] {
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  position: relative;
  margin: 0;
}
.checks input[type="checkbox"]:checked {
  background: var(--ink);
}
[data-bauhaus="on"] .checks input[type="checkbox"]:checked { background: var(--red); border-color: var(--red); }

/* ---------- shared ---------- */
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 56px; }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 32px; }
}

.numbered {
  counter-reset: n;
  display: grid;
  gap: 0;
}
.numbered > .item {
  counter-increment: n;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 24px;
  align-items: baseline;
}
.numbered > .item:last-child { border-bottom: 1px solid var(--rule); }
.numbered > .item::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
@media (max-width: 760px) {
  .numbered > .item { grid-template-columns: 60px 1fr; }
  .numbered > .item .body { grid-column: 2 / 3; }
}
