/* ============================================================
   STOKPOS — design tokens & shared UI
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --paper: #efede6;
  --paper-2: #e4e1d6;
  --ink: #1c1b19;
  --ink-soft: #55524a;
  --teal: #1f5c56;
  --teal-dark: #153f3b;
  --amber: #e8a33d;
  --brick: #b8473a;
  --line: #c9c4b8;
  --line-strong: #a7a192;
  --white: #faf9f5;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 3px;

  /* ---- Dark Mode Token ---- */
  [data-theme="dark"] {
    --paper: #121211;
    --paper-2: #1e1d1a;
    --ink: #efede6;
    --ink-soft: #a7a192;
    --teal: #2a7d75;
    --teal-dark: #3aa399;
    --amber: #e8a33d;
    --brick: #e05c4f;
    --line: #33312b;
    --line-strong: #4d4a41;
    --white: #1c1b19;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0 0 0.4em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
  color: var(--ink-soft);
  max-width: 62ch;
}
a {
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.mono {
  font-family: var(--font-mono);
}

/* ---- Perforated / ticket edge, used as a signature motif ---- */
.torn-edge {
  position: relative;
}
.torn-edge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 9px;
  background-image: radial-gradient(
    circle at 8px 0,
    transparent 7px,
    var(--paper) 7.5px
  );
  background-size: 16px 16px;
  background-position: 0 0;
}

/* ---- Top bar shared across pages ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand .brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.topbar-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.topbar-nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.topbar-nav a.current,
.topbar-nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}
.topbar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  border-radius: 2px;
}

/* ---- Buttons ---- */
.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition:
    transform 0.12s ease,
    background 0.15s ease;
}
.btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
.btn:active {
  transform: scale(0.98);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}
.btn-teal {
  background: var(--teal);
  border-color: var(--teal);
}
.btn-teal:hover {
  background: var(--teal-dark);
}
.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.btn-amber:hover {
  background: #d18f28;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Cards / tags ---- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  display: inline-block;
}
.tag-amber {
  background: #fbf0dc;
  border-color: #e8c583;
  color: #8a5a11;
}
.tag-brick {
  background: #f7e4e1;
  border-color: #e3a79c;
  color: var(--brick);
}
.tag-teal {
  background: #e4eeec;
  border-color: #9ec3bc;
  color: var(--teal-dark);
}

/* ---- Layout helpers ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.section {
  padding: 64px 0;
}
.hairline {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 6px;
}
