/* ─── tokens ─── */
:root {
  --bg: #060816;
  --panel: rgba(11, 18, 41, 0.72);
  --text: #f4f7ff;
  --muted: #b7c4ee;
  --line: rgba(143, 176, 255, 0.25);
  --playhub: #17c6a3;
  --finance: #f4b334;
  --seller: #4da6ff;
  --katrin: #e86caf;
  --soon: #9b90c8;
  --radius-card: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(77, 166, 255, 0.18), transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(244, 179, 52, 0.22), transparent 35%),
    radial-gradient(circle at 75% 88%, rgba(23, 198, 163, 0.18), transparent 40%),
    linear-gradient(160deg, #04050d 0%, #0b1430 52%, #0a0f23 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── bg grid ─── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(131, 157, 241, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(131, 157, 241, 0.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 90%);
}

/* ─── hero ─── */
.hero {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 7rem 0 3.5rem;
  animation: rise 0.9s var(--ease) both;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 0.78rem/1 "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c8d5ff;
  background: rgba(14, 26, 62, 0.65);
  backdrop-filter: blur(6px);
}

.tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--playhub);
  box-shadow: 0 0 8px var(--playhub);
  animation: pulse-dot 2s ease-in-out infinite;
}

h1 {
  margin: 1.2rem 0 0;
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

h1 .gradient-text {
  background: linear-gradient(135deg, var(--seller) 0%, var(--playhub) 50%, var(--finance) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
}

.subtitle {
  margin: 1.1rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  line-height: 1.55;
}

/* ─── CTA button ─── */
.ghost-btn {
  position: relative;
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 200px;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid rgba(77, 166, 255, 0.35);
  background: linear-gradient(135deg, rgba(77, 166, 255, 0.2), rgba(23, 198, 163, 0.18));
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
  overflow: hidden;
}

.ghost-btn::after {
  content: "↓";
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 166, 255, 0.6);
  box-shadow:
    0 8px 30px rgba(77, 166, 255, 0.15),
    0 2px 10px rgba(23, 198, 163, 0.1);
  background: linear-gradient(135deg, rgba(77, 166, 255, 0.3), rgba(23, 198, 163, 0.25));
}

.ghost-btn:hover::after {
  transform: translateY(3px);
}

/* ─── projects grid ─── */
.projects {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* ─── cards ─── */
.card {
  position: relative;
  padding: 1.4rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: rise 0.8s var(--ease) both;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
}

.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }
.card:nth-child(5) { animation-delay: 0.32s; }

/* ── state-driven borders ── */

/* default: neutral gray */
.card {
  border-color: rgba(150, 165, 210, 0.2);
}
.card:hover {
  border-color: rgba(150, 165, 210, 0.4);
  box-shadow:
    0 8px 36px rgba(150, 165, 210, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* online → green */
.project-card[data-state="online"] {
  border-color: rgba(74, 234, 162, 0.35);
}
.project-card[data-state="online"]:hover {
  border-color: rgba(74, 234, 162, 0.6);
  box-shadow:
    0 8px 36px rgba(74, 234, 162, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* offline → red */
.project-card[data-state="offline"] {
  border-color: rgba(255, 107, 127, 0.35);
  background: rgba(33, 18, 37, 0.65);
}
.project-card[data-state="offline"]:hover {
  border-color: rgba(255, 107, 127, 0.55);
  box-shadow:
    0 8px 36px rgba(255, 107, 127, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* colored top accent line */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease);
}
.card:hover::before { opacity: 1; }

/* accent line color follows status */
.card::before { background: rgba(150, 165, 210, 0.4); }
.project-card[data-state="online"]::before  { background: rgba(74, 234, 162, 0.8); }
.project-card[data-state="offline"]::before { background: rgba(255, 107, 127, 0.8); }

/* card icon */
.card-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.card h2 {
  margin: 0.3rem 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

/* ─── chip / status ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font: 600 0.7rem/1 "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #dff6ff;
  background: rgba(17, 39, 72, 0.6);
}

.chip-muted {
  color: #ddd4ff;
  background: rgba(54, 44, 88, 0.55);
}

/* status with pulsing dot */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  font: 600 0.72rem/1.2 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-checking {
  color: #cdd7ff;
}
.status-checking::before {
  background: #cdd7ff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.status-online {
  color: #85f7cf;
}
.status-online::before {
  background: #4aeaa2;
  box-shadow: 0 0 8px rgba(74, 234, 162, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-offline {
  color: #ff9aa9;
}
.status-offline::before {
  background: #ff6b7f;
  box-shadow: 0 0 6px rgba(255, 107, 127, 0.5);
}

/* ─── card links ─── */
.card-link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: 600 0.92rem/1.2 "JetBrains Mono", monospace;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 0.15rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
  transition:
    border-color 0.25s ease,
    gap 0.25s var(--ease);
}

.card-link::after {
  content: "→";
  font-size: 0.85em;
  transition: transform 0.25s var(--ease);
}

.card-link:hover {
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

.card-link:hover::after {
  transform: translateX(3px);
}

.card-link-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.card-link-disabled::after {
  content: "⏳";
}



/* ─── footer ─── */
footer {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(143, 176, 255, 0.1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer p {
  margin: 0;
  color: #7b8fc4;
  font: 500 0.82rem/1.5 "JetBrains Mono", monospace;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: #7b8fc4;
  text-decoration: none;
  font: 500 0.82rem/1.5 "JetBrains Mono", monospace;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* ─── animations ─── */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── responsive ─── */
@media (max-width: 640px) {
  .hero {
    padding-top: 4.2rem;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
