/* Nomla website. Plain CSS, no build step. Fonts are self-hosted (SIL OFL, see fonts/). */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/AtkinsonHyperlegibleNext-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/AtkinsonHyperlegibleNext-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/AtkinsonHyperlegibleMono-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/AtkinsonHyperlegibleMono-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --nomla: #4886D9;        /* logo blue, the hero field */
  --nomla-deep: #2F67B5;   /* text-safe blue on paper */
  --ink: #0F2747;
  --ink-soft: #46597A;
  --paper: #F6F9FE;
  --rule: #CBDAEE;
  --signal: #F5B83D;       /* the voice: only the signal trace and the talk state */
  --signal-ink: #8A5A00;
  --on-nomla: #FFFFFF;
  --well: #E8F0FB;

  --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;

  /* type scale, ratio 4:3 from an 18px body */
  --t-0: 0.833rem;
  --t-1: 1.125rem;
  --t-2: 1.5rem;
  --t-3: 2rem;
  --t-4: 2.667rem;
  --t-5: 3.556rem;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nomla: #2E5FA3;
    --nomla-deep: #8DB8F2;
    --ink: #E3ECF8;
    --ink-soft: #A7B8D2;
    --paper: #0D1A2D;
    --rule: #263C5C;
    --signal: #F5B83D;
    --signal-ink: #F5C766;
    --well: #132540;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --nomla: #2E5FA3;
  --nomla-deep: #8DB8F2;
  --ink: #E3ECF8;
  --ink-soft: #A7B8D2;
  --paper: #0D1A2D;
  --rule: #263C5C;
  --signal: #F5B83D;
  --signal-ink: #F5C766;
  --well: #132540;
  color-scheme: dark;
}

/* language switch: content comes in pairs, the inactive language is hidden */
html[data-ui="de"] [lang="en"],
html[data-ui="en"] [lang="de"] { display: none !important; }

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

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-1);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: var(--nomla-deep); text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

code, .num { font-family: var(--mono); font-size: 0.92em; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem;
}
.skip:focus { top: 16px; }

.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }

/* ---------- hero ---------- */

.hero {
  background: var(--nomla);
  color: var(--on-nomla);
  position: relative;
  padding-block: 1.25rem 0;
}

.topbar {
  display: flex; justify-content: flex-end; gap: 0.25rem;
}
.topbar button {
  font: inherit; font-size: var(--t-0); font-weight: 600;
  color: var(--on-nomla); background: transparent;
  border: 1.5px solid rgb(255 255 255 / 0.55); border-radius: 999px;
  padding: 0.2rem 0.8rem; cursor: pointer;
}
.topbar button[aria-pressed="true"] { background: var(--on-nomla); color: var(--nomla); border-color: var(--on-nomla); }

.hero-body {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(2rem, 7vw, 5rem) 1.5rem;
}
.hero-mark { width: clamp(5.5rem, 17vw, 13rem); height: auto; color: var(--on-nomla); display: block; }

.wordmark {
  margin: 0;
  font-size: clamp(4.2rem, 17vw, 11.5rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.hero-lede {
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  margin: 1.25rem 0 0;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--on-nomla);
}
.btn-primary { background: var(--on-nomla); color: #12345F; }
.btn-ghost { color: var(--on-nomla); }
.btn:hover { text-decoration: underline; }
.hero-note { font-size: var(--t-0); margin: 0.9rem 0 0; opacity: 0.92; max-width: 52ch; }

.trace { display: block; width: 100%; height: clamp(90px, 14vw, 150px); }
.trace-caption {
  display: flex; justify-content: space-between;
  font-size: var(--t-0); padding-bottom: 0.9rem; opacity: 0.9;
}

/* ---------- sections ---------- */

main section { padding-block: clamp(3rem, 8vw, 6rem); }
main section + section { border-top: 1px solid var(--rule); }

h2 {
  font-size: clamp(var(--t-3), 5vw, var(--t-5));
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 1rem;
  max-width: 20ch;
}
h3 { font-size: var(--t-2); line-height: 1.2; margin: 0 0 0.4rem; font-weight: 700; }
.intro { max-width: var(--measure); font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 2.5rem; }
p { max-width: var(--measure); }

/* ---------- the signal chain ---------- */

.chain { list-style: none; margin: 0; padding: 0; counter-reset: stage; }
.stage {
  counter-increment: stage;
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-bottom: 2.6rem;
}
/* the cable: one continuous line through all stages */
.stage::before {
  content: "";
  position: absolute; left: calc(1.75rem - 3px); top: 0; bottom: 0;
  width: 6px; background: var(--signal); border-radius: 3px;
}
.stage:first-child::before { top: 1.75rem; }
.stage:last-child::before { bottom: auto; height: 1.75rem; }
.jack {
  position: relative; z-index: 1;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--paper); border: 6px solid var(--signal);
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem; color: var(--ink);
}
.jack::after { content: counter(stage); }
.stage-body { padding-top: 0.55rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem 2.5rem; }
.stage-body p { margin: 0; }
.values { margin: 0.5rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; font-size: 0.94rem; align-content: start; }
.values dt { color: var(--ink-soft); }
.values dd { margin: 0; font-family: var(--mono); font-size: 0.9rem; }
.stage.is-server .jack { background: var(--signal); }

@media (min-width: 900px) {
  .stage-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .stage-body h3 { grid-column: 1 / -1; }
  .values { margin-top: 0.1rem; padding-left: 1.25rem; border-left: 1px solid var(--rule); }
}

.return {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--well);
  border-radius: 6px;
  max-width: 60rem;
}
.return h3 { font-size: 1.25rem; }
.return p { margin: 0.3rem 0 0; }

/* ---------- two-column facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 2rem 3rem;
}
.facts h3 { font-size: 1.2rem; }
.facts p { margin: 0; color: var(--ink-soft); }
.facts p strong { color: var(--ink); font-weight: 700; }

/* ---------- modules ---------- */

.modules { display: grid; gap: 0.75rem; max-width: 60rem; margin-bottom: 2.5rem; }
.module {
  border: 2px solid var(--nomla-deep);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
}
.module h3 { font-size: 1.15rem; margin: 0; }
.module h3 code { font-size: 1rem; }
.module p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.module .module { margin-top: 0.8rem; border-style: dashed; }
.module .module .module { border-style: dotted; }

/* ---------- table ---------- */

.table-scroll { overflow-x: auto; max-width: 60rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; }
th, td { text-align: left; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { color: var(--ink-soft); font-weight: 600; }
td:nth-child(2) { font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; }

/* ---------- lineage ---------- */

.lineage { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; max-width: 52rem; }
.lineage li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.lineage li:last-child { border-bottom: 1px solid var(--rule); }
.lineage .years { font-family: var(--mono); color: var(--ink-soft); }
.lineage strong { font-size: 1.15rem; }
.lineage p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.lineage li.now strong { color: var(--nomla-deep); }

/* ---------- memorial ---------- */

.memorial { text-align: center; }
.memorial blockquote {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.4;
  font-weight: 400;
}
.memorial .candle { display: block; width: 6px; height: 2.5rem; margin: 0 auto 1.5rem; background: var(--signal); border-radius: 3px; }

/* ---------- footer ---------- */

footer {
  background: var(--well);
  padding-block: 2.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
footer p { margin: 0.3rem 0; }

@media (max-width: 560px) {
  .hero-body { grid-template-columns: 1fr; }
  .hero-mark { width: 5rem; }
  .lineage li { grid-template-columns: 1fr; gap: 0.2rem; }
  .stage { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .jack { width: 2.75rem; height: 2.75rem; border-width: 5px; font-size: 0.95rem; }
  .stage::before { left: calc(1.375rem - 3px); }
  .stage:first-child::before { top: 1.375rem; }
  .stage:last-child::before { height: 1.375rem; }
  .values { grid-template-columns: 1fr; }
  .values dd { margin-bottom: 0.35rem; }
}

/* ---------- site header and navigation ---------- */

.site-head { background: var(--nomla); color: var(--on-nomla); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  padding-block: 0.8rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--on-nomla); text-decoration: none; font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand svg { width: 2.1rem; height: auto; color: var(--on-nomla); }
.site-nav { flex: 1 1 auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.4rem; }
.site-nav a {
  display: block; color: var(--on-nomla); text-decoration: none; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 999px;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"], .site-nav a[aria-current="true"] { background: rgb(255 255 255 / 0.18); }
.site-head .topbar { margin-left: auto; }

.hero.hero-start { padding-top: 0; }
.hero-start .hero-body { padding-top: clamp(1.5rem, 5vw, 3.5rem); }

.page-head { background: var(--nomla); color: var(--on-nomla); padding-block: clamp(2rem, 6vw, 4rem); }
.page-head h1 { margin: 0; font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: 0.95; letter-spacing: -0.035em; font-weight: 800; }
.page-head p { margin: 1rem 0 0; font-size: clamp(1.1rem, 2.2vw, 1.4rem); max-width: 46ch; }
.page-head a { color: var(--on-nomla); }

/* ---------- what is it ---------- */

.what { display: grid; gap: 2rem 4rem; grid-template-columns: minmax(0, 1fr); }
.what .say { font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.5; margin: 0 0 1rem; }
.what ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.what li strong { display: block; font-size: 1.15rem; }
.what li span { color: var(--ink-soft); }
@media (min-width: 900px) { .what { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }

/* ---------- step-by-step guides ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 50rem; }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1.1rem;
  padding: 1.4rem 0; border-top: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before {
  content: counter(step);
  font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--nomla-deep);
}
.steps h3 { font-size: 1.25rem; margin: 0 0 0.35rem; }
.steps p { margin: 0 0 0.5rem; }
.steps p:last-child { margin-bottom: 0; }
.ui { font-weight: 700; }           /* a label exactly as the app shows it */
.tip { color: var(--ink-soft); font-size: 0.95rem; }

.more {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  max-width: 60rem;
}
.more a {
  display: block; padding: 1.1rem 1.25rem; border: 2px solid var(--nomla-deep); border-radius: 6px;
  text-decoration: none; color: var(--ink);
}
.more a strong { display: block; color: var(--nomla-deep); font-size: 1.15rem; }
.more a:hover strong { text-decoration: underline; }
