/* ============================================================
   zwokbenkel.de — stylesheet v1
   Palette: Tinte (ink) / Papier (paper) / Buchungsgrün (ledger)
   Fonts: IBM Plex Sans + IBM Plex Mono, self-hosted (DSGVO)
   ============================================================ */

/* ---------- Fonts (latin + cyrillic) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/ibm-plex-sans-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/ibm-plex-sans-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/ibm-plex-sans-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/ibm-plex-mono-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---------- Tokens ---------- */
:root {
  --ink:        #16283e;  /* deep steel blue — headings, footer, contact panel */
  --ink-soft:   #23364d;
  --text:       #2b3440;  /* body */
  --muted:      #5c6774;
  --paper:      #f7f8f6;  /* page background */
  --card:       #ffffff;
  --line:       #dfe3e0;  /* ledger rule */
  --ledger:     #1f7a5c;  /* Buchungsgrün — CTA, links, accents */
  --ledger-dk:  #175f48;
  --amber:      #b98a2f;  /* sparingly: the deadline chip */
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Consolas', monospace;
  --maxw: 1120px;
  --radius: 6px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--sans); color: var(--text);
  background: var(--paper); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ledger); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ledger-dk); }
:focus-visible { outline: 3px solid var(--ledger); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); font-weight: 700; letter-spacing: -0.015em; }
.h1-sub { display: block; font-size: .62em; font-weight: 600; color: var(--ink-soft);
  letter-spacing: -0.005em; line-height: 1.35; margin-top: .45em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* mono eyebrow — the recurring utility voice */
.eyebrow {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ledger);
  display: block; margin-bottom: .8rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,246,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; letter-spacing: .01em; }
.brand .tld { color: var(--ledger); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ledger-dk); }
.lang { font-family: var(--mono); font-size: .82rem; }
.lang a, .lang span { padding: 3px 7px; border-radius: 4px; text-decoration: none; }
.lang span[aria-current] { background: var(--ink); color: #fff; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  /* ledger paper: fine horizontal rules */
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(22,40,62,.055) 31px 32px),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 56px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: 48px; align-items: center; }
.hero .id-line { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 0 0 1.1rem; }
.id-line .nw { white-space: nowrap; }
.hero .id-line strong { color: var(--ink); font-weight: 500; }
.hero p.lead { font-size: 1.08rem; max-width: 56ch; }
.hero .cta-row { margin-top: 1.6rem; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; background: var(--ledger); color: #fff;
  padding: 13px 26px; border-radius: var(--radius); text-decoration: none;
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
}
.btn:hover { background: var(--ledger-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* Signature: data-flow diagram */
.flow { font-family: var(--mono); font-size: .82rem; }
.flow-box {
  background: var(--card); border: 1.5px solid var(--ink);
  border-radius: var(--radius); padding: 12px 16px; color: var(--ink);
  box-shadow: 3px 3px 0 rgba(22,40,62,.12);
}
.flow-node { display: flex; flex-direction: column; gap: 2px; }
.flow-node small { color: var(--muted); font-size: .72rem; }
.flow-pipe {
  height: 34px; margin: 6px 0 6px 26px; border-left: 2px dashed var(--ledger);
  position: relative;
}
.flow-pipe::after {
  content: '▼'; position: absolute; left: -6.5px; bottom: -4px;
  color: var(--ledger); font-size: .7rem;
}
.flow-pipe.two-way::before {
  content: '▲'; position: absolute; left: -6.5px; top: -4px;
  color: var(--ledger); font-size: .7rem;
}
@media (prefers-reduced-motion: no-preference) {
  .flow-pipe { border-left-style: solid;
    background: linear-gradient(var(--ledger) 50%, transparent 50%);
    background-size: 2px 10px; background-repeat: repeat-y; background-position: -2px 0;
    border-left: none; width: 2px;
    animation: pipeflow 1.2s linear infinite; }
  @keyframes pipeflow { to { background-position: -2px 10px; } }
}
.flow-caption { margin-top: 10px; color: var(--muted); font-size: .75rem; }

/* deadline chip */
.chip {
  display: inline-block; font-family: var(--mono); font-size: .78rem;
  border: 1px solid var(--amber); color: var(--amber);
  border-radius: 999px; padding: 3px 12px; margin-bottom: 1rem; background: #fff;
}

/* ---------- Sections ---------- */
section { padding: 72px 0; scroll-margin-top: 64px; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--ledger); transform: translateY(-2px); }
.card { position: relative; }
.card .more::after { content: ''; position: absolute; inset: 0; }
.card:hover .more { color: var(--ledger-dk); }
.card:focus-within { outline: 3px solid var(--ledger); outline-offset: 2px; }
.card .more:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transform: none; transition: none; } }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .95rem; color: var(--text); flex: 1; }
.card .more { font-size: .92rem; font-weight: 600; text-decoration: none; }
.card.card-accent { border-top: 3px solid var(--amber); }

/* Advantages */
.adv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 40px; }
.adv article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.adv h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.adv p { font-size: .95rem; color: var(--muted); margin: 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  border-left: 3px solid var(--ledger); background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.project h3 { font-size: 1rem; }
.project p { font-size: .92rem; color: var(--muted); margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,5fr); gap: 44px; align-items: start; }
.portrait { border-radius: var(--radius); border: 1px solid var(--line); }
.about .stack { font-family: var(--mono); font-size: .85rem; color: var(--muted); }

/* Contact */
.contact { background: var(--ink); color: #e8ecef; }
.contact h2, .contact h3 { color: #fff; }
.contact .eyebrow { color: #7fc7ab; }
.contact a { color: #9fd9c0; }
.contact-grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); gap: 48px; }
.form label { display: block; font-size: .9rem; font-weight: 600; margin: 16px 0 6px; color: #cdd6dd; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid #3d5068; background: #1d314a; color: #fff;
  font-family: var(--sans); font-size: 1rem;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--ledger); border-color: var(--ledger); }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; margin: 16px 0; color: #cdd6dd; }
.form .consent label { margin: 0; font-weight: 400; font-size: .85rem; }
.form .consent input { width: auto; margin-top: .28em; flex: none; }
.form .note { font-family: var(--mono); font-size: .75rem; color: #8fa1b3; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid #2c405a; color: #8fa1b3; padding: 26px 0; font-size: .88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #cdd6dd; text-decoration: none; margin-right: 18px; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Subpages ---------- */
.page { padding: 64px 0 80px; min-height: 50vh; }
.page .wrap { max-width: 720px; }   /* centered reading column on wide screens */
.page .prose, .page .lead { max-width: none; }
.page .back { font-family: var(--mono); font-size: .85rem; display: inline-block; margin-bottom: 2rem; text-decoration: none; }
.stub-note {
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card);
  padding: 18px 20px; color: var(--muted); font-size: .95rem; max-width: 62ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .cards, .projects { grid-template-columns: 1fr 1fr; }
  .adv { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 48px; }
  .flow { max-width: 380px; }
}
@media (max-width: 620px) {
  .cards, .projects { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a.nav-link { display: none; }  /* on phones: brand + lang only */
  section { padding: 52px 0; }
  .about-grid { gap: 24px; }
  .portrait { max-width: 280px; }
}


/* ---------- Polish pass v3 ---------- */
/* rhythm: alternate section backgrounds */
main > section:nth-of-type(odd):not(.contact) { background: #ffffff; }

/* stats band under hero */
.stats { border-bottom: 1px solid var(--line); background: var(--card); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 26px; padding-bottom: 26px; }
.stat b { display: block; font-family: var(--mono); font-weight: 500; font-size: 1.5rem; color: var(--ink); letter-spacing: -0.01em; }
.stat span { font-size: .82rem; color: var(--muted); }
@media (max-width: 620px) { .stats .wrap { grid-template-columns: 1fr 1fr; } }




/* ---------- back to top ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(22,40,62,.35);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--ledger); color: #fff; border-color: var(--ledger); }
.totop svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .totop { transition: none; } }
@media (max-width: 620px) { .totop { right: 14px; bottom: 14px; } }


/* ---------- service content pages ---------- */
.page .lead { font-size: 1.08rem; max-width: 62ch; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.6rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }

.timeline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 1.8rem 0 2.2rem; max-width: 760px; }
.timeline .row { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.timeline .row:last-child { border-bottom: none; }
.timeline .when { font-family: var(--mono); font-size: .85rem; color: var(--ledger); font-weight: 500; padding-top: 2px; }
.timeline .row.due .when { color: var(--amber); }
.timeline .what { font-size: .95rem; }
.timeline .what b { color: var(--ink); }
@media (max-width: 620px) { .timeline .row { grid-template-columns: 1fr; gap: 4px; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.4rem 0 2rem; max-width: 68ch; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.3rem 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 500;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.steps li:not(:last-child)::after {
  content: ''; position: absolute; left: 18.5px; top: 42px; bottom: 2px;
  border-left: 2px dashed var(--line);
}
.steps h3 { margin-bottom: .3rem; }
.steps p { font-size: .95rem; color: var(--text); margin: 0; }

.cta-box { background: var(--ink); color: #e8ecef; border-radius: var(--radius); padding: 28px 30px; margin: 2.6rem 0 0; max-width: 760px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.cta-box h2 { color: #fff; margin: 0 0 .3rem; font-size: 1.3rem; }
.cta-box p { margin: 0; font-size: .95rem; color: #cdd6dd; }


/* ---------- form protection & feedback ---------- */
.hp { position: absolute !important; left: -9999px !important; top: -9999px !important; }
.form-error { display: none; background: #7a2e2e; color: #fff; border-radius: var(--radius);
  padding: 12px 16px; font-size: .9rem; margin: 0 0 6px; }
