/* ==========================================================================
   umzugmitfreunden.de – Musterseite
   Design-System gemäß design-plan.md. Alle Farben/Größen/Abstände als
   Custom Properties in :root – keine verstreuten Hex-Werte im Stylesheet.
   ========================================================================== */

@font-face {
  font-family: 'Bungee';
  src: url('/assets/fonts/bungee-display.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Farbe (design-plan.md Abschnitt 1) */
  --color-ground: #e9dec0;
  --color-ground-raised: #f1e8cc;
  --color-ground-muted: #dccfa0;
  --color-deep: #2b2e2c;
  --color-lead: #a5342a;
  --color-lead-light: #e87c6e;
  --color-lead-hover: #8a2c22;
  --color-accent: #375f5c;
  --color-border-decorative: #c7b788;
  --color-border-functional: #6b5a3a;
  --color-text-secondary: #544a36;
  --color-success: #2e504e;
  --color-warning: #7f5119;
  --color-error: #7a2419;
  --color-white: #ffffff;

  /* Typografie */
  --font-display: 'Bungee', system-ui, sans-serif;
  --font-text: 'Archivo', system-ui, sans-serif;

  --step-display: 2.986rem;
  --step-h1: 2.488rem;
  --step-h2: 1.953rem;
  --step-h3: 1.526rem;
  --step-lead: 1.25rem;
  --step-body: 1rem;
  --step-small: 0.875rem;
  --step-caption: 0.75rem;

  /* Abstände (4/8-Basis) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Radien */
  --radius-none: 0;
  --radius-button: 2px;
  --radius-input: 2px;
  --radius-pill: 999px;

  /* Schatten */
  --shadow-floating: 0 2px 10px rgba(43, 46, 44, 0.35);
  --shadow-header: 0 1px 0 var(--color-border-decorative);

  /* Container */
  --container-max: 72rem;

  /* Font-Scale für Barrierefreiheits-Panel */
  --font-scale: 1;
}

:root[data-contrast='high'] {
  --color-ground: #ffffff;
  --color-ground-raised: #ffffff;
  --color-ground-muted: #eeeeee;
  --color-deep: #000000;
  --color-lead: #7a1d13;
  --color-lead-light: #ffb4a6;
  --color-lead-hover: #5c140c;
  --color-accent: #163a37;
  --color-border-decorative: #000000;
  --color-border-functional: #000000;
  --color-text-secondary: #000000;
  --color-success: #163a37;
  --color-warning: #5c3c10;
  --color-error: #5c140c;
}

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

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--color-ground);
  color: var(--color-deep);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.6;
  hyphens: auto;
  text-wrap: pretty;
}

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

/* Basisgröße für alle Inline-Icons; spezifischere Icon-Klassen (z. B.
   .brand-mark, .concept-band-icon, .label-panel-icon) überschreiben dies
   per Deklarationsreihenfolge weiter unten im Stylesheet. */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

a {
  color: var(--color-lead);
}

a:hover {
  color: var(--color-lead-hover);
}

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

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-deep);
  color: var(--color-ground);
  padding: var(--space-3) var(--space-4);
  z-index: 1000;
  border-radius: var(--radius-button);
}

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

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* Typografie-Rollen */
h1, h2, h3 {
  font-weight: 700;
  text-wrap: balance;
  color: var(--color-deep);
}

h1, .step-display {
  font-family: var(--font-display);
  font-size: var(--step-h1);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  line-height: 1.1;
}

.step-display {
  font-size: var(--step-display);
  line-height: 1.05;
}

h2 {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--step-h2);
  letter-spacing: -0.005em;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--step-h3);
  line-height: 1.3;
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 62ch;
}

small, .text-small {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.caption {
  font-size: var(--step-caption);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

p {
  max-width: 68ch;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  background: var(--color-ground);
  border-bottom: 1px solid var(--color-border-decorative);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-deep);
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--color-lead);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-wordmark-sub {
  display: block;
  font-size: 0.6rem;
  color: var(--color-lead);
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--color-border-functional);
  border-radius: var(--radius-button);
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-deep);
}

.nav-toggle-icon-close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-icon-open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-icon-close {
  display: block;
}

.nav-list {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--color-deep);
  font-weight: 500;
  font-size: var(--step-small);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a[aria-current='page'] {
  color: var(--color-lead);
  border-bottom-color: var(--color-lead);
}

@media (max-width: 56rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-3) clamp(1rem, 4vw, 2.5rem) var(--space-5);
    background: var(--color-ground);
    border-bottom: 1px solid var(--color-border-decorative);
  }

  .nav-list[hidden] {
    display: none;
  }
}

@media (min-width: 56.01rem) {
  .nav-list[hidden] {
    display: flex;
  }
}

/* Konzept-/Verkaufshinweis-Band */
.concept-band {
  background: var(--color-warning);
  color: var(--color-white);
}

.concept-band-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
  font-size: var(--step-small);
}

.concept-band-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.concept-band p {
  margin: 0;
  flex: 1;
  max-width: none;
}

.concept-band-link {
  color: var(--color-white);
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 40rem) {
  .concept-band-inner {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Sektionen – gemeinsamer Rhythmus
   ========================================================================== */

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

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

/* Hero (Bild-Bruchkante rechts) */
.hero {
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero-text {
  padding-block: var(--space-8);
}

.hero-text .step-display {
  margin-block-end: var(--space-4);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-block-start: var(--space-6);
}

.hero-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.05);
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-6);
  }

  .hero-text {
    padding-inline-start: clamp(1rem, 4vw, 2.5rem);
  }

  .hero-media {
    margin-inline-end: calc(-1 * (100vw - var(--container-max)) / 2);
  }

  .hero-media img {
    height: 100%;
    max-height: 34rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--step-small);
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-button);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn-primary {
  background: var(--color-lead);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-lead-hover);
  color: var(--color-white);
}

.btn-text {
  background: none;
  color: var(--color-deep);
  padding: var(--space-3) 0;
  border: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-border-decorative);
}

.btn-text:hover {
  color: var(--color-lead);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition-duration: 200ms;
  }
}

/* Zitat-/Detailfläche */
.quote-panel {
  background: var(--color-ground-muted);
  padding-block: var(--space-8);
}

.quote-panel blockquote {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-h3);
  font-weight: 600;
  max-width: 44ch;
}

.quote-panel cite {
  display: block;
  margin-block-start: var(--space-3);
  font-style: normal;
  font-size: var(--step-small);
  color: var(--color-text-secondary);
}

/* Zweispaltig asymmetrisch */
.split {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-8);
  }

  .split-narrow {
    padding-inline-start: var(--space-6);
    border-inline-start: 1px solid var(--color-border-decorative);
  }
}

.split ul {
  padding-left: 1.1em;
}

.split li {
  margin-block-end: var(--space-2);
}

.split li .icon {
  display: inline-block;
  vertical-align: -0.25em;
  margin-inline-end: var(--space-2);
}

/* Liste mit Trennlinien (echte Abfolge) */
.steps-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  border-top: 1px solid var(--color-border-decorative);
}

.steps-list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-border-decorative);
}

.steps-list .step-number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-lead);
}

.steps-list h3 {
  margin: 0 0 var(--space-1);
}

.steps-list p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* Bild über Bruchkante */
.break-image {
  display: grid;
  gap: var(--space-6);
}

.break-image-media img {
  filter: saturate(0.95) contrast(1.05);
}

@media (min-width: 56rem) {
  .break-image {
    grid-template-columns: 5fr 7fr;
    align-items: center;
  }

  .break-image-media {
    margin-block-start: calc(-1 * var(--space-9));
  }
}

/* Etikett-Fläche (Verkaufs-Inhalte, gestrichelter Rahmen wie Versandetikett) */
.label-panel {
  border: 2px dashed var(--color-border-functional);
  padding: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--color-ground-raised);
}

.label-panel-text {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.label-panel-icon {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.label-panel h2 {
  margin: 0 0 var(--space-1);
}

.label-panel p {
  margin: 0;
  color: var(--color-text-secondary);
}

.label-table {
  width: 100%;
  border-collapse: collapse;
  margin-block-start: var(--space-4);
}

.label-table th,
.label-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-decorative);
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
}

.label-table th {
  color: var(--color-text-secondary);
  font-weight: 600;
  width: 40%;
}

/* CTA-Band */
.cta-band {
  background: var(--color-deep);
  color: var(--color-ground);
  text-align: center;
  padding-block: var(--space-8);
}

.cta-band h2 {
  color: var(--color-ground);
}

.cta-band .btn-primary {
  margin-block-start: var(--space-5);
}

.cta-band-lead {
  margin-inline: auto;
  color: inherit;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--step-caption);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}

/* Alerts */
.alert {
  padding: var(--space-4) var(--space-5);
  border-inline-start: 4px solid;
  margin-block-end: var(--space-5);
}

.alert-error {
  background: var(--color-ground-raised);
  border-color: var(--color-error);
  color: var(--color-error);
}

.alert-success {
  background: var(--color-ground-raised);
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-note {
  background: var(--color-ground-raised);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.alert ul {
  margin: 0;
  padding-left: 1.1em;
}

/* ==========================================================================
   Formulare
   ========================================================================== */

.form-field {
  margin-block-end: var(--space-5);
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: var(--step-small);
  margin-block-end: var(--space-2);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: var(--space-3);
  border: 2px solid var(--color-border-functional);
  border-radius: var(--radius-input);
  background: var(--color-white);
  color: var(--color-deep);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--color-lead);
  outline-offset: 1px;
}

.form-field-error input,
.form-field-error textarea {
  border-color: var(--color-error);
}

.form-error-text {
  color: var(--color-error);
  font-size: var(--step-small);
  margin-block-start: var(--space-1);
}

.form-hint {
  color: var(--color-text-secondary);
  font-size: var(--step-small);
}

/* Honeypot: unsichtbar, aber nicht display:none (Bots ignorieren das oft) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.site-footer {
  background: var(--color-deep);
  color: var(--color-ground);
  padding-block: var(--space-8) var(--space-6);
}

.site-footer a {
  color: var(--color-lead-light);
}

.footer-grid {
  display: grid;
  gap: var(--space-6);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 var(--space-3);
}

.footer-contact-mail {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.footer-contact address {
  font-style: normal;
  line-height: 1.6;
}

.footer-grid h2 {
  color: var(--color-ground);
  font-size: var(--step-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 var(--space-3);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-block-end: var(--space-2);
}

.footer-bottom {
  max-width: var(--container-max);
  margin: var(--space-6) auto 0;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  font-size: var(--step-caption);
  color: var(--color-border-decorative);
}

@media (min-width: 56rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

/* ==========================================================================
   Accessibility-Widget
   ========================================================================== */

.a11y-widget {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 500;
}

.a11y-toggle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--color-lead);
  color: var(--color-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-floating);
}

.a11y-toggle:hover {
  background: var(--color-lead-hover);
}

.a11y-panel {
  position: absolute;
  right: 0;
  bottom: calc(52px + var(--space-3));
  width: min(20rem, 85vw);
  background: var(--color-white);
  border: 2px solid var(--color-border-functional);
  box-shadow: var(--shadow-floating);
  padding: var(--space-5);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-4);
}

.a11y-panel-header h2 {
  font-size: var(--step-small);
  text-transform: uppercase;
  margin: 0;
}

.a11y-close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-deep);
  padding: var(--space-1);
}

.a11y-field {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}

.a11y-field legend {
  font-size: var(--step-small);
  font-weight: 600;
  margin-block-end: var(--space-2);
  padding: 0;
}

.a11y-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.a11y-btn {
  min-width: 44px;
  min-height: 44px;
  border: 2px solid var(--color-border-functional);
  background: var(--color-ground);
  color: var(--color-deep);
  border-radius: var(--radius-button);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
}

.a11y-btn[aria-pressed='true'] {
  background: var(--color-lead);
  color: var(--color-white);
  border-color: var(--color-lead);
}

/* ==========================================================================
   Legal-/Content-Seiten
   ========================================================================== */

.legal-content {
  padding-block: var(--space-8);
}

.legal-content dl {
  margin: 0 0 var(--space-6);
}

.legal-content dt {
  font-weight: 600;
  margin-block-start: var(--space-3);
}

.legal-content dd {
  margin: 0;
  color: var(--color-text-secondary);
}

.placeholder-note {
  background: var(--color-ground-raised);
  border-inline-start: 4px solid var(--color-warning);
  padding: var(--space-3) var(--space-4);
  color: var(--color-warning);
  font-size: var(--step-small);
}

/* ==========================================================================
   Bewegung: genau ein orchestrierter Moment (Hero beim Laden)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .hero-text > * {
    animation: hero-rise 400ms ease both;
  }

  .hero-text > *:nth-child(2) {
    animation-delay: 80ms;
  }

  .hero-text > *:nth-child(3) {
    animation-delay: 160ms;
  }

  @keyframes hero-rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   404 / offline
   ========================================================================== */

.status-page {
  text-align: center;
  padding-block: var(--space-10);
}

.status-page .step-display {
  color: var(--color-lead);
}

.status-lead {
  margin-inline: auto;
}
