/* ==========================================================================
   pawngrubber.com — base design system & shell styles
   (Design tokens moved to css/tokens.css)
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0; }

::selection { background: var(--accent); color: var(--on-accent); }

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

/* ---------- header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: .55rem; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(140deg, var(--board-light), var(--board-dark));
  color: #1a1206; font-size: 17px; line-height: 1;
}
.brand-mark.small { width: 24px; height: 24px; font-size: 14px; }
.brand-text { font: 600 15px/1 var(--mono); letter-spacing: -.01em; }

.nav { display: flex; gap: 1.6rem; }
.nav a {
  font-size: 14px; color: var(--text-2);
  padding: .25rem 0; position: relative; transition: color .15s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: var(--accent); transition: right .22s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { right: 0; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav a[aria-current="page"]::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--text-2);
  font-size: 15px; cursor: pointer; transition: .15s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--text); }
.nav-toggle {
  display: none;
  background: transparent;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-position: center 11px, center 16px, center 21px;
  background-size: 15px 1.5px;
  background-repeat: no-repeat;
}

/* ---------- buttons & tags --------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--text);
  font-size: 14.5px; font-weight: 500;
  transition: .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--text-3); }
.btn-glyph { font-size: 12px; opacity: .8; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text-2); }

.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.tag {
  padding: .22rem .55rem; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 500 11.5px/1.5 var(--mono); color: var(--text-2);
}

/* ---------- sections ---------------------------------------------------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem);
}
.section-head { margin-bottom: 2.25rem; }
.section-head h2 {
  display: flex; align-items: baseline; gap: .8rem;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
}
.sec-num {
  font: 500 13px/1 var(--mono); color: var(--accent);
  letter-spacing: .05em;
}
.section-head p { margin-top: .8rem; max-width: 58ch; color: var(--text-2); }

/* ---------- footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: .75rem;
  font: 400 13px/1.5 var(--mono); color: var(--text-3);
}
.footer-right { margin-left: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 680px) {
  html { scroll-padding-top: 70px; }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    padding: .5rem clamp(1rem, 4vw, 2.5rem) 1rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    visibility: hidden; pointer-events: none;
    transition: transform .25s ease, visibility .25s;
    box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); visibility: visible; pointer-events: auto; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: block; }

  .footer-inner { flex-wrap: wrap; font-size: 12px; }
  .footer-right { margin-left: 0; width: 100%; }
}
