/* ===================================================================
   HYTORC Technologies Self-Service — Stylesheet
   Abgleich mit hytorctech.com Live-CI (siehe selfservice-design-brief.md).
   Tokens: #DC3F2C Primary, #EFEFEF Page-BG, #FFFFFF Panel, #d9d9d9 Footer.
   =================================================================== */

:root {
  --hytorc-red:       #DC3F2C;
  --hytorc-red-dark:  #C81517;
  --error:            #dd5044;
  --success:          #22a565;

  --page-bg:          #EFEFEF;
  --panel-bg:         #FFFFFF;
  --footer-bg:        #d9d9d9;

  --text:             #666666;
  --heading:          #222222;
  --muted:            #999999;
  --border:           #bababa;

  --radius-std:       3px;
  --radius-pill:      999em;

  --shadow-card:      0 0 10px rgba(0, 0, 0, 0.1);
  --shadow-elevated:  0 5px 10px rgba(0, 0, 0, 0.1);

  --content-max:      1200px;
  --gutter:           25px;
  --form-col:         640px;
  --bp-desktop:       769px;
}

/* ====== Reset / Base ====== */

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

html {
  /* Reserviert den vertikalen Scrollbar-Platz dauerhaft — so springt das
     Layout nicht zwischen Seiten mit und ohne Scrollbar hin und her, und
     der mittig zentrierte Inhalt (Stepper, Panel) wirkt immer symmetrisch. */
  scrollbar-gutter: stable;
}

html, body {
  margin: 0; padding: 0;
  background: var(--page-bg);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  min-height: 100vh;
}

body { display: flex; flex-direction: column; }

main {
  flex: 1 0 auto;
  background: var(--page-bg);
  /* überlappt den unteren Rand des Heros um 2px → schluckt den
     Antialias-Blitzer am Rand der Wave-Mask. */
  margin-top: -2px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.75px;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

p { margin: 0 0 1em 0; }

a {
  color: var(--hytorc-red);
  text-decoration: none;
  font-weight: 700;
}
a:hover { text-decoration: underline; }

/* ====== Layout Container ====== */

.content-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
  width: 100%;
}
@media (max-width: 1250px) {
  .content-wrapper { padding: 0 var(--gutter); }
}

.page-main { padding: 4px 0 60px 0; }

/* ====== Header (hytorctech.com-Nachbau) ======
   Aufbau:
     .page-header            Container + Wave ::after
       .page-header__hero    Foto-BG 1920×1026, min-height 220px
         .page-header__top   Logo links + Kontakt/Sprache rechts
       .page-header__menu    weißer Balken darunter (wie Hauptsite-Navigation)
       (::after)             Wave-Cut zum grauen Content */

.page-header {
  position: relative;
}

.page-header__hero {
  background-image: url('/img/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;   /* wie auf hytorctech.com: BG viewport-fest, scrollt nicht mit */
  min-height: 280px;              /* Logo 95 + Menü 41 + Photo-Streifen 64 + Wave 80 = 280 */
  position: relative;
  overflow: hidden;
}

/* Wave-Cut am UNTEREN Rand des Hero: Photo → wavy Übergang → grau.
   Trick: ein grau-gefülltes Pseudo-Element, das per CSS-mask die Form des
   Wave-SVG annimmt. Die transparenten SVG-Bereiche werden maskiert →
   Photo scheint durch. Die weiß-gefüllten SVG-Bereiche → grau gerendert. */
.page-header__hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 80px;
  background-color: var(--page-bg);
  -webkit-mask-image: url('/img/wave-divider.svg');
          mask-image: url('/img/wave-divider.svg');
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  z-index: 1;
}
/* Sanfte Abdunklung von oben — hilft Kontrast für Kontakt-Text und nimmt dem
   Photo seine volle Helligkeit, wie auf hytorctech.com. */
.page-header__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}
/* Nur die Content-Wrapper (mit Logo + Meta) über dem Darkening-Overlay.
   NICHT auf .page-header__menu anwenden — der muss absolut positioniert bleiben. */
.page-header__hero > .content-wrapper { position: relative; z-index: 1; }

.page-header__top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-top: 0;
  min-height: 95px;    /* exakt Logo-Block-Höhe — Menü-Balken sitzt direkt darunter */
}

.page-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 285px;
  height: 95px;
  align-self: flex-start;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  line-height: 0;
}
.page-header__logo img {
  display: block;
  max-width: 251px;     /* 17 px Padding links/rechts */
  max-height: 66px;     /* 14.5 px Padding oben/unten */
  width: auto;
  height: auto;
}

/* Kontakt-Block rechts oben auf dem abgedunkelten Photo: weiße Schrift,
   dezenter schwarzer Halo für Lesbarkeit auf hellen Photo-Partien. */
.page-header__meta {
  color: #fff;
  text-align: right;
  padding-top: 24px;       /* fax/email weiter nach unten → kleinerer Abstand zur Tel-Nummer */
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}
.page-header__meta a {
  color: #fff;
  font-weight: 400;
  text-decoration: none;
}
.page-header__meta a:hover { text-decoration: underline; }

.page-header__contact {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.page-header__contact strong { font-weight: 700; }

.page-header__phone {
  margin-top: -2px;        /* leicht hoch, Abstand zu Fax/E-Mail kompakter (4px tiefer als -6px) */
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.page-header__phone strong { font-weight: 400; font-size: 13px; margin-right: 4px; }
.page-header__phone a { color: inherit; font-weight: inherit; text-decoration: none; }
.page-header__phone a:hover { text-decoration: underline; }

/* Sprachwahl vertikal gestapelt mit rotem Strich-Marker davor (wie hytorctech.com).
   Sitzt INNERHALB der Content-Breite, rechts vom Kontakt-Block. */
.page-header__right {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
}
.page-header__lang {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding-top: 30px;     /* etwas tiefer → wirkt mittiger zur Kontaktblock-Höhe */
}
.page-header__lang::before {
  content: '';
  display: block;
  width: 2px;
  background: var(--hytorc-red);
  border-radius: 1px;
}
.page-header__lang-stack {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
}
.page-header__lang a {
  color: #fff;
  font-weight: 400;
  padding: 0 2px;
  opacity: 0.95;
  text-decoration: none;
}
.page-header__lang a:hover { text-decoration: underline; }
.page-header__lang a.is-active {
  color: var(--hytorc-red);
  font-weight: 700;
  opacity: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

/* Weißer Menü-Balken — nur innerhalb der 1200px Content-Breite (wie auf
   hytorctech.com), absolute positioniert direkt unter dem Logo, liegt
   auf der z-Achse ÜBER dem Photo. Außerhalb scheint das Photo durch. */
.page-header__menu {
  position: absolute;
  top: 105px;                 /* 10px Abstand unter dem 95px-Logo-Block */
  left: 0; right: 0;
  background: transparent;
  z-index: 2;
}
.page-header__menu > .content-wrapper {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.page-header__menu-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 41px;
  padding: 0 25px;   /* Einrückung links + rechts, damit Items nicht am Rand kleben */
}
.page-header__menu-nav a {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}
.page-header__menu-nav a:hover {
  color: var(--hytorc-red);
  text-decoration: none;
}
/* Nicht-klickbarer „aktiver" Menüpunkt links — entspricht „Start" auf hytorctech.com.
   Gleiche Typo wie die Links, aber rot + bold und ohne Hover-Change. */
.page-header__menu-nav__active {
  color: var(--hytorc-red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  display: flex;
  align-items: center;
  height: 100%;
  cursor: default;
  user-select: none;
}

/* (Alte .page-header::after-Wave entfernt — die Wave sitzt jetzt als
   CSS-mask auf .page-header__hero::after, siehe dort.) */

/* ====== Panel (Content-Card) ====== */

.panel {
  background: var(--panel-bg);
  border-radius: var(--radius-std);
  padding: 40px;
  box-shadow: var(--shadow-card);
  max-width: var(--form-col);
  margin: 0 auto;
}

.panel__intro { margin: 0 0 2em 0; color: var(--text); }
.panel__intro code { white-space: nowrap; }

/* ====== Stepper ====== */

.stepper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  margin: 0 auto 40px auto;
  /* Browser-Default für <ol> ist padding-inline-start: 40px + list-style-type.
     Beides muss explizit weg, sonst rutscht der Stepper nach rechts und
     ist nicht mehr mittig. */
  padding: 0;
  list-style: none;
  max-width: var(--form-col);
}

.stepper__step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.stepper__circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
  transition: all 0.2s;
}

.stepper__step.is-active .stepper__circle,
.stepper__step.is-done .stepper__circle {
  background: var(--hytorc-red);
  color: #fff;
  border-color: var(--hytorc-red);
}

.stepper__label {
  margin-top: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--muted);
}

.stepper__step.is-active .stepper__label,
.stepper__step.is-done .stepper__label {
  color: var(--heading);
  font-weight: 700;
}

.stepper__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.stepper__step.is-done:not(:last-child)::after {
  background: var(--hytorc-red);
}

/* ====== Forms ====== */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--heading);
  letter-spacing: 0.3px;
}
.form-label .required {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.form-input {
  display: block;
  width: 100%;
  padding: 10px 15px;
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
  border-radius: var(--radius-std);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--hytorc-red);
  /* a11y: leichter Ring (nicht live-konform, aber korrekt) */
  box-shadow: 0 0 0 2px rgba(220, 63, 44, 0.2);
}
.form-input.is-error {
  border-color: var(--error);
  color: var(--error);
}
/* Input für den Lizenzschlüssel — bessere Lesbarkeit einer fixen 24-Zeichen-Sequenz:
   Monospace, große Ziffern, etwas Letter-Spacing, mittig. */
.form-input--key {
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', 'Consolas', monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 14px 15px;
}
.form-input--key::placeholder {
  letter-spacing: 0.08em;
  color: #bbb;
}

.form-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--error);
  font-weight: 700;
}

/* ====== Alert ====== */

.alert {
  padding: 12px 15px 12px 20px;
  border-left: 5px solid var(--error);
  background: #fff;
  color: var(--error);
  border-radius: var(--radius-std);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 700;
  /* Zeilenumbrüche (\n) in Fehlermeldungen respektieren — wird z. B. bei der
     gesperrten-Lizenz-Meldung verwendet, um die individuelle Bemerkung
     auf einer eigenen Zeile darzustellen. */
  white-space: pre-line;
}

.alert--success {
  border-left-color: var(--success);
  color: var(--success);
}

/* ====== Buttons (Pill-Style) ====== */

.btn {
  display: inline-block;
  padding: 10px 28px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn--primary {
  background: var(--hytorc-red);
  color: #fff;
  border-color: var(--hytorc-red);
}
.btn--primary:hover {
  background: #fff;
  color: var(--hytorc-red);
  text-decoration: none;
  border-color: var(--hytorc-red);
}

.btn--ghost {
  background: #fff;
  color: var(--hytorc-red);
  border-color: var(--hytorc-red);
}
.btn--ghost:hover {
  background: var(--hytorc-red);
  color: #fff;
  text-decoration: none;
}

.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}
.btn-row--end { justify-content: flex-end; }

/* ====== Dropzone (File-Upload) ====== */

.dropzone {
  display: block;  /* <label> wäre sonst inline — zerstört Box-Layout */
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-std);
  background: #fff;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.dropzone__inline-error {
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--error);
  background: #fff;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-std);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--hytorc-red);
  background: #fef4f2;
}
.dropzone__icon {
  width: 40px; height: 40px;
  margin: 0 auto 12px auto;
  color: var(--muted);
}
.dropzone.is-dragover .dropzone__icon { color: var(--hytorc-red); }
.dropzone__label {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
}
.dropzone__hint {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone__selected {
  display: none;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-std);
  text-align: left;
  gap: 12px;
  align-items: center;
}
.dropzone__selected.is-visible { display: flex; }
.dropzone__selected .file-name {
  flex: 1;
  color: var(--heading);
  font-weight: 700;
  font-size: 14px;
  word-break: break-all;
}
.dropzone__remove {
  background: none;
  border: none;
  color: var(--hytorc-red);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dropzone__remove:hover { text-decoration: underline; }

/* ====== Success-Screen ====== */

.success-screen { text-align: center; padding: 20px 0; }
.success-screen__icon {
  width: 64px; height: 64px;
  color: var(--success);
  margin: 0 auto 20px auto;
  display: block;
}
.success-screen h2 { margin-bottom: 12px; }
.success-screen__hint {
  margin: 12px auto 24px auto;
  font-size: 13px;
  color: var(--muted);
  max-width: 400px;
}
.success-screen__meta {
  margin: 0 auto 24px auto;
  padding: 16px 20px;
  background: #f8f8f8;
  border-radius: var(--radius-std);
  max-width: 400px;
  text-align: left;
  font-size: 14px;
}
.success-screen__meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.success-screen__meta dd { margin: 0 0 10px 0; color: var(--heading); font-weight: 700; }
.success-screen__meta dd:last-child { margin-bottom: 0; }

/* ====== Key-Display ====== */

.key-display {
  display: inline-block;
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-radius: var(--radius-std);
  padding: 6px 14px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 1px;
}

/* ====== Footer ====== */

.page-footer {
  background: var(--footer-bg);
  color: var(--text);
  padding: 25px 0;
  font-size: 13px;
  margin-top: 60px;
}
.page-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.page-footer__links a {
  color: var(--text);
  font-weight: 400;
  margin-right: 18px;
}
.page-footer__links a:hover {
  color: var(--hytorc-red);
  text-decoration: none;
}
.page-footer__copy { color: var(--muted); font-size: 12px; }

/* ====== Responsive ====== */

@media (max-width: 768px) {
  .page-header__inner { flex-direction: column; align-items: flex-start; }
  .page-header__logo img { width: 220px; height: auto; }
  .panel { padding: 24px; }
  .stepper__label { font-size: 10px; }
  .btn-row { flex-direction: column-reverse; }
  .btn { width: 100%; text-align: center; }
}
