/* =========================================================
   atrex — automotive training experts
   Design tokens: anthracite neutrals, single red accent
   ========================================================= */

:root {
  /* Greys / anthracite */
  --c-bg: #202327;
  --c-bg-2: #25292e;
  --c-bg-3: #2c3036;
  --c-bg-4: #363b42;
  --c-line: #444a53;
  --c-line-2: #535a64;
  --c-text: #eef0f2;
  --c-text-2: #c1c5cb;
  --c-text-3: #8b9098;
  --c-text-muted: #6b7079;

  /* Light surfaces (alt sections) */
  --c-paper: #f3f4f6;
  --c-paper-2: #e6e8eb;
  --c-ink: #202327;
  --c-ink-2: #3a3f46;
  --c-ink-3: #6b7079;

  /* Brand red — close to atrex logo */
  --c-red: #c8102e;
  --c-red-2: #e21b3c;
  --c-red-ink: #9a0a22;

  /* Layout */
  --container: 1240px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-red);
  color: #fff;
  padding: 10px 14px;
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(32, 35, 39, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-mark {
  width: 190px;
  height: auto;
  display: block;
}
.brand-mark-sm {
  width: 178px;
}

.nav {
  position: relative;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  border: 1px solid var(--c-line-2);
  border-radius: 4px;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--c-text);
  transition: transform 200ms var(--ease), opacity 200ms var(--ease),
    top 200ms var(--ease);
}
.nav-toggle span:nth-child(1) {
  top: 14px;
}
.nav-toggle span:nth-child(2) {
  top: 21px;
}
.nav-toggle span:nth-child(3) {
  top: 28px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-2);
  letter-spacing: 0.01em;
  border-radius: 4px;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.nav-list a:hover {
  color: var(--c-text);
  background: var(--c-bg-3);
}
.nav-list .nav-cta {
  margin-left: 8px;
  color: #fff;
  background: var(--c-red);
  padding: 10px 16px;
}
.nav-list .nav-cta:hover {
  background: var(--c-red-2);
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-block;
  }
  .nav-list {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    background: var(--c-bg-2);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    min-width: 240px;
    gap: 2px;
    box-shadow: 0 16px 48px rgba(20, 23, 26, 0.34);
    display: none;
  }
  .nav-list.is-open {
    display: flex;
  }
  .nav-list a {
    padding: 12px 14px;
    font-size: 15px;
  }
  .nav-list .nav-cta {
    margin: 6px 0 0;
    justify-content: center;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(32, 35, 39, 0.94) 0%,
      rgba(32, 35, 39, 0.74) 45%,
      rgba(32, 35, 39, 0.42) 100%
    ),
    linear-gradient(0deg, rgba(32, 35, 39, 0.86) 0%, rgba(32, 35, 39, 0.14) 60%);
}
.hero-inner {
  position: relative;
  max-width: 880px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 22px;
}
.eyebrow-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-red);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.18);
}
.hero h1 {
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.accent {
  color: var(--c-red);
}
.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--c-text-2);
  max-width: 64ch;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 3px;
  transition: background 180ms var(--ease), color 180ms var(--ease),
    transform 180ms var(--ease), border-color 180ms var(--ease);
}
.btn-primary {
  background: var(--c-red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-red-2);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-line-2);
}
.btn-ghost:hover {
  border-color: var(--c-text-3);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--c-line);
  max-width: 760px;
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stats dt {
  order: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.hero-stats dd {
  margin: 0;
  order: 1;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (max-width: 600px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* =========================================================
   Sections (dark base)
   ========================================================= */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
  background: var(--c-bg);
  color: var(--c-text);
  position: relative;
}
.section-alt {
  background: var(--c-paper);
  color: var(--c-ink);
}
.section-alt .eyebrow,
.section-alt .section-lead {
  color: var(--c-ink-3);
}
.section-alt .eyebrow-dot {
  background: var(--c-red);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
}
.section-dark {
  background: var(--c-bg-2);
}
.section-head {
  max-width: 760px;
  margin: 0 0 56px;
}
.section-head h2,
.section h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.section-lead {
  margin-top: 18px;
  color: var(--c-text-2);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 60ch;
}

/* =========================================================
   Pillars (Leistungen overview)
   ========================================================= */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--c-line);
}
.pillars li {
  padding: 32px 24px 36px;
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg);
  transition: background 200ms var(--ease);
  position: relative;
}
.pillars li:last-child {
  border-right: 0;
}
.pillars li:hover {
  background: var(--c-bg-2);
}
.pillars li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--c-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease);
}
.pillars li:hover::before {
  transform: scaleX(1);
}
.pillar-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-red);
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}
.pillars h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.pillars p {
  color: var(--c-text-2);
  font-size: 15px;
}

@media (max-width: 960px) {
  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pillars li:nth-child(2) {
    border-right: 0;
  }
}
@media (max-width: 560px) {
  .pillars {
    grid-template-columns: 1fr;
  }
  .pillars li {
    border-right: 0;
  }
}

/* =========================================================
   Two-column content sections
   ========================================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.two-col-reverse .two-col-text {
  order: 2;
}
.two-col-reverse .two-col-figure {
  order: 1;
}
.two-col-text h2 {
  margin-top: 16px;
  margin-bottom: 22px;
}
.two-col-text p {
  color: var(--c-text-2);
  font-size: clamp(15px, 1.4vw, 17px);
  margin-bottom: 24px;
}
.section-alt .two-col-text p {
  color: var(--c-ink-2);
}
.two-col-figure {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.two-col-figure::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 56px;
  height: 4px;
  background: var(--c-red);
}
.two-col-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col-reverse .two-col-text {
    order: 1;
  }
  .two-col-reverse .two-col-figure {
    order: 2;
  }
}

/* Check lists */
.check-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--c-text-2);
}
.section-alt .check-list li {
  color: var(--c-ink-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 2px;
  background: var(--c-red);
}
.check-list-dark li {
  color: var(--c-text-2);
}

/* =========================================================
   Process / Methodik
   ========================================================= */
.process {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
}
.section-alt .process {
  border-color: var(--c-paper-2);
}
.process li {
  padding: 28px 24px 32px;
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  position: relative;
}
.section-alt .process li {
  border-color: var(--c-paper-2);
}
.process-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--c-red);
  display: block;
  margin-bottom: 16px;
}
.process h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.process p {
  font-size: 14px;
  color: var(--c-ink-2);
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .process {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Benefits
   ========================================================= */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
.benefits li {
  background: var(--c-bg);
  padding: 32px 28px 36px;
  transition: background 200ms var(--ease);
}
.benefits li:hover {
  background: var(--c-bg-2);
}
.benefits h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.benefits h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--c-red);
  display: inline-block;
}
.benefits p {
  color: var(--c-text-2);
  font-size: 15px;
}
@media (max-width: 900px) {
  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .benefits {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CTA
   ========================================================= */
.section-cta {
  background: linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 100%);
  border-top: 1px solid var(--c-line);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.cta-text h2 {
  margin: 14px 0 22px;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.cta-card {
  background: var(--c-bg-3);
  border: 1px solid var(--c-line);
  padding: 28px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--c-red);
}
.cta-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.cta-card p {
  color: var(--c-text-2);
  font-size: 14.5px;
  margin-bottom: 18px;
}
.cta-meta {
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-3);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--c-line);
  padding-top: 18px;
}
@media (max-width: 900px) {
  .cta-inner {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #24282d;
  border-top: 1px solid var(--c-line);
  padding-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p {
  color: var(--c-text-3);
  font-size: 14px;
  margin-top: 16px;
  max-width: 36ch;
}
.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 14px;
}
.footer-nav a {
  color: var(--c-text-2);
  font-size: 14.5px;
  display: inline-block;
  padding: 5px 0;
}
.footer-nav a:hover {
  color: var(--c-text);
}
.footer-contact p {
  color: var(--c-text-2);
  font-size: 14.5px;
  margin-bottom: 10px;
}
.footer-contact .company-details {
  color: var(--c-text-3);
  font-size: 13.5px;
}
.footer-contact a {
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line-2);
}
.footer-contact a:hover {
  border-color: var(--c-red);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--c-line);
  color: var(--c-text-3);
  font-size: 13px;
}
.footer-bottom a:hover {
  color: var(--c-text);
}
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .brand-mark {
    width: 152px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   Reveal-on-scroll (lightweight, JS-progressive)
   Only applied when JS adds the .js-reveal-ready flag.
   Without JS or before observer attaches, content is fully visible.
   ========================================================= */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
