/* ======================================================
   Erion's Service — Stylesheet
   Konzept: "Bauplan-Präzision" — dünne Linien, Raster-Punkte
   und Eckmarkierungen wie auf einer technischen Zeichnung,
   übersetzt in ein ruhiges, blaues, minimalistisches Layout.
   ====================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Design Tokens ---------- */
:root {
  --ink: #163A5E;
  --blue: #1668A8;
  --blue-bright: #4FA8E8;
  --blue-dark: #0F4E80;
  --sky: #E9F4FD;
  --line: #CFE5F7;
  --paper: #FAFCFF;
  --white: #FFFFFF;
  --muted: #4F6E8C;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

  --container: 1180px;
  --radius-control: 8px;
  --radius-tile: 3px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { color: var(--muted); max-width: 62ch; }
p.lede { font-size: 1.15rem; color: var(--ink); opacity: 0.85; }

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

section { padding: var(--space-6) 0; }
section.tight { padding: var(--space-5) 0; }

.eyebrow-none { display: none; } /* placeholder guard, no all-caps eyebrows used */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 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;
}

/* ---------- Blueprint grid backdrop ---------- */
.bp-field {
  position: relative;
  overflow: hidden;
}
.bp-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0) 85%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0) 85%);
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { color: var(--blue); padding: 13px 4px; }
.btn-ghost:hover { color: var(--blue-dark); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  white-space: nowrap;
}
.brand-word strong { font-weight: 700; }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; gap: var(--space-4); }
.nav-menu a {
  font-weight: 500;
  color: var(--ink);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .18s ease, color .18s ease;
}
.nav-menu a:hover { color: var(--blue); }
.nav-menu a[aria-current="page"] { border-color: var(--blue); color: var(--blue); }

.header-cta { margin-left: var(--space-4); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.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); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-6) 0 var(--space-5); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-content { animation: heroRise .7s ease both; }
.hero-art { animation: heroRise .7s ease .12s both; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 { margin-bottom: var(--space-2); }
.hero .lede { margin-bottom: var(--space-3); }
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }

.trust-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}
.trust-row div { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--muted); }
.trust-row svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }

.hero-art-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  padding: var(--space-3);
  border-radius: var(--radius-tile);
}
.corner { position: relative; }
.corner::before, .corner::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--blue);
}
.corner::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ---------- Section headings ---------- */
.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head h2 { margin-bottom: var(--space-1); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Service tiles ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service-tile {
  position: relative;
  padding: var(--space-3) var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color .18s ease;
}
.service-tile::before, .service-tile::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--blue);
  opacity: 0;
  transition: opacity .18s ease;
}
.service-tile::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.service-tile::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.service-tile:hover, .service-tile:focus-within { background: var(--white); }
.service-tile:hover::before, .service-tile:hover::after,
.service-tile:focus-within::before, .service-tile:focus-within::after { opacity: 1; }

.service-tile .icon { color: var(--blue); width: 38px; height: 38px; margin-bottom: var(--space-2); }
.service-tile h3 { font-size: 1.02rem; margin-bottom: 6px; }
.service-tile p { font-size: 0.92rem; }

.services-more { margin-top: var(--space-3); }

/* ---------- Divider list (Why us / Values) ---------- */
.divider-list { border-top: 1px solid var(--line); }
.divider-item {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.divider-item h3 { align-self: start; }
.divider-item p { max-width: 52ch; }

/* ---------- Process steps ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.process-step { padding-top: var(--space-2); border-top: 2px solid var(--blue); }
.process-step .num { font-family: var(--font-display); font-weight: 700; color: var(--blue); font-size: 1.4rem; display: block; margin-bottom: 6px; }
.process-step h3 { margin-bottom: 6px; font-size: 1.05rem; }
.process-step p { font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-tile);
}
.cta-band .container { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.cta-inner h2 { color: var(--white); margin-bottom: 4px; }
.cta-inner p { color: #B9C7DE; }
.cta-band .btn-primary { background: var(--white); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--sky); }

/* ---------- Leistungen detail rows ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.service-detail .icon-frame {
  width: 72px; height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
}
.service-detail .icon-frame svg { width: 34px; height: 34px; color: var(--blue); }
.service-detail h3 { margin-bottom: 6px; }
.service-detail ul.tasks { margin-top: var(--space-1); }
.service-detail ul.tasks li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 4px;
}
.service-detail ul.tasks li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 1.5px; background: var(--blue);
}

.category-nav {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: var(--space-2) 0; margin-bottom: var(--space-2);
}
.category-nav a { font-weight: 500; color: var(--blue); font-size: 0.95rem; }
.category-nav a:hover { color: var(--blue-dark); }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  padding: var(--space-3);
  background: var(--white);
  display: flex; gap: var(--space-2); align-items: flex-start;
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sky); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.team-card h3 { font-size: 1rem; margin-bottom: 2px; }
.team-card .role { color: var(--muted); font-size: 0.88rem; margin-bottom: 6px; display: block; }
.team-card p { font-size: 0.92rem; }

/* ---------- Values ---------- */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.value-item { border-top: 2px solid var(--blue); padding-top: var(--space-2); }
.value-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.value-item p { font-size: 0.92rem; }

/* ---------- Area / map block ---------- */
.area-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: center;
}
.area-map { border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--white); padding: var(--space-3); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.3fr;
  gap: var(--space-5);
  align-items: start;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--white);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}
.contact-card h3 { font-size: 0.98rem; margin-bottom: 8px; }
.contact-card a.big-link { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.contact-card a.big-link:hover { color: var(--blue); }
.quick-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }

.form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--white);
  padding: var(--space-4);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.form-field { margin-bottom: var(--space-2); }
.form-field label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }
.form-field .req { color: var(--blue); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 11px 13px;
  background: var(--paper);
  transition: border-color .18s ease, background-color .18s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  background: var(--white);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; margin-top: var(--space-2); }
.form-success {
  display: none;
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--blue);
  border-radius: var(--radius-tile);
  background: var(--sky);
  color: var(--blue-dark);
  font-size: 0.92rem;
}
.form-success.is-visible { display: block; }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 74ch; }
.legal-content h2 { margin-top: var(--space-4); margin-bottom: var(--space-1); font-size: 1.2rem; }
.legal-content p, .legal-content li { color: var(--muted); margin-bottom: var(--space-1); font-size: 0.96rem; }
.legal-content ul { margin: var(--space-1) 0 var(--space-2) 18px; list-style: disc; }
.legal-note {
  border-left: 3px solid var(--blue);
  padding: var(--space-2) var(--space-3);
  background: var(--sky);
  margin-bottom: var(--space-4);
  font-size: 0.92rem;
  color: var(--ink);
  border-radius: 0 var(--radius-tile) var(--radius-tile) 0;
}

/* ---------- Page header (inner pages) ---------- */
.page-header { padding: var(--space-5) 0 var(--space-4); border-bottom: 1px solid var(--line); }
.page-header p.lede { margin-top: var(--space-1); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C6D3E7; margin-top: var(--space-6); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-5) 0 var(--space-4);
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand p { color: #C6D3E7; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.footer-brand p span { display: block; font-family: var(--font-body); font-weight: 400; color: #8FA3C4; font-size: 0.85rem; margin-top: 4px; }
.footer-brand .brand-mark { width: 38px; height: 38px; }
.footer-col h3 { color: var(--white); font-size: 0.92rem; margin-bottom: var(--space-2); }
.footer-col p, .footer-col a { color: #AEBEDA; font-size: 0.92rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #22385C;
  padding: var(--space-2) 0;
  font-size: 0.82rem;
  color: #8397B9;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ======================================================
   Responsive
   ====================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .divider-item { grid-template-columns: 1fr; gap: 6px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: var(--space-2); }
  .area-block { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 84px; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--space-2) 24px var(--space-3);
    gap: var(--space-2);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-menu.is-open { max-height: 320px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 56px 1fr; }
  .service-detail .icon-frame { width: 56px; height: 56px; }
  .service-detail .icon-frame svg { width: 26px; height: 26px; }
  .process-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-content, .hero-art { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
