/* ===========================================================
   Protein Dispenser — Landing Page
   Design v2: "Technisches Datenblatt" — German engineering
   document aesthetic. Paper, ink, one engineering blue.
   Fonts: IBM Plex Sans / Mono, self-hosted (GDPR-clean).
   =========================================================== */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-var.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../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(../fonts/ibm-plex-mono-500.woff2) format('woff2');
}

:root {
  --paper: #f4f3ef;
  --paper-raised: #fdfdfb;
  --ink: #16191b;
  --ink-soft: #555d63;
  --line: #dbd8d0;
  --line-strong: #16191b;
  --blue: #0f4c81;
  --blue-deep: #0a3a63;
  --blue-soft: rgba(15, 76, 129, 0.07);
  --blue-on-dark: #6fb1e0;
  --graphite: #22262a;
  --grid: rgba(22, 25, 27, 0.05);
  --radius: 2px;
  --maxw: 1120px;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 243, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.brand-mark { color: var(--blue); }

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.nav-menu a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a.nav-cta {
  color: #fff;
  background: var(--blue);
  padding: 9px 18px;
  border-radius: var(--radius);
}
.nav-menu a.nav-cta:hover { background: var(--blue-deep); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  padding: 92px 0 72px;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.accent { color: var(--blue); }

.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 52px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.hero-stats {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.hero-stats > div {
  border-left: 2px solid var(--line-strong);
  padding: 2px 28px 2px 16px;
}
.hero-stats dt {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: -0.01em;
}
.hero-stats dd {
  color: var(--ink-soft);
  font-size: 0.85rem;
  max-width: 22ch;
  line-height: 1.5;
}

/* Machine illustration — dark product on light page */
.machine-svg { width: 100%; max-width: 290px; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(22, 25, 27, 0.18)); }
.m-case { fill: var(--graphite); }
.m-case-line { fill: none; stroke: #383e44; stroke-width: 2; }
.m-panel { fill: #14171a; stroke: #383e44; }
.m-text { fill: #aeb6bd; font-size: 13px; font-weight: 600; letter-spacing: 2px; font-family: var(--mono); }
.m-accent-dot { fill: var(--blue-on-dark); }
.m-steel { fill: #3c434a; stroke: #9aa4ad; stroke-width: 1.4; }
.m-clamp { fill: #9aa4ad; }
.m-pipe { fill: #2c3237; stroke: #9aa4ad; stroke-width: 1.2; }
.m-chamber { stroke: var(--blue-on-dark); stroke-width: 1.6; }
.m-bay { fill: #14171a; stroke: #383e44; }
.m-cup { fill: none; stroke: #8a939a; stroke-width: 1.6; }
.machine-svg .powder circle { fill: #e8e6e0; }
.powder circle { animation: fall 1.6s linear infinite; }
.powder circle:nth-child(2) { animation-delay: 0.3s; }
.powder circle:nth-child(3) { animation-delay: 0.6s; }
.powder circle:nth-child(4) { animation-delay: 0.9s; }
.powder circle:nth-child(5) { animation-delay: 1.2s; }
@keyframes fall {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(26px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt {
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 18px;
  max-width: 30ch;
}

.section-lead {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 66ch;
  margin-bottom: 44px;
}

/* Cards */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
}
.section-alt .card { background: var(--paper); }
.card h3 { font-size: 1.04rem; font-weight: 600; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 0.93rem; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
}
.steps li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.step-num {
  display: block;
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 14px;
}
.step-num::before { content: "0"; }
.step-num::after { content: ""; display: block; width: 34px; height: 2px; background: var(--blue); margin-top: 8px; }
.steps h3 { font-size: 1.04rem; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 0.93rem; }

/* Callout */
.callout {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 48px;
  max-width: 860px;
}
.callout-title {
  font-family: var(--mono);
  color: var(--blue);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.callout p:not(.callout-title) { color: var(--ink-soft); }
.callout strong { color: var(--ink); font-weight: 600; }

/* Tech section */
.tech-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.tech-diagram {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 18px;
  position: sticky;
  top: 88px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.tech-diagram svg { max-width: 280px; margin: 0 auto; }

.d-steel { fill: #e9e7e1; stroke: var(--ink); stroke-width: 1.4; }
.d-clamp { fill: var(--ink); }
.d-valvebody { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 1.4; }
.d-disc { stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.d-pivot { fill: var(--ink); }
.d-chamber { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 1.5; }
.d-cup { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
.d-dim { stroke: var(--ink-soft); stroke-width: 1; }
.d-arrowhead { fill: var(--ink-soft); }
.d-label { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.d-label-strong { fill: var(--ink); font-size: 12.5px; font-weight: 600; font-family: var(--sans); }
.d-label-sub { fill: var(--ink-soft); font-size: 10.5px; font-weight: 400; font-family: var(--mono); }
.tech-diagram .powder circle { fill: var(--blue); }

.tech-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Business model */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
  margin-top: 14px;
}
.split h3 { margin: 24px 0 8px; font-size: 1.08rem; font-weight: 600; }
.split h3:first-child { margin-top: 0; }
.split p { color: var(--ink-soft); }

.kpi-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
}
.kpi-box h3 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.kpi-box table { width: 100%; border-collapse: collapse; }
.kpi-box th, .kpi-box td {
  text-align: left;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.kpi-box th { color: var(--ink-soft); font-weight: 400; }
.kpi-box td {
  text-align: right;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--blue);
}
.kpi-note { margin-top: 14px; font-size: 0.8rem; color: var(--ink-soft); }

/* Timeline */
.timeline {
  list-style: none;
  margin-top: 44px;
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-strong);
}
.timeline li {
  position: relative;
  padding-bottom: 40px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -36px; top: 7px;
  width: 14px; height: 14px;
  background: var(--paper);
  border: 1.5px solid var(--ink-soft);
}
.timeline li.done::before { background: var(--blue); border-color: var(--blue); }
.timeline li.now::before {
  border-color: var(--blue);
  border-width: 3px;
}
.timeline h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 6px; }
.tl-date {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timeline p { color: var(--ink-soft); max-width: 70ch; }

/* Contact */
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 38px;
  text-align: center;
  max-width: 420px;
  margin: 16px auto 0;
}
.contact-name { font-size: 1.15rem; font-weight: 600; }
.contact-role {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 6px 0 24px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.76rem;
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 22px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-footer a:hover { color: var(--ink); }

/* Legal pages */
.legal { padding: 72px 0; }
.legal h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 28px; }
.legal h2 { font-size: 1.2rem; font-weight: 600; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); max-width: 72ch; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--blue); }
.legal .todo {
  background: var(--blue-soft);
  border: 1px dashed var(--blue);
  border-radius: var(--radius);
  padding: 3px 9px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.85em;
}
.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 36px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .powder circle { animation: none; opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .machine-svg { max-width: 210px; }
  .tech-grid { grid-template-columns: 1fr; }
  .tech-diagram { position: static; }
  .cards-3, .steps, .tech-cards { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cards-3, .steps, .tech-cards { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 64px 0; }
  .hero-stats > div { padding: 2px 18px 2px 14px; margin-bottom: 14px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 26px;
    gap: 18px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
