/* ─────────────────────────────────────────────────────────────
   Terralign Metals — cover-first editorial design.
   Reference language: DS2 — a near-white field, one glossy
   deep-purple liquid form, tiny letter-spaced type, and space.
   No shadows, no gradients on chrome, no animation theatre.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:   #FAF9F6;
  --paper-2: #F3F1EC;
  --ink:     #17111F;
  --ink-2:   #4A4352;
  /* #8B8494 measured 3.42:1 on the paper — under AA for the small text this
     token is used on (labels, caption, footer, table heads, fine print).
     #767083 is 4.55:1 and keeps the same soft grey-violet. */
  --ink-3:   #767083;
  --rule:    #E2DFD8;
  --violet:  #2A1152;   /* the pour's core — links, marks */
  --violet-2:#5B2EA6;   /* hover / secondary accent        */

  --sans: "Helvetica Neue", Helvetica, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 6vw, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--violet); color: var(--paper); }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-2); }
em { font-style: italic; }

/* ── masthead ── */
.mast {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px var(--gutter);
  mix-blend-mode: multiply;
}
.mast__brand {
  font-size: 12px; font-weight: 700; letter-spacing: 0.32em; color: var(--ink);
}
.mast__nav { display: flex; gap: 28px; }
.mast__nav a {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
}
.mast__nav a:hover { color: var(--violet); }

/* ── cover ── */
.cover {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 12vh var(--gutter) 10vh;
  position: relative;
}
.cover__art { position: relative; width: min(58vh, 82vw, 460px); }
.pour { width: 100%; height: auto; display: block; }
/* Anchored fully outside the artwork box — the pour's lower-left lobe
   reaches far enough in that an inset caption lands on top of it. */
.cover__caption {
  position: absolute; right: 100%; bottom: 8%;
  margin-right: 26px;
  display: flex; flex-direction: column; gap: 4px; text-align: right;
  font-size: 10px; letter-spacing: 0.34em; color: var(--ink-3);
  white-space: nowrap;
}
.cover__line {
  margin-top: 7vh;
  font-size: clamp(15px, 1.7vw, 19px);
  font-weight: 400;
  color: var(--ink-2);
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.8;
  /* Wide enough to hold the tagline on one line on desktop; `balance` evens
     the two lines it breaks into once the viewport is narrower. */
  max-width: 52ch;
  text-wrap: balance;
}

/* ── sections ── */
.sec {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, var(--measure)) 1fr;
  gap: 32px;
  padding: 11vh var(--gutter);
  border-top: 1px solid var(--rule);
}
.sec__label {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.3em; color: var(--ink-3);
  padding-top: 6px;
  white-space: nowrap;
}
/* min-width:0 — a grid item defaults to min-width:auto, which lets wide
   content (the territory table) push the track past the viewport instead
   of scrolling inside its own box. */
.sec__body { grid-column: 2; min-width: 0; }
.sec__body > p + p { margin-top: 1.2em; }
.lead {
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 1.1em;
}
.fine { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; margin-top: 1.6em; }

/* ── method list ── */
.method { margin: 2.4em 0 1.6em; }
.method__row {
  display: grid; grid-template-columns: 172px 1fr; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--rule);
}
.method__row:last-child { border-bottom: 1px solid var(--rule); }
.method__row dt {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--violet); padding-top: 5px;
}
.method__row dd { font-size: 15.5px; color: var(--ink-2); }

/* ── evidence figures ── */
.figures {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin: 2.2em 0;
}
.figure { padding: 26px 22px 26px 0; }
.figure + .figure { border-left: 1px solid var(--rule); padding-left: 22px; }
.figure__n {
  font-family: var(--mono); font-size: clamp(30px, 3.4vw, 40px);
  color: var(--violet); letter-spacing: -0.02em;
}
.figure__t { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 10px; }

/* ── operation list ── */
.oplist { list-style: none; margin: 1.8em 0 0; }
.oplist li {
  padding: 15px 0; border-top: 1px solid var(--rule);
  font-size: 15.5px; color: var(--ink-2);
}
.oplist li:last-child { border-bottom: 1px solid var(--rule); }
.oplist li span {
  display: inline-block; min-width: 172px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink);
}

/* ── territory table ── */
/* Three columns of mono text have a hard minimum width; below it the table
   scrolls in its own box rather than pushing the page sideways. */
.terr-wrap { overflow-x: auto; }
.terr { width: 100%; border-collapse: collapse; margin-top: 0.6em; min-width: 300px; }
.terr th {
  text-align: left; font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  padding: 0 14px 10px 0; border-bottom: 1px solid var(--ink);
}
.terr td {
  padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-2);
}
.terr td:first-child { color: var(--ink); font-weight: 500; }
.terr td:nth-child(2), .terr td:nth-child(3) { font-family: var(--mono); font-size: 12.5px; }
.terr__note { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

/* ── contact ── */
.contact__mail a {
  font-family: var(--mono); font-size: clamp(17px, 2vw, 22px);
  border-bottom: 1px solid var(--violet);
}
.sec--last { padding-bottom: 16vh; }

/* ── footer ── */
.foot {
  display: flex; justify-content: space-between;
  padding: 26px var(--gutter) 34px;
  border-top: 1px solid var(--rule);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ── responsive ── */
@media (max-width: 860px) {
  .sec { grid-template-columns: 1fr; gap: 14px; padding: 9vh var(--gutter); }
  /* The explicit column placements must be cleared too, or `grid-column: 2`
     opens an implicit second track and the stack never happens. */
  .sec__label, .sec__body { grid-column: 1; }
  .sec__label { padding-top: 0; }
  .figures { grid-template-columns: 1fr; }
  .figure + .figure { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 22px; }
  .method__row { grid-template-columns: 1fr; gap: 8px; }
  .oplist li span { display: block; min-width: 0; margin-bottom: 4px; }
  .cover__caption {
    right: auto; left: 0; bottom: -46px; margin-right: 0;
    flex-direction: column; gap: 3px; text-align: left;
  }
  .mast__nav { gap: 16px; }
  .mast__nav a:nth-child(2) { display: none; }
}

/* "TERRALIGN METALS" is a wider mark than the masthead was built for; on
   narrow phones it and the nav cannot share a line. Tighten the mark and
   drop the nav to Contact alone. */
@media (max-width: 560px) {
  .mast { padding: 18px var(--gutter); }
  .mast__brand { font-size: 11px; letter-spacing: 0.2em; }
  .mast__nav { gap: 14px; }
  .mast__nav a { font-size: 10px; letter-spacing: 0.16em; }
  .mast__nav a:nth-child(1),
  .mast__nav a:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
