/* ==========================================================================
   Codedmask — codedmask.com
   Hand-written CSS. No framework, no build step, no JavaScript.
   Editorial grid: large type, hairline rules, restrained palette.
   ========================================================================== */

:root {
  --ink:        #101010;
  --ink-soft:   #5a5a58;
  --ink-faint:  #8e8e8b;
  --paper:      #fbfbf9;
  --rule:       #d9d9d4;
  --rule-firm:  #101010;

  --measure:    64rem;   /* outer page width  */
  --text:       34rem;   /* prose line length */

  --step-hero:  clamp(2.6rem, 7vw, 5.25rem);
  --step-h1:    clamp(2rem, 4.5vw, 3rem);
  --step-h2:    clamp(1.25rem, 2vw, 1.5rem);
  --step-body:  1.09375rem;
  --step-small: 0.8125rem;

  /* Modern grotesk stack. Inter first where installed, then the current
     platform UI faces (SF Pro / Segoe UI Variable / Roboto). No webfont
     request — the CSP in _headers blocks external font hosts by design. */
  --sans:    "Inter", "Inter var", -apple-system, BlinkMacSystemFont,
             "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", "Inter var", -apple-system, BlinkMacSystemFont,
             "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-body);
  line-height: 1.6;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular figures wherever numbers sit in a column */
.facts dd,
.index .num,
.legal { font-variant-numeric: tabular-nums; }

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
}

/* Breathing room under content wraps only. Kept off the shared .wrap so it
   does not inflate the masthead and colophon, which use .wrap too. */
main > .wrap,
main .section > .wrap {
  padding-bottom: 50px;
}

.prose { max-width: var(--text); }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule-firm);
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.nav a {
  font-size: var(--step-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

main { display: block; }

.hero {
  font-family: var(--display);
  font-size: var(--step-hero);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.038em;
  margin: clamp(2.25rem, 4.5vw, 4rem) 0 0;
  max-width: 18ch;
  text-wrap: balance;
}

/* Emphasis without italics — a grotesk italic is a slant, not a voice */
.hero em {
  font-style: normal;
  color: var(--ink-faint);
}

.page-title {
  font-family: var(--display);
  font-size: var(--step-h1);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0.75rem;
  max-width: 24ch;
  text-wrap: balance;
}

.standfirst {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--text);
  margin: 1.5rem 0 0;
}

h2 {
  font-family: var(--sans);
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem;
}

h3 {
  font-family: var(--display);
  font-size: var(--step-h2);
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1.125rem; }
p:last-child { margin-bottom: 0; }

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

ul, ol { margin: 0 0 1.125rem; padding-left: 1.1rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--ink-faint); }

strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   Sections & rules
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.section--open { border-top: 0; }

.section-grid {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem 3rem;
  align-items: start;
}

@media (max-width: 46rem) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   Indexed list — numbered rows separated by hairlines
   -------------------------------------------------------------------------- */

.index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.index > li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 1.5rem;
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

.index .num {
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.index .body p {
  color: var(--ink-soft);
  max-width: var(--text);
  margin: 0.25rem 0 0;
}

@media (max-width: 34rem) {
  .index > li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* --------------------------------------------------------------------------
   Definition rows — company facts, contact details
   -------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.facts dt {
  font-size: var(--step-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.facts dd {
  margin: 0;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 46rem) {
  .facts { grid-template-columns: 1fr; }

  .facts dt {
    padding-bottom: 0.15rem;
    border-bottom: 0;
  }

  .facts dd { padding-top: 0; }
}

/* Placeholder marker — must be visibly unfilled before launch */
.todo {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  background: #fff2b8;
  border-bottom: 1px solid #c9a400;
  padding: 0.1rem 0.35rem;
  color: #4a3b00;
}

/* --------------------------------------------------------------------------
   Legal documents
   -------------------------------------------------------------------------- */

.legal { max-width: var(--text); }

.legal h2 {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.legal h2:first-of-type { margin-top: 2rem; }

.legal .meta {
  font-size: var(--step-small);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Colophon
   -------------------------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--rule-firm);
  padding-block: 2.5rem 3.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}

.colophon .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.colophon a {
  font-size: var(--step-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

.colophon a:hover { color: var(--ink); text-decoration: underline; }

.colophon .legal-line {
  font-size: var(--step-small);
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 10;
  text-decoration: none;
  font-size: var(--step-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; }
  .masthead, .colophon { border-color: #000; }
  .nav, .skip { display: none; }
  a { text-decoration: none; color: #000; }
}
