/* ============================================================
   OCCLUDE — base.css
   Variables, reset, typography, folio header, footer, paper grain
   ============================================================ */

/* ---------- Font faces ---------- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- CSS custom properties ---------- */
:root {
  --paper:    #EEE9DC;
  --paper-2:  #E5DFD0;
  --ink:      #14171D;
  --ink-2:    #2A2E37;
  --ink-3:    #6C6F77;
  --ink-4:    #9A9B9F;
  --rule:     #C8C2B1;
  --rule-2:   #B4AE9C;
  --live:     #14171D;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body:  'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }
dd { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; }

/* ---------- Base typography ---------- */
html, body {
  background: var(--paper);
  color: var(--ink);
}
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(20,23,29,0.14); }
a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-2); }
a:hover { border-bottom-color: var(--ink); }
.mono { font-family: var(--mono); }
.sans { font-family: var(--body); }

/* ---------- Paper grain texture ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(20,23,29,0.025) 1px, transparent 1.4px),
    radial-gradient(rgba(20,23,29,0.020) 1px, transparent 1.4px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
main { position: relative; z-index: 1; }

/* ---------- Page container ---------- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

/* ---------- Brand mark: [.] ---------- */
.mk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--mono);
}
.mk-bracket { font-weight: 400; }
.mk-dot {
  width: 5px;
  height: 5px;
  background: var(--live);
  display: inline-block;
  border-radius: 0.5px;
  animation: pulse 3.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.42; }
  50%      { opacity: 1.0; }
}

/* Mark sizes */
.mk-sm { font-size: 14px; }
.mk-sm .mk-dot { width: 4px; height: 4px; }
.mk-md { font-size: 18px; gap: 7px; }
.mk-md .mk-dot { width: 6px; height: 6px; }
.mk-lg { font-size: 48px; gap: 14px; line-height: 1; }
.mk-lg .mk-dot { width: 13px; height: 13px; }

/* ---------- Folio header ---------- */
.folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.folio-l {
  display: flex;
  align-items: center;
  gap: 12px;
}
.folio-title {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 11px;
}
.folio-nav {
  display: flex;
  gap: 22px;
}
.folio-nav a { border: 0; color: var(--ink-3); }
.folio-nav a:hover { color: var(--ink); }
.folio-r {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- Colophon / Footer ---------- */
.colophon {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.colophon .r { display: flex; gap: 22px; }
.colophon a { color: var(--ink-3); border: 0; }
.colophon a:hover { color: var(--ink); }

/* ---------- Utility ---------- */
code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(20,23,29,0.05);
  padding: 1px 5px;
}
.badge {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--rule-2);
  color: var(--ink);
  letter-spacing: 0.08em;
  font-size: 10px;
  text-transform: uppercase;
}
