/* GFR Finance GmbH — sober German bank visual system */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy: #0b1f33;
  --navy-deep: #071522;
  --ink: #1a2332;
  --muted: #5a6a7a;
  --line: #d5dde6;
  --paper: #f3f1ed;
  --white: #ffffff;
  --steel: #2f4a63;
  --accent: #8a734a;
  --accent-soft: rgba(138, 115, 74, 0.12);
  --success: #1f6b4a;
  --danger: #8b2e2e;
  --shadow: 0 18px 50px rgba(11, 31, 51, 0.12);
  --radius: 2px;
  --max: 1180px;
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 0.6em;
}
p { margin: 0 0 1em; }
.container { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }

/* Top bar */
.topbar {
  background: var(--navy-deep);
  color: rgba(255,255,255,.78);
  font-size: 0.82rem;
  letter-spacing: .02em;
}
.topbar .container {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .55rem 0;
}
.topbar a { color: rgba(255,255,255,.85); text-decoration: none; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; color: #fff; font-weight: 600;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-panel {
  position: absolute; right: 0; top: 1.6rem; z-index: 40;
  width: min(320px, 80vw);
  max-height: 280px; overflow: auto;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.lang-panel a {
  display: block; padding: .55rem .75rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line); font-size: .9rem;
}
.lang-panel a:hover, .lang-panel a.is-active { background: var(--accent-soft); }

/* Header */
.site-header {
  background: rgba(243,241,237,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1rem 0;
}
.brand {
  display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--navy);
}
.brand-mark {
  width: 46px; height: 46px; background: var(--navy);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .04em;
}
.brand-text strong { display: block; font-size: 1.05rem; letter-spacing: .03em; }
.brand-text span { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.nav {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
}
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
}
.nav a:hover { color: var(--steel); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; border: 1px solid transparent; cursor: pointer;
  padding: .85rem 1.35rem; font: inherit; font-weight: 600;
  text-decoration: none; transition: .2s ease; border-radius: var(--radius);
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--steel); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--accent); color: #fff; }
.btn-gold:hover { filter: brightness(.95); color: #fff; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); padding: .45rem .7rem; cursor: pointer;
}

/* Hero — full bleed */
.hero {
  position: relative; min-height: min(88vh, 760px);
  display: grid; align-items: end;
  color: #fff; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,21,34,.82) 0%, rgba(7,21,34,.45) 55%, rgba(7,21,34,.25) 100%),
              linear-gradient(0deg, rgba(7,21,34,.55), transparent 45%);
}
.hero-content {
  position: relative; z-index: 1;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto; padding: 7rem 0 4.5rem;
}
.hero-brand {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0 0 .4rem; color: #fff; letter-spacing: .02em;
}
.hero h1 {
  color: #fff; max-width: 16ch;
  font-size: clamp(1.6rem, 3vw, 2.35rem); margin-bottom: .9rem;
}
.hero p { max-width: 42ch; color: rgba(255,255,255,.88); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Sections */
.section { padding: 5rem 0; }
.section-muted { background: #ebe7e0; }
.section-dark { background: var(--navy); color: rgba(255,255,255,.86); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 44rem; margin-bottom: 2.4rem; }
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: rgba(255,255,255,.7); }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .7rem;
}

.loan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.loan-tile {
  position: relative; min-height: 280px; overflow: hidden;
  color: #fff; text-decoration: none; display: block;
  isolation: isolate;
}
.loan-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .5s ease;
}
.loan-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,21,34,.15), rgba(7,21,34,.85));
}
.loan-tile:hover img { transform: scale(1.04); }
.loan-tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.35rem; }
.loan-tile h3 { color: #fff; font-size: 1.25rem; margin: 0 0 .35rem; }
.loan-tile p { margin: 0; color: rgba(255,255,255,.85); font-size: .95rem; }
.rate-badge {
  display: inline-block; margin-bottom: .55rem;
  background: var(--accent); color: #fff; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  padding: .28rem .55rem;
}

.trust-row, .steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.trust-item, .step-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.section-dark .trust-item, .section-dark .step-item { border-top-color: rgba(255,255,255,.18); }
.trust-item h3, .step-item h3 { font-size: 1.25rem; }
.step-num {
  font-family: var(--font-display); font-size: 2rem; color: var(--accent); display: block; margin-bottom: .4rem;
}

.split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center;
}
.split-media { min-height: 420px; background-size: cover; background-position: center; }

/* Forms */
.form-panel {
  background: var(--white); border: 1px solid var(--line); padding: 1.75rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
input, select, textarea {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--line);
  background: #fff; font: inherit; color: var(--ink); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(47,74,99,.25); border-color: var(--steel);
}
.flash {
  padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); background: #fff;
}
.flash-success { border-left: 4px solid var(--success); }
.flash-error { border-left: 4px solid var(--danger); }
.flash-info { border-left: 4px solid var(--steel); }

.table-wrap { overflow: auto; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #eef2f6; color: var(--navy); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.stat {
  background: #fff; border: 1px solid var(--line); padding: 1.1rem 1.2rem;
}
.stat strong { display: block; font-family: var(--font-display); font-size: 1.55rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .9rem; }

.page-hero {
  position: relative; min-height: 360px; display: grid; align-items: end; color: #fff;
}
.page-hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.page-hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,21,34,.78), rgba(7,21,34,.35));
}
.page-hero .container { position: relative; z-index: 1; padding: 5rem 0 2.5rem; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.8rem); max-width: 18ch; }
.page-hero p { color: rgba(255,255,255,.88); max-width: 48ch; }

.testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.testimonial {
  background: #fff; border: 1px solid var(--line); padding: 1.25rem;
}
.testimonial .stars { color: var(--accent); letter-spacing: .08em; margin-bottom: .5rem; font-size: .9rem; }
.testimonial .meta { color: var(--muted); font-size: .88rem; margin-top: .8rem; }

.footer {
  background: var(--navy-deep); color: rgba(255,255,255,.75); padding: 3.5rem 0 2rem;
}
.footer a { color: rgba(255,255,255,.86); text-decoration: none; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem;
}
.footer h3 { color: #fff; font-size: 1.05rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: .4rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .88rem;
}

/* Chat widget (Smartsupp-like) */
.gfr-chat-launcher {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; box-shadow: var(--shadow);
  font-size: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h16v12H7l-3 3V4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 26px;
}
.gfr-chat-panel {
  position: fixed; right: 1.2rem; bottom: 5.2rem; z-index: 91;
  width: min(360px, calc(100vw - 1.5rem)); height: 460px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: none; flex-direction: column; overflow: hidden;
}
.gfr-chat-panel.open { display: flex; }
.gfr-chat-head {
  background: var(--navy); color: #fff; padding: .9rem 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.gfr-chat-head strong { font-family: var(--font-display); font-weight: 400; }
.gfr-chat-msgs { flex: 1; overflow: auto; padding: 1rem; background: #f7f8fa; }
.gfr-chat-bubble {
  max-width: 85%; padding: .65rem .8rem; margin-bottom: .55rem; font-size: .92rem;
  border: 1px solid var(--line); background: #fff;
}
.gfr-chat-bubble.mine { margin-left: auto; background: var(--navy); color: #fff; border-color: var(--navy); }
.gfr-chat-form { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--line); }
.gfr-chat-form input { flex: 1; }
.gfr-chat-form button { padding: .7rem .9rem; }

@media (max-width: 980px) {
  .loan-grid, .trust-row, .steps, .testimonial-grid, .stat-grid, .footer-grid, .split, .form-grid {
    grid-template-columns: 1fr;
  }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.2rem;
    flex-direction: column; align-items: flex-start;
  }
  .nav.open { display: flex; }
  .site-header { position: sticky; }
  .site-header .container { position: relative; }
}
