@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/jetbrains-mono.woff2) format('woff2');
}
@font-face { /* only downloaded when Cyrillic glyphs show up (?fx=cyrillic) */
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0400-045F;
}

:root {
  color-scheme: dark;
  --bg: #0f1114;
  --surface: #161a1f;
  --line: #262b33;
  --text: #ebe7df;
  --muted: #8e9198;
  --gold: #cfa95e;
  --gold-grad: linear-gradient(100deg, #8a7444, #d9b46a);
  --pad: clamp(16px, 5vw, 64px);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html.decoding body { visibility: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 16px/1.7 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 3rem); margin-bottom: 2.5rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .6rem; }
p { margin: 0 0 1rem; }

.gold { color: var(--gold); }
.label { color: var(--gold); font-size: .85rem; letter-spacing: .05em; margin-bottom: 1rem; }
.lead { color: var(--muted); max-width: 58ch; font-size: 1.05rem; }

/* decode effect (scramble.js): real char keeps its place unpainted, random glyph drawn on top */
.dc-c[data-g] { position: relative; -webkit-text-fill-color: transparent; }
.dc-c[data-g]::after {
  content: attr(data-g); content: attr(data-g) / ""; /* empty alt text: screen readers skip the glyph */
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  line-height: normal; /* = inline content box, so baselines match */
  -webkit-text-fill-color: var(--fx-color); opacity: .8;
}
.dc-c.dc-in { animation: dc-in .45s ease-out; } /* brief gold glow as each char locks in */
@keyframes dc-in { from { color: var(--fx-color); text-shadow: 0 0 .5em var(--fx-color); } }
:root { --fx-color: var(--gold); }
.btn, .lang button[aria-pressed="true"] { --fx-color: currentColor; } /* gold on gold would vanish */
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 500; letter-spacing: .08em; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 2.5vw, 2rem); font-size: .9rem; }
nav a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .2s; }
nav a:not(.btn):hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); }
.lang button { font: inherit; font-size: .8rem; background: none; color: var(--muted); border: 0; padding: .35rem .55rem; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--bg); background: var(--gold); }

.btn {
  display: inline-block; padding: .85rem 1.4rem; border-radius: 2px;
  background: var(--gold-grad); color: #111; font-weight: 600; text-decoration: none;
  transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-small { padding: .5rem .9rem; }
.btn-ghost { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); }

/* sections */
main > section, footer { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vw, 140px) var(--pad); }
main > section + section { border-top: 1px solid var(--line); }

.hero {
  min-height: 100svh; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 3rem;
  padding-top: 120px !important;
}
.hero h1 { margin-bottom: 1.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-mark { width: 100%; opacity: .9; filter: drop-shadow(0 0 40px rgb(207 169 94 / .12)); }


.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 1.5rem; }
.case { margin: 0; }
.case-wide { grid-column: 1 / -1; }
.case img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 4px; transition: transform .5s cubic-bezier(.2,.7,0,1); }
.case > img:hover { transform: translateY(-4px); }
.case-info { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: baseline; padding-top: 1rem; }
.case-info h3 { font-size: 1.15rem; font-weight: 500; margin: 0; }
.case-info span { color: var(--gold); font-size: .8rem; justify-self: end; }
.case-info p { grid-column: 1 / -1; color: var(--muted); font-size: .92rem; margin: .2rem 0 0; max-width: 60ch; }
.case-link, .case-soon { grid-column: 1 / -1; font-size: .85rem; margin-top: .5rem; }
.case-link { color: var(--gold); text-decoration: none; justify-self: start; }
.case-link:hover { text-decoration: underline; }
.case-soon { color: var(--muted); }
.case-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.steps li { position: relative; border-top: 1px solid var(--gold); padding: 1.6rem 2rem 0 0; }
.steps li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--gold); } /* timeline node */
.steps .num { color: var(--gold); font-size: .85rem; display: block; margin-bottom: 1rem; }
.steps p { color: var(--muted); font-size: .95rem; }

.facts { list-style: none; padding: 0; margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--muted); font-size: .85rem; }
.facts li { display: flex; align-items: center; gap: .6rem; }
.facts li::before { content: ""; width: 6px; height: 6px; background: var(--gold); } /* drawn marker, not a glyph */

.lead + .tiles { margin-top: 3rem; }
/* services: illustrated tiles on a hairline grid */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tiles article { padding: 2rem 2rem 2.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .3s; }
.tiles article:hover { background: #14171c; }
.tiles h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: .5rem; }
.tiles p { color: var(--muted); font-size: .92rem; margin: 0; }
.ill { display: block; width: 56px; height: 56px; color: var(--gold); margin-bottom: 1.6rem; transition: transform .35s cubic-bezier(.2,.7,0,1); }
.tiles article:hover .ill { transform: translateY(-4px); }

/* claim graphic: tangled connections resolve into three clean lines */
.tangle { display: block; width: 100%; height: auto; margin: 0 0 3rem; overflow: visible; }
.tangle .mess path { stroke: #474c55; stroke-width: 1.5; }
.tangle .clean path { stroke: var(--gold); stroke-width: 2; }
.tangle .node { fill: var(--gold); }
.tangle .dot { fill: var(--bg); stroke: var(--gold); stroke-width: 1.5; }
.tangle path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.draw .tangle:not(.in) path { stroke-dashoffset: 1; }
.draw .tangle:not(.in) circle { opacity: 0; }
.tangle .mess path { transition: stroke-dashoffset 1.8s cubic-bezier(.3,.6,0,1); }
.tangle .node { transition: opacity .4s 1.4s; }
.tangle .clean path { transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,0,1) 1.5s; }
.tangle .dot { transition: opacity .4s 2.4s; }

/* why: three plain columns under one gold rule */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; border-top: 1px solid var(--gold); padding-top: 2rem; }
.cols p { color: var(--muted); font-size: .95rem; margin: 0; }

.faq { border-bottom: 1px solid var(--line); max-width: 900px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { /* drawn plus that turns into a minus */
  content: ""; flex: none; width: 12px; height: 12px; margin-top: .45em;
  background: linear-gradient(var(--gold), var(--gold)) center / 100% 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) center / 1.5px 100% no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { background-size: 100% 1.5px, 1.5px 0; }
.faq summary:hover { color: var(--gold); }
.faq details p { color: var(--muted); font-size: .95rem; max-width: 70ch; margin: 0 0 1.4rem; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.5rem; max-width: 760px; margin-top: 2.5rem; }
.form label { display: grid; gap: .5rem; font-size: .85rem; color: var(--muted); }
.form .wide { grid-column: 1 / -1; }
.form input, .form textarea { font: inherit; font-size: .95rem; color: var(--text); background: #14171c; border: 1px solid var(--line); border-radius: 2px; padding: .8rem .9rem; width: 100%; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); }
.form textarea { resize: vertical; min-height: 8rem; }
.form .hp { position: absolute; left: -9999px; } /* honeypot for spam bots */
.form-note { font-size: .8rem; color: var(--muted); margin: 0; }
.form-note a { color: inherit; }
.form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.address { color: var(--muted); font-size: .85rem; margin-top: 1.5rem; }
.imprint-title { grid-column: 1 / -1; font-size: .85rem; font-weight: 500; color: var(--gold); letter-spacing: .05em; margin: 0 0 1rem; }

/* browser surfaces in the brand palette */
::selection { background: var(--gold); color: var(--bg); }
html { scrollbar-color: #3a3e45 var(--bg); accent-color: var(--gold); caret-color: var(--gold); }
a { text-underline-offset: 3px; }

.contact { text-align: left; }
.mail {
  display: inline-block; font-size: clamp(1.4rem, 5vw, 3.4rem); font-weight: 500; text-decoration: none;
  color: var(--gold);
  border-bottom: 1px solid var(--line); padding-bottom: .3rem; word-break: break-all;
}
.mail:hover { border-color: var(--gold); }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding-block: 56px !important; }
.imprint { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.imprint .label { grid-column: 1 / -1; }
.legal { margin: 2rem 0 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero { min-height: auto; gap: 2rem; }
  .hero-mark { order: -1; max-width: 120px; }
  .cols, .projects, .imprint, .form { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
}
@media (max-width: 560px) {
  .case-strip { grid-template-columns: 1fr 1fr; }
  .case-info { grid-template-columns: 1fr; }
  .case-info span { justify-self: start; }
  .case-strip img:last-child { display: none; }
  .steps { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .tiles article { display: grid; grid-template-columns: 44px 1fr; gap: 0 1.2rem; padding: 1.4rem 1.2rem; }
  .tiles .ill { width: 44px; height: 44px; margin: 0; grid-row: span 2; }
  .brand span { display: none; } /* deer mark alone leaves room for DE/EN + CTA */
  .btn-small { white-space: nowrap; }
  nav a:not(.btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .case img { transition: none; }
}

/* legal pages (datenschutz/, agb/): plain long-form text, no decode effect */
.legal-text { max-width: 780px; margin: 0 auto; padding: 120px var(--pad) 64px; overflow-wrap: break-word; }
.legal-text h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 2rem; }
.legal-text h2 { font-size: 1.3rem; margin: 2.8rem 0 1rem; }
.legal-text h3 { font-size: 1rem; margin: 1.8rem 0 .6rem; }
.legal-text p, .legal-text li { color: var(--muted); font-size: .92rem; }
.legal-text a { color: var(--gold); overflow-wrap: anywhere; }
.legal-page footer { text-align: center; }
