/* ==========================================================
   Coding4u – OnePager
   Schriften liegen lokal unter /assets/fonts (DSGVO, kein Google-Request)
   ========================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-blur: rgba(10, 10, 10, .78);
  --fg: #f4f4f2;
  --muted: #9b9b97;
  --line: #232323;
  --line-strong: #3a3a3a;
  --surface: #121212;
  --ghost: #161616;
  --inv-line: rgba(10, 10, 10, .22);
  --inv-muted: #4d4d4a;

  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 11vw, 144px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .7; }
img, svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1360px; margin: 0 auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, opacity .2s ease;
}
.btn:hover { opacity: 1; transform: translateY(-1px); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 14px; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--ghost { border-color: var(--line-strong); }
.btn--inv { background: var(--bg); color: var(--fg); min-height: 56px; padding: 0 32px; }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-blur);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; }
.nav__logo svg { height: 26px; width: auto; }
.nav__links { display: flex; gap: 32px; font-family: var(--mono); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---------- Typo ---------- */
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }
.label { color: var(--muted); }
.h1 { margin-top: 24px; font-size: clamp(40px, 5.6vw, 88px); line-height: 1; font-weight: 400; font-stretch: 118%; letter-spacing: -.045em; }
.h2 { font-size: clamp(30px, 4vw, 56px); line-height: 1.08; font-weight: 400; font-stretch: 112%; letter-spacing: -.035em; max-width: 960px; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--muted); max-width: 520px; letter-spacing: -.01em; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(72px, 9vw, 120px); padding-bottom: 40px; }
.hero__title { margin-top: 32px; font-size: clamp(48px, 8.4vw, 136px); line-height: .95; font-weight: 400; font-stretch: 118%; letter-spacing: -.045em; max-width: 1200px; }
.hero__row { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-end; }
.hero__mark { margin-top: clamp(56px, 7vw, 96px); width: 100%; height: auto; color: var(--ghost); }

/* ---------- Tech ---------- */
.tech { position: relative; z-index: 1; background: var(--bg); border-block: 1px solid var(--line); }
.tech__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; padding-block: 22px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.line-top { border-top: 1px solid var(--line); }
.split { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.split > .label { flex: 0 0 240px; }
.split__main { flex: 1 1 560px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; gap: 32px 80px; align-items: flex-end; justify-content: space-between; }
.head__aside { max-width: 380px; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* Über uns */
.pillars { margin-top: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.pillar { padding-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.pillar h3 { font-size: 24px; font-weight: 500; font-stretch: 110%; letter-spacing: -.02em; }
.pillar p { color: var(--muted); line-height: 1.55; }

/* Leistungen */
.services { margin-top: 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service {
  padding: 32px; min-height: 260px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 72px;
  transition: background .25s ease;
}
.service:hover { background: rgba(127, 127, 127, .07); }
.service h3 { margin-bottom: 14px; white-space: nowrap; font-size: 26px; font-weight: 500; font-stretch: 112%; letter-spacing: -.025em; hyphens: auto; }
.service p { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Projekte */
.projects { margin-top: 80px; border-top: 1px solid var(--line); }
.project {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px;
  padding: 28px 8px; border-bottom: 1px solid var(--line);
  transition: background .25s ease;
}
.project:hover { background: rgba(127, 127, 127, .08); }
.project > .mono:first-child { flex: 0 0 48px; }
.project h3 { flex: 1 1 260px; font-size: 28px; font-weight: 500; font-stretch: 112%; letter-spacing: -.025em; }
.project__cat { flex: 0 0 180px; }
.project p { flex: 2 1 320px; color: var(--muted); }

/* Prozess */
.steps { margin-top: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.step { padding: 28px 24px 32px 0; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 12px; }
.step--active { border-top: 2px solid var(--fg); }
.step strong { font-size: 22px; font-weight: 500; font-stretch: 110%; letter-spacing: -.02em; }
.step .muted { font-size: 15px; }

/* ---------- Kontakt / Quiz ---------- */
.invert { background: var(--fg); color: var(--bg); }
.invert .label, .invert .lead { color: var(--inv-muted); }
.invert .lead { margin-top: 32px; max-width: 440px; }
.invert .h1 { font-size: clamp(42px, 6vw, 96px); line-height: .98; }
.contact { display: flex; flex-wrap: wrap; gap: 64px 96px; }
.contact__info { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 64px; }
.contact__details { display: flex; flex-direction: column; gap: 4px; font-size: clamp(18px, 2vw, 22px); font-weight: 500; font-stretch: 110%; letter-spacing: -.02em; }
.contact__details span { margin-top: 8px; font-size: 16px; font-weight: 400; color: var(--inv-muted); }

.quiz { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.quiz__top { display: flex; flex-direction: column; gap: 14px; }
.quiz__meta { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 12px; color: var(--inv-muted); }
.quiz__back { background: none; border: 0; padding: 0 4px; min-height: 44px; cursor: pointer; color: var(--bg); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.quiz__bar { height: 2px; background: var(--inv-line); }
.quiz__fill { height: 2px; width: 25%; background: var(--bg); transition: width .35s ease; }
.quiz__title { font-size: clamp(26px, 3vw, 40px); line-height: 1.1; font-weight: 400; font-stretch: 112%; letter-spacing: -.03em; }
.quiz__opts { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.quiz__opt {
  display: flex; align-items: center; gap: 18px; width: 100%;
  min-height: 64px; padding: 12px 22px; border-radius: 16px;
  border: 1px solid var(--inv-line); background: transparent; color: var(--bg);
  font: inherit; font-size: 18px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.quiz__opt:hover, .quiz__opt.is-selected { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.quiz__opt:hover { transform: translateY(-1px); }
.quiz__key { flex: 0 0 28px; height: 28px; border-radius: 8px; border: 1px solid currentColor; opacity: .7; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 400; }
.quiz__opt span:nth-child(2) { flex: 1 1 auto; }

.quiz__form { display: flex; flex-direction: column; }
.quiz__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.quiz__chips span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--inv-line); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--inv-line); }
.field label { font-size: 12px; color: var(--inv-muted); }
.field .opt { text-transform: none; letter-spacing: 0; }
.field input { background: transparent; border: 0; outline: none; padding: 0; min-height: 36px; font: inherit; font-size: 22px; color: var(--bg); }
.field input::placeholder { color: var(--bg); opacity: .35; }
.field:focus-within { border-bottom-color: var(--bg); }
.field.is-invalid { border-bottom-color: #b42318; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; font-size: 14px; line-height: 1.45; color: var(--inv-muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--bg); }
.check a { text-decoration: underline; color: var(--bg); }
.quiz__error { margin-top: 16px; color: #b42318; font-size: 14px; }
.quiz__form .btn { margin-top: 28px; align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.quiz__done { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.quiz__done .lead { margin-top: 0; }
.quiz__check { width: 64px; height: 64px; border-radius: 50%; background: var(--bg); color: var(--fg); display: flex; align-items: center; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__inner { padding-block: 64px 40px; display: flex; flex-direction: column; gap: 64px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer__logo { height: 40px; width: auto; color: var(--fg); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.footer__cols > div { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer__cols .mono { font-size: 12px; margin-bottom: 4px; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }

/* ---------- Rechtstexte ---------- */
.legal { padding-block: clamp(64px, 8vw, 112px) var(--section); max-width: 820px; }
.legal h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 400; font-stretch: 118%; letter-spacing: -.045em; margin-bottom: 48px; }
.legal h2 { font-size: 22px; font-weight: 500; font-stretch: 110%; letter-spacing: -.02em; margin: 48px 0 12px; }
.legal p, .legal li { color: var(--muted); line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 12px 0 0; }
.legal a { text-decoration: underline; color: var(--fg); }
.legal .back { display: inline-block; margin-bottom: 40px; text-decoration: none; }

/* ==========================================================
   Animationen – nur aktiv, wenn .motion gesetzt ist
   (fehlt bei "Bewegung reduzieren" im Betriebssystem)
   ========================================================== */
:root { --ease: cubic-bezier(.2, .7, .2, 1); }

/* Navigation: beim Runterscrollen ausblenden, beim Hochscrollen zeigen */
.nav { transition: transform .45s var(--ease); }
.nav.is-hidden { transform: translateY(-100%); }

/* Pulsierender Punkt im Hero */
.motion .dot { position: relative; }
.motion .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--fg); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .55; } to { transform: scale(3.4); opacity: 0; } }

/* Headline: Wörter gleiten von unten in die Maske */
.motion .hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.motion .hero__title .w > span {
  display: inline-block; transform: translateY(110%);
  animation: wordUp 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
@keyframes wordUp { to { transform: none; } }

/* Großes c4u-Logo: C von links, U von rechts, die 4 fällt hinein */
.hero__mark path { fill: currentColor; transform-box: fill-box; }
.motion .hero__mark .m-c { opacity: 0; transform: translateX(-12%); animation: markIn 1.4s var(--ease) .55s forwards; }
.motion .hero__mark .m-u { opacity: 0; transform: translateX(12%);  animation: markIn 1.4s var(--ease) .55s forwards; }
.motion .hero__mark .m-4 { opacity: 0; transform: translateY(-70%) rotate(-8deg); animation: markIn 1.1s cubic-bezier(.3, 1.35, .5, 1) 1.15s forwards; }
@keyframes markIn { to { opacity: 1; transform: none; } }

/* Scroll-Reveal */
.motion [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), background .25s ease;
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms;
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Tech-Leiste als Endlos-Laufband */
.tech.is-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.tech.is-marquee .tech__inner { max-width: none; margin: 0; padding-inline: 0; width: max-content; flex-wrap: nowrap; justify-content: flex-start; gap: 0; animation: marquee 38s linear infinite; }
.tech.is-marquee .tech__inner span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; }
.tech.is-marquee .tech__inner span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.tech.is-marquee:hover .tech__inner { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Hover-Details */
.btn span[aria-hidden] { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover span[aria-hidden] { transform: translateX(4px); }
.service h3, .project h3 { transition: transform .4s var(--ease); }
.service:hover h3, .project:hover h3 { transform: translateX(8px); }
.service > .mono { transition: color .25s ease; }
.service:hover > .mono { color: var(--fg); }

/* Prozess: Fortschrittslinie läuft Schritt für Schritt durch */
.step { position: relative; border-top: 1px solid var(--line-strong); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--fg); transition: width .9s var(--ease); }
html:not(.motion) .step:first-child::before, .steps.is-in .step::before { width: 100%; }
.steps.is-in .step:nth-child(2)::before { transition-delay: .3s; }
.steps.is-in .step:nth-child(3)::before { transition-delay: .6s; }
.steps.is-in .step:nth-child(4)::before { transition-delay: .9s; }
.steps.is-in .step:nth-child(5)::before { transition-delay: 1.2s; }

/* Quiz: weiche Übergänge zwischen den Fragen */
.motion .quiz-anim { animation: qIn .45s var(--ease); }
.motion .quiz__opt { animation: qIn .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.motion .quiz__check { animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) .1s backwards; }
@keyframes qIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
