/* GENERIERT aus Design-Tokens First Finance Kreditkontor. Nicht direkt bearbeiten einzelner Seiten am Look - ändere die Token-Werte hier oben in :root. */

/* ============ Fonts (lokal gehostet, keine Laufzeit-Anfrage) ============ */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-variable-latin.woff2") format("woff2-variations"),
       url("../fonts/montserrat-variable-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-variable-latin.woff2") format("woff2-variations"),
       url("../fonts/lora-variable-latin.woff2") format("woff2");
}

/* ============ Design-Tokens ============ */
:root {
  /* Marke (aus dem echten Logo abgeleitet) */
  --accent: #71d0d3;          /* Cyan-Unterstrich, Signatur-Element */
  --accent-strong: #2a3e92;   /* Marken-Blau, Buttons/Links auf hellem Grund */
  --accent-2: #182342;        /* Marken-Navy (Logo-Hintergrund) */

  /* Flächen */
  --bg: #ffffff;
  --bg-deep: #101a34;         /* etwas dunkler als accent-2, für Verlauf im Hero */
  --surface: #f4f6fb;
  --card-bg: #ffffff;

  /* Text */
  --ink: #182342;             /* Headlines */
  --text: #2b3245;            /* Fließtext */
  --text-soft: #5b6478;       /* sekundärer Text */
  --on-accent: #ffffff;

  /* Linien */
  --line: #e3e7f0;
  --line-strong: #c7ced5;

  /* Schatten */
  --shadow: 0 20px 60px -25px rgba(24, 35, 66, 0.35);
  --shadow-brand: 0 25px 55px -20px rgba(42, 62, 146, 0.45);

  /* Schriften */
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 18px;
  --radius-sm: 10px;

  /* Abstands-Skala */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;
}

/* ============ Reset & Basis ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
ul { padding: 0; margin: 0; list-style: none; }
button { font: inherit; }

/* UI-/Navigationselemente bewusst in der Display-Schrift (Montserrat), nicht in der Lesetext-Serife (Lora) */
.btn, .main-nav a, .mobile-panel a, .phone-link, .footer-col a, .footer-bottom a {
  font-family: var(--font-display);
}

/* Sichtbarer Fokus für alle interaktiven Elemente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip-Link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ============ Layout-Hilfen ============ */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { padding-block: var(--space-6); }
.section-tight { padding-block: var(--space-5); }

.section-head { max-width: 46rem; margin-bottom: var(--space-4); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.7em;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color .15s ease;
}
.btn-primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.btn-ghost-dark {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost-dark:hover { background: var(--surface); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; aspect-ratio: 1206 / 298; }
.brand .visually-hidden { position: absolute !important; }

@media (min-width: 480px) { .brand img { height: 32px; } }
@media (min-width: 860px) { .brand img { height: 38px; } }

.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; gap: var(--space-4); }
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  padding: 0.4em 0.1em;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-actions .btn { padding: 0.6em 1em; font-size: 0.85rem; }
@media (min-width: 480px) {
  .header-actions { gap: var(--space-2); }
  .header-actions .btn { padding: 0.7em 1.3em; font-size: 0.95rem; }
}
.phone-link { display: none; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.phone-link:hover { color: var(--accent-strong); }

/* Mobiles Menü ohne JS-Framework: Checkbox-Technik */
.nav-toggle { display: inline-flex; }
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
}
.nav-toggle-label svg { width: 22px; height: 22px; }
.nav-toggle-input:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
}
.mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - 76px);
  height: calc(100dvh - 76px);
  background: #fff;
  padding: var(--space-3) var(--gutter) var(--space-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 101;
}
.nav-toggle-input:checked ~ .mobile-panel { display: block; }
.mobile-panel ul { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-panel a {
  display: block;
  padding: 0.9em 0.2em;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
}
.mobile-panel .btn { width: 100%; margin-top: var(--space-3); }

/* CTA im mobilen Menü: Link-Regeln dürfen Button-Layout und weiße Schrift nicht überschreiben */
.mobile-panel a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95em 1.7em;
  font-size: 1rem;
  color: var(--on-accent);
  border-bottom: 2px solid transparent;
}
.mobile-panel a.btn:hover,
.mobile-panel a.btn:focus-visible {
  color: var(--on-accent);
}

.mobile-panel .mobile-contact { margin-top: var(--space-3); color: var(--text-soft); font-size: 0.95rem; }
.mobile-panel .mobile-contact a { border: none; display: inline; padding: 0; font-weight: 600; color: var(--accent-strong); }

@media (min-width: 860px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
  .phone-link { display: inline-block; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--accent-2) 0%, var(--bg-deep) 100%);
  color: #fff;
  overflow: hidden;
  padding-block: var(--space-6) var(--space-6);
}
.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-5);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1em;
}
.hero-eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); border-radius: 2px; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  max-width: 18ch;
  letter-spacing: -0.01em;
}
.hero .lede {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: var(--space-3);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.hero-facts { display: grid; gap: var(--space-2); grid-template-columns: 1fr; border-top: 1px solid rgba(255,255,255,0.18); padding-top: var(--space-3); }
.hero-facts div { padding-right: var(--space-2); }
.hero-facts strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 0.2em; }
.hero-facts span { color: rgba(255,255,255,0.72); font-size: 0.92rem; }

/* Wasserzeichen: FFK-Bildlogo, 10% Deckkraft, wie gewünscht fix (nicht responsiv variiert) */
.hero-art {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 46%;
  max-width: 480px;
  opacity: 0.1;
  z-index: 1;
  pointer-events: none;
}
@media (max-width: 640px) {
  .hero-art { width: 62%; right: -14%; bottom: -4%; }
}

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); border-top: none; padding-top: 0; }
  .hero-facts-wrap { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.18); padding-top: var(--space-3); margin-top: var(--space-2); }
}

/* ============ Leistungen ============ */
/* 6 Karten: mobil gestapelt, ab 480px 2 Spalten (3 Zeilen), ab 900px 3 Spalten (2 Zeilen) — Zeilen strecken sich gleich hoch (Grid-Default) */
.leistungen-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .leistungen-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .leistungen-grid { grid-template-columns: repeat(3, 1fr); } }

.leistung-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  min-height: 210px;
}
.leistung-card .num {
  font-family: var(--font-display);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.leistung-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.2em; }
.leistung-card p { font-size: 0.95rem; color: var(--text-soft); margin-bottom: 0; }

/* ============ Referenzen ============ */
.ref-band {
  background: var(--accent-2);
  color: #fff;
}
.ref-band .section-head .eyebrow { color: var(--accent); }
.ref-band h2 { color: #fff; }

.ref-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 700px) { .ref-grid { grid-template-columns: repeat(3, 1fr); } }

.ref-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: var(--space-3);
  min-height: 190px;
}
.ref-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(113, 208, 211, 0.16);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.ref-icon svg { width: 26px; height: 26px; }
.ref-card h3 { color: #fff; font-size: 1.3rem; font-weight: 700; margin-bottom: 0.35em; }
.ref-card p { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

.ref-note { margin-top: var(--space-3); color: rgba(255,255,255,0.6); font-size: 0.88rem; max-width: 60ch; }

/* ============ Über uns / Vita ============ */
.vita { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .vita { grid-template-columns: 0.85fr 1.15fr; align-items: center; } }
.vita-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.vita-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vita-list { display: grid; gap: 0.9em; margin: var(--space-3) 0 0; }
.vita-list li { display: flex; gap: 0.7em; align-items: flex-start; }
.vita-list li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--accent-strong);
}
.vita-list p { margin: 0; }
.vita-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--ink); margin-bottom: 0.1em; }
.vita-role { color: var(--accent-strong); font-weight: 600; margin-bottom: 1em; }

/* ============ Kontakt / CTA ============ */
.cta-band {
  background: linear-gradient(160deg, var(--accent-2) 0%, var(--bg-deep) 100%);
  color: #fff;
}
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-grid { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .cta-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.cta-band .lede { color: rgba(255,255,255,0.82); max-width: 42ch; }
.contact-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.contact-card dl { display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); }
.contact-card dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); margin-bottom: 0.2em; }
.contact-card dd { margin: 0; font-size: 1.05rem; font-weight: 600; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { color: var(--accent); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ============ Footer ============ */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: var(--space-5) var(--space-4); }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand img { width: auto; height: 34px; aspect-ratio: 1206 / 298; margin-bottom: 0.9em; }
.footer-brand p { color: var(--text-soft); font-size: 0.92rem; max-width: 36ch; }
.footer-col h3, .footer-col h4 { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin-bottom: 0.9em; }
.footer-col ul { display: grid; gap: 0.6em; }
.footer-col a { text-decoration: none; color: var(--text); font-size: 0.98rem; }
.footer-col a:hover { color: var(--accent-strong); }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em 1.5em;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.86rem;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.2em; }
.footer-bottom a { color: var(--text-soft); text-decoration: underline; }

/* ============ Legal-Placeholder-Seiten ============ */
.legal-main { padding-block: var(--space-6); }
.legal-main h2 {
  font-size: 1.17em;
}
.legal-main .container { max-width: 780px; }
.placeholder-box {
  margin-top: var(--space-3);
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--text-soft);
}

/* ============ 404 ============ */
.error-main {
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--accent-2) 0%, var(--bg-deep) 100%);
  color: #fff;
}
.error-main .container { text-align: center; }
.error-main h1 { color: #fff; font-size: clamp(2.2rem, 6vw, 3.2rem); }
.error-main p { color: rgba(255,255,255,0.8); margin-inline: auto; }
