/* Selbst gehostet, auf einen deutschen Zeichensatz reduziert.
   Keine Verbindung zu Google, damit keine Besucher-IP das Haus verlaesst. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --ground: #eceef1;
  --surface: #f6f7f9;
  --raised: #ffffff;
  --ink: #10141a;
  --muted: #545c68;
  --line: #d3d8de;
  --line-strong: #b6bdc6;
  --accent: #1263c7;
  --accent-ink: #ffffff;
  --deep: #121821;
  --deep-ink: #e8eaee;
  --deep-muted: #99a2ae;

  /* Thermal scale: colour encodes what a material demands of the chamber. */
  --heat-1: #0f766e;
  --heat-2: #15803d;
  --heat-3: #b45309;
  --heat-4: #b91c1c;
  --fiber:  #6d28d9;

  --heat-1-b: #2dd4bf;
  --heat-2-b: #4ade80;
  --heat-3-b: #fbbf24;
  --heat-4-b: #f87171;
  --fiber-b:  #a78bfa;

  /* Als Klassen statt Inline-Styles, damit die CSP ohne 'unsafe-inline' auskommt. */
  --measure: 60ch;
  --radius: 4px;
  --tap: 44px;

  --s-0: 1rem;
  --s-1: 1.125rem;
  --s-2: 1.375rem;
  --s-3: 1.75rem;
  --s-4: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  --s-5: clamp(2.25rem, 1.5rem + 3vw, 3.375rem);

  --band: clamp(4.5rem, 8vw, 7.5rem);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1217;
    --surface: #151a21;
    --raised: #1a2029;
    --ink: #e8eaee;
    --muted: #99a2ae;
    --line: #262d37;
    --line-strong: #39424e;
    --accent: #4a9eff;
    --accent-ink: #07101f;
    --deep: #0a0d12;

    --heat-1: #2dd4bf;
    --heat-2: #4ade80;
    --heat-3: #fbbf24;
    --heat-4: #f87171;
    --fiber:  #a78bfa;
  }
}

.mark-hot  { --mark: var(--heat-4); }
.mark-cool { --mark: var(--heat-1); }

.mat-1 { --mat: var(--heat-1-b); }
.mat-2 { --mat: var(--heat-2-b); }
.mat-3 { --mat: var(--heat-3-b); }
.mat-4 { --mat: var(--heat-4-b); }
.mat-5 { --mat: var(--fiber-b); }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--s-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; max-width: var(--measure); }
a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--band); }

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 27px;
  height: 19px;
  flex: none;
  color: var(--accent);
}

.brand-word { transform: translateX(0.1em); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 200ms ease;
}
.nav a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .nav-collapse { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 120ms ease;
}

.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 84%, #000); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-quiet:hover { border-color: var(--ink); }

/* ---------- Hero: asymmetric split ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(4rem, 7vw, 6.5rem);
  overflow: hidden;
}

/* Layer lines: the same device the logo's V is built from. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 1px,
    transparent 1px 9px
  );
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 60%, transparent 95%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: var(--s-5);
  max-width: 23ch;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: var(--s-1);
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* ---------- Photography ---------- */
.hero-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Full-bleed strip leading into the material band. The photograph is
   near-black, so it meets the dark band without a visible seam. */
.band-lead { padding-top: 0; }

.band-image {
  margin: 0 0 var(--band);
  height: clamp(170px, 24vw, 330px);
  overflow: hidden;
}

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

/* ---------- Section heads ---------- */
.head { margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }

.head h2 {
  font-size: var(--s-4);
  max-width: 19ch;
  margin-bottom: 0.875rem;
}

.head p {
  font-size: var(--s-1);
  color: var(--muted);
  max-width: 52ch;
}

/* ---------- Services: asymmetric bento, 3 items, 3 cells ---------- */
.services {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.25rem;
}

.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  display: flex;
  flex-direction: column;
}

.service-lead {
  grid-row: span 2;
  background: var(--raised);
}

.service-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.service h3 {
  font-size: var(--s-2);
  margin-bottom: 0.75rem;
}

.service-lead h3 { font-size: var(--s-3); }

.service p { color: var(--muted); }

.service ul {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  columns: 2;
  column-gap: 1.5rem;
}

.service-lead ul { margin-top: auto; padding-top: 1.5rem; }

.service li {
  padding-left: 1.05rem;
  position: relative;
  padding-block: 0.22rem;
  break-inside: avoid;
}

.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

@media (max-width: 820px) {
  .services { grid-template-columns: 1fr; }
  .service-lead { grid-row: auto; }
  .service ul { columns: 1; }
}

/* ---------- Machines: side-by-side comparison, no card chrome ---------- */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-strong);
}

.compare-col {
  padding-top: 1.75rem;
  border-top: 3px solid var(--mark, var(--accent));
  margin-top: -1px;
}

.compare-col + .compare-col {
  padding-left: clamp(1.5rem, 3vw, 3rem);
  margin-left: clamp(1.5rem, 3vw, 3rem);
  border-left: 1px solid var(--line);
}

.compare-name {
  font-size: var(--s-3);
  margin-bottom: 0.4rem;
}

.compare-role {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

.compare dl { margin: 0; display: grid; gap: 1rem; }

.compare dt {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.compare dd {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: var(--s-1);
}

.compare dd.plain { font-family: 'IBM Plex Sans', sans-serif; font-size: 1rem; }

.compare dd.key { color: var(--mark, var(--accent)); font-weight: 500; }

@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
  .compare-col + .compare-col {
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
    margin-top: 2.5rem;
  }
}

/* ---------- Materials: a scale, not cards ---------- */
.deep-band { background: var(--deep); color: var(--deep-ink); }
.deep-band .head h2 { color: var(--deep-ink); }
.deep-band .head p { color: var(--deep-muted); }

.scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.scale-item { padding-top: 1.25rem; border-top: 3px solid var(--mat); }

.scale-item h3 {
  font-size: var(--s-1);
  color: var(--deep-ink);
  margin-bottom: 0.5rem;
}

.scale-item p {
  color: var(--deep-muted);
  font-size: 0.9375rem;
}

.scale-note {
  margin-top: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--deep-muted);
}

.scale-note.only { color: var(--mat); }

.scale-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  color: var(--deep-muted);
}

.scale-legend span:nth-child(2) {
  flex: 1;
  height: 4px;
  background: linear-gradient(to right, var(--heat-1-b), var(--heat-2-b), var(--heat-3-b), var(--heat-4-b));
}

@media (max-width: 900px) {
  .scale { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .scale { grid-template-columns: 1fr; }
}

/* ---------- Process: horizontal timeline ---------- */
.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  counter-reset: stage;
}

.stage {
  counter-increment: stage;
  padding-top: 2.75rem;
  position: relative;
}

.stage::before {
  content: counter(stage);
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
}

/* The rail connects the stages; it stops at the last marker. */
.stage::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 38px;
  right: calc(-1 * clamp(1.25rem, 2.5vw, 2.25rem));
  height: 1px;
  background: var(--line-strong);
}

.stage:last-child::after { display: none; }

.stage h3 { font-size: var(--s-1); margin-bottom: 0.5rem; }
.stage p { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 860px) {
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:nth-child(2)::after { display: none; }
}
@media (max-width: 520px) {
  .track { grid-template-columns: 1fr; gap: 2rem; }
  .stage::after { display: none; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact h2 { font-size: var(--s-4); max-width: 13ch; margin-bottom: 1.125rem; }
.contact-lede { font-size: var(--s-1); color: var(--muted); margin-bottom: 1.75rem; }

.contact-list { display: grid; gap: 1.125rem; margin: 0; padding: 0; }

.contact-list div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--line);
}

.contact-list dt { font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font-size: var(--s-1); }

@media (max-width: 780px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-end;
  justify-content: space-between;
}

.lockup {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 0.85rem;
  text-decoration: none;
}

.lockup .brand-mark { width: 38px; height: 27px; grid-row: span 2; }

.lockup-word {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 1.375rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}

.lockup-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

.footer-meta { display: grid; gap: 0.75rem; justify-items: start; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }

@media (min-width: 700px) { .footer-meta { justify-items: end; } }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(3rem, 6vw, 5rem); }
.legal h1 { font-size: var(--s-4); margin-bottom: 2.25rem; }
.legal h2 { font-size: var(--s-2); margin-top: 2.75rem; margin-bottom: 0.875rem; }
.legal p, .legal address, .legal ul { max-width: var(--measure); color: var(--muted); margin-bottom: 1rem; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.25rem; }
.legal li { padding-block: 0.2rem; }

.todo {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  color: var(--ink);
  max-width: var(--measure);
  margin-block: 1.5rem;
}

.back { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 500; text-underline-offset: 3px; }

/* ---------- Motion: scroll-driven reveal, progressive enhancement ----------
   Communicates reading order as sections enter. Chrome/Edge get the timeline;
   everywhere else the content is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 26%;
    }
  }

  .hero-grid > * {
    animation: rise 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-grid > *:nth-child(2) { animation-delay: 110ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
