/* ==========================================================================
   SM Group – Landingpage
   Farben und Maße nach dem Original (smgroup.org, Stand 12/2025)
   ========================================================================== */

@font-face {
  font-family: "Ruda";
  src: url("../assets/fonts/ruda-400.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Ruda";
  src: url("../assets/fonts/ruda-700.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --bg: #101010;
  --surface: #3e3e3e;
  --surface-dark: #1c1c1c;
  --text: #ffffff;
  --muted: #a8a8a8;
  --accent: #80b241;
  --container: 1118px;
  --gutter: 20px;
  --radius-pill: 50px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Ruda", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.22; }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: var(--radius-pill);
  text-decoration: none; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Feste Kontakt-Badges (rechts)
   -------------------------------------------------------------------------- */
.badges {
  position: fixed; right: 0; top: 30vh; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
.badge {
  display: flex; align-items: center; gap: 20px;
  width: 57px; height: 50px;
  padding: 0 12px 0 16px;
  background: #fff; color: var(--bg);
  text-decoration: none; white-space: nowrap; font-weight: 600;
  overflow: hidden;
  transition: width .3s var(--ease);
  box-shadow: 0 4px 18px rgb(0 0 0 / .35);
}
.badge > img { flex: none; }
.badge--call:hover, .badge--call:focus-visible { width: 200px; }
.badge--yt:hover, .badge--yt:focus-visible { width: 140px; }
.badge--yt > img { height: 22px; width: auto; }
.badge--social:hover, .badge--social:focus-within { width: 165px; }
.badge__socials { display: flex; gap: 20px; }
.badge__socials img { width: 25px; height: 25px; }
@media (max-width: 719px) {
  .badges { top: auto; bottom: 16px; }
  .badge { width: 46px; height: 44px; padding-left: 12px; }
  .badge > img { width: 21px; height: auto; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: 80px; margin-bottom: 50px;
}
.hero__video { position: absolute; inset: 0; z-index: -1; opacity: .1; }
.hero__video video { width: 100%; height: 100%; object-fit: cover; }
.hero::after { /* weicher Übergang zum Seitenhintergrund */
  content: ""; position: absolute; inset: auto 0 0; height: 120px; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero__grid { display: grid; grid-template-columns: 1fr; gap: 50px; }
.hero__portrait { order: 2; text-align: center; }
.hero__portrait img { width: 60%; height: auto; margin-inline: auto; }
.hero__logo img { width: 100px; height: auto; margin-bottom: 28px; }
.hero__text h1 { margin-bottom: 24px; text-wrap: balance; }
.hero__author { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero__author::before {
  content: ""; display: inline-block; width: 28px; height: 1px;
  background: var(--accent); vertical-align: middle; margin-right: 12px;
}

@media (min-width: 720px) {
  .hero__grid { grid-template-columns: 286px 1fr; gap: 32px; align-items: end; }
  .hero__portrait { order: 0; }
  .hero__portrait img { width: 100%; }
  .hero__text { margin-bottom: 40px; padding-right: 48px; }
  .hero__logo img { width: 180px; }
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 426px 1fr; gap: 64px; }
  .hero__text { margin-bottom: 120px; padding-right: 68px; }
  .hero__logo img { width: 212px; }
}

/* --------------------------------------------------------------------------
   Vorteile
   -------------------------------------------------------------------------- */
.usp { padding-block: 40px 20px; }
.usp > h2 { text-align: center; margin-bottom: 40px; }
.usp__grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .usp__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.usp__item {
  text-align: center;
  padding: 28px 20px 32px;
  border-radius: 6px;
  transition: background-color .3s var(--ease);
}
.usp__item:hover { background: var(--surface-dark); }
.usp__icon {
  width: 44px; height: 44px; margin: 0 auto 18px;
  fill: transparent; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round;
  transition: transform .5s var(--ease), fill .3s var(--ease);
}
.usp__item:hover .usp__icon { transform: rotate(72deg) scale(1.08); fill: rgb(128 178 65 / .25); }
.usp__item h3 { margin-bottom: 14px; text-wrap: balance; }
.usp__item p { font-size: 14px; color: var(--muted); max-width: 34ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Nachhaltigkeit
   -------------------------------------------------------------------------- */
.future {
  margin-block: 70px;
  padding-block: clamp(80px, 12vw, 140px);
  background:
    radial-gradient(ellipse at 15% 30%, rgb(128 178 65 / .28), transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgb(128 178 65 / .14), transparent 50%),
    linear-gradient(180deg, #121812, #0d120c);
  border-block: 1px solid rgb(128 178 65 / .15);
}
.future__content h2 { margin-bottom: 20px; text-wrap: balance; }
.future__content p { font-size: 18px; color: #d6d6d6; max-width: 62ch; }
@media (min-width: 1024px) {
  .future__content { text-align: right; }
  .future__content h2, .future__content p { margin-left: auto; }
  .future__content p { max-width: 82%; }
}

/* --------------------------------------------------------------------------
   Unternehmens-Karussell
   -------------------------------------------------------------------------- */
.companies { margin-bottom: 70px; }
.carousel { position: relative; }

.carousel__track {
  --card-w: min(78vw, 360px);
  list-style: none; margin: 0;
  display: flex; align-items: center; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 20px;
  /* Polsterung, damit auch die erste/letzte Karte mittig stehen kann */
  padding-inline: calc(50% - var(--card-w) / 2);
}
.carousel__track::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .carousel__track { --card-w: 420px; gap: 24px; } }

.card {
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  display: flex; flex-direction: column;
  background: var(--surface);
  overflow: hidden;
  transform: scale(.9);
  opacity: .55;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.card.is-active { transform: scale(1); opacity: 1; }
.card:not(.is-active) { cursor: pointer; }
.card:not(.is-active):hover { opacity: .75; }
.card.is-active:hover { box-shadow: 0 18px 50px rgb(0 0 0 / .55); }
.card img { transition: transform .8s var(--ease); }
.card.is-active:hover img { transform: scale(1.04); }
.card { position: relative; }
.card > img { position: relative; z-index: 0; }
.card__body { position: relative; z-index: 1; background: var(--surface); }
.no-anim .card, .no-anim .card img { transition: none !important; }
.card img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 85%; }
.card__body {
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  padding: 32px 32px 36px; text-align: center;
  font-size: 14px; color: var(--muted);
}
.card__body p { min-height: 4.65em; }

.pill {
  display: inline-block;
  background: #fff; color: var(--bg);
  padding: 15px 40px; border-radius: var(--radius-pill);
  line-height: 1; font-weight: 700; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.pill::after {
  content: "→"; display: inline-block; width: 0; opacity: 0;
  transition: width .25s var(--ease), opacity .25s var(--ease), margin .25s var(--ease);
}
.pill:hover { background: var(--accent); color: #fff; }
.pill:hover::after { width: 1em; margin-left: 8px; opacity: 1; }

.carousel__controls {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 16px;
}
.carousel__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid #555; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.carousel__btn:hover { border-color: #fff; background: rgb(255 255 255 / .08); }
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel__dots { display: flex; gap: 6px; }
.carousel__dots button {
  width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.carousel__dots button::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #555; transition: background-color .2s, transform .2s;
}
.carousel__dots button[aria-current="true"]::before { background: #fff; transform: scale(1.25); }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */
.contact { background: var(--surface); padding: 40px 0 48px; text-align: center; }
.contact h2 { margin-bottom: 24px; }
.contact__row {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.contact__big { font-size: clamp(20px, 2.6vw, 26px); text-decoration: none; }
.contact__big:hover { color: var(--accent); }
.contact__social { display: flex; align-items: center; gap: 22px; }
.contact__social img { height: 26px; width: auto; transition: opacity .2s; }
.contact__social a:hover img { opacity: .7; }

@media (min-width: 820px) {
  .contact__row { flex-direction: row; justify-content: center; gap: 0; }
  .contact__row > * { padding-inline: 22px; }
  .contact__row > * + * { border-left: 1px solid #fff; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { padding: 22px 0 28px; color: var(--muted); font-size: 12px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.footer li + li { border-left: 1px solid var(--muted); }
.footer li a { display: block; padding: 4px 12px; text-decoration: none; }
.footer li:first-child a { padding-left: 0; }
@media (min-width: 600px) { .footer li:first-child a { padding-left: 12px; } .footer ul { border-left: 1px solid var(--muted); } }
.footer a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Rechtstexte (Impressum, Datenschutz, Disclaimer)
   -------------------------------------------------------------------------- */
.legal-header { padding: 28px 0; border-bottom: 1px solid #262626; }
.legal-header img { width: 90px; height: auto; }
.legal { padding-block: 48px 80px; max-width: 820px; }
.legal h1 { margin-bottom: 32px; }
.legal h2 { font-size: 20px; margin: 36px 0 10px; }
.legal h3 { font-size: 16px; margin: 24px 0 6px; }
.legal p, .legal li { color: #cfcfcf; font-size: 15px; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }
.legal .back { display: inline-block; margin-top: 48px; }

/* --------------------------------------------------------------------------
   Animationen
   -------------------------------------------------------------------------- */
/* Kopfbereich beim Laden */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero__logo, .hero__text h1, .hero__author { animation: rise .9s var(--ease) both; }
.hero__text h1 { animation-delay: .15s; }
.hero__author { animation-delay: .3s; }
.hero__portrait img { animation: fade 1.2s var(--ease) .1s both; }

/* Bereiche beim Scrollen (nur wenn JavaScript aktiv ist) */
.has-reveal [data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.has-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* Grüne Linie unter Abschnittsüberschriften */
.usp > h2::after, .future__content h2::after {
  content: ""; display: block; width: 48px; height: 2px; margin-top: 14px;
  background: var(--accent);
}
.usp > h2::after { margin-inline: auto; }
@media (min-width: 1024px) { .future__content h2::after { margin-left: auto; } }

/* --------------------------------------------------------------------------
   Weniger Bewegung
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero__video { display: none; }
}
