/* ============================================================
   Halli Galli Webdesign – Main Stylesheet
   DSGVO-konform: Keine externen Fonts, nur System-Schriften
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --primary: #2d2d5e;
  --primary-light: #4343a0;
  --primary-dark: #1a1a3e;
  --accent: #c0392b;
  --accent-hover: #a33025;
  --accent-light: #fdf0ee;
  --dark: #1a1a2e;
  --gray-900: #212529;
  --gray-700: #495057;
  --gray-500: #6c757d;
  --gray-300: #dee2e6;
  --gray-100: #f1f3f5;
  --light: #f8f9fa;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-light: #555c63;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.25s ease;
  --max-width: 1200px;
  --header-height: 72px;
}

/* --- Reset & Base ----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
               Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

ul { list-style: none; }

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

.section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 3rem auto;
  font-size: 1.05rem;
}

/* --- Layout Utilities ------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

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

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.4;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,91,0.35);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--dark);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* --- Header / Navigation ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: var(--white) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Hero Section ----------------------------------------- */
.hero {
  position: relative;
  padding: 0;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(45,45,94,0.92) 0%, rgba(26,26,62,0.95) 100%),
    url("https://images.unsplash.com/photo-1497215728101-856f4ea42174?fit=crop&w=1600&q=80")
    center / cover no-repeat;
  color: var(--white);
}

.hero .container {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

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

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero h1 span {
  color: var(--accent);
  display: inline;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-badges {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-badge {
  text-align: left;
}

.hero-badge .badge-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-badge .badge-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.25rem;
}

/* --- Services Section ------------------------------------- */
.services {
  background: var(--light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- About Section ---------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  text-align: left;
  margin-bottom: 1rem;
}

.about-text .lead {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-feature .check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.about-feature strong {
  display: block;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.about-feature span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* --- Contact Section -------------------------------------- */
.contact {
  background: var(--light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  display: grid;
  gap: 1.25rem;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.contact-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.contact-card p,
.contact-card a {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
}

.contact-card a:hover {
  color: var(--accent);
}

.contact-highlight {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.contact-highlight h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.contact-highlight .phone-big {
  font-size: 2rem;
  font-weight: 800;
  color: #e8a09b;
  margin-bottom: 0.5rem;
  display: block;
}

.contact-highlight p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}

.contact-highlight .btn {
  align-self: flex-start;
}

/* --- Map Placeholder -------------------------------------- */
.map-area {
  aspect-ratio: 16/7;
  background: var(--gray-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 1rem;
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 0.75rem;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-links .footer-heading {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.6);
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* --- Legal Pages (Impressum/Datenschutz) ------------------ */
.legal-page {
  padding: 4rem 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.legal-page .container {
  max-width: 800px;
}

.legal-page h1 {
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.legal-page p,
.legal-page li {
  margin-bottom: 0.75rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page address {
  font-style: normal;
  line-height: 1.6;
}

/* Underline links in legal text for WCAG link-distinguishability */
.legal-page p a,
.legal-page li a {
  text-decoration: underline;
}

.legal-page p a:hover,
.legal-page li a:hover {
  color: var(--accent);
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .hero-badges {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Mobile Navigation */
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    gap: 0.5rem;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  .hero {
    text-align: center;
    min-height: auto;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-badges {
    justify-content: center;
    text-align: center;
  }

  .hero-badge {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-badges {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

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

/* --- Focus & Accessibility -------------------------------- */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Print Styles ----------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle,
  .nav-overlay,
  .hero,
  .btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
