/* ===================
   RESET & NORMALIZE
=================== */
html, body, div, span, ap, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body { 
  line-height: 1.5;
  font-family: 'Open Sans', Arial, sans-serif;
  color: #23395D;
  background-color: #F7F5EA;
  min-height: 100vh;
}
*, *:before, *:after { box-sizing: inherit; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; outline: none; transition: background 0.2s, color 0.2s;
}
:focus { outline: 2px dashed #A97835; outline-offset: 2px; }

/* ===================
   VINTAGE RETRO STYLING
=================== */
:root {
  --brand-primary: #23395D; /* Deep Navy */
  --brand-secondary: #21A179; /* Green */
  --brand-accent: #F2F6FC; /* Pale Blue */
  --vintage-cream: #F7F5EA;
  --vintage-sand: #ECE1CE;
  --vintage-orange: #D97A38;
  --vintage-brown: #A97835;
  --vintage-dark: #484034;
  --vintage-yellow: #F7C873;
  --vintage-red: #E6614F;
  --vintage-teal: #5D8B92;
  --shadow-light: rgba(233,214,184,0.13);
  --shadow-vintage: 0 3px 10px 0 rgba(169,120,53,0.06);
  --border-radius: 14px;
  --font-display: 'Montserrat', 'Arial Rounded MT Bold', 'Avenir Next', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

/* ================
   TYPOGRAPHY
=============== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.01em;
}
h1 { font-size: 2.4rem; margin-bottom: 20px; text-shadow: 1px 1px 0 #FFF8E6; }
h2 { font-size: 1.75rem; margin-bottom: 18px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
p, li, ul, ol { font-family: var(--font-body); font-size: 1rem; margin-bottom: 14px; color: var(--vintage-dark);}
p { line-height: 1.6; }
strong { color: var(--brand-secondary); font-weight: 700; }
section h2, section h3 { text-shadow: 1px 1px 0 #FFE5B4; }

/* Typography scaling for smaller screens */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
  p, li, .btn-primary { font-size: 0.98rem; }
}

/* =============
   HEADER & NAV
============= */
header {
  background: var(--vintage-cream);
  box-shadow: 0 2px 10px 0 var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
}
.container {
  max-width: 1070px;
  margin: 0 auto;
  padding: 0 18px;
}
header .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 15px 18px;
  gap: 10px;
}
.logo img {
  height: 42px;
  filter: sepia(0.1) contrast(1.1);
}

.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--brand-primary);
  border-radius: 6px;
  padding: 5px 13px 5px 13px;
  background: transparent;
  position: relative;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--vintage-yellow);
  color: var(--vintage-dark);
}

.btn-primary {
  background: var(--vintage-orange);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  border-radius: 24px;
  padding: 10px 32px;
  margin-left: 10px;
  box-shadow: 0 2px 7px 0 var(--shadow-vintage);
  border: none;
  transition: background 0.22s, transform 0.13s;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.04);
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--vintage-brown);
  transform: translateY(-1px) scale(1.04);
}

/* ===============
   MOBILE MENU
=============== */
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: var(--vintage-dark);
  background: var(--vintage-yellow);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background 0.2s, color 0.2s;
  z-index: 101;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--vintage-orange);
  color: #fff;
}

.mobile-menu {
  position: fixed;
  left: 0; right: 0; bottom: 0; top: 0;
  background: linear-gradient(to bottom right,var(--vintage-yellow), var(--vintage-cream) 80%);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.57,0.1,0.25,1.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 22px 18px 8px 0;
  background: var(--vintage-red);
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 9px var(--shadow-light);
  border: none;
  transition: background 0.22s, color 0.22s;
  z-index: 1001;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--vintage-brown);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 32px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-primary);
  background: var(--vintage-sand);
  border-radius: 9px;
  padding: 14px 16px;
  margin: 0 0 7px 0;
  box-shadow: 0 1px 6px 0 var(--shadow-light);
  transition: background 0.16s, color 0.16s, transform 0.15s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--vintage-orange);
  color: #fff;
  transform: translateX(6px) scale(1.04);
}

@media (max-width: 990px) {
  .main-nav, header .btn-primary { display: none; }
  .mobile-menu-toggle { display: flex; }
}
@media (min-width: 991px) {
  .mobile-menu { display: none!important; }
  .mobile-menu-toggle { display: none!important; }
}

/* ===============
   HERO SECTION
=============== */
.hero {
  background: repeating-linear-gradient(120deg,var(--vintage-cream), var(--vintage-yellow) 16%, var(--vintage-cream) 32%);
  border-bottom: 7px double var(--vintage-orange);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0 44px 0;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.hero .content-wrapper {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  background: rgba(255,252,245,0.86);
  border-radius: var(--border-radius);
  box-shadow: 0 7px 20px -5px var(--shadow-vintage);
  padding: 32px 26px 28px 26px;
  margin: 0 auto;
}
.hero h1 { color: var(--vintage-brown); }
.hero p { color: var(--brand-primary); font-size: 1.09rem; margin-bottom: 8px; }

/* ================
   SECTIONS SPACING
================= */
.section, .features, .about, .cta, .guide-steps, .expert-tips, .cta-guide, .schufa-explanation, .schufa-steps, .schufa-faq, .trust-signal,
.contract-guide, .contract-tips, .cta-contract, .contact-info, .contact-faq, .privacy-policy, .gdpr-policy, .cookies-policy, .terms-of-use,
.nebenkosten-explanation, .nebenkosten-faqs, .cta-nebenkosten, .deposit-guide, .deposit-steps, .deposit-faqs, .cta-deposit, .thank-you {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--vintage-cream);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 10px 0 var(--shadow-light);
}
@media (max-width: 768px) {
  .section, .features, .about, .cta, .guide-steps, .expert-tips, .cta-guide, .schufa-explanation, .schufa-steps, .schufa-faq, .trust-signal,
  .contract-guide, .contract-tips, .cta-contract, .contact-info, .contact-faq, .privacy-policy, .gdpr-policy, .cookies-policy, .terms-of-use,
  .nebenkosten-explanation, .nebenkosten-faqs, .cta-nebenkosten, .deposit-guide, .deposit-steps, .deposit-faqs, .cta-deposit, .thank-you {
    padding: 26px 10px;
    margin-bottom: 38px;
  }
}

/* ================
   FLEX CONTAINERS
================= */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: stretch; gap: 18px; }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--vintage-sand);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px var(--shadow-light);
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  width: 100%;
  min-width: 200px;
  max-width: 360px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover, .card:focus-within {
  transform: translateY(-3px) scale(1.017);
  box-shadow: 0 7px 20px -4px var(--vintage-brown);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* =============
   FEATURES GRID
============= */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.feature-grid li {
  background: var(--vintage-sand);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 8px var(--shadow-vintage);
  padding: 22px 18px 18px 18px;
  flex: 1 1 224px;
  max-width: 355px;
  min-width: 190px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  transition: transform 0.17s, box-shadow 0.17s;
}
.feature-grid li:hover, .feature-grid li:focus-within {
  transform: translateY(-2px) scale(1.025);
  background: var(--vintage-yellow);
  box-shadow: 0 7px 22px -5px var(--vintage-orange);
}
.feature-grid img {
  height: 38px;
  margin-bottom: 9px;
}

/* ================
   TESTIMONIALS  
================= */
.testimonial, .testimonials {
  background: var(--vintage-accent);
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px 20px 24px;
  background: #fff;
  color: var(--brand-primary);
  border-radius: var(--border-radius);
  box-shadow: 0 3px 12px 0 var(--shadow-vintage);
  margin-bottom: 20px;
  border-left: 6px solid var(--vintage-orange);
}
.testimonial-card strong {
  color: var(--vintage-brown);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
.testimonial-card p {
  color: var(--brand-primary);
  font-family: var(--font-body);
}
@media (max-width: 768px) {
  .testimonial-card {
    padding: 18px 9px 18px 15px;
  }
}

/* ================
   FOOTER
================= */
footer {
  background: var(--brand-primary);
  padding: 34px 0 10px 0;
  margin-top: 60px;
  color: #fff;
}
footer .container {
  display: flex;
  flex-direction: column;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-contact, .footer-links, .footer-social {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-contact img {
  width: 46px;
  margin-bottom: 10px;
  filter: sepia(0.10);
}
.footer-links a {
  color: var(--vintage-yellow);
  font-weight: 500;
  font-family: var(--font-display);
  padding: 4px 0;
  transition: color 0.17s;
}
.footer-links a:hover, .footer-links a:focus {
  color: var(--vintage-orange);
}
.footer-social {
  flex-direction: row;
  gap: 18px;
  margin-top: 12px;
}
.footer-social a img {
  width: 28px;
  height: 28px;
}
footer p { color: #fff; font-family: var(--font-body); font-size: 0.96rem; margin-bottom: 8px; }
footer a { color: #fff; }
@media (max-width: 900px) {
  footer .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}

/* =============
 CONTACT PAGE
============== */
.contact-info {
  background: var(--vintage-sand);
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 16px;
}
.contact-details p img {
  width: 18px;
  vertical-align: middle;
  margin-right: 8px;
  display: inline;
}
.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.contact-cta .btn-primary {
  margin: 0;
  margin-top: 8px;
}

/* ================
  FORM ELEMENTS (future-proof)
================= */
input, textarea, select {
  font-family: var(--font-body);
  border-radius: 9px;
  border: 1.5px solid var(--vintage-brown);
  padding: 10px 14px;
  background: #fffdfa;
  font-size: 1rem;
  margin-bottom: 12px;
  width: 100%;
  transition: border-color 0.16s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--vintage-orange);
}

/* ================
  ALERTS/SPECIALS (Cookie)
================= */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--vintage-brown);
  color: #fff;
  padding: 24px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 5001;
  transition: transform 0.34s cubic-bezier(0.66,0.02,0.4,1), opacity 0.22s;
  box-shadow: 0 0 34px 0 var(--shadow-vintage);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.cookie-banner.hide {
  transform: translateY(175%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner p {
  color: #fff;
  font-family: var(--font-body);
  margin: 0; font-size: 1.03rem;
  text-align: center;
  max-width: 830px;
}
.cookie-buttons {
  display: flex;
  gap: 13px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.cookie-btn {
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: 18px;
  transition: background 0.2s, color 0.2s, box-shadow 0.15s;
  font-size: 1rem;
  cursor: pointer;
}
.cookie-btn.accept {
  background: var(--vintage-yellow);
  color: var(--vintage-dark);
  box-shadow: 0 2px 9px rgba(86,67,34,0.07);
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: var(--vintage-orange);
  color: #fff;
}
.cookie-btn.reject {
  background: #fff;
  color: var(--vintage-brown);
  border: 2px solid var(--vintage-brown);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: var(--vintage-red);
  color: #fff;
}
.cookie-btn.settings {
  background: var(--vintage-sand);
  color: var(--vintage-dark);
  border: 2px solid var(--vintage-brown);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: var(--vintage-brown);
  color: #fff;
}

/* Cookie preferences modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0; bottom: 0; right: 0; left: 0;
  z-index: 6000;
  background: rgba(39,24,6,0.37);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: var(--vintage-cream);
  color: var(--brand-primary);
  border-radius: 20px;
  padding: 42px 28px 28px 28px;
  box-shadow: 0 13px 33px 0 var(--shadow-vintage);
  min-width: 290px;
  max-width: 410px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 6001;
  animation: cookieModalUp 0.5s cubic-bezier(.64,.2,.56,1.1);
}
@keyframes cookieModalUp {
  0% { transform: translateY(60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-family: var(--font-display);
  color: var(--vintage-brown);
  margin-bottom: 10px;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--vintage-sand);
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 1.03rem;
}
.cookie-modal-buttons {
  display: flex;
  gap: 14px;
  margin-top: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cookie-toggle {
  accent-color: var(--vintage-orange);
  width: 22px;
  height: 22px;
  margin-right: 2px;
}
.cookie-toggle[disabled] {
  opacity: 0.68;
}

/* ==============
   MISC/ELEMENTS
============== */
a.btn-primary {
  text-decoration: none;
}
ul, ol { margin-left: 1.2em; }
ul li, ol li { margin-bottom: 8px; }

/* FAQ & Guide bullets */
.guide-steps ol, .schufa-steps ol, .deposit-steps ol {
  margin-left: 22px;
  list-style: decimal inside;
}
.guide-steps ol li, .schufa-steps ol li, .deposit-steps ol li {
  margin-bottom: 10px;
  font-size: 1.07em;
}

/* Section backgrounds */
.guide-steps, .expert-tips, .contract-guide, .contract-tips, .schufa-explanation, .schufa-steps, .schufa-faq, .privacy-policy, .gdpr-policy, .cookies-policy, .terms-of-use, .nebenkosten-explanation, .nebenkosten-faqs, .deposit-guide, .deposit-steps, .deposit-faqs {
  background: var(--vintage-cream);
}

/* =============
 RESPONSIVE RULES
============== */
@media (max-width: 1100px) {
  .container { max-width: 98vw; }
}
@media (max-width: 768px) {
  .feature-grid { flex-direction: column; gap: 14px; }
  .card-container, .content-grid { flex-direction: column; gap: 14px; }
  .card { max-width: 98vw; min-width: 0; }
  .content-wrapper { gap: 13px; }
}

@media (max-width: 600px) {
  header .container, .container, .footer .container { padding: 0 4vw; }
  .mobile-nav { padding: 10px 16px; }
  .cookie-banner { padding: 16px 7px 8px 7px; }
  .cookie-modal { padding: 30px 9px 16px 9px; }
}

/* ================
   UTILITIES & EFFECTS
================= */
.shadow-sm { box-shadow: 0 1px 7px 0 var(--shadow-light); }
.rounded { border-radius: var(--border-radius); }
.mt-16 { margin-top: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.row { flex-direction: row; }
.col { flex-direction: column; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* Subtle keyline/shadow element (for retro flavor) */
.vintage-keyline {
  border-top: 3px dashed var(--vintage-brown);
  border-bottom: 3px dashed var(--vintage-yellow);
  height: 0;
  margin: 18px 0;
  opacity: 0.45;
}

/* Subtle pop-in animation for cards and sections */
@media (prefers-reduced-motion: no-preference) {
  .card, .testimonial-card, section, .cookie-banner, .cookie-modal {
    animation: popinFade 0.58s cubic-bezier(0.68,0.05,0.43,1.02);
  }
}
@keyframes popinFade {
  from { transform: translateY(40px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* =================
   VISUAL RETRO MOTIFS
================== */
h1, h2 {
  letter-spacing: 0.015em;
  text-shadow: 1.5px 1.5px 0 #FFF8E6, 0px 2px 8px #F7C87322;
  border-bottom: 2px solid var(--vintage-yellow);
  padding-bottom: 7px;
}
h1 { border-bottom-width: 4px; }

section {
  position: relative;
}
section:after {
  content: '';
  display: block;
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: -16px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg width='152' height='6' viewBox='0 0 152 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='152' height='6' fill='%23F7C873'/%3E%3C/svg%3E") repeat-x;
  opacity: 0.17;
  border-radius: 4px;
  pointer-events: none;
}
@media (max-width: 768px) {
  section:after { left: 9px; right: 9px; bottom: -8px; height: 4px; }
}

/* ===============
   FINAL SAFETY/ACCESSIBILITY
================ */
::-webkit-input-placeholder { color: #BCB19D; }
::-moz-placeholder { color: #BCB19D; }
:-ms-input-placeholder { color: #BCB19D; }
::placeholder { color: #BCB19D; }

.skip-link {
  position: absolute;
  top: -42px;
  left: 5px;
  background: var(--vintage-orange);
  color: #fff;
  padding: 8px 13px;
  border-radius: 5px;
  z-index: 10000;
}
.skip-link:focus { top: 8px; }

/* Hide visually but keep accessible */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===============
   PRINT (for contracts/guides)
=============== */
@media print {
  header, footer, .cookie-banner, .mobile-menu, .mobile-menu-toggle { display: none !important; }
  body { background: #fff; color: #222; }
  section { background: #fff; box-shadow: none; }
}
