/* ========================================
   MaklerFriend Landing Page V2 - 2025
   Modern CSS with CSS Variables & Grid
   ======================================== */

/* ==========================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================== */
:root {
  /* Colors - Brand */
  --color-primary: #0f62fe;
  --color-primary-dark: #0a3078;
  --color-black: #1a1a1a;

  /* Colors - Grays */
  --color-gray-1: #ecedee;
  --color-gray-2: #d9dfe6;
  --color-gray-3: #bac8d4;
  --color-gray-4: #a0b4c5;
  --color-gray-5: #8296a0;

  /* Colors - Utility */
  --color-white: #ffffff;
  --color-orange: #ff6b35;

  /* Typography - Fonts */
  --font-heading: 'Clash Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;

  /* Typography - Sizes (using clamp for fluid typography) */
  --text-hero: clamp(2.5rem, 5vw, 3rem);
  --text-big-headline: clamp(2rem, 4vw, 2.25rem);
  --text-main-headline: clamp(1.5rem, 3vw, 1.5rem);
  --text-big-copy: 1.375rem;
  --text-main-copy: 1.0625rem;
  --text-small: 0.9375rem;

  /* Spacing (using 8px grid) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --container-max-width: 1280px;
  --container-padding: clamp(1rem, 5vw, 3rem);

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-header: 1000;
  --z-modal: 2000;
  --z-tooltip: 3000;
}

/* ==========================================
   2. MODERN CSS RESET
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-main-copy);
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ==========================================
   3. CUSTOM FONTS
   ========================================== */
@font-face {
  font-family: 'Clash Grotesk';
  src: url('../images/ClashGrotesk-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

/* ==========================================
   4. UTILITY CLASSES
   ========================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-blue {
  color: var(--color-primary);
}

/* ==========================================
   5. BUTTONS (Modern Component)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: var(--text-main-copy);
  font-family: var(--font-body);
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  background: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-gray-1);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--large {
  padding: 0.75rem 1.5rem;
  font-size: var(--text-big-copy);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn--white:hover,
.btn--white:focus-visible {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.3);
}

.btn__icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* ==========================================
   6. HEADER / NAVIGATION
   ========================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--color-gray-1);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-header);
  transition: box-shadow var(--transition-base);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-lg);
  padding-block: var(--space-md);
}

.nav__logo img {
  height: 40px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.nav__logo:hover img {
  opacity: 0.8;
}

.nav__menu {
  justify-self: center;
}

.nav__list {
  display: flex;
  gap: var(--space-xl);
}

.nav__link {
  font-size: var(--text-main-copy);
  font-weight: 500;
  color: var(--color-black);
  position: relative;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-primary);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-self: end;
}

.nav__login {
  font-weight: 500;
  color: var(--color-primary);
  transition: opacity var(--transition-fast);
}

.nav__login:hover {
  opacity: 0.8;
}

/* Mobile Toggle (hidden on desktop) */
.nav__toggle {
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  width: 24px;
  height: 2px;
  background-color: var(--color-black);
  transition: all var(--transition-base);
  position: absolute;
  left: 4px;
}

.nav__toggle-icon {
  top: 15px;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
}

.nav__toggle-icon::before {
  top: -8px;
}

.nav__toggle-icon::after {
  top: 8px;
}

/* ==========================================
   7. HERO SECTION
   ========================================== */
.hero {
  position: relative;
  padding-block-start: var(--space-lg);
  padding-block-end: var(--space-3xl);
  overflow-x: clip;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.hero__background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.hero__visual {
  position: relative;
  width: 100%;
  max-width: min(769px, 90%);
  animation: float 12s ease-in-out infinite;
}

.hero__pattern {
  width: 100%;
  height: auto;
  display: block;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: 900px;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-black);
  letter-spacing: 0.01em;
}

.hero__headline {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  margin: 0;
}

.hero__cta {
  align-self: center;
}

.hero__image {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(15, 98, 254, 0.15));
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ==========================================
   8. FEATURES SECTION
   ========================================== */
.features {
  padding-block: var(--space-3xl);
  background-color: var(--color-white);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md);
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base);
}

.feature-card__icon img {
  filter: invert(28%) sepia(99%) saturate(2381%) hue-rotate(210deg)
    brightness(98%) contrast(103%);
}

.feature-card:hover .feature-card__icon {
  background-color: var(--color-primary);
}

.feature-card:hover .feature-card__icon img {
  filter: brightness(0) invert(1);
}

.feature-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-main-headline);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--color-black);
  margin: 0;
}

.feature-card__description {
  font-size: var(--text-main-copy);
  line-height: 1.6;
  color: var(--color-gray-5);
  margin: 0;
}

/* ==========================================
   9. PRODUCT SHOWCASE SECTIONS
   ========================================== */
.product-showcase {
  position: relative;
  padding-block-start: var(--space-xl);
  padding-block-end: var(--space-3xl);
  overflow: hidden;
}

.product-showcase--wertermittlung {
  background: linear-gradient(135deg, #0f62fe 0%, #0a3078 100%);
}

.product-showcase--leadfischer {
  background: linear-gradient(135deg, #0f62fe 0%, #0a3078 100%);
}

.product-showcase__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.product-showcase__visual {
  position: relative;
  overflow: visible;
}

.product-showcase__image {
  width: 590px;
  max-width: none;
  height: auto;
  display: block;
  animation: float 12s ease-in-out infinite;
  position: relative;
  left: calc(-1 * var(--container-padding));
}

/* Right-aligned image for Leadfischer */
.product-showcase__visual--right .product-showcase__image {
  left: auto;
  right: calc(-1 * var(--container-padding));
}

.product-showcase__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: left;
}

.product-showcase__headline {
  font-family: var(--font-heading);
  font-size: var(--text-big-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-white);
  margin: 0;
}

.product-showcase__description {
  font-size: 1.375rem;
  line-height: 1.75rem;
  font-weight: 300;
  color: var(--color-white);
  opacity: 0.85;
}

.product-showcase__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-showcase__feature-item {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--color-white);
  padding-left: var(--space-lg);
  position: relative;
}

.product-showcase__feature-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.125rem;
}

.product-showcase__cta {
  align-self: flex-start;
}

/* ==========================================
   10. BENEFITS SECTION
   ========================================== */
.benefits {
  padding-block: var(--space-3xl);
  background-color: var(--color-white);
}

.benefits__headline {
  font-family: var(--font-heading);
  font-size: var(--text-big-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-primary);
  text-align: center;
  margin: 0 0 var(--space-3xl) 0;
}

.benefits__wrapper {
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-3xl);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2xl) var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.benefit-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
}

.benefit-item__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-item__icon img {
  width: 100%;
  height: 100%;
  filter: invert(28%) sepia(99%) saturate(2381%) hue-rotate(210deg)
    brightness(98%) contrast(103%);
}

.benefit-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-main-headline);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-black);
  margin: 0;
}

.benefit-item__description {
  font-size: var(--text-main-copy);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  opacity: 0.85;
  margin: 0;
}

.benefits__cta {
  display: flex;
  justify-content: center;
}

/* ==========================================
   11. TESTIMONIALS SECTION
   ========================================== */
.testimonials {
  padding-block: var(--space-3xl);
  background-color: var(--color-white);
}

.testimonials__headline {
  font-family: var(--font-heading);
  font-size: var(--text-big-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-black);
  text-align: center;
  margin: 0 0 var(--space-3xl) 0;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 0;
  text-align: left;
  border-left: 2px dashed var(--color-primary);
  padding-left: var(--space-lg);
}

.testimonial-card__rating {
  display: flex;
  gap: 4px;
}

.testimonial-card__rating .star {
  color: var(--color-primary);
  width: 20px;
  height: 20px;
}

.testimonial-card__text {
  font-size: var(--text-main-copy);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  margin: 0;
}

.testimonial-card__author {
  margin-top: auto;
}

.testimonial-card__name {
  font-size: var(--text-main-copy);
  font-weight: 600;
  color: var(--color-black);
  margin: 0 0 4px 0;
}

.testimonial-card__company {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-gray-5);
  margin: 0;
}

/* ==========================================
   12. ABOUT MAKLERFRIEND SECTION
   ========================================== */
.about {
  padding-block: var(--space-3xl);
  background-color: var(--color-white);
}

.about__content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.about__headline {
  font-family: var(--font-heading);
  font-size: var(--text-big-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-primary);
  margin: 0 0 var(--space-lg) 0;
}

.about__text {
  font-size: var(--text-main-copy);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-gray-5);
  margin: 0;
  text-align: left;
}

/* ==========================================
   13. CONTACT FORM SECTION
   ========================================== */
.contact {
  position: relative;
  padding-block: var(--space-3xl);
  background: linear-gradient(135deg, #0f62fe 0%, #0a3078 100%);
}

.contact__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact__headline {
  font-family: var(--font-heading);
  font-size: var(--text-big-headline);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-white);
  margin: 0 0 var(--space-md) 0;
}

.contact__subheadline {
  font-size: var(--text-main-copy);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-white);
  opacity: 0.9;
  margin: 0 0 var(--space-3xl) 0;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

.form-label {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-white);
  margin: 0;
}

.form-input,
.form-textarea {
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-main-copy);
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-gray-4);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-checkbox {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  cursor: pointer;
}

.form-checkbox input[type='checkbox'] {
  margin-top: 4px;
  cursor: pointer;
}

.form-checkbox-text {
  font-size: var(--text-small);
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-white);
  opacity: 0.9;
}

.form-checkbox-text strong {
  font-weight: 600;
}

.contact__form button {
  align-self: center;
}

/* ==========================================
   14. FOOTER
   ========================================== */
.footer {
  padding-block: var(--space-2xl);
  background: linear-gradient(135deg, #0f62fe 0%, #0a3078 100%);
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  align-items: end;
}

/* Brand Section */
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  width: fit-content;
}

.footer__logo-icon {
  width: 40px;
  height: 40px;
}

.footer__logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-white);
}

.footer__info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer__copyright {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-white);
  opacity: 0.8;
  margin: 0;
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.footer__legal-link {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.footer__legal-link:hover {
  opacity: 1;
}

.footer__legal-separator {
  font-size: var(--text-small);
  color: var(--color-white);
  opacity: 0.6;
}

/* Navigation Section */
.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: var(--space-2xl);
}

.footer__nav-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-main-copy);
  font-weight: 400;
  color: var(--color-white);
  text-decoration: none;
  transition: transform var(--transition-base);
}

.footer__nav-link:hover {
  transform: translateX(4px);
}

.footer__nav-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ==========================================
   15. RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 992px) {
  .hero__content {
    gap: var(--space-xl);
  }

  .hero__visual {
    max-width: min(600px, 85%);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-showcase__content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .product-showcase__visual {
    order: -1;
  }

  .product-showcase__image {
    width: 100%;
    max-width: 500;
  }

  .benefits__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .nav__menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    background-color: var(--color-white);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: left var(--transition-base);
  }

  .nav__menu--active {
    left: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav__toggle {
    display: block;
  }

  .nav {
    grid-template-columns: auto 1fr auto;
  }

  .nav__actions {
    grid-column: 3;
  }

  .footer__content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__nav {
    gap: var(--space-xl);
  }
}

/* Mobile */
@media (max-width: 576px) {
  .features__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: var(--space-2xl);
  }

  .hero__visual {
    max-width: 95%;
  }

  .hero__background {
    top: 65%;
  }

  .nav__actions {
    gap: var(--space-sm);
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }
}

/* ==========================================
   16. LARGE SCREENS (1300px+)
   ========================================== */
@media (min-width: 1300px) {
  .hero__visual {
    max-width: 1200px;
  }
}

@media (min-width: 1920px) {
  .hero__visual {
    max-width: 1400px;
  }
}

/* ==========================================
   10. ACCESSIBILITY & FOCUS STATES
   ========================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn--primary {
    border: 3px solid var(--color-black);
  }
}
