/* Fidelis KI — site styles. Self-hosted fonts. No tracking. */
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fraunces-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600.woff2") format("woff2");
}

:root {
  --ink: #14110c;
  --ink-soft: #3a352c;
  --muted: #5e584e;
  --paper: #f3eee4;
  --paper-2: #eae3d6;
  --rule: #d7cfc0;
  --pine: #15352a;
  --pine-deep: #0c231c;
  --pine-mid: #1e4a3a;
  --gold: #c4a056;
  --gold-dim: #8d7040;
  --cream: #f7f3ea;
  --focus: #c4a056;
  --header-h: 4.5rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 70rem;
  --serif: "Fraunces", "Source Serif 4", "Palatino Linotype", Palatino, serif;
  --sans: "Manrope", "IBM Plex Sans", "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--gold);
  color: var(--pine-deep);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: transparent;
  color: var(--cream);
  mix-blend-mode: normal;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
body.subpage .site-header {
  background: rgba(243, 238, 228, 0.92);
  color: var(--ink);
  border-bottom-color: var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand svg { width: 2.05rem; height: 2.05rem; color: var(--gold); }
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}
.brand-name span { font-weight: 400; font-style: italic; opacity: .85; margin-left: .2em; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}
.nav a {
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .9;
}
.nav a:hover, .nav a:focus-visible { opacity: 1; color: var(--gold); }
.nav-cta {
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--gold); }

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  height: 1.5px;
  background: currentColor;
  content: "";
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--pine-deep);
    color: var(--cream);
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  }
  .site-header.is-scrolled .nav,
  body.subpage .site-header .nav {
    background: var(--paper);
    color: var(--ink);
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 0.7rem 0; width: 100%; }
}

/* Layout helpers */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin-inline: auto;
}
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 0.9rem;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  font-weight: 400;
}
h3 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0 0 0.6rem;
}
.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0;
}
.placeholder {
  display: inline;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  padding: 0.05em 0.35em;
  border-radius: 0.2em;
  font-weight: 500;
  white-space: nowrap;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(100svh, 54rem);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 70% at 80% 10%, rgba(196,160,86,.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(20,70,50,.45), transparent 55%),
    linear-gradient(165deg, var(--pine-deep) 0%, var(--pine) 52%, #0a1c16 100%);
  padding: calc(var(--header-h) + 2rem) 0 4.5rem;
  margin-top: calc(-1 * var(--header-h));
  overflow: hidden;
}
.hero::before {
  content: "f";
  position: absolute;
  right: -4vw;
  bottom: -18%;
  font-family: var(--serif);
  font-size: clamp(18rem, 48vw, 38rem);
  line-height: .7;
  color: rgba(247, 243, 234, 0.04);
  pointer-events: none;
  font-style: italic;
  user-select: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.hero .wrap { position: relative; z-index: 1; width: min(100% - 2 * var(--gutter), 78rem); }
.hero-kicker {
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(2.7rem, 7.2vw, 6.1rem);
  line-height: 0.98;
  margin: 0 0 1.5rem;
  max-width: 14ch;
  font-weight: 400;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.hero-lead {
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  color: color-mix(in srgb, var(--cream) 78%, var(--pine));
  margin: 0 0 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.btn-gold {
  background: var(--gold);
  color: var(--pine-deep);
}
.btn-gold:hover { background: #d4b36a; }
.btn-ghost {
  border-color: color-mix(in srgb, var(--cream) 30%, transparent);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ink {
  background: var(--pine);
  color: var(--cream);
}
.btn-ink:hover { background: var(--pine-mid); }

/* Spine rule on light sections */
.page-main { position: relative; }
.page-main::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: max(0.7rem, calc((100% - var(--measure)) / 2 + 0.15rem));
  width: 1px;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat;
  background-size: 1px 100%;
  opacity: .55;
  pointer-events: none;
}
@media (max-width: 700px) {
  .page-main::before { left: 0.7rem; }
}

/* Leistungen */
.intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem 3rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 800px) { .intro-row { grid-template-columns: 1fr; } }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: color-mix(in srgb, var(--paper-2) 65%, white);
  border: 1px solid var(--rule);
  padding: 1.6rem 1.5rem 1.5rem;
  position: relative;
}
.card .num {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  font-size: 0.8rem;
  margin: 0 0 0.85rem;
}
.card p { margin: 0; color: var(--ink-soft); }

/* Process */
.process {
  background: var(--pine-deep);
  color: var(--cream);
  position: relative;
}
.process .kicker { color: var(--gold); }
.process h2 { color: var(--cream); }
.process .lede { color: color-mix(in srgb, var(--cream) 75%, var(--pine)); }
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 3rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.step {
  padding: 1.8rem 1.4rem 0.4rem 0;
  border-right: 1px solid color-mix(in srgb, var(--cream) 12%, transparent);
}
.step:last-child { border-right: 0; padding-right: 0; }
.step .num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.8rem;
  line-height: 1;
}
.step p { margin: 0.4rem 0 0; color: color-mix(in srgb, var(--cream) 72%, var(--pine)); font-size: 0.98rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step { border-bottom: 1px solid color-mix(in srgb, var(--cream) 12%, transparent); padding: 1.5rem 1.2rem 1.5rem 0; }
  .step:nth-child(2n) { border-right: 0; padding-right: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; }
}

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
}
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr; } }
.principles { list-style: none; margin: 0; padding: 0; }
.principles li {
  padding: 1.2rem 0;
  border-top: 1px solid var(--rule);
}
.principles li:last-child { border-bottom: 1px solid var(--rule); }
.principles strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  display: block;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}
.principles span { color: var(--ink-soft); display: block; }

/* Use cases */
.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}
@media (max-width: 800px) { .cases { grid-template-columns: 1fr; } }
.case {
  padding: 1.8rem 1.5rem;
  background: var(--pine);
  color: var(--cream);
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.case h3 { color: var(--cream); }
.case p { margin: 0; color: color-mix(in srgb, var(--cream) 78%, var(--pine)); }
.case .tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

/* About + contact split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.about p, .contact p { color: var(--ink-soft); }
.about p + p, .contact p + p { margin-top: 1rem; }
.meaning {
  margin-top: 1.6rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  max-width: 24rem;
}
.contact-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
}
.contact-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list dt, .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--cream) 80%, #000);
  padding: 2.2rem 0;
  font-size: 0.88rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.4rem; }

/* Subpages */
.sub-hero {
  background: var(--pine-deep);
  color: var(--cream);
  padding: calc(var(--header-h) + 3rem) 0 3.5rem;
  margin-top: calc(-1 * var(--header-h));
}
.sub-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; }
.legal {
  max-width: 42rem;
}
.legal h2 { font-size: 1.6rem; margin: 2.2rem 0 0.7rem; }
.legal p { color: var(--ink-soft); }
.note {
  border-left: 3px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 1.4rem 0;
  color: var(--ink);
}
