/* ==========================================================================
   RCI GmbH – style.css
   Plain CSS, mobile first, keine externen Ressourcen
   ========================================================================== */

/* Schrift lokal (Inter Variable, SIL OFL 1.1 – siehe fonts/OFL-Inter.txt) */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Farben, Abstände, Maße */
:root {
  --c-anthracite: #1f2328;
  --c-anthracite-2: #2b3138;
  --c-white: #ffffff;
  --c-grey-100: #f3f4f6;
  --c-grey-300: #d5d9df;
  --c-line: #c5cad2; /* Trennlinien auf Weiß und Hellgrau */
  --c-text: #1f2328;
  --c-muted: #4b5563;
  --c-accent: #3455a8;
  --c-accent-dark: #28438a;
  --c-accent-light: #9fb6f2; /* Akzent für Text auf Anthrazit */
  --c-on-dark: #e8ebef;
  --c-on-dark-muted: #b9c0ca;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3rem, 8vw, 6rem);

  --maxw: 72rem;
  --radius: 0.375rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-2);
}

body {
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--c-accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--c-accent-dark);
}

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

.on-dark :focus-visible {
  outline-color: var(--c-accent-light);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Typografie */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.65rem, 1.1rem + 3.4vw, 3.5rem);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

@media (max-width: 30rem) {
  h1 {
    hyphens: auto;
  }
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.375rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  margin-bottom: var(--space-1);
}

p + p {
  margin-top: var(--space-2);
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  max-width: 46rem;
}

/* Layout */
.wrap {
  width: min(100% - 2 * var(--space-3), var(--maxw));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-5);
}

.section--grey {
  background: var(--c-grey-100);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--c-white);
  color: var(--c-anthracite);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-1);
}

/* Glasfasergewebe (Leinwandbindung): schachbrettartig wechseln Felder mit
   waagerechten (0°) und senkrechten (90°) Faserbündeln. Zum Text hin ausgeblendet. */
.weave {
  --weave-cell: 22px; /* Größe eines Faserfeldes */
  --weave-fiber: rgba(255, 255, 255, 0.07);
  --weave-fade: linear-gradient(90deg, transparent 15%, #000 80%);
  position: relative;
  isolation: isolate;
  background-color: var(--c-anthracite);
}

.weave::before,
.weave::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

@supports (mask-composite: intersect) or (-webkit-mask-composite: source-in) {
  .weave::before,
  .weave::after {
    -webkit-mask-image:
      conic-gradient(#000 25%, transparent 0 50%, #000 0 75%, transparent 0),
      var(--weave-fade);
    mask-image:
      conic-gradient(#000 25%, transparent 0 50%, #000 0 75%, transparent 0),
      var(--weave-fade);
    -webkit-mask-size: calc(var(--weave-cell) * 2) calc(var(--weave-cell) * 2), 100% 100%;
    mask-size: calc(var(--weave-cell) * 2) calc(var(--weave-cell) * 2), 100% 100%;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }

  /* waagerechte Fasern in den Feldern A */
  .weave::before {
    background: repeating-linear-gradient(0deg, var(--weave-fiber) 0 1px, transparent 1px 4px);
  }

  /* senkrechte Fasern in den Feldern B (Schachbrett um eine Zelle versetzt) */
  .weave::after {
    background: repeating-linear-gradient(90deg, var(--weave-fiber) 0 1px, transparent 1px 4px);
    -webkit-mask-position: var(--weave-cell) 0, 0 0;
    mask-position: var(--weave-cell) 0, 0 0;
  }
}

/* Footer: wenig Text, Muster über die volle Breite */
.site-footer.weave {
  --weave-fade: linear-gradient(#000, #000);
}

@media (prefers-contrast: more) {
  .weave::before,
  .weave::after {
    display: none;
  }
}

.on-dark {
  color: var(--c-on-dark);
}

.on-dark a {
  color: var(--c-accent-light);
}

.on-dark a:hover {
  color: var(--c-white);
}

/* Header / Hero */
.hero {
  padding-block: var(--space-4) var(--space-5);
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.hero__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: var(--c-white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
}

.on-dark a.hero__phone {
  color: var(--c-white);
}

.on-dark a.hero__phone:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--c-white);
}

.hero__phone-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

/* mobil nur Icon, Nummer bleibt für Screenreader lesbar */
.hero__phone-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.brand {
  display: inline-block;
  line-height: 0;
  color: var(--c-white);
  text-decoration: none;
}

.on-dark a.brand {
  color: var(--c-white);
}

.brand rect {
  fill: var(--c-accent-light); /* Logo-Quadrat: auf Anthrazit besser sichtbar */
}

.brand svg {
  display: block;
  width: auto;
  height: clamp(2.75rem, 2.2rem + 1.6vw, 3.5rem);
}

.hero__grid {
  display: grid;
  gap: var(--space-4);
}

/* nur ab Desktop-Breite sichtbar (dort wird das Bild auch erst geladen) */
.hero__media {
  display: none;
}

.hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--c-accent-light); /* angelehnt an das Logo-Quadrat */
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.35);
}

.kicker {
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent-light);
}

.hero h1 {
  max-width: 22ch;
  color: var(--c-white);
  margin-bottom: var(--space-3);
}

.hero .lead + .lead {
  margin-top: var(--space-2);
}

.hero .lead {
  color: var(--c-on-dark);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--c-accent);
  border-radius: var(--radius);
  background: var(--c-accent);
  color: var(--c-white);
  transition: background-color 0.15s, border-color 0.15s;
}

.on-dark a.btn,
a.btn {
  color: var(--c-white);
}

.btn:hover,
.on-dark a.btn:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
  color: var(--c-white);
}

.btn--ghost,
.on-dark a.btn--ghost {
  background: transparent;
  border-color: var(--c-on-dark-muted);
  color: var(--c-white);
}

.btn--ghost:hover,
.on-dark a.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--c-white);
}

/* Abschnittsnummer */
.section-no {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-1);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--c-accent);
}

.section-no::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: currentColor;
}

.on-dark .section-no {
  color: var(--c-accent-light);
}

/* Kennzahlen-Leiste */
.facts {
  border-bottom: 1px solid var(--c-line);
}

.facts__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-2);
  padding-block: var(--space-3);
}

.facts__list li {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--c-muted);
}

.facts strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 700;
  color: var(--c-text);
}

/* Kernkompetenz: Text links, Eigenschaften rechts */
.split {
  display: grid;
  gap: var(--space-4);
}

.features li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid var(--c-line);
}

.features li:last-child {
  border-bottom: 1px solid var(--c-line);
}

.features p {
  color: var(--c-muted);
}

.icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--c-accent);
}

/* Leistungen: Datenblatt-Liste */
.services {
  display: grid;
  gap: 0 var(--space-4);
  margin-top: var(--space-4);
}

.services li {
  padding-block: var(--space-3);
  border-top: 1px solid var(--c-line);
}

.services p {
  color: var(--c-muted);
}

/* Referenzbild */
.figure {
  margin-top: var(--space-4);
}

.figure img {
  width: 100%;
  border-radius: var(--radius);
}

.figure figcaption {
  margin-top: var(--space-1);
  font-size: 0.9375rem;
  color: var(--c-muted);
}

/* Ablauf: vertikale Linie mobil, horizontal ab Tablet */
.steps {
  counter-reset: step;
  position: relative;
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-4);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 4rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-white);
  font-weight: 700;
}

.steps li::after {
  content: "";
  position: absolute;
  left: calc(1.375rem - 1px);
  top: 2.75rem;
  bottom: calc(-1 * var(--space-4));
  width: 2px;
  background: var(--c-grey-300);
}

.steps li:last-child::after {
  display: none;
}

.steps p {
  color: var(--c-muted);
}

/* Werte (Qualität, Flexibilität, Termintreue) */
.values {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-grey-300);
}

.values h3 {
  color: var(--c-accent);
}

.values p {
  color: var(--c-muted);
}

/* Kontakt-Band */
.contact-band {
  background: var(--c-anthracite-2);
}

.contact-band .lead {
  max-width: 40rem;
}

.contact-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.contact-big {
  display: grid;
  gap: var(--space-3);
}

.contact-big__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-on-dark-muted);
}

.on-dark .contact-big a {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 600;
  color: var(--c-white);
  overflow-wrap: anywhere;
  text-decoration-color: var(--c-accent-light);
}

.on-dark .contact-big a:hover {
  color: var(--c-accent-light);
}

.contact-band address {
  font-style: normal;
  color: var(--c-on-dark);
}

.contact-band .actions {
  margin-top: var(--space-4);
}

/* Footer */
.site-footer {
  padding-block: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  align-items: center;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.site-footer a {
  display: inline-block;
  padding-block: 0.4rem;
}

.site-footer p {
  color: var(--c-on-dark-muted);
}

/* Rechtstexte */
.legal {
  padding-block: var(--space-4) var(--space-5);
}

.legal .wrap {
  max-width: 50rem;
}

.legal h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  margin-bottom: var(--space-4);
}

.legal h2 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
  margin-top: var(--space-4);
}

.legal h3 {
  margin-top: var(--space-3);
}

.legal ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-top: var(--space-2);
}

.legal li + li {
  margin-top: 0.5rem;
}

.legal .caps {
  font-size: 0.9375rem;
}

.hero--slim {
  padding-block: var(--space-3);
}

.hero--slim .brand {
  margin-bottom: 0;
}

/* Tablet */
@media (min-width: 48rem) {
  .values {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }

  .steps li {
    padding-left: 0;
    padding-top: 4rem;
  }

  .steps li::after {
    left: 2.75rem;
    right: calc(-1 * var(--space-3));
    top: calc(1.375rem - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .facts__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .facts__list li {
    padding-inline: var(--space-3);
  }

  .facts__list li:first-child {
    padding-left: 0;
  }

  .facts__list li + li {
    border-left: 1px solid var(--c-line);
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__phone-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Desktop */
@media (min-width: 64rem) {
  .hero {
    padding-block: var(--space-4) calc(var(--space-5) * 1.2);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: center;
  }

  .hero__media {
    display: block;
    width: 100%;
    justify-self: end;
    max-width: 27.5rem;
  }

  .split {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-5);
    align-items: start;
  }

  .services {
    grid-template-columns: repeat(4, 1fr);
  }
}
