/* Praxis KI – styles.css */

:root {
  --bg: #EEF1EC;
  --bg-alt: #E4E9E2;
  --surface: #F8FAF6;
  --text: #1E2420;
  --text-muted: #4F5952;
  --border: #CBD3CA;
  --grid: rgba(30, 36, 32, 0.045);
  --accent: #4A5BA8;          /* Weiss auf Blau: ca. 6.3:1 */
  --accent-hover: #3D4C8F;
  --accent-text: #FFFFFF;
  --accent-soft: #E3E7F6;
  --accent-ink: #3F4F96;      /* Blau als Textfarbe auf hellem Grund */
  --focus: #4A5BA8;

  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 6px;
  --max: 1080px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161A17;
    --bg-alt: #1C211D;
    --surface: #222823;
    --text: #E6EAE4;
    --text-muted: #A9B3AA;
    --border: #353D37;
    --grid: rgba(230, 234, 228, 0.04);
    --accent: #8E9CF0;
    --accent-hover: #A3AFF4;
    --accent-text: #11152B;
    --accent-soft: #252B48;
    --accent-ink: #A3AFF4;
    --focus: #8E9CF0;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
.h2-large { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 22ch; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1em; }

a { color: inherit; }

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

/* Kopfzeile */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.logo span { color: var(--accent-ink); }

.header-link {
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
}
.header-link:hover { background: var(--text); color: var(--bg); }

/* Einstieg */
.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 9vw, 104px);
  border-bottom: 1px solid var(--border);
  /* feines Millimeterraster */
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 60ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.25em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--accent);
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 62ch;
}

.button {
  display: inline-block;
  margin-top: 0.75rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: var(--radius);
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--accent-hover); }

/* Abschnitte */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1em;
}
.section-label .num {
  color: var(--accent-ink);
  margin-right: 0.5em;
}

/* Zitate */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 2rem;
}

.quote {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }
.quote figcaption {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.quote figcaption::before { content: "– "; }

/* Rechenbeispiel */
.table-wrap {
  position: relative;
  margin-top: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.calc {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.calc th, .calc td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.calc tbody tr:last-child th,
.calc tbody tr:last-child td { border-bottom: 0; }

.calc thead th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-alt);
}

.calc tbody th { font-weight: 600; }

.calc .num-col {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.calc thead .num-col { font-family: var(--font-mono); }
.calc .total { font-weight: 500; }

.calc tr.is-best { background: var(--accent-soft); }
.calc tr.is-best th:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.calc tr.is-best .total { color: var(--accent-ink); font-weight: 600; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.footnote {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Screenshots */
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 2rem;
}
.shot { margin: 0; }
.shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.shot figcaption {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Stand der Entwicklung */
.status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 2rem;
}
.status-col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}
.status-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 12px; height: 12px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  flex: none;
}
.dot-done { background: var(--accent); border-color: var(--accent); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--border);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px; top: 17px;
  width: 12px; height: 12px;
  border: 2px solid var(--text-muted);
  border-radius: 2px;
}
.checklist.done li::before {
  background: var(--accent);
  border-color: var(--accent);
}
.checklist.done li::after {
  content: "";
  position: absolute;
  left: 6px; top: 19px;
  width: 4px; height: 7px;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Ablauf */
.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: none;
}
.steps li {
  border-top: 3px solid var(--text);
  padding-top: 20px;
}
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.steps p { color: var(--text-muted); margin: 0; }

/* Über mich */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
}
.portrait {
  width: 220px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Kontakt */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.contact-list {
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 16px 56px;
}
.contact-list dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-list dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.contact-list a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.contact-list a:hover { color: var(--accent-ink); }

/* Fusszeile */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { text-underline-offset: 3px; }
.footer-inner a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 860px) {
  .quotes, .steps { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root { --gutter: 16px; }
  .shots, .status { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 160px; }
}

/* Ankersprünge nicht unter der Kopfzeile verstecken */
section[id] { scroll-margin-top: 72px; }

/* Rechtsseiten (Impressum, Datenschutz) */
.legal { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); margin-bottom: 0.75em; }
.legal h2 { font-size: 1.6rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.35em; }
.legal a { text-underline-offset: 3px; }
.legal a:hover { color: var(--accent-ink); }

.back { font-size: 0.9375rem; margin-bottom: 1.5em; }
.back a { color: var(--text-muted); text-decoration: none; }
.back a:hover { color: var(--text); text-decoration: underline; }

.draft-note {
  border: 1px solid var(--accent);
  border-left-width: 4px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 2em;
}

mark.fill {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0 3px;
  border-radius: 2px;
}

.stand { margin-top: 2em; color: var(--text-muted); font-size: 0.9375rem; }

.footer-inner a[aria-current="page"] { color: var(--text); }
