/* ============================================================
   OPENCLAW SKILLS — engineering-manual design system
   ============================================================ */

:root {
  /* Theme: Ink (default) */
  --bg:        #f3efe6;       /* warm off-white paper */
  --bg-2:      #ebe6d8;
  --ink:       #0f1a3a;       /* deep navy */
  --ink-2:     #1d2a52;
  --ink-soft:  #4a5578;
  --rule:      #0f1a3a;
  --accent:    #c8472e;       /* signal red — used sparingly */
  --metal-1:   #9aa3b7;
  --metal-2:   #c8ceda;
  --metal-3:   #5a6784;
  --grid:      rgba(15, 26, 58, 0.08);
  --grid-major:rgba(15, 26, 58, 0.14);

  /* Density */
  --pad-x: clamp(24px, 4vw, 72px);
  --pad-y: 48px;
  --gap:   24px;

  /* Type */
  --font-display: "Anton", "Oswald", "Impact", "Arial Narrow Bold", sans-serif;
  --font-body:    "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, "Menlo", monospace;
}

/* Blueprint theme */
[data-theme="blueprint"] {
  --bg:        #0b2038;
  --bg-2:      #0e2846;
  --ink:       #eaf2ff;
  --ink-2:     #cfdef5;
  --ink-soft:  #8ba4c6;
  --rule:      #a8c6ea;
  --accent:    #ffb454;
  --metal-1:   #7c96b8;
  --metal-2:   #b8cbe3;
  --metal-3:   #4a6486;
  --grid:      rgba(168, 198, 234, 0.12);
  --grid-major:rgba(168, 198, 234, 0.22);
}

/* Graphite theme */
[data-theme="graphite"] {
  --bg:        #1a1a1a;
  --bg-2:      #222;
  --ink:       #f2efe6;
  --ink-2:     #d9d4c4;
  --ink-soft:  #8a8576;
  --rule:      #d9d4c4;
  --accent:    #d97a3b;
  --metal-1:   #8a8576;
  --metal-2:   #b8b2a2;
  --metal-3:   #5a564c;
  --grid:      rgba(242, 239, 230, 0.07);
  --grid-major:rgba(242, 239, 230, 0.14);
}

/* Density: compact */
[data-density="compact"] {
  --pad-x: clamp(20px, 3vw, 48px);
  --pad-y: 32px;
  --gap:   16px;
}

/* -------- reset -------- */
* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html, body { background: var(--bg); color: var(--ink); overflow-x: hidden; max-width: 100vw; width: 100%; }
img, svg { max-width: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* -------- grid paper background -------- */
body[data-grid="on"]::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 96px 96px, 96px 96px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

/* -------- type -------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--ink);
}
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mono-lg {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
a { color: inherit; text-decoration: none; }

/* -------- header/nav -------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}
.brand-mark {
  width: 18px; height: 18px;
  border: 1.5px solid var(--ink);
  position: relative;
  transform: rotate(45deg);
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 3px;
  background: var(--ink);
}
nav.site-nav {
  display: flex; align-items: center; gap: 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
nav.site-nav a:not(.btn-pill) {
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 1.5px solid transparent;
}
nav.site-nav a:not(.btn-pill):hover { border-bottom-color: var(--ink); }
nav.site-nav a:not(.btn-pill).active { border-bottom-color: var(--ink); }
.btn-pill,
nav.site-nav a.btn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg) !important;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-pill:hover { transform: translate(-1px, -1px); border-bottom-color: var(--ink) !important; }
.btn-pill.ghost {
  background: transparent; color: var(--ink) !important;
}

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translate(-1px, -1px); }
.btn.ghost { background: transparent; color: var(--ink); }

/* -------- layout primitives -------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.rule { border-top: 1px solid var(--rule); }

/* -------- hex frame (for hero art) -------- */
.hex-frame {
  --hex-clip: polygon(25% 2%, 75% 2%, 98% 50%, 75% 98%, 25% 98%, 2% 50%);
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
}
.hex-frame svg.hex-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* -------- card -------- */
.card {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 22px;
  position: relative;
}
.card .eyebrow { margin-bottom: 10px; }

/* -------- tweaks panel -------- */
.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 260px;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  padding: 18px;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  display: none;
  box-shadow: 8px 8px 0 var(--ink);
}
body[data-tweaks="on"] .tweaks { display: block; }
.tweaks h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks h4::before { content: "◈ TWEAKS"; }
.tweaks h4 span { font-size: 10px; color: var(--ink-soft); }
.tweak-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.tweak-row:first-of-type { border-top: none; }
.seg {
  display: inline-flex;
  border: 1px solid var(--ink);
}
.seg button {
  background: transparent;
  border: none;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  border-left: 1px solid var(--ink);
}
.seg button:first-child { border-left: none; }
.seg button.on { background: var(--ink); color: var(--bg); }

/* -------- corner crop marks on sections -------- */
.crops {
  position: absolute; inset: 0; pointer-events: none;
}
.crops::before, .crops::after,
.crops > span::before, .crops > span::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}
.crops::before { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.crops::after { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.crops > span::before { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; position: absolute; width:14px;height:14px; }
.crops > span::after { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; position: absolute; width:14px;height:14px; }

/* -------- footer -------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px var(--pad-x);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 64px;
}
.site-footer .dots { display: flex; gap: 6px; }
.site-footer .dots i {
  width: 6px; height: 6px; background: var(--ink-soft); display: block;
}

/* ==================== Mobile / H5 ==================== */
@media (max-width: 720px) {
  :root {
    --pad-x: 16px;
    --pad-y: 28px;
    --gap: 14px;
  }
  body { font-size: 14px; }

  .site-header {
    padding: 12px var(--pad-x);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .site-header .brand {
    font-size: 10.5px; letter-spacing: 0.16em;
    justify-content: flex-start;
  }
  .brand-mark { width: 14px; height: 14px; }
  nav.site-nav {
    width: 100%;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed var(--rule);
    flex-wrap: nowrap;
  }
  nav.site-nav a:not(.btn-pill) { padding: 4px 0; }
  .btn-pill, nav.site-nav a.btn-pill {
    padding: 7px 12px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .btn { padding: 12px 18px; font-size: 11px; letter-spacing: 0.16em; }

  .site-footer {
    flex-direction: column;
    gap: 10px;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-align: center;
    padding: 22px var(--pad-x);
    margin-top: 40px;
  }

  .tweaks {
    right: 10px; bottom: 10px; left: 10px; width: auto;
    padding: 14px;
  }

  body[data-grid="on"]::before {
    background-size: 14px 14px, 14px 14px, 70px 70px, 70px 70px;
  }
}

/* utilities */
.flex { display: flex; }
.col { flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-sm { gap: 8px; } .gap-md { gap: 16px; } .gap-lg { gap: 32px; }
.mt-sm { margin-top: 8px; } .mt-md { margin-top: 16px; } .mt-lg { margin-top: 32px; } .mt-xl { margin-top: 64px; }
.mb-sm { margin-bottom: 8px; } .mb-md { margin-bottom: 16px; } .mb-lg { margin-bottom: 32px; }
