/* =============================================================
   privhost – Stylesheet der Startseite
   Gleiche Sprache wie share.privhost.de: eine Schrift (Inter),
   monochrome Flächen, ein Signalblau. Die Seite steht auf einem
   ruhigen Hintergrund aus Punktraster und zwei wandernden
   Lichtern; die Kacheln reagieren auf den Zeiger.
   Farbschema über [data-theme] am <html>-Element.
   ============================================================= */

@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}

:root {
  --font-sans: 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-2: #f7f7f6;
  --sunken: #e9e9e6;
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.18);
  --text: #111111;
  --text-2: #5f5f5f;
  --text-3: #8f8f8f;

  --ink: #111111;
  --ink-text: #ffffff;

  --accent: #2456f0;
  --accent-soft: rgba(36, 86, 240, 0.1);
  --accent-line: rgba(36, 86, 240, 0.45);
  --ok: #1d9a5a;
  --ok-soft: rgba(29, 154, 90, 0.1);

  /* Hintergrundlichter und Rasterpunkte */
  --spot: rgba(36, 86, 240, 0.14);
  --glow-a: rgba(36, 86, 240, 0.13);
  --glow-b: rgba(17, 17, 17, 0.07);
  --dot: rgba(17, 17, 17, 0.14);

  --shadow-md: 0 1px 2px rgba(17, 17, 17, 0.04), 0 16px 48px -20px rgba(17, 17, 17, 0.18);
  --shadow-lift: 0 2px 6px rgba(17, 17, 17, 0.05), 0 34px 70px -26px rgba(17, 17, 17, 0.3);

  --r-sm: 8px;
  --r-md: 12px;
  --r-xl: 26px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 600ms;

  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --page-x: clamp(20px, 5vw, 48px);
}

:root[data-theme='dark'] {
  --bg: #0d0d0e;
  --surface: #151517;
  --surface-2: #1b1b1e;
  --sunken: #09090a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f2f2;
  --text-2: #a1a1a6;
  --text-3: #6f6f75;

  --ink: #f2f2f2;
  --ink-text: #0d0d0e;

  --accent: #5b83ff;
  --accent-soft: rgba(91, 131, 255, 0.14);
  --accent-line: rgba(91, 131, 255, 0.55);
  --ok: #3ec57d;
  --ok-soft: rgba(62, 197, 125, 0.12);

  --spot: rgba(91, 131, 255, 0.22);
  --glow-a: rgba(91, 131, 255, 0.2);
  --glow-b: rgba(255, 255, 255, 0.05);
  --dot: rgba(255, 255, 255, 0.12);

  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 60px -24px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.55), 0 36px 80px -28px rgba(0, 0, 0, 0.95);
}

/* ---------- Grundlagen ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

html[data-theme='dark'] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-med) ease, color var(--t-med) ease;
}

h1,
h2,
h3,
p,
ul,
li {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 40;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: top var(--t-fast) ease;
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- Hintergrund ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Punktraster, das nach unten hin ausblendet. */
.ambient__grid {
  position: absolute;
  inset: -1px;
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000, transparent 75%);
  opacity: 0.9;
  transition: opacity var(--t-med) ease;
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.ambient__glow--a {
  top: -22vmax;
  left: 50%;
  width: 62vmax;
  height: 62vmax;
  margin-left: -31vmax;
  background: var(--glow-a);
  animation: drift-a 26s var(--ease-in-out, ease-in-out) infinite alternate;
}

.ambient__glow--b {
  bottom: -30vmax;
  right: -12vmax;
  width: 52vmax;
  height: 52vmax;
  background: var(--glow-b);
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from {
    transform: translate3d(-6%, -3%, 0) scale(1);
  }
  to {
    transform: translate3d(7%, 5%, 0) scale(1.12);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(4%, 4%, 0) scale(1.08);
  }
  to {
    transform: translate3d(-8%, -4%, 0) scale(1);
  }
}

/* ---------- Bewegung ---------- */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

.reveal {
  animation: reveal var(--t-slow) var(--ease-out) both;
}

.reveal[data-i='1'] {
  animation-delay: 80ms;
}

.reveal[data-i='2'] {
  animation-delay: 180ms;
}

.reveal[data-i='3'] {
  animation-delay: 260ms;
}

.reveal[data-i='4'] {
  animation-delay: 340ms;
}

.reveal[data-i='5'] {
  animation-delay: 420ms;
}

/* ---------- Kopf- und Fußzeile ---------- */

.site-header {
  height: 76px;
  padding: 0 var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform var(--t-med) var(--ease-spring);
}

.brand:hover .brand__mark {
  transform: rotate(45deg);
}

.brand__mark circle {
  fill: var(--ink);
}

.brand__mark rect {
  fill: var(--ink-text);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--sunken);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform var(--t-med) var(--ease-spring), opacity var(--t-fast) ease;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

/* Der Inhalt sitzt optisch mittig, auch wenn wenig darin steht. */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) var(--page-x) clamp(48px, 8vh, 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-footer {
  padding: 22px var(--page-x) 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: var(--text-3);
  transition: color var(--t-fast) ease;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- Kopfbereich ---------- */

.hero {
  text-align: center;
  margin-bottom: clamp(34px, 6vh, 60px);
}

.hero__title {
  font-size: clamp(44px, 9vw, 76px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
}

/* Ein Hauch Verlauf: unten etwas weicher als oben. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero__title {
    background: linear-gradient(178deg, var(--text) 42%, var(--text-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__sub {
  margin: 16px auto 0;
  max-width: 44ch;
  color: var(--text-2);
  font-size: 16.5px;
  text-wrap: pretty;
}

/* ---------- Werkzeugraster ---------- */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

/* Die Kacheln einer Reihe sind immer gleich hoch. */
.tools > li {
  display: flex;
}

.tool {
  position: relative;
  flex: 1;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out),
    border-color var(--t-fast) ease, background-color var(--t-med) ease;
}

/* Lichtschein, der dem Zeiger folgt (Position aus site.js). */
.tool__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 66%);
  transition: opacity var(--t-med) ease;
}

/* Haarfeiner Verlaufsrand, der beim Zeigen aufleuchtet. */
.tool__ring {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, var(--accent-line), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) ease;
}

.tool--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.tool--link:hover .tool__glow,
.tool--link:hover .tool__ring {
  opacity: 1;
}

.tool--link:focus-visible {
  border-radius: var(--r-xl);
}

.tool__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool__icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease,
    transform var(--t-med) var(--ease-spring), box-shadow var(--t-fast) ease;
}

:root[data-theme='dark'] .tool__icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tool__icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--text);
  transition: stroke var(--t-fast) ease, transform var(--t-med) var(--ease-spring);
}

.tool--link:hover .tool__icon {
  background: var(--ink);
  border-color: var(--ink);
  transform: rotate(-5deg) scale(1.04);
}

.tool--link:hover .tool__icon svg {
  stroke: var(--ink-text);
  transform: translateY(-1px);
}

.tool__body {
  margin-top: 20px;
  display: block;
}

.tool__name {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.tool__host {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
}

.tool__text {
  display: block;
  margin-top: 10px;
  color: var(--text-2);
  text-wrap: pretty;
}

.tool__foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool__go {
  font-size: 14.5px;
  font-weight: 500;
}

.tool__arrow {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease,
    transform var(--t-med) var(--ease-spring);
}

.tool__arrow svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.tool--link:hover .tool__arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ink-text);
  transform: translateX(3px);
}

/* Zustandsmarke: online oder in Arbeit. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.tag__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.tag--live .tag__dot {
  animation: breathe 2.6s var(--ease-out) infinite;
}

/* Der Platzhalter bleibt ruhig: gestrichelt, ohne Fläche. */
.tool--soon {
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-3);
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
}

.tool--soon .tool__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}

.tool__plus {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  color: var(--text-3);
}

.tool__plus svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

@media (pointer: coarse) {
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
}

/* Einspaltig braucht der Platzhalter keine Höhe zu halten. */
@media (max-width: 620px) {
  .tool--soon {
    min-height: 0;
    flex-direction: row;
    gap: 12px;
    padding: 20px;
  }

  .tool__plus {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
