@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=VT323&display=swap');

:root {
  --paper: #e9e5dc;
  --paper-2: #f4f1e8;
  --ink: #151515;
  --muted: #6f6a62;
  --line: #9f9a91;
  --black: #0b0c0d;
  --cyan: #00c7d9;
  --magenta: #ee2e91;
  --yellow: #e6b800;
  --green: #14a84a;
  --red: #d9352b;
  --blue: #1267b4;
  --max: 1440px;
  --header-h: 58px;
  --footer-h: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

a { color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  z-index: 99;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,.18) 0 1px, transparent 1.2px),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,.7) 0 1px, transparent 1.2px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: multiply;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  background: rgba(233, 229, 220, .94);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.brand-mark {
  font-family: "VT323", monospace;
  font-size: 24px;
  line-height: 1;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.main-nav a {
  display: grid;
  place-items: center;
  padding: 0 14px;
  text-decoration: none;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--black);
  color: var(--paper-2);
  border-color: var(--black);
  outline: none;
}

.system-clock {
  display: flex;
  gap: 18px;
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

.screen {
  min-height: 100svh;
  padding: calc(var(--header-h) + 46px) max(28px, calc((100vw - var(--max)) / 2)) 48px;
  position: relative;
  overflow: hidden;
}

.screen::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--ink);
  opacity: .55;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 600;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  font-family: "VT323", monospace;
  font-size: clamp(82px, 10vw, 160px);
  line-height: .72;
  letter-spacing: -.025em;
  font-weight: 400;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 62px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 500;
}

.hero-screen {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: center;
  gap: clamp(30px, 7vw, 110px);
  background:
    linear-gradient(90deg, transparent 0 52%, rgba(0,199,217,.06) 52% 52.15%, transparent 52.15%),
    var(--paper);
}

.hero-copy {
  max-width: 620px;
  min-width: 0;
  z-index: 2;
}

.hero-media {
  min-width: 0;
  width: 100%;
}

.lead {
  max-width: 590px;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.55;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  font-size: 12px;
  font-weight: 600;
}

.status-led {
  width: 9px;
  height: 9px;
  background: #21ce4b;
  box-shadow: 0 0 12px rgba(33,206,75,.5);
}

.command-link {
  display: block;
  width: max-content;
  margin-top: 54px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
}
.command-link:hover { color: var(--cyan); border-color: var(--cyan); }

.section-index {
  position: absolute;
  right: 34px;
  bottom: 28px;
  font-size: 12px;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  text-decoration: none;
  font-size: 28px;
}

.section-heading {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 34px;
}

.section-number {
  font-family: "VT323", monospace;
  font-size: 42px;
  line-height: 1;
  border-top: 2px solid currentColor;
  padding-top: 8px;
}

.presentation-screen {
  background:
    radial-gradient(circle at 16% 78%, rgba(0,199,217,.08), transparent 23%),
    var(--paper);
}

.compact-heading { margin-bottom: 54px; }
.presentation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
}

.video-shell { min-width: 0; }
.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050708;
  border: 1px solid var(--ink);
  box-shadow: 9px 9px 0 rgba(0,0,0,.08), -3px -3px 0 rgba(0,199,217,.5), 3px 3px 0 rgba(238,46,145,.45);
  overflow: hidden;
}
.video-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,190,220,.06) 0 1px, transparent 1px 5px);
}
.video-logo {
  position: absolute;
  left: 50%; top: 43%; transform: translate(-50%,-50%);
  font-family: "VT323", monospace;
  font-size: clamp(44px, 7vw, 100px);
  color: var(--cyan);
  text-shadow: 2px 0 var(--magenta);
}
.play-button {
  position: absolute;
  left: 50%; top: 62%; transform: translate(-50%,-50%);
  width: 58px; height: 58px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: white;
  cursor: pointer;
}
.video-controls {
  position: absolute;
  inset: auto 14px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 10px;
}
.video-progress { flex: 1; height: 2px; background: rgba(255,255,255,.45); }
.media-caption { margin: 14px 0 0; font-size: 11px; color: var(--muted); }

.terminal-card {
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--black);
  color: #ddd;
  box-shadow: 10px 10px 0 rgba(0,0,0,.08);
}
.terminal-title {
  padding: 10px 14px;
  border-bottom: 1px solid #575757;
  color: var(--cyan);
  font-size: 12px;
}
.terminal-card p { padding: 22px; margin: 0; line-height: 1.7; font-size: 14px; }
.terminal-card .terminal-command { color: #8fd9a7; border-top: 1px solid #333; font-size: 12px; }

.story-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(35px, 8vw, 120px);
  align-items: center;
  background: var(--paper-2);
}

.story-panel { max-width: 930px; }
.story-panel h2 { margin-bottom: 48px; }
.story-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; }
.story-columns p { line-height: 1.8; font-size: 15px; }

.fact-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.fact-grid article { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.fact-grid article:nth-child(2n) { border-right: 0; }
.fact-grid article:nth-last-child(-n+2) { border-bottom: 0; }
.fact-grid strong { font-family: "VT323", monospace; font-size: 42px; font-weight: 400; }
.fact-grid span { font-size: 12px; }

.categories-screen { min-height: calc(100svh - var(--footer-h)); padding-bottom: 34px; background: var(--paper-2); }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.category-card {
  min-height: 330px;
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
  text-decoration: none;
  box-shadow: inset 0 -5px 0 var(--accent);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  padding: 3px;
  background: conic-gradient(
    from var(--glow-angle),
    var(--cyan),
    var(--magenta),
    var(--yellow),
    var(--green),
    var(--blue),
    var(--cyan)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  filter: blur(3px);
  pointer-events: none;
  z-index: -1;
  transition: opacity .18s ease;
}

.category-card:hover::before,
.category-card:focus-visible::before {
  opacity: 1;
  animation: card-glow-spin 3s linear infinite;
}

@keyframes card-glow-spin {
  to {
    --glow-angle: 360deg;
  }
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-7px);
  background: rgba(255,255,255,.7);
  box-shadow:
    inset 0 -7px 0 var(--accent),
    0 0 18px rgba(0,199,217,.18),
    0 0 28px rgba(238,46,145,.12);
  outline: none;
}

.lego-card { --accent: var(--red); }
.hardware-card { --accent: var(--yellow); }
.software-card { --accent: var(--blue); }
.games-card { --accent: var(--green); }
.making-card { --accent: var(--magenta); }
.category-card small { color: var(--muted); }
.category-card h3 { margin: 8px 0 12px; font-size: 24px; }
.category-card p { margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card-arrow { position: absolute; top: 16px; right: 18px; font-size: 22px; }
.card-icon {
  height: 120px;
  display: grid;
  place-items: center;
}

.card-icon img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-footer {
  min-height: var(--footer-h);
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--black);
  color: var(--paper-2);
  font-size: 12px;
}
.footer-links { display: flex; gap: 12px; }
.footer-links a { min-width: 116px; padding: 11px 14px; text-align: center; border: 1px solid #555; text-decoration: none; }
.footer-links a:hover { border-color: var(--cyan); color: var(--cyan); }


/* ---------- Responsive layout ---------- */

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .main-nav a {
    padding-inline: 10px;
    font-size: 12px;
  }

  .language-switcher {
    margin-left: 16px;
  }

  .system-clock {
    gap: 10px;
    font-size: 11px;
  }

  .hero-screen {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(26px, 4vw, 60px);
  }

  .brickdos-title {
    gap: 16px;
  }

  .brickdos-title img {
    width: 92px;
    height: 92px;
  }

  h1 {
    font-size: clamp(72px, 8vw, 120px);
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-card:nth-child(4),
  .category-card:nth-child(5) {
    min-height: 280px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 56px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    padding-inline: 18px;
  }

  .system-clock {
    display: none;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
    grid-column: 3;
  }

  .topbar.nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .topbar.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .topbar.nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: auto;
    display: none;
    padding: 12px 18px 16px;
    background: rgba(233,229,220,.98);
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 14px 22px rgba(0,0,0,.12);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
  }

  .topbar.nav-open .main-nav {
    display: flex;
  }

  .main-nav > a {
    min-height: 44px;
    justify-content: start;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(21,21,21,.16);
  }

  .main-nav > a:last-of-type {
    border-bottom: 0;
  }

  .language-switcher {
    width: 100%;
    margin: 12px 0 0;
  }

  .language-current {
    width: 100%;
    justify-content: space-between;
    height: 42px;
  }

  .language-dropdown {
    position: static;
    width: 100%;
    border-top: 0;
  }

  .screen {
    min-height: auto;
    padding:
      calc(var(--header-h) + 38px)
      24px
      52px;
    overflow: clip;
  }

  .hero-screen {
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 38px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-media {
    max-width: 760px;
  }

  .hero-visual {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .hero-image {
    object-position: center;
  }

  .story-screen,
  .presentation-grid {
    grid-template-columns: 1fr;
  }

  .story-screen {
    gap: 42px;
    align-items: start;
  }

  .story-panel {
    max-width: none;
  }

  .story-panel h2 {
    margin-bottom: 30px;
  }

  .presentation-grid {
    gap: 34px;
  }

  .terminal-card {
    max-width: 760px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .category-card,
  .category-card:nth-child(4),
  .category-card:nth-child(5) {
    min-height: 290px;
  }

  .categories-screen {
    min-height: auto;
    padding-bottom: 48px;
  }

  .section-index {
    position: static;
    width: 100%;
    margin-top: 32px;
    text-align: right;
  }

  .scroll-cue {
    display: none;
  }

  .site-footer {
    min-height: 0;
    grid-template-columns: 1fr auto;
    gap: 18px 28px;
    padding: 24px;
  }

  .footer-links {
    justify-self: end;
  }

  .footer-legal {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding-inline: 14px;
  }

  .brand {
    gap: 8px;
  }

  .brand span:last-child {
    display: none;
  }

  .screen {
    padding:
      calc(var(--header-h) + 28px)
      16px
      42px;
  }

  .hero-screen {
    min-height: auto;
    padding-top: calc(var(--header-h) + 42px);
    padding-bottom: 48px;
    gap: 30px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .12em;
  }

  .brickdos-title {
    gap: 12px;
    align-items: center;
  }

  .brickdos-title img {
    width: 68px;
    height: 68px;
  }

  h1 {
    font-size: clamp(64px, 22vw, 88px);
    line-height: .78;
  }

  h2 {
    font-size: clamp(30px, 10vw, 44px);
    letter-spacing: -.035em;
  }

  .lead {
    font-size: 17px;
    line-height: 1.5;
  }

  .status-line {
    margin-top: 18px;
  }

  .command-link {
    margin-top: 34px;
    max-width: 100%;
    font-size: 13px;
  }

  .hero-visual {
    aspect-ratio: 4 / 3;
  }

  .media-frame {
    box-shadow:
      6px 6px 0 rgba(0,0,0,.08),
      -2px -2px 0 rgba(0,199,217,.5),
      2px 2px 0 rgba(238,46,145,.45);
  }

  .section-heading {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 26px;
  }

  .section-number {
    font-size: 34px;
  }

  .compact-heading {
    margin-bottom: 30px;
  }

  .story-columns {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .story-columns p {
    font-size: 14px;
    line-height: 1.7;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .fact-grid article {
    min-height: 92px;
    border-right: 0;
  }

  .fact-grid article:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--ink);
  }

  .fact-grid article:last-child {
    border-bottom: 0;
  }

  .fact-grid strong {
    font-size: 34px;
  }

  .video-placeholder {
    aspect-ratio: 16 / 9;
  }

  .terminal-card p {
    padding: 18px;
    font-size: 13px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .category-card:nth-child(4),
  .category-card:nth-child(5) {
    min-height: 250px;
    padding: 18px;
  }

  .card-icon {
    height: 100px;
  }

  .category-card h3 {
    font-size: 22px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }

  .footer-links {
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-links a {
    width: 100%;
    min-width: 0;
  }

  .footer-legal {
    grid-column: auto;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .category-card,
  .category-card::before,
  .menu-toggle span {
    transition: none;
    animation: none !important;
  }

  header::after {
    animation: none;
  }
}

.brickdos-title {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brickdos-title img {
  width: 115px;
  height: 115px;
  object-fit: contain;
  flex-shrink: 0;
}

.brickdos-title h1 {
  margin: 0;
}

nav {
  display: flex;
  align-items: center;
}

.language-switcher {
  position: relative;
  margin-left: 32px;
  align-self: center;
}

.language-current {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid #222;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.language-arrow {
  margin-left: 6px;
  font-size: .7em;
}

.language-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  min-width: 100%;
  background: var(--paper-2);
  border: 1px solid #222;
  z-index: 101;
}

.language-dropdown a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: inherit;
}

.language-dropdown a:hover,
.language-dropdown a:focus-visible {
  background: #ddd6c8;
  outline: none;
}

.language-switcher:hover .language-dropdown,
.language-switcher:focus-within .language-dropdown {
  display: block;
}

header {
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    #00ffff,
    #ff00ff,
    #ff0040,
    #ffd000,
    #00ffff
  );
  background-size: 300% 100%;
  animation: header-gradient 6s linear infinite;
}

@keyframes header-gradient {
  to {
    background-position: 300% 50%;
  }
}

.footer-legal {
  display: flex;
  justify-self: end;
  gap: 18px;
}

.footer-legal a {
  color: var(--paper-2);
  text-decoration: none;
  font-size: 11px;
  opacity: .75;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--cyan);
  opacity: 1;
  outline: none;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.media-frame {
  position: relative;
  overflow: hidden;
  background: #050708;
  border: 1px solid var(--ink);
  box-shadow:
    9px 9px 0 rgba(0,0,0,.08),
    -3px -3px 0 rgba(0,199,217,.5),
    3px 3px 0 rgba(238,46,145,.45);
}

.hero-visual {
  aspect-ratio: 1.35;
  min-height: 420px;
}

/* =========================================================
   MOBILE FIXES
   ========================================================= */

@media (max-width: 620px) {

  /* ---------- Hamburger ---------- */

  .menu-toggle {
    display: grid;
    place-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    margin: 3px 0;
    transform-origin: center;
  }

  .topbar.nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .topbar.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .topbar.nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }


  /* ---------- Hero Titel ---------- */

  .brickdos-title {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .brickdos-title img {
    width: 64px;
    height: 64px;
  }

  .brickdos-title h1 {
    min-width: 0;
    font-size: clamp(52px, 16vw, 68px);
    line-height: .82;
    white-space: nowrap;
  }


  /* ---------- Hero Foto ---------- */

  .hero-media {
    width: 100%;
    min-width: 0;
  }

  .hero-visual {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }


  /* ---------- Explore Karten ---------- */

  .category-card {
    min-height: 0;
    justify-content: flex-start;
    gap: 14px;
  }

  .card-icon {
    height: 90px;
    margin-bottom: 6px;
    place-items: center;
  }

  .card-icon img {
    max-width: 90%;
    max-height: 140px;
    width: auto;
    height: auto;
  }

  .category-card h3 {
    margin-top: 4px;
  }

  .category-card p {
    margin-bottom: 0;
  }
}