/* Schriften: IBM Plex, selbst gehostet (SIL Open Font License, siehe fonts/LICENSE-plex.txt) */
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Tokens nach Carbon (White/G100), Akzent Teal statt IBM-Blau */
:root {
  --background: #ffffff;
  --layer: #f4f4f4;
  --layer-hover: #e8e8e8;
  --border: #e0e0e0;
  --border-strong: #8d8d8d;
  --text: #161616;
  --text-2: #525252;
  --accent: #007d79;
  --accent-hover: #006b68;
  --accent-text: #005d5d;
  --dark: #161616;
  --dark-layer: #262626;
  --dark-border: #393939;
  --dark-text: #f4f4f4;
  --dark-text-2: #c6c6c6;
  --dark-accent: #3ddbd9;
  --focus: #0f62fe;
  --sans: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.5; letter-spacing: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* Sprache: alles mit dem jeweils anderen lang-Attribut ausblenden */
html[data-lang="de"] body [lang="en"],
html[data-lang="en"] body [lang="de"] { display: none !important; }

.wrap { max-width: 82rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 672px) { .wrap { padding: 0 2rem; } }

.label { font-family: var(--mono); font-size: .75rem; letter-spacing: .32px; color: var(--accent-text); margin-bottom: 1rem; }

/* Vorschau-Hinweis */
.preview-bar { background: #f1c21b; color: #161616; font-size: .75rem; text-align: center; padding: .375rem 1rem; }

/* UI Shell Header */
.shell { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; height: 3rem; background: var(--dark); color: var(--dark-text); border-bottom: 1px solid var(--dark-border); }
.shell__brand { display: flex; align-items: center; gap: .625rem; height: 100%; padding: 0 1rem; text-decoration: none; font-size: .875rem; white-space: nowrap; }
.shell__brand b { font-weight: 600; }
.shell__mark { width: 1.25rem; height: 1.25rem; fill: var(--dark-accent); }
.shell__mark .o { fill: none; stroke: var(--dark-accent); stroke-width: 2; }
.shell__nav { display: none; height: 100%; margin-left: 1rem; border-left: 1px solid var(--dark-border); }
.shell__nav a { display: flex; align-items: center; height: 100%; padding: 0 1rem; font-size: .875rem; color: var(--dark-text-2); text-decoration: none; transition: background .11s, color .11s; }
.shell__nav a:hover { background: #333; color: var(--dark-text); }
.shell__actions { display: flex; height: 100%; margin-left: auto; }
.shell__lang { height: 100%; width: 3rem; border: 0; background: transparent; color: var(--dark-text); font: 400 .875rem var(--mono); cursor: pointer; }
.shell__lang:hover { background: #333; }
.shell__cta { display: flex; align-items: center; padding: 0 1rem; background: var(--accent); text-decoration: none; font-size: .875rem; color: #fff; transition: background .11s; }
.shell__cta:hover { background: var(--accent-hover); }
@media (min-width: 900px) { .shell__nav { display: flex; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 3rem; padding: .875rem 1rem; font-size: .875rem; text-decoration: none; border: 1px solid transparent; transition: background .11s, color .11s; }
.btn svg { width: 1rem; height: 1rem; fill: currentColor; flex: none; transition: transform .15s; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: #fff; padding-right: 1rem; min-width: 13rem; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { color: var(--dark-accent); }
.btn--ghost:hover { background: #333; }
.btn--tertiary { border-color: var(--accent); color: var(--accent); }
.btn--tertiary:hover { background: var(--accent); color: #fff; }

/* Hero */
.hero { position: relative; background: var(--dark); color: var(--dark-text); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--dark-border) 1px, transparent 1px), linear-gradient(90deg, var(--dark-border) 1px, transparent 1px); background-size: 4rem 4rem; opacity: .35; mask-image: linear-gradient(120deg, transparent 30%, #000 100%); }
.hero__grid { position: relative; display: grid; gap: 3rem; padding-top: 4rem; padding-bottom: 4rem; }
.hero .label { color: var(--dark-accent); }
.hero h1 { font-weight: 300; font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.12; letter-spacing: -.01em; }
.hero__lead { max-width: 36rem; margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.55; color: var(--dark-text-2); }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 2.5rem; }
@media (min-width: 1056px) { .hero__grid { grid-template-columns: 1fr 1.05fr; align-items: center; padding-top: 6rem; padding-bottom: 6rem; } }

/* Produkt-Mock */
.mock { background: #fff; color: var(--text); font-size: .6875rem; box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 24px 48px rgba(0,0,0,.35); opacity: 0; transform: translateY(16px); animation: rise .7s .15s cubic-bezier(.2,0,.38,.9) forwards; }
.mock__top { display: flex; align-items: center; gap: .5rem; height: 2rem; padding: 0 .75rem; background: var(--dark-layer); color: var(--dark-text); border-bottom: 1px solid var(--dark-border); }
.mock__dot { width: .5rem; height: .5rem; background: var(--dark-accent); }
.mock__week { margin-left: auto; font-family: var(--mono); color: var(--dark-text-2); }
.mock__body { display: flex; }
.mock__side { display: flex; flex-direction: column; gap: .5rem; width: 2.25rem; padding: .75rem .625rem; background: var(--layer); border-right: 1px solid var(--border); }
.mock__side i { display: block; height: 1rem; background: #c6c6c6; }
.mock__side i.on { background: var(--accent); }
.mock__main { flex: 1; min-width: 0; }
.mock__head, .mock__row { display: grid; grid-template-columns: 5.5rem repeat(5, 1fr); align-items: center; }
.mock__head { height: 1.75rem; background: var(--layer); border-bottom: 1px solid var(--border); font-weight: 600; }
.mock__head span { padding: 0 .5rem; }
.mock__row { position: relative; height: 2.5rem; border-bottom: 1px solid var(--border); }
.mock__row > span { grid-column: 1; padding: 0 .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.mock__row b { grid-row: 1; grid-column: calc(var(--s) + 1) / calc(var(--e) + 1); margin: 0 2px; padding: .3rem .4rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; transform-origin: left; animation: grow .5s cubic-bezier(.2,0,.38,.9) backwards; }
.mock__row:nth-child(2) b { animation-delay: .5s; } .mock__row:nth-child(3) b { animation-delay: .6s; }
.mock__row:nth-child(4) b { animation-delay: .7s; } .mock__row:nth-child(5) b { animation-delay: .8s; }
.mock__row:nth-child(6) b { animation-delay: .9s; }
.mock__row b.c1 { background: #d9fbfb; border-color: #007d79; }
.mock__row b.c2 { background: #e8daff; border-color: #8a3ffc; }
.mock__row b.c3 { background: #ffd7d9; border-color: #da1e28; }
.mock__row b.c4 { background: #e0e0e0; border-color: #8d8d8d; color: var(--text-2); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } }

/* Problem-Band */
.band { border-bottom: 1px solid var(--border); }
.band__grid { display: grid; }
.band__item { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.band__item:last-child { border-bottom: 0; }
.band__item h3 { font-size: 1.25rem; font-weight: 400; margin-bottom: .5rem; }
.band__item p { color: var(--text-2); font-size: .875rem; line-height: 1.6; max-width: 26rem; }
@media (min-width: 672px) {
  .band__grid { grid-template-columns: repeat(3, 1fr); }
  .band__item { padding: 2.5rem 2rem 2.5rem 0; border-bottom: 0; }
  .band__item + .band__item { padding-left: 2rem; border-left: 1px solid var(--border); }
}

/* Sektionen */
.section { padding: 5rem 0; }
.section--layer { background: var(--layer); }
.section--dark { background: var(--dark); color: var(--dark-text); }
.section--dark .label { color: var(--dark-accent); }
.section--dark p { color: var(--dark-text-2); }
.section h2 { font-size: clamp(1.75rem, 3.4vw, 2.625rem); font-weight: 300; line-height: 1.2; max-width: 40rem; }
.section__head { margin-bottom: 3rem; }
.section__intro { max-width: 40rem; margin-top: 1.25rem; color: var(--text-2); line-height: 1.6; }
.split { display: grid; gap: 2.5rem; }
.split > div > p { margin-top: 1.25rem; max-width: 34rem; line-height: 1.6; color: var(--text-2); }
.section--dark .split > div > p { color: var(--dark-text-2); }
@media (min-width: 1056px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* Kacheln */
.tiles { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.tile { display: flex; flex-direction: column; padding: 1.5rem 1.25rem 2rem; background: var(--background); transition: background .11s; }
.tile:hover { background: var(--layer); }
.tile__icon { width: 2rem; height: 2rem; fill: var(--accent); margin-bottom: 2.5rem; }
.tile h3 { font-size: 1.25rem; font-weight: 400; margin-bottom: .75rem; }
.tile p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }
.tile ul { list-style: none; padding: 0; margin-top: 1.5rem; font-size: .875rem; }
.tile li { padding: .5rem 0; border-top: 1px solid var(--border); }
.tile li::before { content: "– "; color: var(--accent); }
.tile--wide { gap: 1.5rem; background: var(--layer); }
.tile--wide:hover { background: var(--layer-hover); }
.tile--wide p { max-width: 40rem; }
.tile--wide .btn { align-self: flex-start; }
@media (min-width: 672px) { .tiles { grid-template-columns: repeat(2, 1fr); } .tile--wide { grid-column: 1 / -1; } }
@media (min-width: 1056px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile--wide { flex-direction: row; align-items: center; justify-content: space-between; }
  .tile--wide .btn { align-self: center; }
}

/* Basis: strukturierte Liste */
.specs { border-top: 1px solid #c6c6c6; }
.specs > div { display: grid; gap: .25rem; padding: 1rem 0; border-bottom: 1px solid #c6c6c6; }
.specs dt { font-weight: 600; font-size: .875rem; }
.specs dd { font-size: .875rem; color: var(--text-2); line-height: 1.55; }
@media (min-width: 672px) { .specs > div { grid-template-columns: 12rem 1fr; gap: 1.5rem; } }

/* KI-Schritte */
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { display: grid; gap: .25rem; padding: 1.25rem 0 1.25rem 3rem; position: relative; border-top: 1px solid var(--dark-border); color: var(--dark-text-2); font-size: .875rem; }
.steps li:last-child { border-bottom: 1px solid var(--dark-border); }
.steps li::before { counter-increment: s; content: "0" counter(s); position: absolute; left: 0; top: 1.25rem; font-family: var(--mono); color: var(--dark-accent); }
.steps b { font-weight: 400; font-size: 1.125rem; color: var(--dark-text); }

/* Ablauf */
.flow { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.flow li { position: relative; padding: 1.5rem 1.25rem 2rem; background: var(--background); }
.flow li::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); transition: width .6s cubic-bezier(.2,0,.38,.9); }
.flow.is-visible li::after { width: 100%; }
.flow.is-visible li:nth-child(2)::after { transition-delay: .25s; }
.flow.is-visible li:nth-child(3)::after { transition-delay: .5s; }
.flow.is-visible li:nth-child(4)::after { transition-delay: .75s; }
.flow__n { font-family: var(--mono); font-size: .875rem; color: var(--accent-text); }
.flow h3 { margin: 2rem 0 .75rem; font-size: 1.25rem; font-weight: 400; }
.flow p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }
@media (min-width: 672px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1056px) { .flow { grid-template-columns: repeat(4, 1fr); } }

/* Über mich */
.about p { color: var(--text-2); line-height: 1.7; max-width: 36rem; }
.about p + p { margin-top: 1rem; }
.about__tech { margin-top: 2rem !important; padding-top: 1rem; border-top: 1px solid #c6c6c6; font-family: var(--mono); font-size: .75rem; color: var(--text) !important; }

/* Kontakt */
.contact__box { align-self: end; display: grid; gap: 1rem; justify-items: start; padding: 2rem 1.5rem; background: var(--dark-layer); }
.contact__mail { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 300; text-decoration: none; word-break: break-all; color: var(--dark-text); border-bottom: 1px solid var(--dark-accent); }
.contact__mail:hover { color: var(--dark-accent); }
.contact__meta { font-size: .875rem; color: var(--dark-text-2); margin-bottom: 1rem !important; }

/* Footer */
.footer { background: var(--dark); color: var(--dark-text-2); border-top: 1px solid var(--dark-border); font-size: .75rem; }
.footer__row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer nav { display: flex; gap: 1.5rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--dark-text); text-decoration: underline; }

/* Einblenden beim Scrollen */
.reveal { transform: translateY(16px); transition: transform .6s cubic-bezier(.2,0,.38,.9); }
.reveal.is-visible { transform: none; }

/* Rechtstexte */
.legal { padding: 4rem 0 6rem; }
.legal h1 { font-size: 2.625rem; font-weight: 300; margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 .5rem; }
.legal p { max-width: 40rem; color: var(--text-2); line-height: 1.6; }
.legal .todo { background: #fcf4d6; border-left: 3px solid #f1c21b; padding: .75rem 1rem; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mock, .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
