/* Prognos — Base: Reset, Typografie, Layout-Primitives */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-ink-soft);
  background: var(--c-paper);
  font-feature-settings: "kern", "liga", "calt";
}

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  color: var(--c-ink);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4) 0;
}

h1 { font-size: var(--fs-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: 600; font-family: var(--ff-sans); letter-spacing: 0; }

@media (max-width: 720px) {
  h1 { font-size: calc(var(--fs-2xl) * 1.1); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }
}

p { margin: 0 0 var(--sp-5) 0; max-width: var(--prose-max); }
p.lead { font-size: var(--fs-md); color: var(--c-ink-soft); line-height: var(--lh-snug); }

a {
  color: var(--c-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
a:hover { color: var(--c-accent-dk); border-bottom-color: var(--c-accent); }

hr {
  border: 0;
  height: 1px;
  background: var(--c-rule);
  margin: var(--sp-7) 0;
}

small, .caption {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  letter-spacing: 0.02em;
}

.label {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  font-weight: 600;
}

code, pre, kbd {
  font-family: var(--ff-mono);
  font-size: 0.92em;
}

pre {
  background: var(--c-ink);
  color: #e8ecf3;
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin: 0 0 var(--sp-5) 0;
}
pre code { color: inherit; background: none; }
:not(pre) > code {
  background: var(--c-paper-alt);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--c-rule-soft);
  font-size: 0.88em;
}

blockquote {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--c-ink);
  margin: var(--sp-6) 0;
  padding: 0 0 0 var(--sp-5);
  border-left: 2px solid var(--c-highlight);
  max-width: var(--prose-max);
}
blockquote footer {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-style: normal;
  color: var(--c-muted);
  margin-top: var(--sp-3);
}

ul, ol { padding-left: 1.25em; margin: 0 0 var(--sp-5) 0; max-width: var(--prose-max); }
li { margin-bottom: var(--sp-2); }

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

/* Layout */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
@media (max-width: 720px) { .container { padding: 0 var(--sp-5); } }

.prose { max-width: var(--prose-max); }

.section {
  padding: var(--sp-9) 0;
  border-top: 1px solid var(--c-rule-soft);
}
.section:first-of-type { border-top: 0; }
.section--alt { background: var(--c-paper-alt); }
.section--dark {
  background: var(--c-ink);
  color: #d8dde8;
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #f6f7fb; }
.section--dark a { color: #8fb6e5; }
.section--dark .label { color: #9aa3b5; }

@media (max-width: 720px) { .section { padding: var(--sp-7) 0; } }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
  max-width: var(--prose-max);
}
.section-head .label { order: -1; }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

.hstack { display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap; }
.vstack { display: flex; flex-direction: column; gap: var(--sp-4); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 0.7em 1.25em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn--primary {
  background: var(--c-ink);
  color: #fff;
  border-color: var(--c-ink);
}
.btn--primary:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  border-bottom-color: var(--c-accent);
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-rule);
}
.btn--ghost:hover {
  border-color: var(--c-ink);
  color: var(--c-ink);
  border-bottom-color: var(--c-ink);
}
.btn--sm { padding: 0.5em 0.9em; font-size: var(--fs-xs); }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-rule-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.brand {
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  border-bottom: 0;
}
.brand .brand__dot { color: var(--c-highlight); }
.nav-links {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  border-bottom: 0;
}
.nav-links a:hover { color: var(--c-accent); border-bottom: 0; }
.nav-links a.current { color: var(--c-ink); }
.nav-cta { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--c-ink); }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav[data-open="true"] .nav-links {
    display: flex;
    position: absolute;
    top: 62px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--c-paper);
    border-bottom: 1px solid var(--c-rule);
    padding: var(--sp-5) var(--sp-6);
    gap: var(--sp-4);
  }
}

/* Footer */
.footer {
  padding: var(--sp-7) 0 var(--sp-6);
  border-top: 1px solid var(--c-rule);
  background: var(--c-paper-alt);
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-6); margin-bottom: var(--sp-6); }
.footer-grid h5 { font-family: var(--ff-sans); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--c-muted); margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--sp-2); }
.footer-grid a { color: var(--c-ink-soft); font-size: var(--fs-sm); }
.footer-meta { display: flex; justify-content: space-between; padding-top: var(--sp-5); border-top: 1px solid var(--c-rule); font-size: var(--fs-xs); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } .footer-meta { flex-direction: column; gap: var(--sp-2); } }

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--c-accent); }
.text-muted  { color: var(--c-muted); }
.text-highlight { color: var(--c-highlight); }
.mono { font-family: var(--ff-mono); }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* Print */
@media print {
  .nav, .nav-toggle, .footer { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: var(--sp-5) 0; border: 0; }
  .section--dark { background: #fff; color: #000; }
  .section--dark h1, .section--dark h2, .section--dark h3 { color: #000; }
  a { color: #000; border: 0; }
  pre { background: #f4f4f4; color: #000; }
}
