/* =====================================================
   Quiet Passage – Internationale Rentenberatung
   Design system: monochrome_sophisticated
   Single stylesheet for all pages (mobile-first, flex-only)
   ===================================================== */

/* ------------------------------
   CSS Reset / Normalize (light)
   ------------------------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.2rem; }
:focus { outline: none; }

/* ------------------------------
   Root tokens
   ------------------------------ */
:root {
  /* Monochrome palette */
  --c-bg: #F7F7F7;          /* page background */
  --c-surface: #FFFFFF;     /* cards / sections */
  --c-ink: #111111;         /* primary text */
  --c-ink-2: #2A2A2A;       /* secondary text */
  --c-ink-3: #555555;       /* tertiary text */
  --c-line: #E6E6E6;        /* borders */
  --c-elev: rgba(0,0,0,0.08); /* subtle shadow color */

  /* Brand accents (used subtly to keep monochrome aesthetic) */
  --brand-primary: #0B3A6E; /* focus / small accents */
  --brand-secondary: #236B5A;
  --brand-accent: #F5F7FA;

  /* Components */
  --btn-bg: #0F0F0F;        /* primary button bg */
  --btn-fg: #FFFFFF;        /* primary button text */
  --btn-border: #1A1A1A;
  --btn-muted-bg: #FFFFFF;  /* secondary button bg */
  --btn-muted-fg: #111111;  /* secondary button text */

  /* Typography scale */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-48: 48px;

  --radius-8: 8px;
  --radius-10: 10px;
  --radius-14: 14px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.06), 0 6px 18px rgba(0,0,0,0.10);
  --shadow-2: 0 2px 6px rgba(0,0,0,0.08), 0 12px 30px rgba(0,0,0,0.14);
  --trans-1: 200ms ease;
  --trans-2: 320ms ease;
}

/* ------------------------------
   Base
   ------------------------------ */
html { scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--fs-16);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { font-family: Georgia, 'Times New Roman', serif; color: var(--c-ink); margin: 0 0 12px; line-height: 1.25; letter-spacing: 0.2px; }
h1 { font-size: var(--fs-32); }
h2 { font-size: var(--fs-24); margin-top: 8px; }
h3 { font-size: var(--fs-20); }

p { margin: 0 0 14px;   }
small, .hint { font-size: var(--fs-14);   }

/* Selection */
::selection { background: #111; color: #fff; }

/* Accessible focus */
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }

/* ------------------------------
   Layout helpers (flex-only)
   ------------------------------ */
.container { display: flex; width: 100%; justify-content: center; padding: 0 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1120px; }

section { background: transparent; padding: 40px 0; }
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Cards (generic) */
.card, .text-section, details .text-section, .testimonial-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
}
.text-section { padding: 18px; }

/* ---------------------------------
   Header & Navigation (mobile-first)
   --------------------------------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid var(--c-line); }
.site-header .container { padding-top: 12px; padding-bottom: 12px; }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }

.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { padding: 8px 10px; color: var(--c-ink); border-radius: 6px; transition: color var(--trans-1), background-color var(--trans-1); }
.main-nav a:hover { background: #F2F2F2; }

/* Header CTAs */
.site-header .btn.primary { display: none; }

.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; width: 44px; border-radius: 8px; border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink);
  cursor: pointer; transition: background var(--trans-1), transform var(--trans-1);
}
.mobile-menu-toggle:hover { background: #F2F2F2; }
.mobile-menu-toggle:active { transform: scale(0.98); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; display: flex; flex-direction: column; padding: 20px;
  background: #FFFFFF; transform: translateX(100%);
  transition: transform var(--trans-2);
  box-shadow: var(--shadow-2);
  z-index: 1200;
}
.mobile-menu.open, .mobile-menu.is-open, body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; height: 40px; width: 44px; border-radius: 8px; border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink); cursor: pointer; margin-bottom: 10px;
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--c-line);
  font-size: var(--fs-18);
}
.mobile-nav a:last-child { border-bottom: none; }

/* Desktop nav visibility */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .site-header .btn.primary { display: inline-flex; }
  .mobile-menu-toggle { display: none; }
}

/* ------------------------------
   Hero
   ------------------------------ */
.hero { background: #0F0F0F; color: #FFFFFF; }
.hero .content-wrapper { gap: 16px; }
.hero h1 { color: #FFFFFF; font-size: var(--fs-32); }
.hero .subheadline { color: #DADADA; font-size: var(--fs-18); }
.hero .eyebrow {
  display: inline-flex; align-items: center; padding: 6px 10px; border: 1px solid #2A2A2A;
  border-radius: 999px; color: #CFCFCF; font-size: var(--fs-14); letter-spacing: 0.6px; text-transform: uppercase;
}

.benefits { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; }
.benefits li { display: flex; align-items: center; gap: 10px; color: #E6E6E6; }
.benefits img { height: 18px; width: 18px; filter: invert(1) grayscale(1); opacity: 0.9; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { font-size: var(--fs-14); color: #B8B8B8; }
.trust img { height: 16px; width: 16px; filter: invert(1) grayscale(1); opacity: 0.85; }

/* ------------------------------
   Buttons
   ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 12px 18px; border-radius: var(--radius-10); border: 1px solid var(--btn-border);
  cursor: pointer; transition: background var(--trans-1), color var(--trans-1), box-shadow var(--trans-1), transform var(--trans-1);
}
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); border-color: #000; }
.btn.primary:hover { background: #1A1A1A; box-shadow: 0 6px 22px rgba(0,0,0,0.25); }
.btn.primary:active { transform: translateY(1px); }

.btn.secondary { background: var(--btn-muted-bg); color: var(--btn-muted-fg); border-color: #1F1F1F; }
.btn.secondary:hover { background: #F1F1F1; }

/* Link hover accents (subtle brand) */
a:hover { color: var(--brand-primary); }
a:focus-visible { outline-color: var(--brand-primary); }

/* ------------------------------
   Feature grids & service cards
   ------------------------------ */
.feature-grid, .service-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-grid .text-section, .service-cards .text-section {
  flex: 1 1 260px;
  min-width: 240px;
}
.feature-grid .text-section h3, .service-cards .text-section h3 { margin-bottom: 6px; }

/* ------------------------------
   Steps (ordered lists)
   ------------------------------ */
.steps { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; }
.steps li { margin: 0 0 4px; color: var(--c-ink-2); }

/* ------------------------------
   Details / FAQ
   ------------------------------ */
details { display: flex; flex-direction: column; gap: 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-10); margin-bottom: 14px; box-shadow: var(--shadow-1); }
summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; color: var(--c-ink); }
summary::-webkit-details-marker { display: none; }
details[open] summary { border-bottom: 1px solid var(--c-line); background: #FAFAFA; }
details .text-section { margin: 0; border: 0; border-radius: 0 0 var(--radius-10) var(--radius-10); box-shadow: none; }

/* ------------------------------
   Testimonials (light cards for readability)
   ------------------------------ */
.testimonial-card { background: #FFFFFF; color: #111; border: 1px solid var(--c-line); border-radius: var(--radius-10); box-shadow: var(--shadow-1); }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { margin-top: 8px; }

/* ------------------------------
   CTA rows / helpers
   ------------------------------ */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ------------------------------
   Footer
   ------------------------------ */
.site-footer section { background: #0F0F0F; color: #EAEAEA; }
.site-footer .content-wrapper { gap: 24px; }
.site-footer .content-wrapper > div { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.site-footer h3 { color: #FFFFFF; font-size: var(--fs-18); margin-bottom: 6px; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: #D5D5D5; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer .btn.secondary { background: transparent; color: #FFFFFF; border-color: #3A3A3A; }

.site-footer > .container + .container { background: #0B0B0B; }
.site-footer > .container + .container .content-wrapper { padding: 12px 0; }
.site-footer p { color: #C7C7C7; }

/* ------------------------------
   Typographic utilities
   ------------------------------ */
.eyebrow { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-ink-3); }
.hint a { text-decoration: underline; }

/* ------------------------------
   Images in text sections
   ------------------------------ */
.text-section img { height: 18px; width: 18px; vertical-align: middle; margin-right: 6px; filter: grayscale(1); }

/* ------------------------------
   Content alignment utilities
   ------------------------------ */
.align-center { display: flex; align-items: center; justify-content: center; }
.stack-vertical { display: flex; flex-direction: column; gap: 12px; }

/* ------------------------------
   Cookie Consent Banner & Modal
   ------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  display: none; /* default hidden, show with .show */
  padding: 14px 20px; background: #FFFFFF; border-top: 1px solid var(--c-line);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.10);
}
.cookie-banner.show { display: flex; }
.cookie-banner .container { padding: 0 20px; }
.cookie-banner .content-wrapper { flex-direction: column; gap: 12px; }
.cookie-text { color: var(--c-ink-2); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; }
.cookie-actions .btn.accept { background: var(--btn-bg); color: #fff; border-color: #000; }
.cookie-actions .btn.reject { background: #FFFFFF; color: #111; border-color: #1F1F1F; }
.cookie-actions .btn.settings { background: #FFFFFF; color: var(--brand-primary); border-color: #CFCFCF; }

/* Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1400; background: rgba(0,0,0,0.45);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal.show { display: flex; }
.cookie-modal .dialog {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 720px;
  background: #FFFFFF; color: #111; border: 1px solid var(--c-line); border-radius: var(--radius-14); box-shadow: var(--shadow-2);
  padding: 20px;
}
.cookie-modal .dialog-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .dialog-body { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .prefs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.cookie-modal .prefs-row:last-child { border-bottom: none; }

/* Toggle (simple) */
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.toggle-switch { width: 44px; height: 26px; border-radius: 20px; background: #E1E1E1; position: relative; border: 1px solid #CFCFCF; transition: background var(--trans-1); }
.toggle-switch::after { content: ""; position: absolute; top: 50%; left: 3px; width: 18px; height: 18px; background: #FFFFFF; border: 1px solid #CFCFCF; border-radius: 50%; transform: translateY(-50%); transition: left var(--trans-1); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.toggle-switch.on { background: var(--brand-primary); border-color: var(--brand-primary); }
.toggle-switch.on::after { left: 21px; }

/* ------------------------------
   Responsive rules
   ------------------------------ */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

@media (min-width: 768px) {
  h1 { font-size: var(--fs-40); }
  .hero h1 { font-size: var(--fs-48); }
  .hero .subheadline { font-size: var(--fs-20); }
  .benefits { flex-direction: row; flex-wrap: wrap; }
  .benefits li { flex: 1 1 320px; }
}

@media (min-width: 992px) {
  .content-wrapper { gap: 24px; }
  .cta-group { gap: 16px; }
  .site-footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}

/* ------------------------------
   Additional spacing & safety
   ------------------------------ */
section + section { margin-top: 10px; }
.container + .container { margin-top: 0; }

/* Ensure adequate gaps between all cards */
.service-cards > .text-section,
.feature-grid > .text-section,
.content-grid > *,
.card-container > * { margin-bottom: 0; }

/* Prevent overlap by ensuring min spacing */
.text-section + .text-section { margin-top: 10px; }

/* ------------------------------
   Link styles inside content
   ------------------------------ */
.content-wrapper a { text-underline-offset: 3px; }
.content-wrapper p a:hover, .content-wrapper li a:hover { text-decoration: underline; }

/* ------------------------------
   Utility color contrasts
   ------------------------------ */
.light-surface { background: #FFFFFF; color: #111; border: 1px solid var(--c-line); }
.dark-surface { background: #0F0F0F; color: #FFFFFF; }

/* ------------------------------
   Specific page tweaks
   ------------------------------ */
/* CTA center rows */
.cta-row { justify-content: flex-start; }
@media (min-width: 768px) { .cta-row { justify-content: center; } }

/* Trust line inside hero */
.hero .trust { border-top: 1px solid #2A2A2A; padding-top: 10px; }

/* Footer bottom strip */
.site-footer > .container:last-child .content-wrapper { justify-content: center; align-items: center; }

/* ------------------------------
   Form-like link blocks (if any added)
   ------------------------------ */
.input-row { display: flex; flex-direction: column; gap: 8px; }
.input-row input, .input-row textarea { background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 8px; padding: 10px 12px; }
.input-row input:focus, .input-row textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(11,58,110,0.15); }

/* ------------------------------
   Accessibility helpers
   ------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ------------------------------
   Monochrome visual polish
   ------------------------------ */
hr { border: 0; border-top: 1px solid var(--c-line); margin: 20px 0; }
blockquote { border-left: 4px solid #D9D9D9; padding-left: 12px; color: var(--c-ink-2); }

/* ------------------------------
   Ensure all flex-based groups exist
   ------------------------------ */
/* Some classes appear in HTML as wrappers; reinforce flex behavior */
nav { display: flex; flex-wrap: wrap; gap: 8px; }
ol, ul { display: flex; flex-direction: column; gap: 8px; }
.details-group { display: flex; flex-direction: column; gap: 12px; }

/* ------------------------------
   High-contrast separators in monochrome style
   ------------------------------ */
.separator { height: 1px; background: var(--c-line); width: 100%; }

/* ------------------------------
   Page-specific lists inside .text-section
   ------------------------------ */
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }
.text-section li { color: var(--c-ink-2); }

/* ------------------------------
   Hover micro-interactions for cards
   ------------------------------ */
.text-section:hover, .testimonial-card:hover, .card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); transition: transform var(--trans-1), box-shadow var(--trans-1); }

/* ------------------------------
   Print basics
   ------------------------------ */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { background: #FFFFFF; }
  section { padding: 16px 0; }
}
