/* ==========================================================================
   TERAX Sp. z o.o. — Design System
   Navy #1B2432 · Gelb #F6B60D · Hintergrund-Hell #F7F8FA
   System-Font-Stack, keine externen CDNs/Fonts.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* 1. Custom Properties                                                   */
/* ---------------------------------------------------------------------- */
:root {
  --navy: #1B2432;
  --navy-light: #2A3547;
  --yellow: #F6B60D;
  --yellow-dark: #D99A00;
  --yellow-text: #8A6200; /* AA-konformer Gelb-Ton fuer Text auf hellem Grund, siehe Report */
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text: #1B2432;
  --muted: #5A6372;
  --border: #E3E6EB;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(27, 36, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 36, 50, 0.10);
  --shadow-lg: 0 20px 48px rgba(27, 36, 50, 0.16);
  --container-w: 1180px;
  --gap: clamp(1rem, 2vw, 2rem);
  --transition: 180ms ease;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body,
h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

html,
body {
  padding: 0;
}

ul[class],
ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------------------------------------------------- */
/* 3. Basistypografie                                                     */
/* ---------------------------------------------------------------------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
}

h3 {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
}

p {
  color: var(--muted);
}

.section p,
.card p {
  max-width: 68ch;
}

strong {
  font-weight: 700;
  color: var(--navy);
}

/* ---------------------------------------------------------------------- */
/* 4. Layout-Utilities                                                    */
/* ---------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3.5rem, 6vw, 6rem);
  background: var(--white);
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--white);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.72);
}

.section--gray {
  background: var(--bg);
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow-text);
  margin-bottom: 0.6rem;
}

.section--dark .section__eyebrow {
  color: var(--yellow);
}

/* ---------------------------------------------------------------------- */
/* 5. Skip-Link & Accessibility                                           */
/* ---------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

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

.section--dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}

/* ---------------------------------------------------------------------- */
/* 6. Buttons                                                              */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background-color var(--transition), color var(--transition),
    border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--yellow-dark);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

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

.section:not(.section--dark) .btn--ghost {
  color: var(--navy);
  border-color: var(--navy);
}

.section:not(.section--dark) .btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---------------------------------------------------------------------- */
/* 7. Site Header / Navigation                                            */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition), background-color var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  padding-block: 1rem;
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.nav__logo .accent {
  color: var(--yellow-text);
}

/* Auf dunklem Grund (Footer-Logo, Navy) bleibt der Akzent in reinem Gelb,
   da --yellow auf Navy AA-konform ist (siehe Fix-Report). */
.footer-grid .nav__logo .accent,
.section--dark .nav__logo .accent {
  color: var(--yellow);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding-block: 0.25rem;
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--yellow-text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------------------------------------------------------------- */
/* 8. Sprach-Umschalter                                                   */
/* ---------------------------------------------------------------------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.lang-switch a {
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: color var(--transition), background-color var(--transition);
}

.lang-switch a:hover {
  color: var(--navy);
  background: var(--bg);
}

.lang-switch a[aria-current="true"],
.lang-switch a.is-active {
  color: var(--navy);
}

.lang-switch span[aria-hidden="true"] {
  color: var(--border);
}

/* ---------------------------------------------------------------------- */
/* 9. Hero                                                                */
/* ---------------------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.hero__content h1 {
  color: var(--white);
}

.hero__content p {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  margin-top: 1.1rem;
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.hero__img {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
}

.hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------- */
/* 10. Checkliste                                                         */
/* ---------------------------------------------------------------------- */
.checklist {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.75rem;
  list-style: none;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--navy);
}

.checklist li::before {
  content: "\2713";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

/* ---------------------------------------------------------------------- */
/* 11. Collage (About-Bilder)                                             */
/* ---------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
}

.collage > :first-child {
  grid-row: span 2;
  aspect-ratio: 1 / 2.08;
}

/* ---------------------------------------------------------------------- */
/* 12. Cards / Leistungen                                                 */
/* ---------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--yellow-text);
  margin-bottom: 1.1rem;
  font-size: 1.4rem;
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------------- */
/* 13. Stats-Band                                                         */
/* ---------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 0.5rem;
}

.stat__num {
  display: block;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  font-weight: 800;
  color: var(--yellow);
  line-height: 1.1;
}

.stat__label {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------------- */
/* 14. Kontakt                                                            */
/* ---------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.contact-info h3 {
  color: var(--white);
}

.contact-info__list {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
}

.contact-info__list a,
.contact-info__list span {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.contact-info__list a:hover {
  color: var(--yellow);
}

/* ---------------------------------------------------------------------- */
/* 15. Formular                                                           */
/* ---------------------------------------------------------------------- */
form {
  display: grid;
  gap: 1.1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--yellow-dark);
  box-shadow: 0 0 0 3px rgba(246, 182, 13, 0.25);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.form-msg {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-msg[hidden] {
  display: none;
}

.form-msg--ok {
  background: #E7F6EC;
  color: #1E6B3A;
  border: 1px solid #BEE6C9;
}

.form-msg--err {
  background: #FBE9E9;
  color: #A32020;
  border: 1px solid #F3C4C4;
}

/* ---------------------------------------------------------------------- */
/* 16. Footer                                                             */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(3rem, 5vw, 4.5rem) 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.footer-grid .nav__logo {
  color: var(--white);
}

.footer-grid p,
.footer-grid li,
.footer-grid a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.footer-grid ul {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid a:hover {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-top: 1.75rem;
  font-size: 0.85rem;
}

.site-footer .footer-grid,
.site-footer .footer-bottom {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------------------------------------------------------------------- */
/* 17. Breakpoint 900px — Nav-Burger, Grid-Kollaps, Hero-Stapelung        */
/* ---------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav__links.is-open {
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav__links a {
    display: block;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--border);
  }

  .nav__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero__img {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
    aspect-ratio: 4 / 3;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .collage {
    order: -1;
  }

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

  .stats {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------------- */
/* 18. Breakpoint 560px — Karten einspaltig                               */
/* ---------------------------------------------------------------------- */
@media (max-width: 560px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

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

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------------------- */
/* 19. Reduced Motion                                                     */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover,
  .card:hover {
    transform: none !important;
  }
}
