/* codemany.com base: zinc monochrome tokens, JetBrains Mono, 40px grid, one-screen layout, nav, buttons, footer.
 * Every page is a single screen: body is a 100svh column (nav, main, slim footer) and never scrolls.
 * Light only: no dark theme, and color-scheme: light keeps form controls and scrollbars light under an OS dark mode. */
:root {
  --background: #ffffff;
  --foreground: #09090b;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --muted: #f4f4f5;
  --grid: #00000008;
  --ring: #a1a1aa;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --shadow: 0 1px 2px #0000000d, 0 8px 24px -12px #0000001f;
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  background-image:
    linear-gradient(90deg, var(--grid) 1px, #0000 1px),
    linear-gradient(var(--grid) 1px, #0000 1px);
  background-size: 40px 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  padding: 8px 12px; background: var(--primary); color: var(--primary-foreground);
  border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 16px; }
code {
  font: inherit; font-size: .95em; color: var(--foreground); background: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere;
}

/* ---------- logo mark (alpha mask of the brand SVG, painted in currentColor) ---------- */
.mark {
  display: inline-block; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url(/brand/logo-mark-small.svg) center / contain no-repeat;
  mask: url(/brand/logo-mark-small.svg) center / contain no-repeat;
}

/* ---------- nav ---------- */
.nav {
  position: relative; z-index: 40; flex: none;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; height: 56px; padding: 0 16px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 700; font-size: 16px; letter-spacing: -0.05em;
}
.nav-links { display: flex; gap: 20px; margin-right: auto; font-size: 13px; }
.nav-links a { color: var(--muted-foreground); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--foreground); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--border); border-radius: 6px; background: var(--background);
  color: var(--foreground); cursor: pointer;
}
.icon-btn:hover { background: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  font: 500 14px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--background); border-color: var(--border); color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- one-screen layout ---------- */
body { height: 100vh; height: 100svh; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 500; color: var(--muted-foreground); letter-spacing: .02em; }
.eyebrow::before { content: "// "; }
.wordmark { margin: 0; font-weight: 700; letter-spacing: -0.05em; font-size: clamp(2.5rem, 9vh, 6rem); line-height: 1; }
.tagline { margin: 0; max-width: 36rem; font-size: 15px; color: var(--foreground); }
.muted { color: var(--muted-foreground); }

/* ---------- footer: one slim line ---------- */
.footer { flex: none; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }
.footer-inner {
  max-width: 1080px; margin: 0 auto; height: 40px; padding: 0 16px;
  display: flex; align-items: center; gap: 6px 14px; white-space: nowrap;
}
.footer-inner span { margin-right: auto; }
.footer a { text-decoration: none; }
.footer a:hover, .footer a[aria-current="page"] { color: var(--foreground); }

@media (max-width: 600px) {
  .nav-inner { gap: 12px; }
  .nav-links { display: none; }
  /* seven links do not fit one line on a phone: drop the copyright and wrap, centered */
  .footer-inner { height: auto; min-height: 40px; padding: 6px 16px; flex-wrap: wrap; justify-content: center; gap: 0 12px; }
  .footer-inner span { display: none; }
}
@media (max-height: 560px) {
  .nav-inner { height: 48px; }
  .footer-inner { height: 32px; }
}
