/* sovereignsignal.com
   House style: assets/tokens.css and assets/fonts.css, copied from sovereign-signal-brand.
   This file only lays the page out. It defines no colours of its own.
   Rust appears on one thing per screen: the main call to action. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper); color: var(--ink);
  font: 400 19px/1.6 var(--serif); font-variation-settings: "opsz" 16;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

/* ---- shared voices ---- */
.label {
  font: 600 11px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.data { font-family: var(--mono); font-weight: 400; letter-spacing: 0; text-transform: none; }

.double {
  border: 0; box-sizing: border-box; height: var(--rule-double);
  border-top: var(--rule-double-top) solid var(--ink);
  border-bottom: var(--rule-double-bottom) solid var(--ink);
}

/* ---- buttons: rust is the one main action, ghost is ink ---- */
.btn {
  display: inline-block; font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; padding: 15px 22px; border: 1px solid var(--rust); border-radius: var(--radius);
  background: var(--rust); color: var(--paper); transition: filter 150ms;
}
.btn:hover { color: var(--paper); filter: brightness(1.08); }
.btn--ghost { background: none; color: var(--ink); border-color: var(--ink); transition: color 150ms, border-color 150ms; }
.btn--ghost:hover { color: var(--rust); border-color: var(--rust); filter: none; }

/* ============ 01 · MASTHEAD AND ARRIVAL ============ */
.mast { padding-top: 28px; }
.mast-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.nav { display: flex; gap: 28px; min-width: 0; }
.nav a {
  font: 600 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; color: var(--ink-2); text-decoration: none; border-bottom: 1.5px solid transparent;
  padding: 12px 0; margin: -12px 0; /* the tap target: 36px tall, no change to layout */
  transition: color 150ms;
}
/* the hover rule stays 6px under the text, where the border sat before the padding grew */
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4.5px; height: 1.5px;
  background: transparent; transition: background-color 150ms;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { background: var(--ink); }
.toggle {
  font: 600 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  background: none; color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 9px 14px; white-space: nowrap; cursor: pointer; transition: color 150ms, border-color 150ms;
}
.toggle:hover { color: var(--rust); border-color: var(--rust); }

/* the lockup: full compass and the wordmark in the proportions of lockup.svg
   (compass 2.35em, gap 0.4em) */
.lockup {
  display: flex; align-items: center; gap: 0.4em;
  font-size: clamp(56px, 6.4vw, 88px);
  padding: 96px 0 40px;
}
.compass { flex: none; width: 2.35em; height: 2.35em; color: var(--ink); }
h1 {
  font: 470 1em/1 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: 0;
  white-space: nowrap;
}

.arrival { padding: 40px 0 0; }
.lede {
  font: 400 28px/1.3 var(--serif); font-variation-settings: "opsz" 36; color: var(--ink-2);
  max-width: 34ch; text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ============ sections: a label rail on the left, an ink rule across ============ */
.sec {
  display: grid; grid-template-columns: 200px 1fr; column-gap: 48px;
  padding-top: 120px;
}
.sec-label { padding-top: 18px; border-top: 1px solid var(--ink); }
.sec-body { padding-top: 18px; border-top: 1px solid var(--ink); min-width: 0; }

.body { margin-top: 40px; max-width: 34em; color: var(--ink-2); text-wrap: pretty; }
.body--lead { margin-top: 0; font-size: 22px; line-height: 1.5; font-variation-settings: "opsz" 24; color: var(--ink); }

/* ---- the practice ---- */
.pull blockquote p {
  font: italic 400 30px/1.35 var(--serif); font-variation-settings: "opsz" 48;
  letter-spacing: -0.005em; max-width: 30em; text-wrap: pretty;
}
.pull figcaption { margin-top: 20px; }
.pull figcaption .data { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

.theses {
  list-style: none; margin-top: 72px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.theses li { padding: 20px 24px 0 0; }
.theses li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.thesis-n { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.theses p { font-size: 17px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.thesis-h {
  display: block; margin-bottom: 8px;
  font: 500 24px/1.2 var(--serif); font-variation-settings: "opsz" 36; color: var(--ink); text-wrap: pretty;
}

/* ---- the work, set as a ledger: tag, thing, state ----
   A row is a div, not a link: the name links the live thing and a caps line below the
   description carries the code and any further live links, so no link nests in another. */
.ledger { margin-top: -18px; }
.row {
  display: grid; grid-template-columns: 120px 1fr 110px; column-gap: 28px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: 0; }
.row-main { max-width: 36em; min-width: 0; }
.row-name {
  display: inline-block; margin-bottom: 4px;
  font: 500 24px/1.2 var(--serif); font-variation-settings: "opsz" 36; color: var(--ink);
}
a.row-name {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--rule); transition: color 150ms, text-decoration-color 150ms;
}
/* the arrow is drawn, not typeset: no font in the stack carries U+2197, so a glyph would fall to a system font */
a.row-name::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 0.4em; vertical-align: 0.12em;
  background-color: var(--ink-3); transition: background-color 150ms;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='square'%3E%3Cpath d='M3 9 9 3M4.5 3H9v4.5'/%3E%3C/svg%3E");
}
a.row-name:hover { color: var(--rust); text-decoration-color: currentColor; }
a.row-name:hover::after { background-color: currentColor; }
.row-desc { font-size: 17px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
/* the links line: a caps label row, each link ink with the house underline, rust on hover.
   Keys ("Telegram", "Code") stay quiet; the links after a key sit closer to it than to the next set. */
.row-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 4px; margin-top: 12px; line-height: 1; }
.row-links a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.row-links a:hover { color: var(--rust); }
.row-link-set { display: inline-flex; align-items: center; column-gap: 14px; }
.row-link-key { color: var(--ink-3); }
.row-link-key::after { content: ":"; }
.row-state { text-align: right; color: var(--ink-2); }
.row-state.is-quiet { color: var(--ink-3); }

/* ---- contact ---- */
.btn--email { margin-top: 32px; text-transform: none; letter-spacing: 0.04em; font-size: 15px; }
.links { display: flex; gap: 28px; margin-top: 40px; }
.links a {
  display: inline-block; padding: 14px 0; margin: -14px 0;
  font: 600 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---- footer ---- */
.foot {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 140px; padding-top: 20px; padding-bottom: 36px;
}
/* the hairline spans the text column, not the padding */
.foot::after {
  content: ""; position: absolute; top: 0; left: 48px; right: 48px; border-top: 1px solid var(--rule);
}
.foot-name { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
/* compass-small.svg holds from 20px up; below that its rings go faint */
.compass-small { width: 22px; height: 22px; color: var(--ink); }
.foot-year { font-size: 12px; color: var(--ink-3); }

/* ============ tablets ============ */
@media (max-width: 960px) {
  .sec { grid-template-columns: 1fr; }
  .sec-label { border-top: 1px solid var(--ink); padding-bottom: 0; }
  .sec-body { border-top: 0; padding-top: 28px; }
  .ledger { margin-top: -22px; }
  /* the theses stack with the sidebar: three columns under 960px squeeze the headings to four lines */
  .theses { grid-template-columns: 1fr; margin-top: 56px; border-top: 0; }
  .theses li, .theses li + li { padding: 20px 0 24px; border-left: 0; border-top: 1px solid var(--rule); }
  .theses li:last-child { padding-bottom: 0; }
}

/* ============ narrow: the lockup stacks before it can run past the column ============ */
@media (max-width: 720px) {
  .lockup {
    flex-direction: column; align-items: flex-start; gap: 24px;
    font-size: clamp(34px, 11.2vw, 56px); padding: 56px 0 28px;
  }
  .compass { width: 2.6em; height: 2.6em; }
}

/* ============ phones ============ */
@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 0 24px; }
  .mast { padding-top: 20px; }
  .nav { gap: 18px; }
  .toggle { padding: 9px 11px; }
  .arrival { padding-top: 28px; }
  .lede { font-size: 24px; }
  .actions { flex-direction: column; align-items: stretch; max-width: 320px; }
  .actions .btn { text-align: center; }
  .sec { padding-top: 88px; }
  .pull blockquote p { font-size: 24px; }
  .body--lead { font-size: 20px; }
  .row { grid-template-columns: 1fr auto; row-gap: 8px; padding: 20px 0; }
  .row-tag { grid-column: 1; grid-row: 1; }
  .row-state { grid-column: 2; grid-row: 1; }
  .row-main { grid-column: 1 / -1; }
  .row-name { font-size: 22px; }
  /* phone tap targets: each link in the caps line grows to 36px tall without moving the line;
     when the line wraps, the row gap matches so stacked targets do not overlap */
  .row-links { margin-top: 14px; row-gap: 24px; }
  .row-links a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  a.row-name { padding: 5px 0; margin: -5px 0 4px; }
  .foot { margin-top: 96px; }
  .foot::after { left: 24px; right: 24px; }
}

/* ============ phones: the toggle drops "mode" (its aria-label keeps it) ============ */
@media (max-width: 379px) {
  .mast-bar { gap: 12px 10px; }
  .nav { gap: 10px; }
  .toggle { padding: 9px 10px; }
  .toggle-word { display: none; }
}
