/* ================================================================
   Schergen Corp – Startseite
   Farbwelt und Bausteine wie im SchergenPlanner, damit sich die
   Services untereinander nicht fremd anfühlen.
   ================================================================ */

:root {
  --bg:            #0e1016;
  --surface:       rgba(255, 255, 255, .045);
  --surface-2:     rgba(255, 255, 255, .075);
  --line:          rgba(255, 255, 255, .10);
  --line-soft:     rgba(255, 255, 255, .06);
  --text:          #e8ebf2;
  --text-dim:      #98a1b5;
  --accent:        #7aa2ff;
  --accent-2:      #b98cff;
  --ok:            #2fd68b;
  --warn:          #ffc861;
  --off:           #ff5468;
  --radius:        16px;
  --shadow:        0 18px 45px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2 { margin: 0; font-weight: 650; letter-spacing: -.02em; }

kbd {
  font: inherit;
  font-size: .74em;
  font-weight: 600;
  padding: .1em .42em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-dim);
}

/* Farbschleier im Hintergrund – liegt fest, scrollt nicht mit. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -10%, #26304a 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #2a2140 0%, transparent 55%),
    radial-gradient(700px 500px at 50% 110%, #1b3040 0%, transparent 60%);
}

/* ----------------------------------------------------------------
   Kopfzeile
   ---------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(14, 16, 22, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.01em; }
.topbar__right { display: flex; align-items: center; gap: .75rem; }
.topbar__logo  { font-size: 1.25rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: .4rem .8rem;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover  { background: var(--surface-2); border-color: rgba(255,255,255,.18); }
.btn--ghost { background: transparent; }
.btn--sm    { padding: .3rem .7rem; font-size: .84rem; }

.topbar__user {
  color: var(--text-dim);
  font-size: .86rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.topbar__user:hover { color: var(--accent); border-color: rgba(122,162,255,.4); }

.topbar__clock {
  color: var(--text-dim);
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
  padding: .3rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem) 3rem;
}

/* ----------------------------------------------------------------
   Kopfbereich
   ---------------------------------------------------------------- */
.hero { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.hero__eyebrow {
  margin: 0 0 .6rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-dim);
}

.hero__title {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.02;
  font-weight: 700;
}
.hero__title-accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: .12em;
}

.hero__claim {
  color: var(--text-dim);
  margin: .7rem auto 1.8rem;
  max-width: 46ch;
  font-size: 1.02rem;
}

.hero__search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(420px, 100%);
  margin: 0 auto;
}
.hero__search-icon {
  position: absolute;
  left: .9rem;
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
}
.hero__search input {
  width: 100%;
  padding: .7rem 3rem .7rem 2.4rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit;
}
.hero__search input::placeholder { color: var(--text-dim); }
.hero__search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
}
.hero__search input::-webkit-search-cancel-button { filter: invert(.6); }
.hero__kbd { position: absolute; right: .8rem; pointer-events: none; }
.hero__search input:focus ~ .hero__kbd { opacity: 0; }

.hero__meta {
  color: var(--text-dim);
  font-size: .84rem;
  margin: .9rem 0 0;
}

/* ----------------------------------------------------------------
   Kacheln
   ---------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(.9rem, 2vw, 1.25rem);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.15rem 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028));
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .14s, border-color .14s, box-shadow .14s;
}

/* Lichtkante am oberen Rand, leuchtet beim Überfahren auf. */
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .18s;
}
a.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 162, 255, .45);
  box-shadow: var(--shadow);
}
a.tile:hover::before { opacity: .9; }
a.tile:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .25);
}
a.tile:active { transform: translateY(-1px); }

.tile--planned { opacity: .5; }
.tile[hidden]  { display: none; }

.tile__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.tile__icon {
  font-size: 1.7rem;
  line-height: 1;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.tile__badge {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 650;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.tile__badge--live { color: #8ae9bf; border-color: rgba(47,214,139,.4);  background: rgba(47,214,139,.12); }
.tile__badge--beta { color: #ffdca0; border-color: rgba(255,200,97,.4);  background: rgba(255,200,97,.12); }

.tile__name { font-size: 1.12rem; margin-top: .15rem; }
.tile__desc { color: var(--text-dim); font-size: .9rem; margin: 0; flex: 1; }

.tile__foot {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .5rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line-soft);
}
.tile__tag {
  font-size: .74rem;
  color: var(--text-dim);
  padding: .18rem .55rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  white-space: nowrap;
}
.tile__tag--lock { color: #ffdca0; border-color: rgba(255, 200, 97, .3); }
.tile__go { margin-left: auto; color: var(--text-dim); font-size: .9rem; white-space: nowrap; }
a.tile:hover .tile__go { color: var(--accent); }

/* Erreichbarkeits-Punkt */
.tile__state { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: var(--text-dim); }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.tile__state[data-state="unknown"] .dot { animation: pulse 1.4s ease-in-out infinite; }
.tile__state[data-state="online"]  .dot { background: var(--ok);   box-shadow: 0 0 0 3px rgba(47,214,139,.18); }
.tile__state[data-state="missing"] .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255,200,97,.18); }
.tile__state[data-state="offline"] .dot { background: var(--off);  box-shadow: 0 0 0 3px rgba(255,84,104,.18); }

@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 2.5rem 1rem;
  margin: 0;
}
.empty[hidden] { display: none; }

.foot {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  color: var(--text-dim);
  font-size: .8rem;
}
.foot__sep { opacity: .5; }

@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; }
  .hero__kbd, .topbar__clock { display: none; }
}

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