/* ==========================================================================
   lecmich.IT — Design tokens & custom styles
   Tailwind CDN handles utility classes; this file carries everything
   Tailwind's default theme can't express: fonts, the signature network
   graphic, motion, and a few hand-tuned components.
   ========================================================================== */

:root {
  --color-navy: #0B1220;
  --color-navy-soft: #131C2E;
  --color-cyan: #06B6D4;
  --color-cyan-dark: #0891A6;
  --color-bg: #F8FAFC;
  --color-bg-cool: #EEF2F6;
  --color-text: #111827;
  --color-muted: #64748B;
  --color-white: #FFFFFF;

  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-head {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
}

/* Visible, consistent focus state everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--color-cyan);
  color: var(--color-navy);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: #E2E8F0;
  box-shadow: 0 1px 0 rgba(11, 18, 32, 0.02);
}

.nav-link {
  position: relative;
  color: var(--color-text);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--color-cyan);
  transition: width 0.2s var(--ease);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.75rem;
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease);
  text-align: center;
}
.btn-primary {
  background: var(--color-cyan);
  color: var(--color-navy);
}
.btn-primary:hover {
  background: #22C9E3;
  box-shadow: 0 8px 20px -6px rgba(6, 182, 212, 0.5);
}
.btn-primary:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid #CBD5E1;
}
.btn-outline:hover {
  border-color: var(--color-navy);
  background: var(--color-white);
}

.btn-ghost-light {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,0.28);
}
.btn-ghost-light:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

/* ---------- Signature hero graphic: system status panel ---------- */
.system-panel {
  background: var(--color-navy-soft);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-md);
}

.node {
  fill: var(--color-navy);
  stroke: #3B4A63;
  stroke-width: 1.5;
}
.node-active {
  stroke: var(--color-cyan);
}
.node-dot {
  fill: var(--color-cyan);
}
.link-line {
  stroke: #2A3752;
  stroke-width: 1.5;
  fill: none;
}
.link-line-flow {
  stroke: var(--color-cyan);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 6 10;
  animation: flow 3.5s linear infinite;
}
@keyframes flow {
  to { stroke-dashoffset: -160; }
}
.pulse-dot {
  animation: pulse 2.2s var(--ease) infinite;
  transform-origin: center;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.35); }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid #E2E8F0;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.5rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--color-text);
}
.faq-icon {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
  color: var(--color-cyan);
}
.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s var(--ease);
}
.faq-panel > div { overflow: hidden; }
.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-panel-inner {
  padding-bottom: 1.5rem;
  color: var(--color-muted);
  max-width: 60ch;
}

/* ---------- Service cards ---------- */
.service-card {
  background: var(--color-white);
  border: 1px solid #E5EAF1;
  border-radius: var(--radius-md);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.service-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 12px 28px -14px rgba(11, 18, 32, 0.18);
  transform: translateY(-2px);
}
.service-icon {
  color: var(--color-cyan-dark);
}

/* ---------- Step numbers (real sequence: a 4-step process) ---------- */
.step-index {
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: var(--color-cyan-dark);
  letter-spacing: 0.08em;
}

/* ---------- Misc ---------- */
.text-balance { text-wrap: balance; }

.dot-grid-bg {
  background-image: radial-gradient(circle, rgba(11,18,32,0.09) 1px, transparent 1px);
  background-size: 22px 22px;
}

.mobile-menu {
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
}
.mobile-menu[data-state="closed"] {
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu[data-state="open"] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ---------- Reduced motion ---------- */
@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;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Erweiterungen (Ausbaustufe 2)
   Aktive Navigation, Problem-Chips, Technologie-Leiste, Projektbeispiele,
   Preis-Modelle, Region, Kontaktformular, mobile CTA-Leiste, Porträt
   ========================================================================== */

/* ---------- Aktiver Navigationszustand (Scrollspy) ---------- */
.nav-link.is-active {
  color: var(--color-cyan-dark);
}
.nav-link.is-active::after {
  width: 100%;
}
.mobile-menu a.is-active {
  color: var(--color-cyan-dark);
  background: var(--color-bg-cool);
}

/* ---------- Problem-Chips im Hero ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #E2E8F0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.chip:hover,
.chip:focus-visible {
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-white);
}
.chip svg {
  color: var(--color-cyan);
  flex-shrink: 0;
}

/* ---------- Technologie-Leiste ---------- */
.tech-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  background: var(--color-white);
  color: #334155;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- Projektbeispiele ---------- */
.case-card {
  background: var(--color-white);
  border: 1px solid #E5EAF1;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.case-label {
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.case-step + .case-step {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #E2E8F0;
}

/* ---------- Leistungs-Details (natives <details>, kein JS) ---------- */
.service-details {
  margin-top: 1.25rem;
  border-top: 1px solid #EDF1F6;
  padding-top: 0.9rem;
}
.service-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  color: var(--color-cyan-dark);
  font-weight: 600;
  font-size: 0.875rem;
}
.service-details > summary::-webkit-details-marker { display: none; }
.service-details > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s var(--ease);
}
.service-details[open] > summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.service-details ul {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}
.service-details li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.55;
}
.service-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--color-cyan);
}
.service-card.is-dark .service-details { border-top-color: rgba(255,255,255,0.12); }
.service-card.is-dark .service-details > summary { color: var(--color-cyan); }
.service-card.is-dark .service-details li { color: #CBD5E1; }

/* ---------- Preis-/Abrechnungsmodelle ---------- */
.model-card {
  background: var(--color-white);
  border: 1px solid #E5EAF1;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  height: 100%;
}
.model-card h3 { margin-top: 0.9rem; }

/* ---------- Porträt ---------- */
.portrait-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-cool);
  border: 1px solid #E2E8F0;
}
.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.portrait-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.7rem 1.1rem;
  border-radius: 0 var(--radius-sm) 0 0;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- Kontaktformular ---------- */
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 0.4rem;
}
.form-label .opt {
  font-weight: 400;
  color: #94A3B8;
}
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.form-input::placeholder { color: #64748B; }
.form-input:hover { border-color: rgba(148, 163, 184, 0.45); }
.form-input:focus {
  outline: none;
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.06);
}
.form-input:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}
textarea.form-input { min-height: 148px; resize: vertical; }
.form-input[aria-invalid="true"] { border-color: #F87171; }

.form-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #FCA5A5;
}
.form-error.is-shown { display: block; }

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.875rem;
  color: #CBD5E1;
  line-height: 1.55;
}
.form-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--color-cyan);
}
.form-consent a {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Honeypot: für Menschen unsichtbar, für Bots ein Köder */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.55;
  display: none;
}
.form-status.is-shown { display: block; }
.form-status.is-ok {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #A5F3FC;
}
.form-status.is-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #FCA5A5;
}

button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Mobile CTA-Leiste ---------- */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid #E2E8F0;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.mobile-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
}
.mobile-cta .cta-call {
  border: 1.5px solid #CBD5E1;
  color: var(--color-navy);
}
.mobile-cta .cta-write {
  background: var(--color-cyan);
  color: var(--color-navy);
}
.mobile-cta[data-hidden="true"] {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .mobile-cta { display: none; }
}
/* Platz für die fixierte Leiste schaffen — nur auf Seiten, die sie haben */
@media (max-width: 1023px) {
  body:has(.mobile-cta) { padding-bottom: 72px; }
}

/* ---------- Region ---------- */
.region-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--color-white);
  border: 1px solid #E2E8F0;
  font-size: 0.875rem;
  color: #334155;
}

/* ---------- Prose (Unterseiten, Rechtstexte) ---------- */
.prose-block h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.prose-block h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.prose-block p { margin-bottom: 1rem; line-height: 1.7; color: #334155; }
.prose-block ul { margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
.prose-block ul li {
  position: relative;
  padding-left: 1.15rem;
  color: #334155;
  line-height: 1.65;
}
.prose-block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--color-cyan);
}
.prose-block a { color: var(--color-cyan-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Ausbaustufe 3 — Rhythmus und Hierarchie
   ========================================================================== */

/* ---------- Ablauf: bewusst ohne Karten, damit die Seite atmet ----------
   Vier Schritte auf einer durchgehenden Linie. Die große Ziffer trägt den
   Abschnitt, nicht ein weiterer weißer Kasten.                              */
.process {
  display: grid;
  gap: 2.5rem;
  counter-reset: none;
}
@media (min-width: 640px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
}
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; }
  .process-step { padding-right: 2rem; }
}

.process-step {
  position: relative;
  padding-top: 2rem;
}
.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #DDE4EC;
}
@media (min-width: 1024px) {
  .process-step:last-child::before { right: 0; }
}
.process-step::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--color-cyan);
  border-radius: 1px;
}
.process-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #C7D2DE;
  margin-bottom: 0.85rem;
}

/* ---------- Helle Variante des Systempanels ----------
   Damit der Fernwartungsbereich hell werden kann, ohne die Grafik zu
   verlieren. Dunkel bleibt so ein Akzent für Hero und Kontakt.             */
.system-panel-light {
  background: var(--color-white);
  border-color: #E2E8F0;
}
.system-panel-light .node {
  fill: #F1F5F9;
  stroke: #CBD5E1;
}
.system-panel-light .node-active {
  stroke: var(--color-cyan-dark);
}
.system-panel-light .node-dot {
  fill: var(--color-cyan-dark);
}
.system-panel-light .link-line {
  stroke: #DDE4EC;
}
.system-panel-light .link-line-flow {
  stroke: var(--color-cyan-dark);
}
