@font-face {
  font-family: Kalam;
  src: url('/assets/fonts/kalam-latin-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f6f0e2;
  --sheet: #fff9ec;
  --ink: #253b47;
  --muted: #515c5d;
  --line: #b7b4a5;
  --red-ink: #9d3f29;
  --faint-rule: #253b4715;
  --hand: Kalam, 'Segoe Print', Bitter, Georgia, serif;
}

body::before { opacity: .065; }
::selection { background: #ead6a2; color: var(--ink); }

h1, h2, h3 {
  font-family: var(--hand);
  font-weight: 700;
  letter-spacing: -.035em;
}

h1 em, h2 em, h3 em { font-family: inherit; font-style: normal; font-weight: inherit; }
h2 em { color: var(--red-ink); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--red-ink);
  outline-offset: 4px;
}

.site-header {
  border-bottom-color: var(--ink);
  box-shadow: 0 3px 0 -2px var(--line);
}

.brand-mark, .button, .nav-cta, .menu-toggle, .stamp {
  border-radius: 2px 5px 3px 4px / 5px 2px 4px 2px;
}

.brand-mark { box-shadow: 2px 1px 0 var(--faint-rule); }
.site-header nav a[aria-current="page"] { text-decoration-color: var(--red-ink); }
.reading-progress { background: var(--red-ink); }
.button.dark { box-shadow: 3px 3px 0 #253b4735; }
.button.dark:hover { background: #375565; }

.hero { gap: clamp(10px, 3vw, 48px); }
.hero h1 {
  font-size: clamp(3.85rem, 6.4vw, 6.15rem);
  line-height: 1.01;
  letter-spacing: -.047em;
}
.hero h1 em { color: var(--red-ink); margin-left: 0; }
.underlined::after {
  border-top-color: var(--red-ink);
  border-top-width: 2px;
  height: 12px;
  bottom: -6px;
}
.underlined::before {
  content: '';
  position: absolute;
  inset: auto 17% -7px 7%;
  height: 5px;
  border-top: 1px solid var(--red-ink);
  border-radius: 58% 42% 0 0;
  transform: rotate(-3deg);
}

.hero-sketch { margin: 0; min-width: 0; }
.hero-sketch img { display: block; width: 100%; height: auto; }
.hero-note { color: var(--muted); }
.note-face, .hand-star, .process-note svg, .closing-label > svg { color: var(--red-ink); stroke: currentColor; }
.hero-foot { border-color: var(--line); }

.service-row:hover { background: #eadfca82; }
.service-arrow { border-radius: 46% 54% 49% 51% / 52% 48% 54% 46%; }
.service-name h3 { letter-spacing: -.027em; }
.service-number { color: var(--red-ink); }

.ai-section, .service-ai {
  color: var(--ink);
  background-color: #f0e7d5;
  background-image: repeating-linear-gradient(transparent 0 29px, var(--faint-rule) 29px 30px);
  border-block: 1px solid var(--line);
}
.ai-section .eyebrow, .ai-section .ai-caption, .ai-section .ai-story p,
.ai-section .ai-postscript, .service-ai .eyebrow, .service-ai p { color: var(--muted); }
.ai-section .ai-story strong, .ai-section .ai-story .stamp.light { color: var(--ink); }
.ai-section .ai-equation { color: var(--ink); }
.ai-section .ai-equation .equation-star { color: var(--red-ink); }
.ai-section .ai-title h2 em { color: var(--red-ink); }
.ai-section .ai-story .stamp, .ai-section .ai-equation > span:not(.equation-star) { border-color: var(--ink); }
.ai-section .ai-promises > div { border-color: var(--line); }
.ai-section::before, .ai-section::after { display: none; }

.process-note, .service-poster, .brief-paper {
  background-color: var(--sheet);
  background-image: repeating-linear-gradient(transparent 0 26px, var(--faint-rule) 26px 27px);
  border-color: var(--ink);
  border-radius: 2px 5px 3px 4px / 4px 2px 5px 3px;
  box-shadow: 4px 5px 0 #d7cbb5;
}
.process-note { transform: rotate(-2deg); }
.service-poster { transform: rotate(2deg); }
.service-poster .poster-star, .service-poster .poster-number { color: var(--red-ink); }
.service-poster .poster-name {
  font-family: var(--hand);
  color: var(--ink);
  line-height: 1.06;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.service-hero h1, .contact-hero h1, .closing h2 { letter-spacing: -.04em; }

.scope-row, .content-guide, .faq-section, .faq-list details { border-color: var(--line); }
.faq-list details > summary { font-weight: 600; }
.faq-list details > summary > span { color: var(--red-ink); }
.faq-list details[open] { background-color: #fff9ec88; }
.faq-list details[open] > summary, .faq-list details[open] > p,
.faq-list details[open] > ul { padding-inline-start: 10px; }
.faq-list details[open] > summary { padding-inline-end: 8px; }
.faq-list details[open] > ul { padding-inline-start: 28px; }

.article-grid .article-card {
  background: var(--sheet);
  border-color: var(--line);
  border-radius: 2px 4px 3px 5px / 4px 2px 3px 2px;
  box-shadow: 3px 3px 0 #253b4710;
}
.article-grid .article-card:nth-child(3n+2) { background: #f1e8d5; }
.article-grid .article-card > a:hover { background: #fffaf0; }
.article-grid .article-card h3 { letter-spacing: -.028em; }
.article-card-meta > span { color: var(--red-ink); }
.article-archive .article-archive-intro h1 > span { color: var(--red-ink); }

.prose-page h2, .content-guide h2 { letter-spacing: -.025em; }
.site-footer { border-top-color: var(--ink); }

@media (min-width: 761px) and (max-width: 980px) {
  .hero h1 { font-size: clamp(3.3rem, 6.1vw, 4.6rem); }
}
@media (max-width: 760px) {
  .hero { gap: 5px; }
  .hero h1 { font-size: clamp(3.05rem, 8.6vw, 4.8rem); }
  .hero-sketch { width: min(100%, 475px); margin-inline: auto; }
}
@media (max-width: 375px) {
  .hero h1 { font-size: clamp(2.65rem, 8.5vw, 3rem); }
}
