/* =========================================================
   FinVista Baufinanzierungen – Ralf Dehn
   Design tokens (reused from the existing FinVista identity)
   ========================================================= */
:root{
  --navy: #00416e;
  --navy-deep: #00304f;
  --navy-soft: #0f5688;
  --sand: #e6e4de;
  --sand-deep: #dad7cf;
  --grey: #c8c8c8;
  --white: #ffffff;
  --ink: #26292c;
  --muted: #5a5a5a;

  --font-display: 'HalisR-Black', 'HalisR-Bold', sans-serif;
  --font-head: 'HalisR-Bold', sans-serif;
  --font-body: 'HalisR-Regular', sans-serif;

  --text-hero: clamp(2.4rem, 5.2vw, 4.6rem);
  --text-2xl: clamp(1.9rem, 3.2vw, 2.7rem);
  --text-xl: clamp(1.4rem, 2vw, 1.9rem);
  --text-lg: clamp(1.15rem, 1.3vw, 1.35rem);
  --text-base: 1.05rem;
  --text-sm: 0.92rem;
  --text-xs: 0.8rem;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-8: 48px; --space-10: 64px;
  --space-12: 88px; --space-16: 120px;

  --container: 1140px;
  --radius: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html{ font-size: 16px; }
body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: var(--text-base);
  overflow-x: hidden;
}

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ---------- Skip link ---------- */
.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: var(--space-2) var(--space-4); z-index: 200;
}
.skip-link:focus{ left: var(--space-2); top: var(--space-2); }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled{ box-shadow: 0 4px 18px rgba(0,0,0,0.06); }
.site-header .wrap{
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: var(--space-4); flex-wrap: nowrap;
}
.brand{ display: flex; align-items: center; gap: var(--space-3); }
.brand img{ height: 42px; width: 42px; }
.brand .brand-text{ font-family: var(--font-head); line-height: 1.15; }
.brand .brand-text strong{ display: block; font-size: 1.05rem; color: var(--navy); letter-spacing: .01em; }
.brand .brand-text span{ display: block; font-size: 0.66rem; color: var(--muted); font-family: var(--font-body); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }

.main-nav{ display: flex; align-items: center; gap: var(--space-5); }
.main-nav ul{ display: flex; gap: var(--space-4); font-family: var(--font-head); font-size: 0.85rem; }
.main-nav a{
  position: relative; padding: 6px 2px; color: var(--ink); white-space: nowrap;
  transition: color .25s var(--ease);
}
.main-nav a::after{
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0%;
  background: var(--navy); transition: width .25s var(--ease);
}
.main-nav a:hover, .main-nav a:focus, .main-nav a.is-active{ color: var(--navy); }
.main-nav a:hover::after, .main-nav a:focus::after, .main-nav a.is-active::after{ width: 100%; }

.nav-cta{
  font-family: var(--font-head); font-size: var(--text-sm);
  background: var(--navy); color: var(--white);
  padding: 10px 20px; border-radius: var(--radius);
  transition: background .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover{ background: var(--navy-soft); transform: translateY(-1px); }

.nav-toggle{
  display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--navy); display: block; }

/* ---------- Hero ---------- */
.hero{
  position: relative; color: var(--white);
  min-height: 62vh; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.hero::before{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,48,79,.93) 10%, rgba(0,65,110,.72) 55%, rgba(0,48,79,.55) 100%);
}
.hero-inner{ position: relative; z-index: 2; padding: var(--space-12) 0 var(--space-10); width: 100%; }
.hero-eyebrow{
  font-family: var(--font-head); font-size: var(--text-sm); letter-spacing: .12em; text-transform: uppercase;
  color: var(--sand); margin-bottom: var(--space-3); display: inline-block;
}
.hero h1{
  font-family: var(--font-display); font-size: var(--text-hero); line-height: 1.06;
  max-width: 16ch; margin-bottom: var(--space-4);
}
.hero p{ font-size: var(--text-lg); max-width: 46ch; color: rgba(255,255,255,.92); }
.hero.hero--small{ min-height: 38vh; }
.hero.hero--small h1{ font-size: var(--text-2xl); max-width: 22ch; }
.hero.hero--plain{ background: linear-gradient(135deg, var(--navy-deep), var(--navy) 70%); }
.hero.hero--plain::before{ content: none; }

/* ---------- Sections ---------- */
.section{ padding: clamp(var(--space-10), 8vw, var(--space-16)) 0; }
.section--sand{ background: var(--sand); }
.section--navy{ background: var(--navy); color: var(--white); }
.section--tight{ padding: var(--space-8) 0; }

.eyebrow{
  font-family: var(--font-head); font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: var(--space-3); display: block;
}
.section--navy .eyebrow{ color: var(--sand); }
h2.section-title{ font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.15; margin-bottom: var(--space-5); max-width: 24ch; }
h3.sub-title{ font-family: var(--font-head); font-size: var(--text-xl); margin-bottom: var(--space-3); color: var(--navy); }
.section--navy h3.sub-title{ color: var(--white); }
p.lede{ font-size: var(--text-lg); max-width: 62ch; color: var(--muted); margin-bottom: var(--space-6); }
.section--navy p.lede{ color: rgba(255,255,255,.85); }

.prose{ max-width: 68ch; }
.prose p{ margin-bottom: var(--space-4); }
.prose p:last-child{ margin-bottom: 0; }

/* ---------- Grid layouts ---------- */
.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); align-items: start; }
.grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-2.reverse{ direction: rtl; }
.grid-2.reverse > *{ direction: ltr; }

/* ---------- Cards ---------- */
.card{
  background: var(--white); border-radius: var(--radius);
  padding: var(--space-6); border: 1px solid rgba(0,0,0,0.07);
}
.card h4{ font-family: var(--font-head); color: var(--navy); font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card p{ color: var(--muted); font-size: var(--text-sm); }

.list-check{ display: grid; gap: var(--space-3); }
.list-check li{ padding-left: var(--space-6); position: relative; }
.list-check li::before{
  content: "•"; position: absolute; left: 2px; top: 0; color: var(--navy); font-size: 1.2em; line-height: 1;
}

.pill-list{ display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill{
  border: 1px solid var(--navy); color: var(--navy); font-family: var(--font-head);
  font-size: var(--text-xs); padding: 6px 14px; border-radius: 999px; letter-spacing: .02em;
}
.section--navy .pill{ border-color: rgba(255,255,255,.5); color: var(--white); }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-head); font-size: var(--text-sm);
  padding: 14px 28px; border-radius: var(--radius);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.btn--primary{ background: var(--navy); color: var(--white); }
.btn--primary:hover{ background: var(--navy-soft); transform: translateY(-1px); }
.btn--ghost{ border: 1px solid var(--navy); color: var(--navy); }
.btn--ghost:hover{ background: var(--navy); color: var(--white); }
.section--navy .btn--ghost{ border-color: rgba(255,255,255,.6); color: var(--white); }
.section--navy .btn--ghost:hover{ background: var(--white); color: var(--navy); }

/* ---------- Weiter lesen (Seitenfolge) ---------- */
.next-page{ background: var(--sand); }
.next-page .wrap{ padding-top: var(--space-10); padding-bottom: var(--space-10); }
.next-page a{
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-8); align-items: center;
  background: var(--white); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,48,79,.06), 0 12px 32px rgba(0,48,79,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.next-page a:hover{ transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,48,79,.06), 0 18px 40px rgba(0,48,79,.14); }
.next-page .next-page-text{ padding: var(--space-8) var(--space-8) var(--space-8) var(--space-8); }
.next-page .eyebrow{ margin-bottom: var(--space-3); }
.next-page h2{ font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.1; color: var(--navy); margin-bottom: var(--space-3); }
.next-page p{ color: var(--ink); max-width: 42ch; }
.next-page .next-page-cta{ display: inline-flex; align-items: center; gap: .5em; margin-top: var(--space-5); font-family: var(--font-head); font-weight: 700; color: var(--navy); }
.next-page .next-page-cta svg{ width: 1.1em; height: 1.1em; transition: transform .25s ease; }
.next-page a:hover .next-page-cta svg{ transform: translateX(4px); }
.next-page .next-page-img{ align-self: stretch; min-height: 260px; }
.next-page .next-page-img img{ width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 800px){
  .next-page a{ grid-template-columns: 1fr; gap: 0; }
  .next-page .next-page-img{ order: -1; min-height: 0; aspect-ratio: 16/10; }
  .next-page .next-page-text{ padding: var(--space-6) var(--space-5) var(--space-7); }
}

/* ---------- Image moments ---------- */
.figure{ border-radius: var(--radius); overflow: hidden; }
.figure img{ width: 100%; height: 100%; object-fit: cover; }
.figure--portrait{ aspect-ratio: 4/5; }
.figure--wide{ aspect-ratio: 16/10; }
.figure--video{ aspect-ratio: 16/9; }
.full-bleed{ width: 100%; }
.full-bleed img{ width: 100%; max-height: 480px; object-fit: cover; }

/* ---------- Quote ---------- */
.pull-quote{
  font-family: var(--font-head); font-size: var(--text-xl); color: var(--navy);
  border-left: 3px solid var(--navy); padding-left: var(--space-5); max-width: 46ch; margin: var(--space-6) 0;
}
.signature{ font-family: var(--font-head); font-size: var(--text-lg); color: var(--navy); margin-top: var(--space-6); }

/* ---------- Timeline ---------- */
.timeline{ display: grid; gap: var(--space-6); }
.timeline li{ display: grid; grid-template-columns: 100px 1fr; gap: var(--space-5); align-items: baseline; }
.timeline .year{ font-family: var(--font-display); font-size: var(--text-lg); color: var(--navy); }
.timeline h4{ font-family: var(--font-head); margin-bottom: var(--space-1); }
.timeline p{ color: var(--muted); font-size: var(--text-sm); }

/* ---------- Info box ---------- */
.info-box{
  background: var(--white); border: 1px solid rgba(0,65,110,0.18); border-left: 4px solid var(--navy);
  border-radius: var(--radius); padding: var(--space-5) var(--space-6);
}
.info-box .eyebrow{ margin-bottom: var(--space-2); }

/* ---------- Aktuelles entries ---------- */
.entry-list{ display: grid; gap: var(--space-8); }
.entry{ padding-bottom: var(--space-6); border-bottom: 1px solid rgba(0,0,0,0.08); }
.entry:last-child{ border-bottom: none; padding-bottom: 0; }
.entry time{ font-family: var(--font-head); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); display: block; margin-bottom: var(--space-2); }
.entry h3{ font-family: var(--font-head); font-size: var(--text-lg); margin-bottom: var(--space-2); }
.entry p{ color: var(--muted); max-width: 68ch; }

/* ---------- Contact block ---------- */
.contact-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.contact-item{ display: flex; gap: var(--space-4); align-items: flex-start; }
.contact-item .ico{
  width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item h4{ font-family: var(--font-head); font-size: var(--text-base); margin-bottom: 2px; }
.contact-item a, .contact-item p{ color: var(--muted); font-size: var(--text-sm); }
.contact-item a:hover{ color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer{ background: var(--navy-deep); color: rgba(255,255,255,.85); }
.site-footer .wrap{ padding: var(--space-10) var(--space-5) var(--space-6); }
.footer-top{ display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-8); padding-bottom: var(--space-8); }
.footer-brand img{ height: 40px; margin-bottom: var(--space-3); }
.footer-brand p{ color: rgba(255,255,255,.65); font-size: var(--text-sm); max-width: 32ch; }
.footer-col h5{ font-family: var(--font-head); color: var(--white); font-size: var(--text-sm); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--space-4); }
.footer-col ul{ display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.footer-col a{ color: rgba(255,255,255,.75); transition: color .2s var(--ease); }
.footer-col a:hover{ color: var(--white); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.15); padding-top: var(--space-5);
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: rgba(255,255,255,.55);
}
.footer-bottom a{ color: rgba(255,255,255,.55); }
.footer-bottom a:hover{ color: var(--white); }
.footer-bottom-links{ display: flex; gap: var(--space-5); flex-wrap: wrap; }

/* ---------- Legal page ---------- */
.legal h2{ font-family: var(--font-display); font-size: var(--text-2xl); color: var(--navy); margin: var(--space-10) 0 var(--space-5); }
.legal h2:first-child{ margin-top: 0; }
.legal h3{ font-family: var(--font-head); font-size: var(--text-lg); color: var(--navy); margin: var(--space-6) 0 var(--space-2); }
.legal p{ margin-bottom: var(--space-3); max-width: 74ch; color: var(--ink); }
.legal ul{ margin: var(--space-3) 0 var(--space-4) var(--space-5); list-style: disc; max-width: 74ch; }
.legal li{ margin-bottom: var(--space-1); }
.legal a{ color: var(--navy); text-decoration: underline; text-decoration-color: rgba(0,65,110,.35); }
.legal a:hover{ text-decoration-color: var(--navy); }
.legal-toc{ display: flex; gap: var(--space-4); margin-bottom: var(--space-8); font-family: var(--font-head); font-size: var(--text-sm); }
.legal-toc a{ color: var(--navy); border-bottom: 2px solid transparent; }
.legal-toc a:hover{ border-color: var(--navy); }

/* ---------- Utility ---------- */
.mt-8{ margin-top: var(--space-8); }
.text-center{ text-align: center; }
.tag-row{ display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px){
  .main-nav ul{ gap: var(--space-4); }
  .footer-top{ grid-template-columns: 1fr; gap: var(--space-6); }
  .contact-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 800px){
  .main-nav ul{ display: none; }
  .nav-toggle{ display: flex; }
  .main-nav.is-open ul{
    display: flex; flex-direction: column; gap: var(--space-4);
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    padding: var(--space-6) var(--space-5); box-shadow: 0 12px 24px rgba(0,0,0,.08);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-cta{ display: none; }
  .grid-2{ grid-template-columns: 1fr; gap: var(--space-6); }
  .grid-2.reverse{ direction: ltr; }
  .grid-3{ grid-template-columns: 1fr; }
  .timeline li{ grid-template-columns: 70px 1fr; }
  .hero{ min-height: 56vh; }
  .hero h1{ max-width: 100%; }
  .legal-toc{ flex-wrap: wrap; }
}

@media (max-width: 520px){
  .wrap{ padding: 0 var(--space-4); }
  .site-header .wrap{ height: 68px; }
  .brand img{ height: 34px; width: 34px; }
  .brand .brand-text strong{ font-size: 0.92rem; }
  .brand .brand-text span{ font-size: 0.62rem; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; }
}
