/* Ranima — editorial black and white. No external requests. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400i.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0a0a0a;
  --paper: #ffffff;
  --mute: #595959;
  --hair: #0a0a0a;
  --soft: #d6d6d6;
  --serif: "Instrument Serif", "Times New Roman", Times, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(20px, 4.4vw, 64px);
  --max: 1360px;
  --col-gap: clamp(16px, 2vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

.skip {
  position: absolute; left: var(--gut); top: -100px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-weight: 700; text-decoration: none; z-index: 10;
}
.skip:focus-visible { top: 12px; outline-color: var(--ink); }

.wrap {
  width: min(calc(var(--max) - 2 * var(--gut)), calc(100% - 2 * var(--gut)));
  margin-left: auto; margin-right: auto;
}

/* Small label voice: letter-spaced sans caps */
.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ---------- Masthead ---------- */
.masthead { padding-top: 22px; }
.masthead .bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--hair);
}
.wordmark {
  font-family: var(--serif); font-size: 30px; line-height: 1;
  letter-spacing: -0.01em; text-decoration: none;
}
.nav { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.nav a { font-size: 14px; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.meta-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--soft);
}
.meta-strip > * { padding: 12px 0; color: var(--mute); }
.meta-strip > * + * { padding-left: 16px; border-left: 1px solid var(--soft); }
.meta-strip .now { color: var(--ink); display: flex; align-items: center; gap: 10px; }
.sq { width: 8px; height: 8px; background: var(--ink); flex: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 150px) 0 clamp(56px, 8vw, 112px); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(58px, 10.2vw, 156px);
  line-height: 0.9;
  letter-spacing: -0.025em;
}
.hero h1 .l2 { display: block; padding-left: calc((100% + var(--col-gap)) / 12 * 2); }
.hero h1 em { font-style: italic; letter-spacing: -0.02em; }
.hero .below {
  margin-top: clamp(40px, 6vw, 88px);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap);
  align-items: end;
}
.status {
  grid-column: 1 / span 4;
  display: grid; gap: 6px;
  border-top: 1px solid var(--hair); padding-top: 14px;
}
.status .big {
  font-family: var(--serif); font-size: clamp(30px, 3vw, 40px); line-height: 1;
}
.status .small { color: var(--mute); font-size: 15px; }
.lede {
  grid-column: 7 / -1;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.5;
  max-width: 34em;
}

/* ---------- Sections ---------- */
.section > .grid { border-top: 1px solid var(--hair); }
.band .section > .grid { border-top: 0; }
.section .grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap);
  padding-top: clamp(28px, 3vw, 40px);
  padding-bottom: clamp(72px, 9vw, 136px);
}
.section .head { grid-column: 1 / span 4; }
.num {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(44px, 4.6vw, 68px); line-height: 1;
  margin-bottom: 14px;
}
.section .body { grid-column: 5 / -1; }

.statement {
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 19em;
}
.cols {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap);
  color: var(--ink);
  font-size: 18px;
  max-width: 54em;
}

/* ---------- Inverted project band ---------- */
.band { background: var(--ink); color: var(--paper); }
.band .section .grid { padding-top: clamp(40px, 5vw, 72px); }
.band :focus-visible { outline-color: var(--paper); }
.band .label.dim, .band .dim { color: #b3b3b3; }
.project-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(54px, 9.4vw, 148px);
  line-height: 0.92; letter-spacing: -0.025em;
  grid-column: 1 / -1;
  margin-top: clamp(8px, 2vw, 24px);
}
.project-meta {
  grid-column: 1 / span 4;
  display: grid; gap: 4px; align-content: start;
  border-top: 1px solid #ffffff; padding-top: 14px;
}
.project-meta .big { font-family: var(--serif); font-size: 30px; line-height: 1.05; }
.project-copy { grid-column: 5 / -1; }
.project-copy .intro {
  font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; max-width: 34em;
}
.functions { margin-top: clamp(36px, 4vw, 56px); border-top: 1px solid #4d4d4d; }
.functions li {
  display: grid; grid-template-columns: 4.2em 1fr; align-items: baseline;
  padding: 14px 0 15px; border-bottom: 1px solid #4d4d4d;
}
.functions .n { font-size: 13px; letter-spacing: 0.1em; color: #b3b3b3; font-variant-numeric: tabular-nums; }
.functions .f { font-family: var(--serif); font-size: clamp(26px, 2.5vw, 36px); line-height: 1.1; }
.functions-caption { margin-bottom: 0; }
.control {
  margin-top: clamp(28px, 3vw, 40px);
  max-width: 38em; color: #e0e0e0;
}
.out {
  margin-top: clamp(28px, 3vw, 40px);
  display: inline-flex; align-items: baseline; gap: 12px;
  font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px);
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px;
}
.out:hover { border-bottom-width: 2px; }
.out span { font-family: var(--sans); font-size: 0.6em; }

/* ---------- Details ---------- */
.facts { border-top: 1px solid var(--hair); }
.facts > div {
  display: grid; grid-template-columns: minmax(150px, 1fr) 2.4fr; gap: var(--col-gap);
  padding: 16px 0 18px; border-bottom: 1px solid var(--soft);
}
.facts dt { color: var(--mute); padding-top: 4px; }
.facts dd { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.4; }

/* ---------- Contact ---------- */
.contact-line { font-size: clamp(19px, 1.6vw, 22px); max-width: 30em; }
.mail {
  display: inline-block;
  margin-top: clamp(20px, 3vw, 36px);
  font-family: var(--serif);
  font-size: clamp(38px, 8.4vw, 128px);
  line-height: 1; letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 0.06em;
  overflow-wrap: anywhere;
}
.mail:hover { border-bottom-width: 4px; }

.alt { margin-top: 18px; color: var(--mute); }

/* ---------- Contact ---------- */
.contact-grid {
  margin-top: clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap);
  border-top: 1px solid var(--hair); padding-top: clamp(24px, 3vw, 36px);
}
.form { grid-column: 1 / span 7; display: grid; gap: 28px; align-content: start; }
.aside { grid-column: 9 / -1; display: grid; gap: 4px; align-content: start; }
.aside .label { margin-top: 18px; color: var(--mute); }
.aside .label:first-child { margin-top: 0; }
.aside .fine { margin-top: 18px; color: var(--mute); font-size: 14px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.field .opt { font-weight: 400; letter-spacing: 0.06em; color: var(--mute); text-transform: none; }
.field input, .field textarea {
  font: inherit; font-size: 19px; color: var(--ink); background: var(--paper);
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 8px 0 10px; width: 100%;
}
.field textarea { border: 1px solid var(--ink); padding: 12px 14px; resize: vertical; min-height: 180px; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.field [aria-invalid="true"] { border-color: #a4161a; border-bottom-width: 2px; }
.hint { color: var(--mute); font-size: 14px; }
.err { color: #a4161a; font-size: 15px; font-weight: 700; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { min-height: 65px; }
.note { font-size: 15px; }
.status:empty { display: none; }
.status { font-size: 17px; padding: 14px 16px; border: 1px solid var(--ink); }
.status.error { border-color: #a4161a; color: #a4161a; font-weight: 700; }
.status.ok { background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.send {
  justify-self: start; font: inherit; font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: 15px 30px; cursor: pointer; border-radius: 0;
}
.send:hover { background: var(--paper); color: var(--ink); }
.send:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.send:disabled { opacity: 0.6; cursor: progress; }
.form .small { color: var(--mute); font-size: 14px; }
.page .intro + .intro { margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { padding: 0 0 40px; font-size: 14px; }
.footer > .grid { border-top: 1px solid var(--hair); padding-top: 28px; }
.footer .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.footer .who { grid-column: 1 / span 4; }
.footer .who strong { display: block; font-size: 14px; letter-spacing: 0.06em; }
.footer .office { grid-column: 5 / span 5; color: var(--mute); }
.footer .office .label { color: var(--ink); display: block; margin-bottom: 4px; }
.footer .links { grid-column: 10 / -1; display: grid; gap: 4px; justify-items: start; }
.footer .copy { grid-column: 1 / -1; color: var(--mute); margin-top: 28px; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding: clamp(48px, 8vw, 120px) 0 clamp(64px, 8vw, 120px); }
.page h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 8vw, 120px); line-height: 0.95; letter-spacing: -0.02em;
}
.page .intro { margin-top: 28px; font-size: clamp(19px, 1.6vw, 22px); max-width: 34em; }
.prose { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--hair); }
.prose section {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap);
  padding: 22px 0 30px; border-bottom: 1px solid var(--soft);
}
.prose h2 {
  grid-column: 1 / span 4;
  font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15;
}
.prose .text { grid-column: 5 / span 7; display: grid; gap: 12px; max-width: 38em; }
.prose ul { display: grid; gap: 6px; }
.prose li { padding-left: 18px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 1px; background: var(--ink); }
.updated { margin-top: 24px; color: var(--mute); font-size: 14px; }
.back { margin-top: 36px; display: inline-block; font-size: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form, .aside { grid-column: 1 / -1; }
  .aside { margin-top: 24px; border-top: 1px solid var(--soft); padding-top: 24px; }
  .hero .below, .section .grid, .footer .grid, .prose section { grid-template-columns: 1fr; }
  .status, .lede, .section .head, .section .body, .project-meta, .project-copy,
  .footer .who, .footer .office, .footer .links, .footer .copy,
  .prose h2, .prose .text { grid-column: 1 / -1; }
  .hero .below { gap: 36px; }
  .lede { order: -1; }
  .hero h1 .l2 { padding-left: 0; display: inline; }
  .section .head { display: flex; align-items: baseline; gap: 16px; }
  .num { margin-bottom: 0; }
  .footer .grid { gap: 20px; }
  .footer .copy { margin-top: 8px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .footer .links { gap: 10px; }
  .nav a { padding: 6px 0; }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .meta-strip .where { display: none; }
  .nav { gap: 16px; }
  .nav .opt { display: none; }
  .cols { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .functions li { grid-template-columns: 2.8em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .skip, .nav { display: none; }
  .band { background: none; color: var(--ink); }
}
