/* KLAACE trust surface. Tokens follow apps/mobile/src/ui/theme.ts.
   Black is the gallery, content provides meaning, KLAACE blue provides the light. */
:root {
  --ground: #010205;
  --surface: #0a0e16;
  --text: #f2f4f8;
  --text-secondary: #a9b2c3;
  --text-muted: #7c879b;
  --silver: #c9d1de;
  --accent: #0a64f4;
  --accent-text: #5b95ff;
  --divider: #1c2433;
  --border: #2a3548;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 36rem;
  color-scheme: dark;
}

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

html { background: var(--ground); -webkit-text-size-adjust: 100%; }

/* One faint source of KLAACE blue, high and to the left, behind the rule. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  background-image: radial-gradient(ellipse 70rem 42rem at 8% -12%, rgba(10, 100, 244, 0.11), rgba(10, 100, 244, 0.03) 45%, transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

.frame {
  flex: 1;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
}

/* Masthead and colophon frame the page like the edges of a plate. */
.masthead {
  display: flex;
  align-items: center;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--divider);
}

.wordmark {
  color: var(--silver);
  font: 500 0.8125rem/1 var(--sans);
  letter-spacing: 0.42em;
  text-decoration: none;
  /* letter-spacing trails the last letter; pull it back so the mark is optically flush */
  margin-right: -0.42em;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(4.5rem, 16vh, 10rem) 0 clamp(4rem, 12vh, 7.5rem);
}

.rule {
  width: 4rem;
  height: 1px;
  margin: 0 0 2.25rem;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 14px 1px rgba(10, 100, 244, 0.55);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1 {
  margin: 0;
  max-width: 26ch;
  font: 400 clamp(2.25rem, 6vw, 3.75rem)/1.08 var(--serif);
  letter-spacing: -0.015em;
  color: var(--text);
}

.home h1 { font-size: clamp(2.75rem, 9vw, 6rem); line-height: 1.02; letter-spacing: -0.025em; }

p { margin: 0 0 1rem; max-width: var(--measure); color: var(--text-secondary); }
p, li, h1, h2 { overflow-wrap: break-word; }

.lede {
  margin-top: 2rem;
  max-width: 34rem;
  font: 400 clamp(1.0625rem, 1.6vw, 1.25rem)/1.6 var(--serif);
  color: var(--text-secondary);
}

h2 {
  margin: 0 0 1rem;
  font: 500 0.6875rem/1.4 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver);
}

ul { margin: 0; padding: 0; list-style: none; max-width: var(--measure); color: var(--text-secondary); }
li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; }
li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.625rem; height: 1px; background: var(--border); }

a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(91, 149, 255, 0.45); text-underline-offset: 0.22em; }
a:hover { color: var(--text); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 2px; }

code { font: 0.875em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--silver); }

/* Home: three quiet statements set on a shared hairline. */
.home main { justify-content: space-between; gap: clamp(5rem, 14vh, 9rem); }

.tenets { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.tenet { padding-top: 1.5rem; border-top: 1px solid var(--divider); }
.tenet p { margin: 0; max-width: 22rem; font-size: 0.9375rem; }

/* A contact or instruction set apart: a lit edge, never a box of colour. */
.plate {
  margin-top: clamp(3rem, 8vh, 4.5rem);
  max-width: 40rem;
  padding: 1.75rem 0 1.75rem 1.75rem;
  border-left: 1px solid var(--accent);
  background: linear-gradient(90deg, rgba(10, 100, 244, 0.07), transparent 70%);
}
.plate p:last-child { margin-bottom: 0; }
.plate-label {
  margin: 0 0 0.875rem;
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.plate-value { margin: 0 0 1rem; font: 400 clamp(1.375rem, 3.2vw, 1.875rem)/1.25 var(--serif); }
.plate-value a { color: var(--text); text-decoration-color: rgba(91, 149, 255, 0.6); }
.plate-value a:hover { color: var(--accent-text); }
.plate-step { margin: 0 0 1rem; font: 400 clamp(1.125rem, 2vw, 1.375rem)/1.5 var(--serif); color: var(--text); }
.plate-note { font-size: 0.875rem; color: var(--text-muted); }

/* Policy clauses: label in the margin, text in the measure. */
.clauses { margin-top: clamp(3.5rem, 9vh, 5.5rem); }
.clause { padding: 1.75rem 0; border-top: 1px solid var(--divider); }
.clause:last-child { border-bottom: 1px solid var(--divider); }
.clause p:last-child, .clause li:last-child { margin-bottom: 0; }

.return { margin-top: 2.5rem; }
.return a { font-size: 0.9375rem; letter-spacing: 0.04em; }
.return a::after { content: "\00a0\2192"; }

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  min-height: 5.5rem;
  border-top: 1px solid var(--divider);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.colophon-mark { color: var(--text-muted); font-size: 0.6875rem; letter-spacing: 0.42em; }
.colophon a { color: var(--text-muted); text-decoration: none; }
.colophon a:hover { color: var(--text); text-decoration: underline; }
.colophon a[aria-current="page"] { color: var(--silver); }

@media (min-width: 52rem) {
  .tenets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
  .clause { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; }
  .clause h2 { margin: 0.3rem 0 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
