/* Lockmast site. Colours follow extension/src/shared/theme.css. The ink
   colours are the accent's hue, darkened: they mark what the server sees. */

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

:root {
  color-scheme: light dark;
  --surface: #ffffff;
  --text: #1b1d22;
  --soft: #41454f;
  --muted: #5d6270;
  --rule: #d8dbe2;
  --accent: #2f5bd3;
  --accent-text: #ffffff;
  --ink: #14204a;
  --ink-text: #eef1fb;
  --ink-muted: #a9b6e0;
  --ink-cipher: #bfcbf2;
  --ink-rule: #2f3d72;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(20px, 5vw, 56px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #16181d;
    --text: #e8eaef;
    --soft: #c3c8d3;
    --muted: #a2a8b5;
    --rule: #333843;
    --accent: #6d8ff0;
    --accent-text: #0d1020;
    --ink: #1c2c66;
    --ink-rule: #3a4a86;
  }
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.mono, kbd { font-family: var(--mono); font-size: 0.875em; }
kbd { white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--surface); }
.skip:focus { left: 8px; z-index: 1; }

/* Header */
.top-row { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 0.9375rem; }
.top nav a:not(.button) { color: var(--text); text-decoration: none; }
.top nav a:not(.button):hover { text-decoration: underline; }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.7em 1.25em;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  transition: filter 120ms;
}
.button:hover { filter: brightness(1.1); }
.button-small { padding: 0.45em 0.95em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* Hero */
.hero { padding-block: clamp(36px, 5vw, 72px) clamp(64px, 8vw, 104px); }
.hero h1 {
  max-width: 15em;
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.033em;
  text-wrap: balance;
}
.lede { max-width: 38em; margin-top: 24px; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--soft); }
.hero .actions { margin-top: 28px; }

/* The same login from each side: the readable side is the page itself, the
   server's side is solid ink. The ink side redefines the tokens its rows use. */
.views {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(40px, 5vw, 56px);
}
.view {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--rule);
  border-right: 0;
  border-radius: 14px 0 0 14px;
}
.view + .view {
  --rule: var(--ink-rule);
  --muted: var(--ink-muted);
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: var(--ink);
  color: var(--ink-text);
}
.view h2 { margin-bottom: 18px; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.012em; }
.view dl > div { display: grid; grid-template-columns: 7em 1fr; padding-block: 9px; border-top: 1px solid var(--rule); }
.view dt { color: var(--muted); }
.view dd { overflow-wrap: anywhere; }
.sealed {
  flex: 1;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--ink-cipher);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sealed .open { color: var(--ink-text); }
.views figcaption {
  grid-column: 1 / -1;
  max-width: 46em;
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Sections: .split puts the heading beside the content, .stack above it, for
   content that needs the full width to keep its lines a readable length. */
.band { border-top: 1px solid var(--rule); }
.split, .stack { padding-block: clamp(64px, 8vw, 104px); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px clamp(32px, 4vw, 64px); }
.split > h2, .stack > h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.024em; text-wrap: balance; }
.stack > h2 { margin-bottom: clamp(32px, 4vw, 52px); }
.body h3 { margin-bottom: 8px; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.008em; }
.body p, .body li { color: var(--soft); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px clamp(32px, 4.5vw, 64px); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(24px, 4vw, 56px); }
.body .intro { max-width: 34em; margin-bottom: 36px; color: var(--text); font-size: 1.25rem; line-height: 1.45; }
.body .also { max-width: 44em; margin-top: 40px; color: var(--muted); }
.body .actions { margin-top: 44px; }
.body .actions a:not(.button) { color: var(--accent); }

.two li { padding-block: 11px; border-top: 1px solid var(--rule); }
.limits li { max-width: 40em; }
.limits li + li { margin-top: 32px; }
.limits strong { display: block; margin-bottom: 6px; color: var(--text); font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }

/* Footer */
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; padding-block: 32px; font-size: 0.9375rem; color: var(--muted); }
.foot-row > span:first-child { color: var(--text); font-weight: 600; }
.foot nav { display: flex; gap: 24px; }
.foot nav a { color: var(--muted); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .views, .two { grid-template-columns: 1fr; }
  .view { border-right: 1px solid var(--rule); border-bottom: 0; border-radius: 14px 14px 0 0; }
  .view + .view { border-radius: 0 0 14px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
