/* Coding County – Stylesheet
   Schrift: Bricolage Grotesque (lokal eingebunden, SIL OFL 1.1), Fließtext: System-Schrift.
   Farben lassen sich zentral über die Variablen unter :root ändern. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #06122b;
  --deep: #0a1f4a;
  --deep-2: #0e2b63;
  --blue: #2f7bff;
  --blue-strong: #1c5fe0;
  --sky: #9cc8ff;
  --mist: #eef4ff;
  --paper: #f8faff;
  --text: #0b1a3b;
  --muted: #475a82;
  --on-dark: #e8f0ff;
  --on-dark-muted: #a9bde3;
  --line-light: #cfdcf5;
  --line-dark: rgba(156, 200, 255, 0.22);

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-code: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--blue); color: #fff; padding: 0.7rem 1.1rem; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.022em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.9rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 750; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 62ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 18, 43, 0.95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.4rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 2.2rem; height: 2.2rem; flex: none; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: 8px; font-size: 0.97rem; font-weight: 500; }
.nav a:hover { background: rgba(156, 200, 255, 0.12); text-decoration: none; }
.nav .nav-cta { background: var(--blue); color: #fff; font-weight: 650; margin-left: 0.4rem; }
.nav .nav-cta:hover { background: #4a8dff; }

.lang { display: flex; gap: 0.15rem; margin-left: 0.6rem; padding-left: 0.9rem; border-left: 1px solid var(--line-dark); }
.lang a { padding: 0.35rem 0.55rem; font-size: 0.85rem; font-weight: 650; border-radius: 6px; color: var(--on-dark-muted); text-decoration: none; }
.lang a[aria-current="true"] { background: rgba(156, 200, 255, 0.16); color: #fff; }
.lang a:hover { color: #fff; text-decoration: none; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-dark); color: #fff; width: 2.9rem; height: 2.9rem; border-radius: 10px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; margin-inline: auto; transition: transform 0.2s, background 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .js .nav-toggle { display: block; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0.1rem;
    background: var(--ink); padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line-dark);
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 0.85rem 0.6rem; font-size: 1.05rem; }
  .js .nav .nav-cta { margin: 0.5rem 0 0; text-align: center; }
  .js .lang { margin: 0.8rem 0 0; padding: 0.8rem 0 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .no-js .site-header .wrap { flex-wrap: wrap; padding-block: 0.6rem; }
  .no-js .nav { flex-wrap: wrap; margin-left: 0; width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 650 1rem/1 var(--font-body); padding: 1.05rem 1.6rem; border-radius: 12px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 30px -10px rgba(47, 123, 255, 0.8); }
.btn-primary:hover { background: #4a8dff; }
.btn-ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--sky); background: rgba(156, 200, 255, 0.08); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--deep-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60rem 38rem at 85% -10%, rgba(47, 123, 255, 0.38), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(28, 95, 224, 0.35), transparent 60%),
    linear-gradient(180deg, var(--ink), var(--deep));
  color: var(--on-dark);
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("/assets/img/contours.svg") center top / cover no-repeat;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-bottom: clamp(3rem, 6vw, 5rem); }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }

.hero h1 { color: #fff; }
.hero .tagline { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 600; color: var(--sky); margin: 1.4rem 0 1rem; letter-spacing: -0.01em; }
.hero .lead { color: var(--on-dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Code window – der eine bewusste Bewegungsmoment auf der Seite */
.code-window {
  background: rgba(4, 12, 30, 0.82);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(47, 123, 255, 0.12), 0 0 90px -20px rgba(47, 123, 255, 0.45);
  overflow: hidden;
  font-family: var(--font-code); font-size: clamp(0.8rem, 1.3vw, 0.95rem);
}
.code-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line-dark); color: var(--on-dark-muted); }
.code-bar i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #2b4478; display: block; }
.code-bar span { margin-left: 0.6rem; font-size: 0.82rem; }
.code-body { padding: 1.2rem 1.2rem 1.4rem; line-height: 1.9; color: #cfe0ff; }
.code-line { display: block; white-space: pre; overflow: hidden; max-width: 0; animation: type 0.55s steps(34, end) forwards; }
.code-line .k { color: var(--sky); }
.code-line .s { color: #7fe0c3; }
.code-line .c { color: #6f86b5; }
.code-line .ok { color: #fff; background: rgba(47, 123, 255, 0.55); padding: 0 0.35em; border-radius: 4px; }
.code-line:nth-child(1) { animation-delay: 0.3s; }
.code-line:nth-child(2) { animation-delay: 0.75s; }
.code-line:nth-child(3) { animation-delay: 1.15s; }
.code-line:nth-child(4) { animation-delay: 1.55s; }
.code-line:nth-child(5) { animation-delay: 1.95s; }
.code-line:nth-child(6) { animation-delay: 2.35s; }
.code-line:nth-child(7) { animation-delay: 2.75s; }
.code-line:nth-child(8) { animation-delay: 3.15s; }
.code-line:nth-child(9) { animation-delay: 3.55s; }
@keyframes type { to { max-width: 60ch; } }

/* Auf einen Blick */
.glance { border-top: 1px solid var(--line-dark); background: rgba(4, 12, 30, 0.45); }
.glance dl { display: grid; gap: 1.4rem 2.5rem; margin: 0; padding-block: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.glance dt { font-size: 0.9rem; color: var(--on-dark-muted); margin-bottom: 0.2rem; }
.glance dd { margin: 0; color: #fff; font-weight: 550; line-height: 1.45; }
.glance a { color: #fff; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-light { background: var(--paper); }
.section-mist { background: var(--mist); }
.section-deep { background: linear-gradient(180deg, var(--deep), #0b2556); color: var(--on-dark); }
.section-ink { background: var(--ink); color: var(--on-dark); position: relative; isolation: isolate; overflow: hidden; }
.section-ink::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/assets/img/contours.svg") 30% 100% / 1600px auto no-repeat; opacity: 0.55; }
.section-deep h2, .section-ink h2 { color: #fff; }
.section-deep .lead, .section-ink .lead { color: var(--on-dark-muted); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { margin-top: 1.2rem; color: var(--muted); font-size: 1.15rem; }
.section-deep .section-head p, .section-ink .section-head p { color: var(--on-dark-muted); }

/* Leistungen – drei bewusst unterschiedliche Flächen */
.services { display: grid; gap: 1.25rem; grid-template-columns: repeat(6, 1fr); }
.svc { position: relative; overflow: hidden; padding: clamp(1.6rem, 3vw, 2.4rem); display: flex; flex-direction: column; gap: 1.2rem; }
.svc h3 { margin-bottom: 0.2rem; }
.svc p { margin: 0; }
.svc-tech { font-size: 0.92rem; font-weight: 650; }
.svc-web { grid-column: span 4; background: linear-gradient(135deg, var(--blue-strong), #3a86ff 70%); color: #fff; border-radius: 28px 28px 8px 28px; }
.svc-web .svc-tech { color: #cfe3ff; }
.svc-app { grid-column: span 2; background: #fff; border: 1.5px solid var(--line-light); border-radius: 8px 28px 28px 28px; }
.svc-app .svc-tech { color: var(--blue-strong); }
.svc-rpa { grid-column: span 6; background: var(--ink); color: var(--on-dark); border-radius: 28px 8px 28px 28px; display: grid; gap: 2rem; align-items: center; }
.svc-rpa .svc-tech { color: var(--sky); }
.svc-rpa p { color: var(--on-dark-muted); }
.svc-art { margin-top: auto; }
.svc-web .svc-art { max-width: 460px; }
.svc-app .svc-art { max-width: 150px; }
@media (min-width: 900px) { .svc-rpa { grid-template-columns: 1fr 1.1fr; } .svc-rpa .svc-art { margin: 0; } }
@media (max-width: 899px) { .svc-web, .svc-app, .svc-rpa { grid-column: span 6; } }

.art-fill { fill: rgba(255, 255, 255, 0.16); }
.art-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art-solid { fill: currentColor; }
.art-text { font: 600 13px var(--font-body); fill: #fff; }
.node rect { fill: rgba(47, 123, 255, 0.18); stroke: var(--blue); stroke-width: 1.5; }
.node text { font: 600 13px var(--font-body); fill: #fff; text-anchor: middle; }
.flow-arrow { fill: none; stroke: var(--sky); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 6; }

.cta-row { margin-top: clamp(2rem, 4vw, 3rem); }

/* Design */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } .split-wide-left { grid-template-columns: 1.1fr 0.9fr; } }
.principles { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.principles li { padding: 1.5rem 0; border-bottom: 1px solid var(--line-dark); }
.principles h3 { color: #fff; margin-bottom: 0.4rem; }
.principles p { margin: 0; color: var(--on-dark-muted); }
.prose p { max-width: 60ch; }

/* Wiederverwendbarkeit */
.blocks-art { width: 100%; max-width: 480px; }
.blk { fill: var(--blue-strong); }
.blk-2 { fill: #3a86ff; }
.blk-3 { fill: var(--sky); }
.blk-ghost { fill: none; stroke: var(--blue-strong); stroke-width: 2; stroke-dasharray: 6 6; }
.benefits { margin: 1.8rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.benefits li { padding-left: 1.7rem; position: relative; }
.benefits li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.75rem; height: 0.75rem; border-radius: 3px; background: var(--blue); }
.benefits strong { display: block; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em; }
.benefits span { color: var(--muted); }

/* KI */
.use-cases { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line-dark); }
@media (min-width: 800px) { .use-cases { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.use-case { padding: 1.6rem 0; border-bottom: 1px solid var(--line-dark); }
.use-case h3 { color: #fff; margin-bottom: 0.4rem; font-size: 1.25rem; }
.use-case p { margin: 0; color: var(--on-dark-muted); }
.note { margin-top: 2rem; max-width: 60ch; color: var(--on-dark-muted); border-left: 3px solid var(--blue); padding-left: 1.1rem; }

/* Sicherheit */
.practice { display: grid; gap: 0; border-top: 1.5px solid var(--text); }
.practice div { display: grid; gap: 0.3rem 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-light); }
@media (min-width: 800px) { .practice div { grid-template-columns: 16rem 1fr; } }
.practice dt { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.practice dd { margin: 0; color: var(--muted); max-width: 60ch; }

/* Ablauf */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.5rem; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; padding-top: 1.1rem; border-top: 3px solid var(--blue); }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--blue-strong); margin-bottom: 0.5rem; }
.steps h3 { margin-bottom: 0.4rem; font-size: 1.25rem; }
.steps p { margin: 0; color: var(--muted); }

/* FAQ */
.faq { max-width: 52rem; border-top: 1.5px solid var(--text); }
.faq details { border-bottom: 1px solid var(--line-light); }
.faq summary { cursor: pointer; list-style: none; padding: 1.3rem 3rem 1.3rem 0; position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.3rem); letter-spacing: -0.012em; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.7rem; height: 0.7rem; border-right: 2.5px solid var(--blue-strong); border-bottom: 2.5px solid var(--blue-strong); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 1.5rem; color: var(--muted); max-width: 60ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Kontakt */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.85fr 1.15fr; } }
.contact-direct { margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.contact-direct dt { color: var(--on-dark-muted); font-size: 0.9rem; }
.contact-direct dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.contact-direct a { color: #fff; }

.form { background: rgba(4, 12, 30, 0.6); border: 1px solid var(--line-dark); border-radius: 20px; padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; color: #fff; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: #fff; background: rgba(156, 200, 255, 0.07);
  border: 1.5px solid var(--line-dark); border-radius: 10px; padding: 0.85rem 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.35); }
.consent { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.95rem; color: var(--on-dark-muted); }
.consent input { margin-top: 0.3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--blue); flex: none; }
.consent a { color: var(--sky); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; margin: 0; font-weight: 600; }
.form-status.ok { color: #7fe0c3; }
.form-status.err { color: #ffb4a8; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Footer */
.site-footer { background: #040c1f; color: var(--on-dark-muted); padding-block: 3rem; font-size: 0.97rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 0.9rem; letter-spacing: 0; }
.footer-brand p { max-width: 34ch; margin: 0.9rem 0 0; }
.copyright { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); font-size: 0.9rem; }

/* Rechtstexte & 404 */
.legal { background: var(--paper); padding-block: clamp(3rem, 7vw, 5.5rem); }
.legal .wrap { max-width: 52rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; letter-spacing: -0.01em; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.35rem; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; background: linear-gradient(180deg, var(--ink), var(--deep)); color: var(--on-dark); padding: 4rem var(--gutter); }
.notfound h1 { color: #fff; margin-bottom: 1rem; }
.notfound p { color: var(--on-dark-muted); max-width: 40ch; margin-inline: auto; margin-bottom: 2rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .code-line { animation: none; max-width: none; }
  .btn:hover { transform: none; }
}
@media print {
  .site-header, .hero::before, .section-ink::before, .form, .nav-toggle { display: none !important; }
}

/* Hilfsklassen (statt Inline-Styles, wegen strenger Content-Security-Policy) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead-gap { margin-top: 1.4rem; }
.lead-muted { margin-top: 1.4rem; color: var(--muted); }
.h-gap { margin-top: 1.5rem; }
.svc-app .svc-art { color: var(--blue-strong); }
