/* ==========================================================================
   TrainTec – Stylesheet
   Technischer, dunkler Grundstil: Schwarz / Anthrazit / Weiß, Grün als Akzent
   ========================================================================== */

/* Schriften lokal eingebunden (Variable Fonts, SIL OFL, siehe fonts/LIZENZ.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  --black: #08090b;
  --anthracite: #14171d;
  --anthracite-2: #1b1f26;
  --rule-dark: rgba(255, 255, 255, 0.12);
  --rule-dark-soft: rgba(255, 255, 255, 0.07);

  --white: #ffffff;
  --off-white: #f4f5f6;
  --ink: #12151a;

  --muted-light: #5b6270;
  --muted-dark: rgba(255, 255, 255, 0.62);
  --rule-light: rgba(8, 9, 11, 0.12);

  --green: #02a81f;
  --green-bright: #02d823;
  --green-soft: rgba(2, 216, 35, 0.1);

  --shadow-sm: 0 2px 10px rgba(8, 9, 11, 0.06);
  --shadow-md: 0 18px 40px rgba(8, 9, 11, 0.14);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 0 1px rgba(2, 216, 35, 0.22), 0 12px 26px rgba(2, 168, 31, 0.1);

  --radius-sm: 6px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, "SF Mono", Consolas, monospace;

  --max-width: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.55em;
}
h1 { font-size: clamp(2.6rem, 2rem + 2.6vw, 4.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 1.55rem + 1.3vw, 2.7rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--muted-light); }
a { color: var(--green); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

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

/* ---------- Technical grid / blueprint texture ---------- */
.tech-grid { position: relative; isolation: isolate; }
.tech-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 40%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}
.tech-grid > .container { position: relative; z-index: 1; }

/* corner bracket accents — technical-drawing motif */
.corner-frame { position: relative; }
.corner-frame::before,
.corner-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.corner-frame::before {
  top: -1px; left: -1px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}
.corner-frame::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--green-bright);
  border-right: 1px solid var(--green-bright);
}

/* small monospace technical tag, e.g. coordinates / reference codes */
.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.tech-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--green-bright);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn::after { content: "\2192"; display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover::after { transform: translateX(4px); }

.btn-primary { background: var(--green); color: #ffffff; }
.btn-primary:hover { background: #039122; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(2, 168, 31, 0.28); text-decoration: none; }

.btn-outline { background: transparent; border-color: rgba(255, 255, 255, 0.3); color: #ffffff; }
.btn-outline:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.55); text-decoration: none; }

.btn-outline-dark { background: transparent; border-color: rgba(8, 9, 11, 0.25); color: var(--ink); }
.btn-outline-dark:hover { transform: translateY(-2px); background: rgba(8, 9, 11, 0.05); border-color: rgba(8, 9, 11, 0.45); text-decoration: none; }

/* ---------- Header ---------- */
/* Anchor targets (service sections linked from the homepage overview and
   the in-page quick nav) must clear the sticky header on jump/scroll. */
section[id] { scroll-margin-top: 130px; }
@media (max-width: 860px) {
  section[id] { scroll-margin-top: 100px; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.35s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background 0.35s var(--ease);
}
.site-header.is-scrolled::before { background: rgba(6, 7, 8, 0.96); }
.site-header.is-scrolled { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }

.site-header .container { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 100px; }

/* ---------- Brand lockup (icon + wordmark) ----------
   Static layout: icon left, wordmark centered. */
.brand-lockup {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.brand-icon,
.brand-word {
  position: absolute;
  top: 50%;
  display: block;
  pointer-events: auto;
}
.brand-icon {
  left: 0;
  transform: translateY(-50%);
}
.brand-icon img {
  height: 68px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.05)) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
  transition: opacity 0.25s var(--ease);
}
.brand-icon:hover img { opacity: 0.85; }

.brand-word {
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  clip-path: inset(0 0 0 0);
}
.brand-word img {
  height: 36px;
  width: auto;
  display: block;
  transition: opacity 0.25s var(--ease);
}
.brand-word:hover img { opacity: 0.85; }

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 4px;
  height: 2px;
  background: var(--green-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: #ffffff; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  padding: 0; z-index: 310; position: relative;
}
.nav-toggle .bar { display: block; height: 2px; width: 24px; background: #ffffff; border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
.nav-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s; z-index: 140;
}
.nav-backdrop.open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }

/* ---------- Media frame: real-image ready with graceful placeholder ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(150deg, var(--anthracite), var(--black));
  background-size: 40px 40px, 40px 40px, 100% 100%;
}
.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}
.media-frame.is-loaded img { opacity: 1; }
.media-frame.parallax img { transition: opacity 1s var(--ease); }

.media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0s;
}
.media-frame.is-loaded .media-fallback { opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s; }
.media-fallback svg { width: 46px; height: 46px; opacity: 0.35; }
.media-fallback span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--black); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media .media-fallback { background: none; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(6, 7, 8, 0.96) 0%, rgba(6, 7, 8, 0.72) 32%, rgba(8, 9, 11, 0.45) 62%, rgba(8, 9, 11, 0.72) 100%),
    linear-gradient(90deg, rgba(6, 7, 8, 0.55) 0%, transparent 45%);
  z-index: 1;
}
.hero-media img { animation: hero-zoom 18s var(--ease) forwards; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; transform: none; }
}

.hero .container { position: relative; z-index: 2; padding: 150px 28px 150px; }

.hero-eyebrow {
  color: var(--green-bright);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--green-bright); display: inline-block; }

.hero h1 { color: #ffffff; max-width: 820px; margin-bottom: 22px; }
.hero p.lead { max-width: 560px; font-size: 1.18rem; color: rgba(255, 255, 255, 0.78); margin-bottom: 40px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }

.hero-line {
  height: 1px;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(90deg, var(--green-bright), transparent);
  transform-origin: left;
  animation: draw-line 1.3s var(--ease) 0.7s both;
}
@keyframes draw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-line { animation: none; transform: scaleX(1); }
}

.hero-tag {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 2;
}
.hero-tag-right {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  text-align: right;
}

/* ---------- Page header (inner pages, image-backed variant) ---------- */
.page-header { position: relative; overflow: hidden; color: #fff; background: var(--black); }
.page-header-media { position: absolute; inset: 0; z-index: 0; }
.page-header-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 7, 8, 0.95) 0%, rgba(6, 7, 8, 0.66) 45%, rgba(8, 9, 11, 0.4) 100%);
  z-index: 1;
}
.page-header .container { position: relative; z-index: 2; padding: 96px 28px 88px; }
.page-header .eyebrow {
  color: var(--green-bright);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.page-header .eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--green-bright); display: inline-block; }
.page-header h1 { color: #fff; margin-bottom: 16px; max-width: 780px; }
.page-header p { color: rgba(255, 255, 255, 0.72); max-width: 620px; margin: 0; font-size: 1.08rem; }

/* ---------- Sections ---------- */
section { padding: 116px 0; }
.section-tight { padding: 88px 0; }
.section-alt { background: var(--off-white); }
.section-dark { background: var(--anthracite); color: rgba(255, 255, 255, 0.85); }
.section-dark h2, .section-dark h3,
.section-black h2, .section-black h3 { color: #fff; }
.section-dark p, .section-black p { color: var(--muted-dark); }
.section-black { background: var(--black); color: #fff; }

.section-heading { max-width: 680px; margin: 0 0 56px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading .eyebrow {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-heading.center .eyebrow { justify-content: center; }
.section-heading .eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--green); display: inline-block; }
.section-dark .section-heading .eyebrow,
.section-black .section-heading .eyebrow { color: var(--green-bright); }
.section-dark .section-heading .eyebrow::before,
.section-black .section-heading .eyebrow::before { background: var(--green-bright); }
.section-heading p { margin: 0; font-size: 1.05rem; }

/* ---------- Spec row list (replaces generic card grids) ---------- */
.spec-list { border-top: 1px solid var(--rule-light); }
.section-dark .spec-list, .section-black .spec-list { border-top-color: var(--rule-dark); }

.spec-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: baseline;
  gap: 28px;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule-light);
  transition: padding-left 0.4s var(--ease);
}
.section-dark .spec-row, .section-black .spec-row { border-bottom-color: var(--rule-dark); }
.spec-row:hover { padding-left: 10px; }
.spec-row .spec-number {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--green);
  letter-spacing: 0.04em;
}
.section-dark .spec-row .spec-number, .section-black .spec-row .spec-number { color: var(--green-bright); }
.spec-row h3 { margin: 0 0 8px; font-size: 1.2rem; }
.spec-row p { margin: 0; max-width: 640px; }

a.spec-row { color: inherit; text-decoration: none; }
.spec-row-arrow {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--green);
  transition: transform 0.35s var(--ease);
}
.section-dark .spec-row-arrow, .section-black .spec-row-arrow { color: var(--green-bright); }
a.spec-row:hover .spec-row-arrow { transform: translateX(5px); }

/* ---------- Text + media (offset, alternating) ---------- */
.text-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.text-media-text { display: flex; flex-direction: column; justify-content: center; padding: 80px 64px; }
.text-media-media { position: relative; min-height: 480px; }
.text-media--reverse .text-media-text { order: 2; }
.text-media--reverse .text-media-media { order: 1; }
.text-media-text .eyebrow {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.text-media-text .eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--green); display: inline-block; }
.section-dark .text-media-text .eyebrow, .section-black .text-media-text .eyebrow { color: var(--green-bright); }
.section-dark .text-media-text .eyebrow::before, .section-black .text-media-text .eyebrow::before { background: var(--green-bright); }
.text-media-text p:last-of-type { margin-bottom: 28px; }

/* ---------- Advantages list ---------- */
.advantage-list { list-style: none; margin: 0; padding: 0; }
.advantage-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-light);
}
.section-dark .advantage-list li, .section-black .advantage-list li { border-bottom-color: var(--rule-dark); }
.advantage-list li:first-child { padding-top: 0; }
.advantage-list .mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--green);
  transform: rotate(45deg);
  margin-top: 4px;
}
.section-dark .advantage-list .mark, .section-black .advantage-list .mark { border-color: var(--green-bright); }
.advantage-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.section-dark .advantage-list strong, .section-black .advantage-list strong { color: #fff; }
.advantage-list span { color: var(--muted-light); font-size: 0.96rem; }
.section-dark .advantage-list span, .section-black .advantage-list span { color: var(--muted-dark); }

/* ---------- CTA close section (restrained, not a bright green banner) ---------- */
.cta-close { background: var(--black); color: #fff; position: relative; overflow: hidden; }
.cta-close::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--green-bright), transparent); }
.cta-close .container { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.cta-close h2 { color: #fff; margin-bottom: 14px; }
.cta-close p { color: var(--muted-dark); margin-bottom: 0; max-width: 480px; }
.cta-close-actions { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.cta-close-direct { font-family: var(--font-mono); font-size: 0.92rem; color: var(--muted-dark); }
.cta-close-direct a { color: #fff; }
.cta-close-direct a:hover { color: var(--green-bright); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 0; }
.contact-panel {
  background: var(--anthracite);
  padding: 56px 52px;
  color: #fff;
  position: relative;
}
.contact-panel h3 {
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-body);
  margin: 32px 0 8px;
}
.contact-panel h3:first-child { margin-top: 0; }
.contact-panel p { color: #fff; font-size: 1.05rem; font-weight: 500; margin-bottom: 2px; }
.contact-panel a { color: #fff; }
.contact-panel a:hover { color: var(--green-bright); }

.contact-form-wrap { background: var(--off-white); padding: 56px 52px; }
form.contact-form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 7px; color: var(--ink); }
input, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--rule-light);
  border-radius: var(--radius-sm); background: #fff; font-family: var(--font-body);
  font-size: 0.95rem; color: var(--ink); transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
textarea { resize: vertical; min-height: 140px; }
.form-note { font-size: 0.82rem; color: var(--muted-light); margin: 0; }
.form-note a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#formular { scroll-margin-top: 120px; }
.form-status {
  margin: 0 0 24px;
  padding: 14px 18px;
  background: #fff;
  border-left: 3px solid var(--green);
  font-weight: 500;
  color: var(--ink);
}
.form-status.is-error { border-left-color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: rgba(255, 255, 255, 0.66); padding: 76px 0 0; position: relative; border-top: 1px solid rgba(2, 216, 35, 0.22); }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--green-bright), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; padding-bottom: 52px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand-icon { height: 34px; width: auto; display: block; }
.footer-brand-word { height: 19px; width: auto; display: block; }
.site-footer p { color: rgba(255, 255, 255, 0.66); }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 12px; }
.site-footer a { color: rgba(255, 255, 255, 0.66); transition: color 0.25s var(--ease), padding-left 0.25s var(--ease); }
.site-footer a:hover { color: var(--green-bright); padding-left: 3px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 24px 88px 24px 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.4); }
@media (max-width: 640px) { .footer-bottom { padding-right: 0; } }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(8, 9, 11, 0.88); backdrop-filter: blur(10px); border: 1px solid rgba(2, 216, 35, 0.4);
  color: var(--green-bright); display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 1.1rem; z-index: 250; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s, box-shadow 0.3s var(--ease);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.back-to-top:hover { box-shadow: var(--shadow-glow); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--stagger-delay, 0s); }
.reveal-stagger.in-view > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Legal pages (Impressum, Datenschutz) ---------- */
.page-header--plain .container { padding-top: 56px; padding-bottom: 48px; }
.legal { max-width: 780px; }
.legal h2 { font-size: 1.35rem; margin: 48px 0 14px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 1.2em; color: var(--muted-light); }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--ink); }
.footer-bottom a:hover { padding-left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .text-media { grid-template-columns: 1fr; }
  .text-media-media { min-height: 340px; order: -1 !important; }
  .text-media-text { padding: 56px 28px; order: 0 !important; }
  .cta-close .container { grid-template-columns: 1fr; text-align: left; }
}

@media (max-width: 860px) {
  section { padding: 80px 0; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero .container { padding: 108px 24px 108px; }
  .page-header .container { padding: 72px 24px 64px; }
  .text-media-text { padding: 48px 28px; }
  .contact-panel, .contact-form-wrap { padding: 40px 28px; }

  .site-header .container { height: 84px; }
  .brand-icon img { height: 52px; }
  .brand-word img { height: 27px; }

  .main-nav {
    position: fixed; inset: 0; background: rgba(6, 7, 8, 0.98);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
    z-index: 150;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
  .main-nav ul { flex-direction: column; gap: 6px; text-align: center; }
  .main-nav a { font-size: 1.5rem; padding: 14px 22px; }
  .main-nav a::after { left: 22px; right: 22px; }
  .nav-toggle { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .back-to-top { right: 16px; bottom: 16px; }

  .spec-row { grid-template-columns: 50px 1fr; }
}

@media (max-width: 560px) {
  .cta-close-actions { align-items: stretch; }
  .cta-close .btn { justify-content: center; }
}
