/* =========================================================
   EvacEye — Designsystem
   Farben, Typografie und Layout leiten sich direkt aus dem
   eigenen Produktkonzept ab: Orange = Person erkannt,
   Hellblau = kleiner Akzent für Sensorausfall, Neutral = kein Befund.
   Helles, seriöses Grundgerüst mit warmen Off-White-Tönen.
   ========================================================= */

:root {
  /* Farben — helles Grundgerüst */
  --ink: #221A14;              /* warmes Dunkelbraun-Schwarz für Text */
  --ink-soft: #4A3C30;
  --paper: #FBF7F0;            /* warmes Off-White, Basis hell */
  --paper-alt: #F3ECE0;        /* etwas wärmerer Ton für Wechsel-Sections */
  --paper-deep: #EADFCB;       /* tiefster warmer Ton, Seitenende */
  --panel: #FFFFFF;            /* Karten-Hintergrund */
  --panel-line: rgba(34, 26, 20, 0.1);
  --text-hi: #221A14;
  --text-mid: #4A3C30;
  --text-low: #6B5B4D;
  --signal-occupied: #FF7A33;   /* Person erkannt — Hauptakzent Orange */
  --signal-hot: #E8491F;        /* Person + Hitze, kräftigeres Orange-Rot */
  --signal-clear: #D9CBB8;      /* kein Befund, neutral warm */
  --signal-offline: #4FB3E8;    /* Sensorausfall — einziger Blau-Akzent */

  /* Typografie */
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
}

* { 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;
    scroll-behavior: auto !important;
  }
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

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

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.72em;
  color: var(--text-low);
  margin-right: 0.5em;
}

/* ---------- Scan progress bar ---------- */
.scan-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--signal-occupied), var(--signal-hot));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(251, 247, 240, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--panel-line);
  background: rgba(251, 247, 240, 0.94);
  box-shadow: 0 1px 24px -8px rgba(34, 26, 20, 0.12);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-icon {
  height: 40px;
  width: auto;
  display: block;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
}
.brand-word-evac { color: var(--ink); }
.brand-word-eye { color: var(--signal-occupied); }
.main-nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-left: auto;
}
.main-nav a {
  color: var(--text-mid);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--signal-occupied); }

.btn--cosima-small {
  background: var(--ink);
  color: var(--paper);
  padding: 9px 18px;
  font-size: 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.btn--cosima-small:hover { background: var(--signal-occupied); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.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); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn--primary {
  background: var(--signal-occupied);
  color: #1A0E05;
  box-shadow: 0 8px 24px -8px rgba(255, 122, 51, 0.55);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -6px rgba(255, 122, 51, 0.65); }
.btn--ghost {
  background: transparent;
  color: var(--text-hi);
  border-color: var(--panel-line);
}
.btn--ghost:hover { border-color: var(--text-mid); }
.btn--block { width: 100%; }
.btn--cosima {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--cosima:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.btn--team,
.btn--hochschule {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  border-width: 1.5px;
}
.btn--team:hover,
.btn--hochschule:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px var(--pad) 90px;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -150px -10% auto -10%;
  height: 780px;
  z-index: 0;
  overflow: hidden;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.9;
}
.hero-bg-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(251, 247, 240, 0.15) 0%,
    rgba(251, 247, 240, 0.55) 55%,
    var(--paper) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-hi);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot--occupied { background: var(--signal-occupied); box-shadow: 0 0 0 0 rgba(255,122,51,0.7); animation: pulse 2.2s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,122,51,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255,122,51,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,51,0); }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.04;
  color: var(--text-hi);
  margin-bottom: 26px;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-hi);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero-actions-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Hero floorplan (signature element) ---------- */
.hero-floorplan { position: relative; z-index: 1; }

.floorplan-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 640px;
  box-shadow: 0 30px 60px -30px rgba(34, 26, 20, 0.25);
}

.floorplan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.floorplan-title { color: var(--text-mid); }
.floorplan-live {
  display: flex; align-items: center; gap: 7px;
  color: var(--signal-occupied);
}

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

.room {
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid var(--signal-clear);
  background: var(--paper-alt);
  transition: transform 0.2s, border-color 0.2s;
  cursor: default;
}
.room:hover { transform: translateY(-2px); }
.room-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-mid); }
.room-icon { font-size: 1.3rem; line-height: 1; }
.room-status { font-size: 0.8rem; color: var(--text-low); }

.room.is-occupied { border-color: var(--signal-occupied); }
.room.is-occupied .room-icon { color: var(--signal-occupied); }
.room.is-occupied .room-status { color: var(--signal-occupied); }

.room.is-hot { border-color: var(--signal-hot); background: rgba(255, 61, 46, 0.08); }
.room.is-hot .room-icon--flame { color: var(--signal-hot); }
.room.is-hot .room-status { color: var(--signal-hot); }

.room.is-clear .room-icon { color: var(--text-low); }

.room.is-offline { border-color: var(--signal-offline); border-style: dashed; }
.room.is-offline .room-icon { color: var(--signal-offline); }
.room.is-offline .room-status { color: var(--signal-offline); }

.floorplan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-line);
  font-size: 0.78rem;
  color: var(--text-low);
}
.floorplan-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend-dot--occupied { background: var(--signal-occupied); }
.legend-dot--hot { background: var(--signal-hot); }
.legend-dot--clear { background: var(--signal-clear); }
.legend-dot--offline { background: var(--signal-offline); }

/* ---------- Hero meta strip ---------- */
.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--panel-line);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-hi);
}
.meta-label { font-size: 0.85rem; color: var(--text-low); max-width: 220px; }

/* ---------- Generic section ---------- */
.section {
  padding: 110px var(--pad);
  border-top: 1px solid var(--panel-line);
  background: var(--paper);
  position: relative;
}
.section--problem { background: var(--paper); }
.section--loesung { background: var(--paper-alt); }
.section--technik { background: var(--paper); }
.section--team { background: var(--paper-alt); }

.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-low);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
}
.section-title {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  max-width: 760px;
  margin-bottom: 22px;
}
.section-lead {
  font-size: 1.08rem;
  color: var(--text-mid);
  max-width: 680px;
}

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}
.problem-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.problem-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-hi);
}
.problem-card p { color: var(--text-mid); font-size: 0.95rem; }

.callout {
  margin-top: 36px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,122,51,0.12), rgba(255,122,51,0.02));
  border: 1px solid rgba(255,122,51,0.3);
}
.callout p { color: var(--text-hi); font-size: 1.02rem; }
.callout strong { color: var(--signal-occupied); }

/* ---------- Lösung ---------- */
.loesung-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  margin-top: 52px;
  align-items: start;
}
.feature-row {
  padding: 22px 0;
  border-top: 1px solid var(--panel-line);
}
.loesung-text .feature-row:first-child { border-top: none; padding-top: 0; }
.feature-row h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--text-hi); }
.feature-row p { color: var(--text-mid); font-size: 0.96rem; }

.loesung-visual { position: sticky; top: 110px; }

.room-detail-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-left: 3px solid var(--signal-hot);
  border-radius: var(--radius);
  padding: 28px;
}
.room-detail-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--signal-hot);
  display: block;
  margin-bottom: 18px;
}
.room-detail-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.room-detail-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-line);
  font-size: 0.92rem;
}
.room-detail-list li:last-child { border-bottom: none; padding-bottom: 0; }
.room-detail-list span { color: var(--text-low); }
.room-detail-list strong { font-family: var(--font-mono); color: var(--text-hi); font-weight: 500; }
.status-flag { color: var(--signal-hot) !important; }
.room-detail-note { font-size: 0.85rem; color: var(--text-low); line-height: 1.55; }

/* ---------- Technik pipeline ---------- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 56px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-step {
  flex: 1 1 0;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.pipeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,122,51,0.12);
  color: var(--signal-occupied);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.pipeline-step h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text-hi); }
.pipeline-step p { font-size: 0.86rem; color: var(--text-mid); }
.pipeline-connector {
  width: 28px;
  flex-shrink: 0;
  align-self: center;
  height: 1px;
  background: var(--panel-line);
  position: relative;
}
.pipeline-connector::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--text-low);
  border-bottom: 1.5px solid var(--text-low);
  transform: translateY(-50%) rotate(-45deg);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.spec-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.spec-card h4 {
  font-size: 0.92rem;
  color: var(--signal-occupied);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.spec-card ul { display: flex; flex-direction: column; gap: 10px; }
.spec-card li {
  font-size: 0.88rem;
  color: var(--text-mid);
  padding-left: 16px;
  position: relative;
}
.spec-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-low);
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 52px;
}
.team-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 28px;
}
.team-role-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--signal-occupied);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.team-card h3 { font-size: 1.25rem; margin-bottom: 12px; color: var(--text-hi); }
.team-tasks { font-size: 0.92rem; color: var(--text-mid); margin-bottom: 14px; }
.team-exp { font-size: 0.86rem; color: var(--text-low); font-style: italic; line-height: 1.55; }

.hochschule-strip {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  flex-wrap: wrap;
  gap: 16px;
}
.hochschule-strip strong { display: block; color: var(--text-hi); margin-bottom: 4px; }
.hochschule-strip span { font-size: 0.86rem; color: var(--text-low); }
.hochschule-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--signal-occupied);
  color: var(--signal-occupied);
  transition: background 0.2s, color 0.2s;
}
.hochschule-badge:hover { background: var(--signal-occupied); color: #fff; }

/* ---------- Kontakt ---------- */
.section--kontakt {
  background: var(--paper-deep);
  color: var(--ink);
  border-top: 1px solid var(--panel-line);
}
.section--kontakt .section-eyebrow,
.section--kontakt .nav-index { color: var(--text-low); }
.section--kontakt .section-title { color: var(--ink); }
.section--kontakt .section-lead { color: var(--text-mid); }

.kontakt-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 56px;
  margin-top: 52px;
}

.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1.5px solid var(--panel-line);
  background: #fff;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--signal-occupied);
}
.section--kontakt .btn--primary { color: #1A0E05; }
.form-note {
  font-size: 0.88rem;
  color: #1f7a3d;
  min-height: 1.2em;
}

.kontakt-info { display: flex; flex-direction: column; gap: 28px; }
.info-block h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-low);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.info-block p { color: var(--ink); font-size: 0.96rem; line-height: 1.6; }
.email-link {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--signal-occupied);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.email-link:hover { color: var(--signal-occupied); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-deep);
  color: var(--text-mid);
  border-top: 1px solid var(--panel-line);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.back-to-top { font-weight: 600; color: var(--ink); }
.back-to-top:hover { text-decoration: underline; color: var(--signal-occupied); }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .problem-grid { grid-template-columns: 1fr; }
  .loesung-layout { grid-template-columns: 1fr; }
  .loesung-visual { position: static; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .kontakt-layout { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipeline-connector { width: 1px; height: 24px; align-self: flex-start; margin-left: 19px; }
  .pipeline-connector::after { right: -3px; top: auto; bottom: 0; transform: rotate(45deg); }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(251, 247, 240, 0.98);
    border-bottom: 1px solid var(--panel-line);
    box-shadow: 0 12px 24px -12px rgba(34, 26, 20, 0.15);
    padding: 12px var(--pad) 24px;
    gap: 4px;
  }
  .main-nav.is-open a { padding: 12px 0; font-size: 1rem; color: var(--text-hi); }

  .hero { padding-top: 120px; }
  .hero-meta { flex-direction: column; gap: 22px; }
  .specs-grid { grid-template-columns: 1fr; }
  .floorplan-grid { grid-template-columns: 1fr; }
}
