/* =============================================================
   polyagent.de — Global responsive stylesheet (Apple-like)
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: #ffffff; color: #1d1d1f;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }
*:focus-visible { outline: 2px solid #0d5b6e; outline-offset: 3px; border-radius: 6px; }
::selection { background: #b6dde5; color: #1d1d1f; }

/* Smooth CTA hover lift */
.nav-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(13,91,110,0.18) !important; }
.nav-cta-btn:active { transform: translateY(0); }

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

/* ============ STICKY MOBILE CTA SPACE ============ */
@media (max-width: 768px) {
  body { padding-bottom: 80px; }
  .sticky-mobile-cta { display: flex !important; }
}

/* ============ NAV ============ */
@media (max-width: 1100px) {
  .nav-inner { gap: 12px !important; }
}
@media (max-width: 960px) {
  .nav-links a, .nav-links button { font-size: 13px !important; padding: 6px 10px !important; }
}
@media (max-width: 860px) {
  .nav-links { display: none !important; }
  .nav-burger { display: inline-flex !important; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 10px 16px !important; }
}

/* ============ HERO ============ */
@media (max-width: 900px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
}
@media (max-width: 480px) {
  .hero-cta > a, .hero-cta > button {
    width: 100% !important; justify-content: center;
  }
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============ SECTION PADDING ============ */
@media (max-width: 768px) {
  section { padding-top: clamp(64px, 12vw, 96px) !important; padding-bottom: clamp(64px, 12vw, 96px) !important; }
}

/* ============ LEISTUNGEN GRID ============ */
@media (max-width: 900px) {
  .leistungen-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
}

/* ============ BRANCHEN GRID ============ */
@media (max-width: 1100px) {
  .branchen-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 800px) {
  .branchen-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .branchen-grid { grid-template-columns: 1fr !important; }
}

/* ============ VORGEHEN STEPS ============ */
@media (max-width: 1000px) {
  .vorgehen-grid { grid-template-columns: repeat(2, 1fr) !important; row-gap: 40px !important; }
  .vorgehen-line { display: none !important; }
}
@media (max-width: 560px) {
  .vorgehen-grid { grid-template-columns: 1fr !important; }
}

/* ============ DIFFERENZIERUNG ============ */
@media (max-width: 800px) {
  .diff-grid { grid-template-columns: 1fr !important; }
}

/* ============ ZAHLEN ============ */
@media (max-width: 900px) {
  .zahlen-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 40px !important; }
}

/* ============ ABOUT ============ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
}

/* ============ TESTIMONIALS ============ */
@media (max-width: 960px) {
  .test-grid { grid-template-columns: 1fr !important; }
}

/* ============ FINAL CTA ============ */
@media (max-width: 600px) {
  .final-cta-row > a, .final-cta-row > button { width: 100% !important; }
  .final-contact { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* ============ FOOTER ============ */
@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr !important; gap: 32px !important; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column !important; align-items: flex-start !important; }
}

/* ============ SUBPAGE BLOCKS ============ */
@media (max-width: 900px) {
  .sub-block { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ============ ULTRAWIDE ============ */
@media (min-width: 1600px) {
  nav .nav-inner, section > div, footer > div { max-width: 1320px !important; }
}
@media (min-width: 2000px) {
  nav .nav-inner, section > div, footer > div { max-width: 1480px !important; }
}

/* ============ FINE-GRAINED MOBILE POLISH ============ */
@media (max-width: 640px) {
  /* tighten hero stat label */
  .hero-stats > div > div:last-child { font-size: 12px !important; }
  /* card padding on small screens */
  .leistungen-grid > * { padding: clamp(22px, 6vw, 32px) !important; }
}
@media (max-width: 380px) {
  h1, h2 { letter-spacing: -0.03em !important; }
}

/* ============ TYPOGRAPHY GUARDRAILS ============ */
h1, h2, h3 { text-wrap: balance; word-break: break-word; hyphens: auto; }
p { word-break: break-word; }
