/*
 * HDS Brandschutz- & Sicherheitstechnik — "modern redesign" stylesheet
 *
 * Design direction: dark slate bands with big display typography, the
 * brand red used as bold surfaces (hero, buttons, contact band, card
 * numbering) instead of only link color. No build step: linked directly
 * via <link>, editable with any text editor.
 */

:root {
  /* Color system — same fire-red brand family, bolder use */
  --ink: #14161b;          /* dark slate: header, hero, footer */
  --ink-2: #1e2129;
  --paper: #ffffff;
  --paper-2: #f4f5f7;
  --line: #e4e6ea;
  --txt: #23252c;
  --muted: #5d6069;
  --fire: #e63226;         /* primary accent */
  --fire-deep: #b8241a;
  --fire-soft: #fdeceb;    /* tint for hover surfaces on light bg */
  --fire-bright: #ff6a5b;  /* accent with AA contrast on dark bg */

  /* Type scale */
  --fs-hero: clamp(2.1rem, 5.5vw, 3.6rem);
  --fs-h1: clamp(1.8rem, 4vw, 2.6rem);
  --fs-h2: clamp(1.35rem, 2.4vw, 1.65rem);
  --fs-h3: 1.15rem;
  --fs-body: 1.0625rem;
  --fs-sm: 0.875rem;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.5rem;
  --sp-6: 4rem;
  --sp-7: 6rem;

  --wrap: 1140px;
  --radius: 14px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--txt);
  background: var(--paper);
}

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

a {
  color: var(--fire-deep);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--fire);
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--fire);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  margin: 2em 0 0.6em;
}

h3 {
  font-size: var(--fs-h3);
  margin: 1.6em 0 0.4em;
}

/* Small uppercase label above headings — main hierarchy device */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fire-deep);
  margin: 0 0 var(--sp-2);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fire-deep);
  color: #ffffff;
  padding: 0.5em 1em;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
  color: #ffffff;
}

/* ---------- Header (dark bar) ---------- */

.site-top {
  background: var(--ink);
  border-bottom: 4px solid var(--fire);
}

.top-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* The logo is the way back to the Startseite (there is no nav item for
   it), so it gets the same hover/focus treatment as the nav links */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0.35em 0.6em;
  margin-left: -0.6em;
  border-radius: 6px;
}

.brand:hover,
.brand:focus {
  background: var(--ink-2);
}

/* The stock logo is near-black; render it white on the dark bar */
.brand img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ---------- Navigation ---------- */

.menu-btn {
  display: none;
  margin-left: auto;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--fs-sm);
  color: #ffffff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  padding: 0.45em 1em;
  cursor: pointer;
}

.menu-btn:hover {
  border-color: var(--fire-bright);
  color: var(--fire-bright);
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--sp-2);
}

.main-nav a {
  display: block;
  padding: 0.5em 0.85em;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus {
  color: #ffffff;
  background: var(--ink-2);
}

.main-nav a[aria-current="page"] {
  color: var(--fire-bright);
}

/* Product sublinks live only in the mobile overlay */
.main-nav .subnav-mobile {
  display: none;
}

/* Mobile: the nav becomes a full-screen overlay, collapsed by default */
@media (max-width: 899px) {
  .menu-btn {
    display: block;
  }

  .main-nav {
    display: none;
  }

  body.menu-open .main-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--ink);
    overflow-y: auto;
    padding: var(--sp-7) var(--sp-4) var(--sp-5);
  }

  /* Keep the close control reachable while the overlay covers the page */
  body.menu-open .menu-btn {
    position: fixed;
    top: var(--sp-3);
    right: var(--sp-4);
    z-index: 60;
  }

  body.menu-open {
    overflow: hidden;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    max-width: 28rem;
    margin: 0 auto;
  }

  .main-nav a {
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0.55em 0;
    border-bottom: 1px solid var(--ink-2);
    border-radius: 0;
  }

  .main-nav a:hover,
  .main-nav a:focus {
    background: none;
    color: var(--fire-bright);
  }

  .main-nav .subnav-mobile {
    display: block;
  }

  .main-nav .subnav-mobile a {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.45em 0 0.45em 1.25em;
    border-bottom: none;
  }

  .main-nav .subnav-mobile li:last-child a {
    border-bottom: 1px solid var(--ink-2);
    padding-bottom: var(--sp-3);
  }

  .main-nav .subnav-mobile a:hover,
  .main-nav .subnav-mobile a:focus,
  .main-nav .subnav-mobile a[aria-current="page"] {
    color: var(--fire-bright);
  }
}

/* ---------- Page hero bands ---------- */

.page-hero {
  background: linear-gradient(120deg, var(--ink) 55%, var(--ink-2) 55.4%);
  color: #ffffff;
  padding: var(--sp-6) 0;
}

.page-hero .eyebrow {
  color: var(--fire-bright);
}

.page-hero h1 {
  font-size: var(--fs-h1);
  margin: 0;
  max-width: 22ch;
}

/* Homepage hero: bigger, two columns, CTA buttons */

.hero-home {
  background: linear-gradient(120deg, var(--ink) 55%, var(--ink-2) 55.4%);
  color: #ffffff;
  padding: var(--sp-7) 0;
}

.hero-home .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: var(--sp-6);
  align-items: center;
}

.hero-home .eyebrow {
  color: var(--fire-bright);
}

.hero-home h1 {
  font-size: var(--fs-hero);
  margin: 0 0 var(--sp-4);
}

.hero-home .lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 var(--sp-4);
  max-width: 46ch;
}

.hero-home .lead a {
  color: #ffffff;
}

.hero-figure {
  margin: 0;
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.hero-figure img {
  display: inline-block;
}

@media (max-width: 720px) {
  .hero-home .wrap {
    grid-template-columns: 1fr;
  }

  .hero-figure {
    max-width: 20rem;
  }
}

/* ---------- Buttons ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.btn {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: 6px;
  padding: 0.9em 1.6em;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.btn-fire {
  background: var(--fire);
  color: #ffffff;
}

.btn-fire:hover {
  background: var(--fire-deep);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  color: #ffffff;
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ---------- Main content ---------- */

main {
  padding: var(--sp-6) 0 var(--sp-7);
}

main .wrap > p,
main .wrap > ul {
  max-width: 70ch;
}

main li + li {
  margin-top: var(--sp-1);
}

/* Product sub-navigation: horizontal pill bar (replaces the dropdown) */

.subnav {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.subnav ul {
  list-style: none;
  margin: 0 auto;
  max-width: var(--wrap);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
}

.subnav a {
  display: block;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--txt);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45em 1.1em;
}

.subnav a:hover,
.subnav a:focus {
  color: var(--fire-deep);
  border-color: var(--fire);
}

.subnav a[aria-current="page"] {
  background: var(--fire);
  border-color: var(--fire);
  color: #ffffff;
}

/* Numbered feature/product cards — editorial "01 02 03" treatment */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--sp-3);
  padding: 0;
  margin: var(--sp-5) 0 0;
  list-style: none;
  counter-reset: card;
  max-width: none;
}

.card-grid li {
  counter-increment: card;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  padding-top: var(--sp-5);
}

.card-grid li::before {
  content: counter(card, decimal-leading-zero);
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-4);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--fire);
}

.card-grid li + li {
  margin-top: 0;
}

.card-grid a {
  font-weight: 700;
  text-decoration: none;
  color: var(--txt);
}

/* Stretch the link over the whole card */
.card-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card-grid li:has(a) {
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card-grid li:has(a:hover),
.card-grid li:has(a:focus) {
  transform: translateY(-3px);
  border-color: var(--fire);
  box-shadow: 0 10px 24px rgba(20, 22, 27, 0.12);
}

.card-grid li:has(a:hover) a,
.card-grid li:has(a:focus) a {
  color: var(--fire-deep);
}

/* Unlinked entries read as plain cards */
.card-grid li:not(:has(a)) {
  color: var(--muted);
  font-weight: 600;
}

/* Homepage section cards get an arrow instead of underlines */
.card-grid .card-go {
  display: block;
  margin-top: var(--sp-2);
  color: var(--fire);
  font-weight: 800;
}

/* ---------- Galleries ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-5) 0 0;
  padding: 0;
}

.gallery figure {
  margin: 0;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 22, 27, 0.12);
}

.gallery img {
  border-radius: 6px;
}

.gallery figcaption {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--sp-2);
}

/* Image floated beside text on product pages */
.img-right {
  float: right;
  margin: 0 0 var(--sp-3) var(--sp-4);
  max-width: 240px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-2);
}

@media (max-width: 560px) {
  .img-right {
    float: none;
    display: block;
    margin: var(--sp-3) auto;
  }
}

/* Long technical lists flow into two columns on wide screens */
@media (min-width: 760px) {
  .spec-list {
    columns: 2;
    column-gap: var(--sp-5);
    max-width: none !important;
  }

  .spec-list li {
    break-inside: avoid;
  }

  .spec-list li + li {
    margin-top: var(--sp-1);
  }
}

/* ---------- Kontakt ---------- */

.contact-hero {
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 800;
  line-height: 1.5;
  max-width: none !important;
}

.contact-hero a {
  color: var(--fire-deep);
  text-decoration-thickness: 3px;
}

.contact-card {
  background: var(--paper-2);
  border-left: 5px solid var(--fire);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-5);
  max-width: 34rem;
}

.contact-card h2 {
  margin-top: 0;
}

/* ---------- Contact band + footer ---------- */

.contact-band {
  background: var(--fire);
  color: #ffffff;
  padding: var(--sp-5) 0;
}

.contact-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
}

.contact-band p {
  margin: 0;
  font-weight: 700;
  font-size: 1.15rem;
}

.contact-band a {
  color: #ffffff;
}

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--sp-6) 0 var(--sp-4);
}

.site-footer a {
  color: #ffffff;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-7);
}

.site-footer h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 var(--sp-2);
}

.site-footer p {
  margin: var(--sp-1) 0;
}

.footer-legal {
  max-width: var(--wrap);
  margin: var(--sp-5) auto 0;
  padding: var(--sp-3) var(--sp-4) 0;
  border-top: 1px solid var(--ink-2);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Cross-document view transitions ---------- */

/* Smooth crossfade between full page loads (View Transitions API).
   Both the outgoing and incoming document must opt in — every page
   links this stylesheet, so that holds site-wide. Browsers without
   support ignore the unknown at-rule and load pages normally. */
@view-transition {
  navigation: auto;
}

/* ---------- Motion preferences ---------- */

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

  @view-transition {
    navigation: none;
  }
}
