/* ---------- Tokens ---------- */
:root {
  --bg: #16181b;        /* Hallenboden */
  --bg-2: #1f2226;      /* Wand */
  --bg-3: #2a2e33;      /* Kanten, Hover */
  --ink: #e9e7e2;       /* Text, warmes Weiß */
  --muted: #9a9ea6;
  --red: #bc1514;       /* Division-13-Rot */
  --red-hot: #f94550;   /* Rot des Wandlogos, aus dem Video gemessen */
  --line: rgba(233, 231, 226, 0.14);

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, canvas { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); font-weight: 700; }
h2 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.9rem + env(safe-area-inset-top, 0px)) var(--gutter) 0.9rem;
  background: linear-gradient(to bottom, rgba(22, 24, 27, 0.92), rgba(22, 24, 27, 0));
  transition: background 0.3s ease;
}
.top.is-solid {
  background: rgba(22, 24, 27, 0.94);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand-sub { font-size: 0.8rem; color: var(--muted); }

.nav { display: flex; gap: 1.75rem; align-items: center; }
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  opacity: 0.85;
}
.nav a:hover { opacity: 1; }
.nav-cta {
  padding: 0.55rem 1rem;
  border: 1px solid var(--red);
  border-radius: 2px;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--red); }

@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
  .brand-sub { display: none; }
}

/* ---------- Scroll-Sequenz ---------- */
.seq {
  position: relative;
  height: 1050vh;            /* Scrollstrecke – mehr = langsamer */
  background: var(--bg);
}
.seq-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.seq-poster,
.seq-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.seq-canvas { opacity: 0; transition: opacity 0.4s ease; }
.seq.is-ready .seq-canvas { opacity: 1; }
.seq.is-ready .seq-poster { opacity: 0; }

.seq-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(22, 24, 27, 0.85) 0%, rgba(22, 24, 27, 0.35) 30%, rgba(22, 24, 27, 0) 55%),
    linear-gradient(to right, rgba(22, 24, 27, 0.55) 0%, rgba(22, 24, 27, 0) 45%);
}

/* Lader */
.seq-loader {
  position: absolute;
  left: var(--gutter);
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  transition: opacity 0.4s ease;
}
.seq.is-ready .seq-loader { opacity: 0; pointer-events: none; }
.seq-loader-bar {
  width: 9rem;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.seq-loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red-hot);
  transition: width 0.15s linear;
}

/* Bildunterschriften */
.cap {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  max-width: 34rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}
.cap.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cap p { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--ink); }
.cap p + p { margin-top: 0.5rem; color: var(--muted); }
.cap-lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.2rem) !important;
  line-height: 1;
  color: var(--ink) !important;
}

.cap-title { max-width: 44rem; }
.cap-title h1 { margin-bottom: 0.6rem; }
.cap-title p { color: var(--ink); font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.cap-cred {
  margin-top: 0.9rem !important;
  font-size: 0.9rem !important;
  color: var(--muted) !important;
  border-left: 2px solid var(--red);
  padding-left: 0.7rem;
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.scroll-hint::before {
  content: "";
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(to bottom, var(--red-hot), transparent);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Gutachten-Arten: eine nach der anderen, rot, rechts */
.cap-item {
  left: 30%;
  right: var(--gutter);
  bottom: auto;
  top: 50%;
  max-width: none;
  text-align: right;
  hyphens: auto;
  -webkit-hyphens: auto;
  transform: translateY(calc(-50% + 18px));
}
.cap-item.is-on { transform: translateY(-50%); }
.cap-item p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
  line-height: 0.98;
  color: var(--red-hot) !important;
  text-shadow: 0 0 26px rgba(249, 69, 80, 0.4), 0 2px 12px rgba(0, 0, 0, 0.6);
}
.cap-hint { bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.cap-hint .scroll-hint { margin-top: 0; }
.cap-final { max-width: 40rem; }

@media (max-aspect-ratio: 9/10) {
  .seq-poster {
    object-fit: contain;
    object-position: center 28%;
    background: var(--bg);
  }
  .seq-scrim {
    background: linear-gradient(to top, rgba(22, 24, 27, 0.7) 0%, rgba(22, 24, 27, 0) 30%);
  }
}

@media (max-width: 720px) {
  .cap { bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
  .cap-title h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .cap-item {
    top: auto;
    bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    left: var(--gutter);
    right: var(--gutter);
    text-align: left;
    max-width: none;
    transform: translateY(18px);
  }
  .cap-item.is-on { transform: none; }
}

/* Reduzierte Bewegung: keine Sequenz, Poster + Texte statisch */
@media (prefers-reduced-motion: reduce) {
  .seq { height: auto; }
  .seq-stage { position: relative; height: auto; min-height: 100svh; }
  .seq-poster { position: relative; height: auto; }
  .seq-canvas, .seq-loader, .scroll-hint, .seq-scrim { display: none; }
  .cap { position: static; opacity: 1; transform: none; margin: 1.5rem var(--gutter) 0; max-width: 44rem; }
  .cap-item { text-align: left; }
  .cap-item.is-on, .cap-item { transform: none; }
  .cap-hint { display: none; }
  .seq-stage { padding-bottom: 3rem; background: var(--bg); }
}

/* ---------- Inhaltsblöcke ---------- */
.block {
  padding-block: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}
.block-alt { background: var(--bg-2); }

.block-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.block-head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.wrap-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 800px) {
  .wrap-split { grid-template-columns: 1fr; }
}

.prose p + p { margin-top: 1rem; }
.prose { font-size: 1.15rem; max-width: 38rem; }

/* Leistungen als Liste mit Trennlinien, keine Karten */
.services {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 5rem);
}
.service {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}
.service dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1;
  margin-bottom: 0.65rem;
}
.service dt::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.6rem;
  vertical-align: 0.15em;
  background: var(--red);
}
.service dd { margin: 0; color: var(--muted); max-width: 30rem; }
@media (max-width: 720px) {
  .services { grid-template-columns: 1fr; }
}

/* Ablauf – echte Reihenfolge, daher nummeriert */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--red);
  padding-top: 1.25rem;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--red-hot);
  margin-bottom: 0.75rem;
}
.steps h3 { margin-bottom: 0.6rem; }
.steps p { color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Kontakt */
.block-contact { background: var(--bg-2); }
.block-contact .contact-card { margin-top: 2.5rem; }

/* Anfrageformular */
.form { display: grid; gap: 1.75rem; }
.form[hidden] { display: none; }
.f-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.f-wide { grid-column: 1 / -1; }
.f-field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.f-field input,
.f-field select,
.f-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
}
.f-field input:focus,
.f-field select:focus,
.f-field textarea:focus {
  outline: none;
  border-color: var(--red-hot);
}
.f-field input[type="file"] { padding: 0.55rem; }
.f-field input::file-selector-button {
  font: inherit;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.45rem 0.9rem;
  margin-right: 0.9rem;
  cursor: pointer;
}
.f-hint { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.f-choice {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.f-choice legend {
  width: 100%;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.f-choice label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 1rem;
  cursor: pointer;
}
.f-choice label:has(input:checked) { border-color: var(--red-hot); }
.f-choice input { accent-color: var(--red); }
.f-error { color: var(--red-hot); font-size: 0.95rem; }
.f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.f-danke { border-top: 2px solid var(--red); padding-top: 1.5rem; align-self: start; }
.f-danke h3 { margin-bottom: 0.6rem; }
.f-danke p { color: var(--muted); max-width: 28rem; }
.f-danke a { color: var(--ink); }
.form .button { margin-top: 0; justify-self: start; border: 0; cursor: pointer; font: inherit; }
@media (max-width: 560px) { .f-grid { grid-template-columns: 1fr; } }
.contact-note { margin-top: 1rem; color: var(--muted); font-size: 1.15rem; max-width: 26rem; }
.contact-card {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.contact-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.contact-line span { color: var(--muted); }
.contact-line strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-align: right;
}
a.contact-line:hover strong { color: var(--red-hot); }

.button {
  display: inline-block;
  justify-self: start;
  margin-top: 1.75rem;
  padding: 1rem 1.6rem;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 2px;
}
.button:hover { background: var(--red-hot); }

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.9rem;
  color: var(--muted);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.foot nav { display: flex; gap: 1.5rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
