/* Second Line Research — stylesheet.
   System fonts only, no web font request, to keep layout shift and long-term
   maintenance risk at zero. Two type families: sans for prose and headings,
   mono for anything that is label, index or figure (nav, section numbers,
   form labels, chart legend, footer metadata) — never for text a visitor
   types. Fixed sizes per breakpoint (640/960/1200px), not fluid clamp(). */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --paper:        #F7F6F2;
  --panel:        #EEECE5;
  --field-bg:     #FFFFFF;
  --ink:          #14181C;
  --ink-muted:    #4B535A;
  --label:        #6B6357;
  --rule:         #D8D3C7;
  --rule-strong:  #B7B0A0;
  --field-border: #867C6D;
  --accent:       #A13327;
  --accent-dark:  #7E2419;
  --white:        #FFFFFF;

  --outer-margin: 20px;
  --content-max: 1200px;
}

@media (min-width: 640px) {
  :root { --outer-margin: 24px; }
}
@media (min-width: 960px) {
  :root { --outer-margin: 40px; }
}

/* ---------- Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, p, ol, ul, figure {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--outer-margin);
}

/* ---------- Visually hidden (screen-reader only) ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus & skip link ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  text-decoration: none;
  transition: top 100ms ease-out;
}
.skip-link:focus {
  top: 8px;
}

/* ---------- Content-column rule ---------- */

.margin-rule {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--outer-margin);
  width: 1px;
  background: var(--rule);
  pointer-events: none;
  display: none;
}
@media (min-width: 640px) {
  .margin-rule { display: block; }
}

/* ---------- Header & nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}
@media (min-width: 960px) {
  .header-row { height: 64px; }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.wordmark-mark {
  width: 20px;
  height: 20px;
  flex: none;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wordmark-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}
@media (min-width: 480px) {
  .wordmark-name { font-size: 15px; }
}
.wordmark-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
}

.nav-desktop { display: none; }
@media (min-width: 960px) {
  .nav-desktop {
    display: block;
  }
  .nav-desktop ul {
    display: flex;
    gap: 32px;
  }
  .nav-desktop a {
    position: relative;
    display: inline-block;
    padding: 4px 0;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--label);
  }
  .nav-desktop a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 120ms ease-out;
  }
  .nav-desktop a:hover,
  .nav-desktop a:focus-visible {
    color: var(--ink);
  }
  .nav-desktop a:hover::after,
  .nav-desktop a:focus-visible::after {
    transform: scaleX(1);
  }
}

.nav-mobile {
  border-bottom: 1px solid var(--rule);
}
.nav-mobile ul {
  display: flex;
  flex-wrap: wrap;
  padding-inline: calc(var(--outer-margin) - 16px);
}
.nav-mobile li { flex: none; }
.nav-mobile a {
  display: block;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  color: var(--label);
}
.nav-mobile a:hover,
.nav-mobile a:focus-visible {
  color: var(--ink);
}
@media (min-width: 960px) {
  .nav-mobile { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  overflow-x: hidden;
  position: relative;
  padding-block: 48px;
}
@media (min-width: 640px) { .hero { padding-block: 64px; } }
@media (min-width: 960px) { .hero { padding-block: 96px; } }

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-text {
  max-width: 40em;
}

.hero-text h1 {
  font-weight: 650;
  font-size: 32px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
@media (min-width: 640px) { .hero-text h1 { font-size: 42px; } }
@media (min-width: 960px) { .hero-text h1 { font-size: 54px; } }
@media (min-width: 1200px) { .hero-text h1 { font-size: 60px; } }

.hero-dek {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 38em;
}
@media (min-width: 640px) { .hero-dek { font-size: 18px; } }
@media (min-width: 960px) { .hero-dek { font-size: 19px; } }

.hero-jump {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--label);
}
.hero-jump:hover,
.hero-jump:focus-visible {
  color: var(--accent);
}

.exhibit {
  margin: 0;
}
.exhibit-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: var(--panel);
}
@media (min-width: 640px) {
  .exhibit-img { height: 220px; }
}
@media (min-width: 960px) {
  .exhibit-img { height: auto; }
}

.exhibit figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 46em;
}
.exhibit figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 960px) {
  .hero-grid {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }
  .hero-text {
    flex: 0 0 auto;
    width: 55%;
    padding-right: 32px;
  }
  .exhibit {
    flex: 1 1 auto;
    margin-right: calc(50% - 50vw);
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .exhibit-img { flex: 1 1 auto; min-height: 0; }
  .exhibit figcaption { padding-right: 40px; }
}

/* ---------- Contents ---------- */

.contents {
  display: block;
  padding-block: 32px;
  border-top: 1px solid var(--rule);
}

.contents-heading {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 12px;
}

.contents-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 11px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

.contents-idx {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--accent);
  flex: none;
}
@media (min-width: 640px) { .contents-idx { font-size: 14px; } }

.contents-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  flex: none;
}
@media (min-width: 640px) { .contents-label { font-size: 14px; } }

.contents-leader {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--rule-strong);
  margin-bottom: 5px;
}

.contents-row:hover .contents-label,
.contents-row:focus-visible .contents-label {
  color: var(--accent);
}

/* ---------- Numbered sections ---------- */

.section {
  padding-block: 48px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 640px) { .section { padding-block: 64px; } }
@media (min-width: 960px) { .section { padding-block: 96px; } }

.section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 32px;
}

.section .idx {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--accent);
}

.section .kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
@media (min-width: 960px) { .section .kicker { font-size: 13px; } }

.sub-idx {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--accent);
  margin-right: 10px;
}

.prose { max-width: 66ch; }
.prose p + p { margin-top: 20px; }
.prose p { font-size: 16px; }
@media (min-width: 640px) { .prose p { font-size: 16.5px; } }
@media (min-width: 960px) { .prose p { font-size: 17px; } }

.lede {
  max-width: 66ch;
  font-size: 19px;
  line-height: 1.5;
}
@media (min-width: 640px) { .lede { font-size: 21px; } }
@media (min-width: 960px) { .lede { font-size: 23px; } }

/* ---------- 01 What we do ---------- */

.wwd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.wwd-item h3 {
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
}
.wwd-item p { font-size: 16px; max-width: 40ch; }

@media (min-width: 960px) {
  .wwd-grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
  }
  .wwd-item {
    border-left: 1px solid var(--rule);
    padding-left: 32px;
  }
  .wwd-item:first-child {
    border-left: none;
    padding-left: 0;
  }
  .wwd-item h3 { font-size: 21px; }
}

/* ---------- 02 How we work ---------- */

.hw-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hw-row {
  font-size: 16px;
  line-height: 1.62;
}
.hw-label {
  display: inline;
  margin-right: 6px;
}

@media (min-width: 960px) {
  .hw-list { gap: 24px; }
  .hw-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 24px;
    align-items: baseline;
    font-size: 17px;
  }
  .hw-label {
    display: block;
    text-align: right;
    padding-right: 24px;
    border-right: 1px solid var(--rule);
    margin-right: 0;
  }
  .sub-idx { display: block; margin-right: 0; margin-bottom: 4px; }
}

/* ---------- 05 Contact ---------- */

.section-panel {
  background: var(--panel);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 64px;
    align-items: start;
  }
}

.contact-email {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 18px;
}
.contact-email a {
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-email a:hover,
.contact-email a:focus-visible {
  text-decoration: underline;
}

.contact-sub {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 16px;
}

.contact-panel {
  background: var(--field-bg);
  border: 1px solid var(--rule-strong);
  padding: 24px;
}
@media (min-width: 640px) { .contact-panel { padding: 32px; } }

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
}

.required-tag {
  color: var(--accent);
  font-size: 12px;
}

.field input,
.field textarea {
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 2px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--ink);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--accent-dark);
}

.field-error {
  font-size: 12.5px;
  color: var(--accent-dark);
  min-height: 1em;
}

/* Honeypot: visually hidden, not display:none, so it stays a normal (if
   oddly placed) field to anything reading the DOM — the point of the trap. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[type="submit"] {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 12px 28px;
  cursor: pointer;
}
button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
button[type="submit"]:disabled {
  cursor: default;
  opacity: 0.7;
}

.form-status {
  font-size: 14px;
  color: var(--ink-muted);
  min-height: 1.4em;
}
.form-status[data-state="error"] { color: var(--accent-dark); }
.form-status[data-state="success"] { color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 32px;
}
.site-footer p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.site-footer p + p { margin-top: 6px; }
@media (min-width: 640px) {
  .site-footer p { font-size: 12.5px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
