/*
Theme Name: Systemhaus-Hertling
Theme URI: https://systemhaus-hertling.com
Author: Systemhaus-Hertling UG (haftungsbeschränkt)
Author URI: https://systemhaus-hertling.com
Description: Individuelles Theme für die Website der Systemhaus-Hertling UG (haftungsbeschränkt).
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: systemhaus-hertling
*/

/* ===========================================================
   Systemhaus-Hertling — Design Tokens
   =========================================================== */
:root {
  --ink: #16233d;
  --ink-soft: #1f2f4d;
  --paper: #f6f7f9;
  --card: #ffffff;
  --teal: #0e7c7b;
  --teal-dark: #0a5f5e;
  --slate: #56637a;
  --text: #1e2733;
  --amber: #e2a73e;
  --line: #dde2e9;
  --line-dark: rgba(255, 255, 255, 0.14);

  --font-display: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
}

/* ===========================================================
   Motion
   =========================================================== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.load-in {
  animation: fade-up 0.7s ease both;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.stagger > .reveal:nth-child(1) {
  transition-delay: 0s;
}

.stagger > .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.stagger > .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.stagger > .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* ===========================================================
   Utility bar + Header
   =========================================================== */
.utility-bar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.utility-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.utility-bar a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.utility-bar a:hover {
  color: #fff;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

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

.main-nav a {
  text-decoration: none;
  color: var(--slate);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

.main-nav a[aria-current="page"] {
  border-bottom: 2px solid var(--teal);
  padding-bottom: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-on-dark {
  background: var(--amber);
  color: var(--ink);
}

.btn-on-dark:hover {
  background: #eeb659;
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  padding: 88px 0 96px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  margin-bottom: 18px;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.05s;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.15s;
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 46ch;
  margin-bottom: 32px;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.28s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.4s;
}

/* Signature element: system status card */
.status-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  color: #fff;
  font-family: var(--font-mono);
  animation: fade-up 0.7s ease both;
  animation-delay: 0.5s;
  box-shadow: 0 24px 48px -20px rgba(22, 35, 61, 0.45);
}

.status-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.status-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.88rem;
}

.status-card__row + .status-card__row {
  border-top: 1px solid var(--line-dark);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ad9a0;
  margin-right: 8px;
  box-shadow: 0 0 0 0 rgba(74, 217, 160, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

.status-value {
  color: #4ad9a0;
  display: flex;
  align-items: center;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 217, 160, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(74, 217, 160, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 217, 160, 0);
  }
}

.status-dot--offline {
  background: #ef5350;
  animation: none;
  box-shadow: none;
}

.status-value--offline {
  color: #ef5350;
}

.status-card__foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===========================================================
   Section scaffolding
   =========================================================== */
.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 60ch;
  margin-bottom: 48px;
}

.section-head .mono-label {
  display: block;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--slate);
  font-size: 1.05rem;
}

/* ===========================================================
   Service cards
   =========================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--card);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 24px -18px rgba(22, 35, 61, 0.45);
}

.service-card a.service-more {
  transition: color 0.15s ease, border-color 0.15s ease;
}

.service-card a.service-more:hover {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.service-card__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 4px;
  width: fit-content;
  padding: 2px 7px;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.service-card p {
  color: var(--slate);
  font-size: 0.95rem;
}

.service-card a.service-more {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
  width: fit-content;
}

/* ===========================================================
   Trust / Warum-wir section
   =========================================================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.trust-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.trust-item p {
  color: var(--slate);
  font-size: 0.95rem;
}

.trust-item .mono-label {
  display: block;
  margin-bottom: 10px;
}

/* ===========================================================
   CTA band
   =========================================================== */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 72px 0;
}

.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  max-width: 34ch;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ===========================================================
   Page hero (inner pages)
   =========================================================== */
.page-hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
}

.page-hero .mono-label {
  display: block;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.05s;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.15s;
}

.page-hero p {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 60ch;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.28s;
}

/* ===========================================================
   Leistungen detail
   =========================================================== */
.service-detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 48px 0;
}

.service-detail + .service-detail {
  border-top: 1px solid var(--line);
}

.service-detail__label {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.service-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(14, 124, 123, 0.25), rgba(22, 35, 61, 0.4));
  mix-blend-mode: multiply;
}

.service-detail h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-detail p {
  color: var(--slate);
  margin-bottom: 16px;
  max-width: 62ch;
}

.service-detail ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-detail li {
  color: var(--text);
  font-size: 0.95rem;
  padding-left: 18px;
  position: relative;
}

.service-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ===========================================================
   Über uns
   =========================================================== */
.about-block {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.about-block p {
  font-size: 1.05rem;
  color: var(--text);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 12px;
}

.value-item {
  border-left: 2px solid var(--teal);
  padding-left: 18px;
}

.value-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.value-item p {
  color: var(--slate);
  font-size: 0.95rem;
}

/* ===========================================================
   Kontakt
   =========================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-card h2 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.contact-list dd {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.contact-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--teal);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--text);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  background: #fff;
}

.form-note {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 6px;
}

/* ===========================================================
   Legal pages (Impressum / Datenschutz)
   =========================================================== */
.legal-content {
  max-width: 74ch;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.legal-content p,
.legal-content li {
  color: var(--text);
  font-size: 0.98rem;
}

.legal-content li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}

.legal-content li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--slate);
}

.legal-content .placeholder {
  background: rgba(226, 167, 62, 0.16);
  color: #8a5a11;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.legal-notice {
  background: rgba(14, 124, 123, 0.08);
  border: 1px solid rgba(14, 124, 123, 0.25);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--teal-dark);
}

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-brand p {
  margin-top: 14px;
  font-size: 0.9rem;
  max-width: 32ch;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.4);
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

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

  .trust-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

  .service-detail {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-detail__label {
    flex-direction: row-reverse;
    align-items: center;
  }

  .service-photo {
    aspect-ratio: 16 / 9;
    max-width: 240px;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav a {
    padding: 10px 0;
    width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .utility-bar .container {
    justify-content: flex-start;
  }

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

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

  .cta-band .container {
    flex-direction: column;
    align-items: flex-start;
  }
}
