/* Small Company Almanac — smallcompanyalmanac.com
   Hand-written, no framework. Light, locked. No dark variant ships. 
   After stewardvc.com patterns with SCA brand adaptations. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/serif-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: only light;
  --bg: #faf8f4;
  --ink: #1a1a1a;
  --muted: #5a5a57;
  --rule: #d9d4ca;
  --accent: #8b5a3c;
  --accent-ink: #6b3f2a;
  --measure: 42rem;

  /* Stroke-token system for drawn artifacts */
  --ink-weight-fine: 0.4;
  --ink-weight-mid: 1.0;
  --ink-weight-bold: 1.6;
  --ink-opacity-shadow: 0.35;
  --ink-opacity-detail: 0.55;
  --hatch-density: 4;

  /* Rule-weight tokens */
  --rule-weight-fine: 0.5px;
  --rule-weight-standard: 1px;
  --rule-weight-emphatic: 1.5px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga', 'calt';
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.site-header {
  padding: 2rem 0 0;
}

.wordmark {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}

.rail {
  border-top: var(--rule-weight-standard) solid var(--rule);
  padding-top: 0.75rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rail span {
  font-variant-numeric: tabular-nums;
}

.rail-bottom {
  margin-top: 3rem;
  margin-bottom: 0;
  border-bottom: var(--rule-weight-standard) solid var(--rule);
  padding-bottom: 0.75rem;
  padding-top: 0;
}

.hero {
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  max-width: var(--measure);
}

.lede {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  max-width: calc(var(--measure) - 4rem);
  color: var(--ink);
}

.posture {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: calc(var(--measure) - 6rem);
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  border-radius: 0;
  transition: background-color 0.15s ease;
}

.cta-button:hover {
  background: var(--accent-ink);
}

.rule {
  border: none;
  height: var(--rule-weight-standard);
  background: var(--rule);
  margin: 3rem auto;
  max-width: var(--measure);
}

.block {
  padding: 2rem 0;
}

.block h2 {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 2rem;
  line-height: 1.3;
}

.cards {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.cards article {
  padding: 1.5rem 0;
}

.card-num {
  display: block;
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.cards h3 {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.cards p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: var(--ink);
}

.site-footer {
  padding: 2rem 0 3rem;
  margin-top: 4rem;
  border-top: var(--rule-weight-standard) solid var(--rule);
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--ink);
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Fieldnote-specific styles */
.fieldnote-header {
  margin-bottom: 2rem;
}

.fieldnote-date {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.fieldnote-title {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.fieldnote-content {
  max-width: var(--measure);
}

.fieldnote-content h2 {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

.fieldnote-content p {
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.fieldnote-content blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--rule);
  font-style: italic;
  color: var(--muted);
}

.fieldnote-content a {
  color: var(--accent);
  text-decoration: underline;
}

.fieldnote-content a:hover {
  color: var(--accent-ink);
}

/* Archive listings */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.archive-list li {
  margin: 0 0 1.5rem;
  padding: 0;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
}

.archive-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.archive-title {
  font-family: 'Source Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.archive-title a {
  color: var(--ink);
  text-decoration: none;
}

.archive-title a:hover {
  text-decoration: underline;
}

.archive-date {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.archive-excerpt {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .rail {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .rail span {
    flex: 1;
    min-width: calc(50% - 0.25rem);
  }
}