/* ---------------------------------------------------------
   index.html and fahrzeugbestand.html. Requires base.css for
   tokens, reset, .container, .eyebrow, .btn, header basics
   and the footer.
--------------------------------------------------------- */

html { scroll-behavior: smooth; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------------------------------------------------------
   Header navigation
--------------------------------------------------------- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.main-nav a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-ink);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.main-nav a:not(.btn):hover,
.main-nav a:not(.btn)[aria-current="page"] {
  background: var(--color-yellow-soft);
}
.main-nav .btn { margin-left: 12px; padding: 11px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--color-ink);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--color-ink);
}
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------
   Sections generic
--------------------------------------------------------- */
section { padding: 88px 0; }
.section--tint { background: var(--color-bg-soft); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-head__lead {
  font-size: 1.05rem;
  color: var(--color-ink-soft);
  margin-bottom: 0;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, var(--color-yellow-soft) 0%, transparent 55%),
    var(--color-white);
  padding: 32px 0 88px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-green-soft);
  color: var(--color-green);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  margin-bottom: 0.4em;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
  max-width: 480px;
  margin: 0 auto 2em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.hero-image {
  /* Banner crop: image is 3:2, so a 9:2 box shows exactly its middle
     third vertically (top and bottom thirds cropped off). */
  aspect-ratio: 9 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------------------------------------------------------
   Page hero (subpages such as fahrzeugbestand.html)
--------------------------------------------------------- */
.page-hero {
  background:
    radial-gradient(circle at 85% 20%, var(--color-yellow-soft) 0%, transparent 55%),
    var(--color-white);
  padding: 36px 0 24px;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  margin-bottom: 0.25em;
}
.page-hero p.lead {
  font-size: 1.02rem;
  color: var(--color-ink-soft);
  max-width: 620px;
  margin-bottom: 0;
}

/* The showroom widget brings its own top spacing, so the section only
   needs a small gap to the hero — the vehicles should be visible early. */
#bestand { padding: 24px 0 64px; }

/* ---------------------------------------------------------
   Centered call-to-action band
--------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-band p {
  color: var(--color-ink-soft);
  max-width: 540px;
  margin: 0 auto 28px;
}

/* ---------------------------------------------------------
   Trust bar with friendly rounded stat cards
--------------------------------------------------------- */
.trust-bar { padding: 64px 0; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 32px 28px;
  text-align: center;
}
.stat-card__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 18px;
}
.stat-card:nth-child(1) .stat-card__dot { background: var(--color-yellow); }
.stat-card:nth-child(2) .stat-card__dot { background: var(--color-green); }
.stat-card:nth-child(3) .stat-card__dot { background: var(--color-yellow); }
.stat-card__number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--color-ink);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-card__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
}

/* ---------------------------------------------------------
   About section
--------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-text .divider { margin: 28px 0; }
.about-image-placeholder {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-soft);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.about-image-placeholder span {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
  max-width: 260px;
}

/* ---------------------------------------------------------
   Ansprechpartner
--------------------------------------------------------- */
.team-group__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-yellow);
  display: inline-block;
}
.team-group + .team-grid { margin-bottom: 8px; }
.team-grid + .team-group { margin-top: 48px; }

.team-grid {
  display: grid;
  /* auto-fill (not auto-fit) keeps empty tracks, so the three-person
     Verkauf row keeps the same card width as the four-person row. */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.person-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
}
.person-card__photo {
  /* Cut-out portraits on a transparent background: let each figure
     stand on the bottom edge of a soft yellow panel. */
  margin: 0 -24px 20px;
  background: var(--color-yellow-soft);
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.person-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}
.person-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 2px;
}
.person-card__role {
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  margin: 0 0 16px;
}

.person-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto 0 0;
  font-size: 0.88rem;
}
.person-contact li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-wrap: anywhere;
}
.person-contact__label {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--color-green);
}
.person-contact a:hover { color: var(--color-green); }

/* ---------------------------------------------------------
   Contact section
--------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}
.contact-card {
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 36px;
  border-top: 4px solid var(--color-yellow);
}
.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1em;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.96rem;
  margin-bottom: 0;
}
.contact-list dt {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-green);
  margin-bottom: 2px;
}
.contact-list dd { margin: 0; color: var(--color-ink); }
.contact-list a:hover { color: var(--color-green); }

.contact-card + .contact-card { margin-top: 24px; }
.contact-card--hours { border-top-color: var(--color-green); }

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 0.96rem;
  margin-bottom: 0;
}
.hours-list dt {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-green);
  margin-bottom: 6px;
}
.hours-list dd { margin: 0; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
}
.hours-row + .hours-row { border-top: 1px solid var(--color-border); }
.hours-row span:first-child { color: var(--color-ink-soft); }

.map-wrap {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.map-wrap iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

.contact-form {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 36px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--color-ink);
}
.form-row .optional {
  color: var(--color-ink-soft);
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-soft);
  color: var(--color-ink);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--color-yellow);
  box-shadow: 0 0 0 4px var(--color-yellow-soft);
  outline: none;
  background: var(--color-white);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.field-error {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #C0392B;
  margin-top: 6px;
  min-height: 1em;
}
.form-status {
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}
.form-status.is-success {
  display: block;
  background: #EAF6EC;
  color: #256029;
}
.form-status.is-error {
  display: block;
  background: #FBEAEA;
  color: #A93226;
}
/* Shown while the form has no backend: names the direct routes instead
   of claiming the message was sent. */
.form-status.is-notice {
  display: block;
  background: var(--color-yellow-soft);
  border: 1px solid var(--color-yellow);
  color: var(--color-ink);
}
.form-status__text {
  font-weight: 500;
  line-height: 1.55;
  margin: 0 0 16px;
}
.form-status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.form-status__actions .btn {
  padding: 11px 22px;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .about-image-placeholder { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 24px;
    box-shadow: var(--shadow-soft);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a:not(.btn) {
    padding: 14px 16px;
    width: 100%;
  }
  .main-nav .btn {
    margin-left: 0;
    margin-top: 12px;
    justify-content: center;
  }
  .nav-toggle { display: block; }
  .page-hero { padding: 28px 0 20px; }
  .trust-grid { grid-template-columns: 1fr; gap: 20px; }
  section { padding: 64px 0; }
  .hero { padding: 72px 0 56px; }
}
