/* ==========================================================
   FFS IT-Solutions — Prototyp Stylesheet
   Palette: dunkles Grau + Waldgrün-Akzent (Logo-Farben)
   Hinweis: Google Fonts werden per <link rel="preconnect"> im
   HTML-Head geladen (schneller als @import hier).
   ========================================================== */

:root {
  --bg: #26282A;
  --surface: #313330;
  --surface-alt: #393B37;
  --border: #494B47;
  --text: #F4F4F1;
  --text-muted: #B6B9B2;

  --accent-copper: #2F6B4C;
  --accent-copper-bright: #4CA173;
  --accent-steel: #9BA095;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  font-weight: 600;
}

p { color: var(--text-muted); max-width: 62ch; }

a { color: var(--accent-copper-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-copper);
  color: #FFFFFF;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(38, 40, 42, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.brand img { height: 30px; width: auto; display: block; }
.brand span { color: var(--accent-copper-bright); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--accent-copper);
  padding-bottom: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 1.5rem 4rem 3.25rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-sidelabel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  border-left: 2px solid var(--accent-copper);
  padding-left: 0.6rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  max-width: 14ch;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent-copper);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-copper-bright); text-decoration: none; }
.btn-secondary {
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent-steel); text-decoration: none; }

.spec-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  max-width: 36rem;
}
.spec-strip div {
  padding: 0 1.25rem;
  border-left: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.spec-strip div:first-child { padding-left: 0; border-left: none; }
.spec-strip strong { color: var(--text); display: block; font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 0.2rem; }

/* Hero search: ersetzt die vorherige abstrakte Grafik */
.hero-search-panel {
  position: relative;
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  background:
    linear-gradient(var(--surface-alt), var(--surface-alt)) padding-box,
    repeating-linear-gradient(0deg, transparent, transparent 27px, var(--border) 27px, var(--border) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, var(--border) 27px, var(--border) 28px);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}
.hero-search-panel .eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.hero-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
}
.hero-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0;
  min-width: 0;
}
.hero-search-box input::placeholder { color: var(--text-muted); }
.hero-search-box button {
  flex-shrink: 0;
  background: var(--accent-copper);
  color: #fff;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.15rem;
  font-family: var(--font-display);
  cursor: pointer;
}
.hero-search-box button:hover { background: var(--accent-copper-bright); }
.hero-search-hint {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hero-search-hint a { color: var(--accent-copper-bright); }
.hero-search-suggestions {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}
.hero-search-suggestions li + li { border-top: 1px solid var(--border); }
.hero-search-suggestions a {
  display: block;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
}
.hero-search-suggestions a:hover { background: var(--surface-alt); text-decoration: none; }
.hero-search-suggestions[hidden] { display: none; }

/* ---------- Section heading ---------- */
.section-head { max-width: 46ch; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }


section { padding: 5rem 0; position: relative; }
section + section {
  border-top: none;
}
section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-image: repeating-linear-gradient(to right, var(--accent-copper) 0 3px, var(--border) 3px 8px, transparent 8px 22px);
  opacity: 0.9;
}

/* ---------- Services grid (asymmetric) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.75rem;
}
.service-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  padding: 2rem;
  background: var(--surface);
  grid-column: span 3;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
a.service-card { cursor: pointer; }
a.service-card::after {
  content: "→";
  position: absolute;
  bottom: 1.15rem;
  right: 1.4rem;
  color: var(--accent-copper-bright);
  font-family: var(--font-display);
  font-size: 1.15rem;
}
a.service-card:hover { border-color: var(--accent-copper-bright); text-decoration: none; }
.card-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--accent-copper-bright);
  margin-bottom: 0.6rem;
}
.service-card.featured {
  grid-column: span 4;
  background: linear-gradient(160deg, var(--surface-alt), var(--surface));
}
.service-card.compact { grid-column: span 2; }
.service-card h3 {
  font-size: 1.15rem;
  color: var(--text);
}
.service-card p { margin-bottom: 0; font-size: 0.95rem; }
.service-card:hover { border-color: var(--accent-steel); }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  padding: 2.25rem;
  margin-top: 2.25rem;
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.cta-band p { margin: 0; }

/* ---------- Generic page content (Zu uns, FAQ, Impressum) ---------- */
.page-hero { padding: 3.5rem 0 1rem; }
.page-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.faq-item p { margin: 0; }

.placeholder-note {
  border: 1px dashed var(--accent-steel);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: var(--accent-steel);
  font-size: 0.88rem;
  margin: 1.5rem 0;
}

.legal-block h2 { font-size: 1.15rem; margin-top: 2rem; }
.legal-block p, .legal-block li { color: var(--text-muted); font-size: 0.95rem; }

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-info div { margin-bottom: 1.5rem; }
.contact-info strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 0.2rem; }

.form-embed-slot {
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  padding: 1.5rem;
  background: var(--surface);
}
.mock-field { margin-bottom: 1rem; }
.mock-field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.mock-field .box {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  height: 2.4rem;
}
.mock-field .box.tall { height: 5rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.footer-links { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-note { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; padding-left: 1.5rem; }
  .hero-sidelabel { display: none; }
  .hero-search-panel { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card, .service-card.featured, .service-card.compact { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--accent-copper-bright);
  outline-offset: 2px;
}

/* ---------- Sehr schmale Screens ---------- */
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card, .service-card.featured, .service-card.compact { grid-column: span 1; }
  .spec-strip { grid-template-columns: 1fr; }
  .spec-strip div { border-left: none; border-top: 1px solid var(--border); padding: 0.75rem 0 0; }
  .spec-strip div:first-child { border-top: none; padding-top: 0; }
  .cta-band { padding: 1.5rem; }
}

/* ---------- Cookie-Banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  transform: translateY(120%);
  transition: transform 0.3s ease;
  z-index: 200;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; font-size: 0.9rem; max-width: 60ch; }
.cookie-banner-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Social Share ---------- */
.share-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.share-row span { font-size: 0.85rem; color: var(--text-muted); }
.share-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.share-row a:hover { border-color: var(--accent-copper-bright); color: var(--accent-copper-bright); text-decoration: none; }

/* ---------- 404-Seite ---------- */
.error-hero {
  padding: 6rem 0;
  text-align: center;
}
.error-hero .code {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--accent-copper-bright);
  margin: 0;
}
.error-hero p { margin: 0 auto 2rem; }

