/* eigencrust.com
 *
 * Palette and type come from the app's own theme (app/eigencrust/theme.py) so
 * the site and the tool match: warm charcoal ground, parchment text, one ochre
 * accent on the top bezel, links and the focus ring.
 */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('fonts/ibm-plex-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('fonts/ibm-plex-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('fonts/ibm-plex-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('fonts/ibm-plex-mono-500.woff2') format('woff2'); }

:root {
  --bg: #181715;
  --panel: #211f1c;
  --raised: #2a2723;
  --border: #38342d;
  --border-strong: #4a453b;
  --text: #e9e4d9;
  --text-dim: #a49d8f;
  --text-faint: #6f695c;
  --accent: #d29b3f;
  --accent-hover: #e2ac52;
  --negative: #c5654d;
  --positive: #7aa25f;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  border-top: 2px solid var(--accent);   /* the instrument bezel */
}

main { width: min(62rem, calc(100% - 3rem)); margin: 0 auto; }

/* ------------------------------------------------------------ masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 2.2rem 0 1.6rem;
}
.mark { width: 34px; height: 34px; display: block; flex: none; }
.wordmark {
  margin: 0;
  font-weight: 600; font-size: 1.35rem; line-height: 1;
  letter-spacing: .09em;
}
.nb { white-space: nowrap; }

.tagline {
  font-size: .8rem; letter-spacing: .04em; line-height: 1;
  color: var(--text-dim);
  padding: .25rem 0 .25rem .8rem;
  border-left: 1px solid var(--border-strong);
}

/* ------------------------------------------------------------- opening */

.lede {
  font-size: 1.35rem;
  line-height: 1.45;
  max-width: 44ch;
  margin: 1.2rem 0 2rem;
}
.lede .quiet { color: var(--text-dim); }

figure { margin: 0 0 2.6rem; }
figure video, figure img {
  display: block; width: 100%; max-width: 100%; height: auto;
  border: 1px solid var(--border);
  background: var(--bg);
}
figcaption {
  margin-top: .55rem;
  font-size: .85rem;
  color: var(--text-dim);
  max-width: 70ch;
}

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

section { padding: 2.4rem 0 0; }

h2 {
  margin: 0 0 1.2rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

p { max-width: 70ch; }

/* The measured run: prose, with the numbers set in mono so they are scannable
   without being broken out into tiles. */
.run { max-width: 62ch; font-size: 1.02rem; }
.run b { font: 500 1em/1 var(--mono); color: var(--text); }

dl.caps { margin: 0; }
dl.caps > div {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 0 1.6rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
dl.caps > div:last-child { border-bottom: 0; }
dl.caps dt { font-weight: 500; }
dl.caps dd { margin: 0; color: var(--text-dim); max-width: 60ch; }
dl.caps code {
  font: 400 .92em/1 var(--mono);
  color: var(--text);
}

.shots { display: grid; gap: 1.8rem; }

/* ------------------------------------------------------------- contact */

form { max-width: 34rem; }
.field { margin-bottom: 1rem; }
label {
  display: block;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--text-dim);
  margin-bottom: .3rem;
}
input, textarea {
  width: 100%;
  font: 400 1rem/1.5 var(--sans);
  color: var(--text);
  background: var(--raised);
  /* --border is a 1.2:1 hairline against the fill: right for dividing
     surfaces, invisible as a control edge. This clears 3:1. */
  border: 1px solid #7d7669;
  border-radius: 3px;
  padding: .5rem .6rem;
}
textarea { min-height: 8.5rem; resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button {
  font: 500 .95rem/1 var(--sans);
  letter-spacing: .04em;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: .65rem 1.3rem;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.note {
  border-left: 3px solid var(--border-strong);
  padding: .55rem .8rem;
  margin: 0 0 1.2rem;
  background: var(--panel);
  max-width: 34rem;
}
.note.ok { border-left-color: var(--positive); }
.note.bad { border-left-color: var(--negative); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

footer {
  margin-top: 3.5rem;
  padding: 1.2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------- narrow view */

@media (max-width: 720px) {
  main { width: calc(100% - 2rem); }
  .lede { font-size: 1.15rem; }
  dl.caps > div { grid-template-columns: 1fr; gap: .25rem; }
  .tagline { display: none; }

}

@media (prefers-reduced-motion: reduce) {
  /* The poster frame carries the same information without the motion. */
  video { display: none; }
  .poster-fallback { display: block !important; }
}
