/*
 * leyonet.ch – Auftritt
 * Schreibmaschine (Marke) trifft Netzwerkplan: Überschriften in Courier wie das Logo,
 * Text in der Systemschrift, Farben nur dort, wo sie etwas bedeuten (Protokolle, OSI-Schichten).
 * Keine externen Schriften, keine externen Ressourcen.
 */
:root {
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --grid: #cfd6df;
  --ink: #000000;
  --text: #18212c;
  --muted: #55606f;
  --graphite: #8a8f98;
  --line: #d3d9e1;
  --cable: #4a5566;
  --console: #18212c;
  --console-text: #e3e9f0;
  --prompt: #8fd18f;
  --focus: #b4530a;

  --arp: #c27c0e;
  --arp-bg: #f5e3b3;
  --icmp: #1d5fd6;
  --icmp-bg: #d6e4fb;
  --port: #16a34a;

  --osi-7: #8e44ad;
  --osi-4: #2e86c1;
  --osi-3: #16a085;
  --osi-2: #d68910;
  --osi-1: #7f8c8d;

  --mono: 'Courier New', 'Nimbus Mono PS', 'Liberation Mono', Courier, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --code: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Typografie ------------------------------------------------------------------ */

h1,
h2,
h3 {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 4.9vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
  max-width: 68ch;
}

code {
  font-family: var(--code);
  font-size: 0.86em;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  white-space: nowrap;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text);
  margin-top: 1.4rem;
  max-width: 34em;
}

.section-lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 0.8rem;
  max-width: 44em;
}

.link {
  font-weight: 600;
  text-underline-offset: 3px;
}

/* --- Knöpfe ----------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0 1.2rem;
  border-radius: 8px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn small {
  font-weight: 400;
  opacity: 0.7;
}
.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover {
  background: #2a3442;
  border-color: #2a3442;
}
.btn-line {
  background: var(--paper);
  color: var(--ink);
}
.btn-line:hover {
  background: var(--canvas);
}
.btn-small {
  min-height: 38px;
  padding: 0 0.9rem;
  font-size: 0.92rem;
}

/* --- Kopf ------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  color: var(--ink);
}
.logo {
  height: 30px;
  width: auto;
}
.top nav {
  margin-left: auto;
}
.top nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.top nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.top nav a:hover {
  color: var(--ink);
  background: var(--canvas);
}

/* --- Hero: Zeichenfläche wie im Programm ------------------------------------------- */

.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.facts li {
  position: relative;
  padding-left: 16px;
}
/* Kleiner Knoten wie im Logo */
.facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--graphite);
}

.sim {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 40px -24px rgba(24, 33, 44, 0.45);
}
.sim-canvas {
  background-color: var(--canvas);
  background-image: radial-gradient(var(--grid) 1.1px, transparent 1.2px);
  background-size: 18px 18px;
  padding: 10px;
}
.topo {
  width: 100%;
  height: auto;
  display: block;
}
.zone {
  stroke-width: 1.6;
  stroke-dasharray: 7 5;
}
.zone-a {
  fill: rgba(22, 160, 133, 0.09);
  stroke: #16a085;
}
.zone-b {
  fill: rgba(142, 68, 173, 0.08);
  stroke: #8e44ad;
}
.zone-label {
  font: 700 12.5px var(--sans);
}
.zone-a-label {
  fill: #0e7c66;
}
.zone-b-label {
  fill: #7d3c98;
}
.cable {
  stroke: var(--cable);
  stroke-width: 2.4;
}
.ports circle {
  fill: var(--port);
}
.port {
  font: 10px var(--code);
  fill: var(--muted);
}
.dev rect,
.dev circle,
.dev path {
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dev-pc rect,
.dev-pc path,
.dev-srv rect,
.dev-srv path {
  fill: #fff;
  stroke: var(--icmp);
}
.dev-srv circle {
  fill: var(--icmp);
}
.dev-sw rect {
  fill: #dff3e8;
  stroke: #0f7a4a;
}
.dev-sw path {
  fill: none;
  stroke: #0f7a4a;
}
.dev-r circle {
  fill: #fde9d7;
  stroke: #c2570c;
}
.dev-r path {
  fill: none;
  stroke: #c2570c;
  stroke-width: 2;
}
.name {
  font: 600 13px var(--sans);
  fill: var(--text);
}
.ip {
  font: 11px var(--code);
  fill: var(--icmp);
}
.packet {
  fill: var(--icmp);
  stroke: #fff;
  stroke-width: 2;
}
.packet.arp {
  fill: var(--arp);
}

.sim-list {
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.sim-head,
.rows li {
  display: grid;
  grid-template-columns: 2.2em 9.6em 5.6em minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 12px;
}
.sim-head {
  height: 30px;
  background: var(--canvas);
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  height: calc(8 * 27px);
  overflow: hidden;
}
.rows li {
  height: 27px;
  border-bottom: 1px solid #edf0f4;
  white-space: nowrap;
}
.rows li > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rows .nr {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.proto {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.74rem;
}
.proto-arp {
  background: var(--arp-bg);
  color: #7a4d05;
}
.proto-icmp {
  background: var(--icmp-bg);
  color: #123f91;
}
.rows li.new {
  animation: arrive 0.9s ease-out;
}
@keyframes arrive {
  from {
    background: #fff6d6;
  }
  to {
    background: transparent;
  }
}
.sim-console {
  margin: 0;
  padding: 9px 12px;
  background: var(--console);
  color: var(--console-text);
  font: 0.8rem/1.4 var(--code);
  max-width: none;
  min-height: 2.4em;
}
.prompt {
  color: var(--prompt);
}

/* --- Bildschirmfotos --------------------------------------------------------------- */

.views,
.teach,
.download {
  padding: clamp(64px, 9vw, 120px) 0;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2rem 0 1rem;
}
.tabs button {
  font: 600 0.95rem var(--sans);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.shot {
  margin: 0;
}
.window {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--canvas);
  box-shadow: 0 30px 60px -36px rgba(24, 33, 44, 0.5);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: #eef1f5;
  border-bottom: 1px solid var(--line);
}
.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--grid);
}
.window-bar em {
  margin: 0 auto;
  font: 0.78rem var(--sans);
  font-style: normal;
  color: var(--muted);
  padding-right: 50px;
}
.shot img {
  width: 100%;
  aspect-ratio: 1440 / 880;
}
.shot figcaption {
  margin-top: 14px;
  color: var(--muted);
  max-width: 68ch;
  min-height: 3.2em;
}

/* --- Zahlen ------------------------------------------------------------------------ */

.numbers {
  background: var(--ink);
  color: #fff;
  padding: clamp(48px, 6vw, 72px) 0;
}
.counters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
}
.counters div {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  border-left: 2px solid #3a414c;
  padding-left: 16px;
}
.counters dd {
  margin: 0;
  font: 700 clamp(2.4rem, 4.4vw, 3.6rem) / 1 var(--mono);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.counters dt {
  color: #b9bec6;
  font-size: 0.92rem;
  line-height: 1.4;
}

/* --- Unterricht -------------------------------------------------------------------- */

.teach-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  margin-top: 3rem;
}
.teach-item h3 {
  margin-bottom: 0.8rem;
}
.teach-item p {
  color: var(--text);
}
.ladder {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
/* Treppe: jedes Profil eine Stufe weiter eingerückt */
.ladder li {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  column-gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  background: var(--paper);
}
.ladder li:nth-child(2) {
  margin-left: 14px;
}
.ladder li:nth-child(3) {
  margin-left: 28px;
}
.ladder li:nth-child(4) {
  margin-left: 42px;
}
.ladder li:nth-child(5) {
  margin-left: 56px;
}
.ladder b {
  font-family: var(--mono);
  grid-row: span 2;
}
.ladder span {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --- Technik: OSI-Stapel ----------------------------------------------------------- */

.tech {
  background-color: var(--canvas);
  background-image: radial-gradient(var(--grid) 1px, transparent 1.1px);
  background-size: 22px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(64px, 9vw, 120px) 0;
}
.tech-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.tech-intro p {
  margin-top: 1.2rem;
}
.tech-points {
  padding-left: 1.1em;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 8px;
}
.osi {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.osi li {
  display: grid;
  grid-template-columns: 2.6em 9.5em minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--layer);
  border-radius: 8px;
}
.osi .n {
  font: 700 1.5rem/1 var(--mono);
  color: var(--layer);
}
.osi .name {
  font-weight: 700;
  padding-top: 2px;
}
.osi .protos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.osi .protos li {
  display: block;
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--layer) 35%, transparent);
  background: color-mix(in srgb, var(--layer) 8%, transparent);
  border-radius: 999px;
  font-size: 0.84rem;
  border-left-width: 1px;
}
.l7 {
  --layer: var(--osi-7);
}
.l4 {
  --layer: var(--osi-4);
}
.l3 {
  --layer: var(--osi-3);
}
.l2 {
  --layer: var(--osi-2);
}
.l1 {
  --layer: var(--osi-1);
}

/* --- Offen ------------------------------------------------------------------------- */

.open {
  padding: clamp(64px, 9vw, 120px) 0;
}
.open-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.open h2 {
  margin-bottom: 1.4rem;
}
.console {
  margin: 0;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--console);
  color: var(--console-text);
  font: 0.92rem/1.6 var(--code);
  overflow-x: auto;
}
.console .c {
  color: #8a96a6;
}
.console .ok {
  color: var(--prompt);
}

/* --- Geschichte ------------------------------------------------------------------- */

.story {
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.mark {
  width: 100%;
  max-width: 260px;
  color: var(--ink);
}
.story h2 {
  margin-bottom: 1.4rem;
}

/* --- Download ---------------------------------------------------------------------- */

.download {
  border-top: 1px solid var(--line);
}
.dl-list {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.dl-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.dl-list h3 {
  margin-bottom: 4px;
}
.dl-list p {
  margin: 0;
  color: var(--muted);
}
.dl-main h3 {
  font-size: 1.6rem;
}
.dl-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.note {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- Fuss -------------------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.foot p {
  margin: 0;
}
.foot ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Unterseiten (Impressum, Datenschutz) ----------------------------------------- */

.page {
  padding: clamp(48px, 7vw, 96px) 0;
}
.page h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  margin-bottom: 1.6rem;
}
.page h2 {
  font-size: 1.45rem;
  margin: 2.4rem 0 0.8rem;
}
.page .wrap {
  max-width: 820px;
}
.page address {
  font-style: normal;
  margin-bottom: 1em;
}
.placeholder {
  background: #fdf0d2;
  padding: 0 4px;
  border-radius: 3px;
}

/* --- Kleine Bildschirme ------------------------------------------------------------ */

@media (max-width: 1020px) {
  .hero-grid,
  .tech-grid,
  .open-grid {
    grid-template-columns: 1fr;
  }
  .teach-grid {
    grid-template-columns: 1fr;
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
  .mark {
    max-width: 120px;
  }
  .counters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .top nav {
    display: none;
  }
  .top-row .btn {
    margin-left: auto;
  }
  .counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sim-head,
  .rows li {
    grid-template-columns: 1.8em 7.4em 4.6em minmax(0, 1fr);
    gap: 6px;
    padding: 0 8px;
  }
  .osi li {
    grid-template-columns: 2em minmax(0, 1fr);
  }
  .osi .protos {
    grid-column: 1 / -1;
  }
  .dl-list > li {
    flex-direction: column;
    align-items: flex-start;
  }
  .dl-buttons {
    justify-content: flex-start;
  }
  .ladder li:nth-child(n) {
    margin-left: 0;
  }
  .window-bar em {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rows li.new {
    animation: none;
  }
}
