/* ==========================================================================
   carXpert Garage & Pneuhaus GB — Redesign 2026
   Shared design tokens + components
   ========================================================================== */

:root {
  /* Brand */
  --brand-primary: #005093;
  --brand-primary-fg: #ffffff;
  --brand-primary-hover: #003a6a;
  --brand-primary-soft: #e6eef6;
  --brand-accent: #75b021;
  --brand-accent-fg: #ffffff;
  --brand-accent-hover: #5f9118;
  --brand-accent-soft: #eef7e0;

  /* Text */
  --text-strong: #0f1b2a;
  --text-body: #3c4858;
  --text-muted: #6b7280;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.78);

  /* Surface */
  --surface-base: #ffffff;
  --surface-muted: #f7f9fb;
  --surface-elevated: #ffffff;
  --surface-dark: #0f1b2a;

  /* Border */
  --border-subtle: #e5e9ef;
  --border-strong: #cbd2db;
  --validation-error: #c7254e;

  /* Hero */
  --hero-overlay: rgba(0, 80, 147, 0.72);

  /* Type */
  --font-display: "Sora", system-ui, -apple-system, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 27, 42, 0.04), 0 1px 3px rgba(15, 27, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 27, 42, 0.06), 0 2px 4px rgba(15, 27, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 27, 42, 0.08), 0 4px 12px rgba(15, 27, 42, 0.04);
  --shadow-xl: 0 32px 64px rgba(15, 27, 42, 0.12), 0 8px 24px rgba(15, 27, 42, 0.06);

  /* Layout */
  --container: 1240px;
  --header-h: 80px;
}

/* ==========================================================================
   Reset + base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  color: var(--text-body);
  background: var(--surface-base);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 160ms ease-out;
}
a:hover { color: var(--brand-primary-hover); }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--brand-primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Skip link
   ========================================================================== */

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  background: var(--brand-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top 160ms ease-out;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ==========================================================================
   Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

/* ==========================================================================
   Section primitives
   ========================================================================== */

.section { padding-block: 80px; }
.section-tight { padding-block: 56px; }

@media (min-width: 1024px) {
  .section { padding-block: 120px; }
  .section-tight { padding-block: 72px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}
.eyebrow.on-dark { color: var(--text-on-dark); }
.eyebrow.on-dark::before { background: var(--brand-accent); }

.section-h2 {
  font-size: clamp(1.875rem, 1.2rem + 2.5vw, 2.5rem);
  font-weight: 700;
  margin-top: 16px;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-body);
  max-width: 60ch;
  margin-top: 16px;
}

.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .eyebrow,
.section-header.center .section-lead { margin-inline: auto; }

@media (min-width: 1024px) {
  .section-header { margin-bottom: 72px; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 100ms ease-out, background 160ms ease-out,
              color 160ms ease-out, border-color 160ms ease-out,
              box-shadow 160ms ease-out;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand-primary);
  color: var(--brand-primary-fg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset,
              0 8px 24px -8px rgba(0, 80, 147, 0.45);
}
.btn-primary:hover {
  background: var(--brand-primary-hover);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset,
              0 12px 28px -8px rgba(0, 80, 147, 0.55);
}

.btn-secondary {
  background: var(--surface-base);
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-muted);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.btn-on-primary {
  background: #fff;
  color: var(--brand-primary);
}
.btn-on-primary:hover { background: #f1f5fa; color: var(--brand-primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--brand-primary-soft); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 200ms ease-out, border-color 200ms ease-out,
              box-shadow 200ms ease-out;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 1px 0 rgba(15, 27, 42, 0.02);
}

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

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark img {
  max-height: 44px;
  width: auto;
}

.brand-mark .brand-text {
  display: none;
  font-size: 0.9375rem;
  line-height: 1.15;
}
.brand-mark .brand-text small {
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

.nav-primary {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-primary a {
  position: relative;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--r-sm);
  transition: color 160ms ease-out, background 160ms ease-out;
}
.nav-primary a:hover { color: var(--brand-primary); }
.nav-primary a.is-active { color: var(--brand-primary); font-weight: 600; }
.nav-primary a.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 12px;
}

.btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-strong);
  border: 1px solid var(--border-subtle);
  transition: background 160ms ease-out, border-color 160ms ease-out;
}
.btn-icon-only:hover { background: var(--surface-muted); border-color: var(--border-strong); }

.hamburger {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-strong);
}
.hamburger:hover { background: var(--surface-muted); }

@media (min-width: 1024px) {
  .nav-primary, .header-cta { display: flex; }
  .hamburger { display: none; }
  .brand-mark .brand-text { display: block; }
}

/* ==========================================================================
   Mobile menu sheet
   ========================================================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.mobile-menu.is-open { display: block; }

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: fade-in 200ms ease-out;
}

.mobile-menu-sheet {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(420px, 88vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  animation: slide-in-right 260ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(15, 27, 42, 0.12);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-header img { max-height: 36px; }

.mobile-menu-close {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-strong);
  display: inline-flex; align-items: center; justify-content: center;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 2px;
  flex: 1;
}

.mobile-nav a {
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-strong);
  border-radius: var(--r-md);
  letter-spacing: -0.02em;
}
.mobile-nav a:hover { background: var(--surface-muted); color: var(--brand-primary); }
.mobile-nav a.is-active { color: var(--brand-primary); }

.mobile-menu-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-muted);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--surface-muted);
  border-top: 4px solid var(--brand-primary);
  padding-top: 72px;
  padding-bottom: 24px;
  color: var(--text-body);
}

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

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin-bottom: 20px;
}

.footer-col .brand-mark img { max-height: 48px; }

.footer-claim {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 20px;
  max-width: 32ch;
}

.google-badge {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
}
.google-badge .stars { color: #f5b400; letter-spacing: 1px; font-size: 0.9rem; }
.google-badge strong { color: var(--text-strong); font-weight: 700; }
.google-badge .g-logo {
  width: 18px; height: 18px;
  background: conic-gradient(from -45deg, #4285F4 0 25%, #34A853 0 50%, #FBBC05 0 75%, #EA4335 0);
  border-radius: 50%;
  position: relative;
}
.google-badge .g-logo::after {
  content: "G";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  font-family: var(--font-ui);
}

.footer-contact {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9375rem;
}
.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.footer-contact svg {
  flex: none;
  width: 20px; height: 20px;
  color: var(--brand-primary);
  margin-top: 2px;
}
.footer-contact a { color: var(--text-body); }
.footer-contact a:hover { color: var(--brand-primary); }

.footer-hours {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9375rem;
}
.footer-hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-subtle);
}
.footer-hours li:last-child { border-bottom: 0; padding-bottom: 0; }
.footer-hours .day { font-weight: 600; color: var(--text-strong); }
.footer-hours .closed { color: var(--text-muted); font-style: italic; }

.footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 0.875rem;
}
.footer-links a { color: var(--text-body); }
.footer-links a:hover { color: var(--brand-primary); }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom-links a { color: var(--text-muted); }
.footer-bottom-links a:hover { color: var(--brand-primary); }

/* ==========================================================================
   Floating mobile CTA
   ========================================================================== */

.floating-cta {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.floating-cta .btn { padding: 12px 14px; font-size: 0.875rem; }

@media (min-width: 1024px) {
  .floating-cta { display: none; }
}

body.has-floating-cta { padding-bottom: 80px; }
@media (min-width: 1024px) { body.has-floating-cta { padding-bottom: 0; } }

/* ==========================================================================
   Card (generic surface)
   ========================================================================== */

.card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out,
              border-color 200ms ease-out;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  margin-bottom: 20px;
}
.icon-badge svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-strong);
}
.card p {
  font-size: 0.9375rem;
  color: var(--text-body);
}

/* Utility helpers */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mt-16 { margin-top: 64px; }

/* ==========================================================================
   Magic-UI-style effects — Border Beam + Shimmer button
   ========================================================================== */

@property --beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Animated gradient "beam" travelling around an element's border. */
.border-beam {
  position: relative;
  --beam-angle: 0deg; /* fallback for engines without @property */
}
.border-beam::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--beam-angle),
              transparent 0 62%,
              var(--brand-accent) 78%,
              var(--brand-primary) 92%,
              transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 4;
  animation: border-beam-spin 5.5s linear infinite;
}
@keyframes border-beam-spin { to { --beam-angle: 360deg; } }

/* Periodic light sweep across a button. */
.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -160%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: btn-shimmer-sweep 5s ease-in-out infinite;
}
@keyframes btn-shimmer-sweep {
  0%   { left: -160%; }
  16%  { left: 160%; }
  100% { left: 160%; }
}

@media (prefers-reduced-motion: reduce) {
  .border-beam::before { animation: none; }
  .btn-shimmer::after { display: none; }
}

/* ==========================================================================
   CTA banner — shared across home + subpages (über uns, dienstleistungen).
   Lives here (not only inline on the homepage) so the dark background is
   present everywhere and the white text never lands on a white section.
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #003a6a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 6px;
  background: var(--brand-accent);
}
.cta-banner::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(117, 176, 33, 0.2), transparent 60%);
  pointer-events: none;
}
.cta-banner .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .cta-banner .container { grid-template-columns: 1.4fr 1fr; gap: 56px; }
}
.cta-banner h2 {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 1.2rem + 2.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cta-banner .subtitle {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.0625rem;
  max-width: 50ch;
}
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 480px)  { .cta-buttons { flex-direction: row; } }
@media (min-width: 1024px) { .cta-buttons { flex-direction: column; align-items: stretch; } }
.cta-buttons .btn { padding: 18px 24px; font-size: 1rem; }

/* The [hidden] attribute must always win over component display rules
   (e.g. the contact-form success box stays hidden until the form is sent). */
[hidden] { display: none !important; }
