/* ===================================================
   RA Digital – Main Stylesheet
   =================================================== */

/* ===== VARIABLES ===== */
:root {
  --color-dark:  #353535;
  --color-blue:  #284B63;
  --color-teal:  #3C6E71;
  --color-gray:  #D9D9D9;
  --color-white: #FFFFFF;
  --color-bg:    #F8F8F8;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width:       1160px;
  --section-padding: 110px;
  --nav-height:      72px;

  --transition: 0.2s ease;
  --radius:     6px;
  --radius-lg:  8px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin:     0;
  padding:    0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color:       var(--color-dark);
  line-height: 1.6;
  background:  var(--color-white);
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  line-height:  1.2;
  font-weight:  600;
  color:        var(--color-dark);
}

p {
  line-height: 1.65;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   0 24px;
}

section {
  padding: var(--section-padding) 0;
}

/* Alternating section backgrounds */
#leistungen,
#warum {
  background: var(--color-bg);
}

#fuer-wen,
#ablauf,
#preise {
  background: var(--color-white);
}

#kontakt {
  background: var(--color-bg);
}

/* Section header shared styles */
.section-header {
  max-width:     680px;
  margin-bottom: 60px;
}

.section-label {
  display:        inline-block;
  font-size:      12px;
  font-weight:    500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--color-teal);
}

.section-title {
  font-size:   38px;
  font-weight: 600;
  color:       var(--color-dark);
  margin-top:  8px;
  line-height: 1.2;
}

.section-intro {
  margin-top:  16px;
  font-size:   17px;
  color:       #5a5a5a;
  line-height: 1.65;
}

/* ===== BUTTONS ===== */
.btn {
  display:         inline-block;
  padding:         13px 28px;
  border-radius:   4px;
  font-size:       15px;
  font-weight:     500;
  font-family:     var(--font-main);
  cursor:          pointer;
  transition:      background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  border:          1.5px solid transparent;
  line-height:     1;
  white-space:     nowrap;
}

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

.btn-primary:hover {
  background:   #1e3a4f;
  border-color: #1e3a4f;
}

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

.btn-secondary:hover {
  background: var(--color-blue);
  color:      var(--color-white);
}

.btn-full {
  width:      100%;
  text-align: center;
}

/* ===== NAVIGATION ===== */
#site-header {
  position:   fixed;
  top:        0;
  left:       0;
  right:      0;
  z-index:    100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray);
  transition: box-shadow 0.3s ease;
}

#site-header.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-container {
  height: var(--nav-height);
}

.nav-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          100%;
  gap:             24px;
}

/* Logo */
.logo {
  display:         flex;
  align-items:     center;
  text-decoration: none;
  flex-shrink:     0;
}

.logo-img {
  height:    42px;
  width:     auto;
  display:   block;
}

.logo-img-footer {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Desktop nav links */
.nav-links {
  display:     flex;
  align-items: center;
  gap:         32px;
  margin-left: auto;
}

.nav-link {
  font-size:       15px;
  font-weight:     400;
  color:           var(--color-dark);
  text-decoration: none;
  transition:      color var(--transition);
  position:        relative;
}

.nav-link::after {
  content:    '';
  position:   absolute;
  bottom:     -3px;
  left:       0;
  width:      0;
  height:     1.5px;
  background: var(--color-blue);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--color-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-blue);
}

.nav-cta {
  flex-shrink: 0;
  padding:     10px 22px;
  font-size:   14px;
}

/* Hamburger */
.hamburger {
  display:        none;
  flex-direction: column;
  justify-content: center;
  align-items:    center;
  gap:            5px;
  width:          40px;
  height:         40px;
  background:     transparent;
  border:         none;
  cursor:         pointer;
  padding:        4px;
  flex-shrink:    0;
}

.hamburger-line {
  display:    block;
  width:      22px;
  height:     2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity:   0;
  transform: scaleX(0);
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position:   fixed;
  top:        var(--nav-height);
  left:       0;
  right:      0;
  bottom:     0;
  background: var(--color-white);
  z-index:    99;
  display:    flex;
  flex-direction: column;
  align-items:    center;
  justify-content: center;
  gap:         12px;
  opacity:     0;
  visibility:  hidden;
  transition:  opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu.is-open {
  opacity:    1;
  visibility: visible;
}

.mobile-nav-links {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            8px;
  margin-bottom:  24px;
}

.mobile-nav-link {
  font-size:   22px;
  font-weight: 500;
  color:       var(--color-dark);
  padding:     12px 24px;
  display:     block;
  transition:  color var(--transition);
}

.mobile-nav-link:hover {
  color: var(--color-blue);
}

.mobile-nav-cta {
  padding: 14px 36px;
  font-size: 16px;
}

/* ===== HERO ===== */
#hero {
  min-height:    100vh;
  display:       flex;
  align-items:   center;
  padding-top:   var(--nav-height);
  background:    var(--color-white);
  padding-bottom: 0;
}

.hero-container {
  width: 100%;
}

.hero-content {
  max-width: 700px;
}

.hero-label {
  margin-bottom: 0;
}

.hero-divider {
  width:        60px;
  height:       2px;
  background:   var(--color-teal);
  margin-top:   18px;
  margin-bottom: 24px;
}

.hero-title {
  font-size:      58px;
  font-weight:    600;
  line-height:    1.1;
  color:          var(--color-dark);
  letter-spacing: -0.02em;
  margin-bottom:  24px;
}

.hero-subtitle {
  font-size:    17px;
  color:        #5a5a5a;
  line-height:  1.7;
  margin-bottom: 40px;
  max-width:    580px;
}

.hero-actions {
  display:     flex;
  align-items: center;
  gap:         16px;
  flex-wrap:   wrap;
}

/* ===== SERVICES ===== */
.services-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   24px;
}

/* Last card: center it when 5 items in 3-column grid */
.services-grid .service-card:nth-child(4),
.services-grid .service-card:nth-child(5) {
  /* no special spanning – last row has 2 cards on desktop */
}

/* Center last row if it has fewer items */
.services-grid .service-card:last-child:nth-child(3n - 1) {
  grid-column: 2;
}

.service-card {
  background:    var(--color-white);
  border:        1px solid var(--color-gray);
  border-radius: var(--radius);
  padding:       32px;
  transition:    border-color var(--transition);
}

.service-card:hover {
  border-color: #b0b0b0;
}

.service-icon {
  margin-bottom: 20px;
  color:         var(--color-blue);
}

.service-title {
  font-size:     18px;
  font-weight:   600;
  margin-bottom: 12px;
  color:         var(--color-dark);
}

.service-desc {
  font-size:  15px;
  color:      #5a5a5a;
  line-height: 1.65;
}

/* ===== TARGET AUDIENCE ===== */
.audience-tags {
  display:   flex;
  flex-wrap: wrap;
  gap:       12px;
}

.audience-tag {
  display:       inline-block;
  padding:       10px 20px;
  border:        1px solid var(--color-gray);
  border-radius: 4px;
  font-size:     15px;
  font-weight:   400;
  color:         var(--color-dark);
  background:    var(--color-white);
}

/* ===== WHY ===== */
.why-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   0;
}

.why-item {
  display:      flex;
  align-items:  flex-start;
  gap:          20px;
  padding:      36px 0;
  border-bottom: 1px solid var(--color-gray);
}

/* Remove bottom border from last two items */
.why-item:nth-last-child(1),
.why-item:nth-last-child(2) {
  border-bottom: none;
}

/* Add right border to left column items */
.why-item:nth-child(odd) {
  padding-right: 48px;
  border-right:  1px solid var(--color-gray);
}

.why-item:nth-child(even) {
  padding-left: 48px;
}

/* If 5 items, last one spans both columns */
.why-item:last-child:nth-child(odd) {
  grid-column:   1 / -1;
  padding-right: 0;
  border-right:  none;
  max-width:     600px;
}

.why-number {
  font-size:   42px;
  font-weight: 600;
  color:       var(--color-gray);
  line-height: 1;
  flex-shrink: 0;
  min-width:   56px;
  user-select: none;
}

.why-content {
  padding-top: 4px;
}

.why-title {
  font-size:     17px;
  font-weight:   600;
  margin-bottom: 8px;
  color:         var(--color-dark);
}

.why-desc {
  font-size:  15px;
  color:      #5a5a5a;
  line-height: 1.65;
}

/* ===== PRICING ===== */
#preise {
  background: var(--color-white);
}

.pricing-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   24px;
  margin-bottom:         40px;
  align-items:           start;
}

.pricing-card {
  background:     var(--color-bg);
  border:         1px solid var(--color-gray);
  border-radius:  var(--radius);
  padding:        32px;
  display:        flex;
  flex-direction: column;
  gap:            0;
}

.pricing-card--featured {
  border-color: var(--color-blue);
  background:   var(--color-white);
}

.pricing-badge {
  display:        inline-block;
  font-size:      11px;
  font-weight:    500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--color-white);
  background:     var(--color-teal);
  padding:        4px 10px;
  border-radius:  3px;
  margin-bottom:  14px;
}

.pricing-title {
  font-size:     18px;
  font-weight:   600;
  color:         var(--color-dark);
  margin-bottom: 12px;
}

.pricing-desc {
  font-size:     14px;
  color:         #5a5a5a;
  line-height:   1.7;
  margin-bottom: 20px;
}

.pricing-features {
  list-style:     none;
  display:        flex;
  flex-direction: column;
  gap:            8px;
  margin-bottom:  0;
  padding-bottom: 24px;
}

.pricing-features li {
  font-size:   14px;
  color:       var(--color-dark);
  padding-left: 18px;
  position:    relative;
}

.pricing-features li::before {
  content:    '–';
  position:   absolute;
  left:       0;
  color:      var(--color-teal);
  font-weight: 500;
}

.pricing-price {
  display:     flex;
  align-items: baseline;
  gap:         6px;
  padding-top: 24px;
  border-top:  1px solid var(--color-gray);
  margin-top:  auto;
}

.pricing-from {
  font-size:   13px;
  color:       #8a8a8a;
  font-weight: 400;
}

.pricing-amount {
  font-size:   28px;
  font-weight: 600;
  color:       var(--color-blue);
  line-height: 1;
}

.pricing-note {
  font-size:   14px;
  color:       #8a8a8a;
  line-height: 1.65;
  text-align:  center;
  max-width:   680px;
  margin:      0 auto;
}

/* ===== PROCESS ===== */
.process-timeline {
  display:     flex;
  align-items: flex-start;
  gap:         0;
  position:    relative;
}

/* Horizontal line connecting circles */
.process-timeline::before {
  content:    '';
  position:   absolute;
  top:        22px; /* half of circle height (44px / 2) */
  left:       calc(22px + 1px); /* center of first circle */
  right:      calc(22px + 1px); /* center of last circle */
  height:     1px;
  background: var(--color-gray);
  z-index:    0;
}

.process-step {
  flex:           1;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  padding:        0 16px;
  position:       relative;
  z-index:        1;
}

.step-circle {
  width:           44px;
  height:          44px;
  border-radius:   50%;
  border:          2px solid var(--color-blue);
  color:           var(--color-blue);
  font-size:       16px;
  font-weight:     600;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      var(--color-white);
  flex-shrink:     0;
  margin-bottom:   24px;
}

.step-content {
  max-width: 220px;
}

.step-title {
  font-size:     16px;
  font-weight:   600;
  margin-bottom: 8px;
  color:         var(--color-dark);
}

.step-desc {
  font-size:  14px;
  color:      #5a5a5a;
  line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   64px;
  align-items:           start;
}

/* Form */
.contact-form-wrapper {
  position: relative;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display:       block;
  font-size:     14px;
  font-weight:   500;
  color:         var(--color-dark);
  margin-bottom: 6px;
}

.required {
  color: var(--color-teal);
}

.optional {
  color:       #8a8a8a;
  font-weight: 400;
  font-size:   13px;
}

.form-input {
  width:        100%;
  border:       1px solid var(--color-gray);
  border-radius: 4px;
  padding:      13px 16px;
  font-family:  var(--font-main);
  font-size:    15px;
  color:        var(--color-dark);
  background:   var(--color-white);
  outline:      none;
  transition:   border-color var(--transition);
  appearance:   none;
}

.form-input::placeholder {
  color: #aaa;
}

.form-input:focus {
  border-color: var(--color-blue);
}

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

/* Form success state */
.form-success {
  position:        absolute;
  inset:           0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      var(--color-white);
  border:          1px solid var(--color-gray);
  border-radius:   var(--radius);
  padding:         48px 32px;
}

.form-success[hidden] {
  display: none;
}

.form-success-inner {
  text-align: center;
  max-width:  320px;
}

.form-success-inner svg {
  margin: 0 auto 20px;
}

.form-success-inner h3 {
  font-size:     22px;
  margin-bottom: 12px;
  color:         var(--color-dark);
}

.form-success-inner p {
  font-size: 15px;
  color:     #5a5a5a;
}

/* Contact info side */
.contact-info {
  padding-top: 8px;
}

.contact-email-block {
  display:       flex;
  align-items:   center;
  gap:           12px;
  margin-bottom: 20px;
}

.contact-icon {
  display:     flex;
  align-items: center;
  color:       var(--color-blue);
  flex-shrink: 0;
}

.contact-email-link {
  font-size:       17px;
  font-weight:     500;
  color:           var(--color-blue);
  text-decoration: none;
  transition:      color var(--transition);
}

.contact-email-link:hover {
  color: #1e3a4f;
}

.contact-note {
  font-size:     15px;
  color:         #5a5a5a;
  line-height:   1.65;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-gray);
}

.trust-signals {
  display:        flex;
  flex-direction: column;
  gap:            12px;
}

.trust-item {
  display:     flex;
  align-items: center;
  gap:         10px;
  font-size:   15px;
  font-weight: 500;
  color:       var(--color-dark);
}

.trust-icon {
  display:     flex;
  align-items: center;
  flex-shrink: 0;
  color:       var(--color-teal);
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--color-dark);
  color:      var(--color-white);
  padding:    48px 0 36px;
}

.footer-top {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             32px;
  margin-bottom:   32px;
}

.footer-nav-links {
  display:     flex;
  align-items: center;
  gap:         28px;
}

.footer-link {
  font-size:   14px;
  color:       rgba(255, 255, 255, 0.65);
  transition:  color var(--transition);
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-email {
  font-size:   14px;
  color:       rgba(255, 255, 255, 0.65);
  transition:  color var(--transition);
}

.footer-email:hover {
  color: var(--color-white);
}

.footer-divider {
  height:       1px;
  background:   rgba(255, 255, 255, 0.1);
  margin-bottom: 28px;
}

.footer-bottom {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             16px;
}

.footer-copy {
  font-size: 13px;
  color:     rgba(255, 255, 255, 0.45);
}

.footer-legal {
  display:     flex;
  align-items: center;
  gap:         12px;
  font-size:   13px;
  color:       rgba(255, 255, 255, 0.45);
}

.footer-legal-link {
  color:           rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition:      color var(--transition);
}

.footer-legal-link:hover {
  color:           var(--color-white);
  text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity:    0;
  transform:  translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity:   1;
  transform: translateY(0);
}

/* Stagger delay for grid children */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.10s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.20s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.25s; }

.why-grid .why-item:nth-child(1) { transition-delay: 0.05s; }
.why-grid .why-item:nth-child(2) { transition-delay: 0.10s; }
.why-grid .why-item:nth-child(3) { transition-delay: 0.15s; }
.why-grid .why-item:nth-child(4) { transition-delay: 0.20s; }
.why-grid .why-item:nth-child(5) { transition-delay: 0.25s; }

.process-timeline .process-step:nth-child(1) { transition-delay: 0.05s; }
.process-timeline .process-step:nth-child(2) { transition-delay: 0.12s; }
.process-timeline .process-step:nth-child(3) { transition-delay: 0.19s; }
.process-timeline .process-step:nth-child(4) { transition-delay: 0.26s; }

/* ===== RESPONSIVE – TABLET (≤ 1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 90px;
  }

  .hero-title {
    font-size: 44px;
  }


  .section-title {
    font-size: 34px;
  }

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

  /* Reset 3-col centering on tablet */
  .services-grid .service-card:last-child:nth-child(3n - 1) {
    grid-column: auto;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-item:nth-child(odd) {
    padding-right: 0;
    border-right:  none;
  }

  .why-item:nth-child(even) {
    padding-left: 0;
  }

  .why-item {
    border-bottom: 1px solid var(--color-gray);
    padding: 28px 0;
  }

  .why-item:nth-last-child(1) {
    border-bottom: none;
  }

  /* last odd item spanning override: reset */
  .why-item:last-child:nth-child(odd) {
    grid-column: auto;
    max-width:   none;
    padding-right: 0;
    border-right:  none;
  }


  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-info {
    padding-top: 0;
  }
}

/* ===== RESPONSIVE – MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 72px;
  }

  /* Nav */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  #hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + 16px);
    align-items: flex-start;
    padding-bottom: 48px;
  }

  .hero-title {
    font-size: 36px;
    letter-spacing: -0.015em;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items:    flex-start;
    gap:            12px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Section titles */
  .section-title {
    font-size: 28px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Why */
  .why-number {
    font-size: 32px;
    min-width: 44px;
  }

  /* Process: vertical on mobile */
  .process-timeline {
    flex-direction: column;
    gap: 0;
  }

  .process-timeline::before {
    display: none;
  }

  .process-step {
    flex-direction: row;
    align-items:    flex-start;
    text-align:     left;
    padding:        0 0 32px 0;
    gap:            20px;
  }

  .process-step:last-child {
    padding-bottom: 0;
  }

  .step-circle {
    margin-bottom: 0;
    flex-shrink:   0;
  }

  .step-content {
    max-width: none;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    align-items:    flex-start;
    gap:            24px;
  }

  .footer-nav-links {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items:    flex-start;
    gap:            12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 30px;
  }

  .audience-quote {
    padding: 28px 24px;
  }

  .audience-quote p {
    font-size: 16px;
  }
}
