:root {
  --black: #050608;
  --ink: #0b0f14;
  --panel: rgba(22, 25, 32, 0.72);
  --red: #ef1d2f;
  --red-deep: #8f0713;
  --text: #f7f7f8;
  --muted: #aeb7c5;
  --card-text: #10141b;
  --card-muted: #6e7888;
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 19% 12%, rgba(239, 29, 47, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 35%, rgba(255, 255, 255, 0.08), transparent 28rem),
    linear-gradient(135deg, #17191d 0%, #07080b 54%, #10141b 100%);
  animation: page-fade 700ms ease-out both;
}

.landing-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px) clamp(18px, 7vw, 128px) 72px;
}

.landing-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 72%, transparent);
  pointer-events: none;
  animation: grid-rise 1100ms ease-out both;
}

.bg-stripe {
  position: absolute;
  top: -18vh;
  bottom: -22vh;
  width: 19vw;
  min-width: 180px;
  transform: skewX(-30deg);
  background: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  animation: stripe-sweep 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bg-stripe-one {
  left: 1vw;
}

.bg-stripe-two {
  left: 19vw;
  width: 9vw;
  background: rgba(239, 29, 47, 0.08);
}

.red-glow {
  position: absolute;
  right: 8vw;
  bottom: 2vh;
  width: 36vw;
  height: 36vw;
  min-width: 260px;
  min-height: 260px;
  background: radial-gradient(circle, rgba(239, 29, 47, 0.22), transparent 68%);
  pointer-events: none;
  animation: glow-breathe 2400ms ease-in-out 800ms infinite alternate;
}

.hero,
.workspace-grid {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
}

.brand-lockup {
  display: grid;
  place-items: center;
  width: clamp(112px, 10vw, 156px);
  height: clamp(112px, 10vw, 156px);
  border-radius: 8px;
  background: #050608;
  border: 1px solid rgba(239, 29, 47, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), 0 0 42px rgba(239, 29, 47, 0.2);
  overflow: hidden;
}

.brand-lockup img {
  width: 118%;
  height: 118%;
  object-fit: contain;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  margin-top: clamp(34px, 5vw, 72px);
}

.hero-grid > div {
  animation: hero-enter 760ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.eyebrow {
  margin: 0 0 14px;
  color: #ff5f6c;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(2.6rem, 5.7vw, 5.85rem);
  line-height: 0.93;
  font-weight: 900;
}

.brand-title {
  max-width: 820px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-title span {
  display: inline;
  color: #f7f7f8;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
}

.brand-title-red {
  color: var(--red) !important;
}

.intro {
  max-width: 650px;
  margin: 26px 0 0;
  color: #c8ced9;
  font-size: clamp(1rem, 1.35vw, 1.45rem);
  line-height: 1.55;
  font-weight: 700;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 300px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  animation: panel-enter 720ms cubic-bezier(0.2, 0.8, 0.2, 1) 420ms both;
}

.status-panel strong,
.status-panel span {
  display: block;
}

.status-panel strong {
  font-size: 1.22rem;
}

.status-panel span {
  margin-top: 4px;
  color: #c2c8d2;
  font-weight: 700;
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 14px rgba(34, 197, 94, 0.13);
  flex: 0 0 auto;
  animation: status-pulse 1700ms ease-in-out infinite;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: clamp(40px, 5vw, 64px);
}

.workspace-card {
  display: flex;
  flex-direction: column;
  min-height: 342px;
  padding: clamp(24px, 2.5vw, 36px);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 243, 247, 0.98)),
    #fff;
  color: var(--card-text);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.36);
  overflow: hidden;
  position: relative;
  animation: card-enter 760ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.workspace-card:nth-child(1) {
  animation-delay: 520ms;
}

.workspace-card:nth-child(2) {
  animation-delay: 660ms;
}

.workspace-card:nth-child(3) {
  animation-delay: 800ms;
}

.workspace-card.active-card {
  cursor: pointer;
}

.workspace-card.active-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 82px rgba(0, 0, 0, 0.44);
}

.workspace-card.active-card:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.72);
  outline-offset: 4px;
}

.workspace-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: #9aa3b1;
}

.active-card::before {
  background: linear-gradient(90deg, var(--red), #ff6a74);
}

.paints-card::before {
  background: linear-gradient(90deg, #5974ff, #7d63e9);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.card-label {
  color: #c1c8d3;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pill.active {
  color: #10823d;
  background: #dcfce7;
  border: 1px solid #a7f3c0;
}

.pill.active span {
  background: #22c55e;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.12);
}

.pill.offline {
  color: #7c8796;
  background: rgba(226, 232, 240, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.pill.offline span {
  background: #aab4c1;
}

.system-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-top: 42px;
  border-radius: 8px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.system-icon.red {
  background: linear-gradient(135deg, #ef1d2f, #830711);
  box-shadow: 0 24px 50px rgba(239, 29, 47, 0.34);
}

.system-icon.blue {
  background: linear-gradient(135deg, #5b73ff, #7658df);
  box-shadow: 0 24px 50px rgba(91, 115, 255, 0.34);
}

.system-icon.dark {
  background: linear-gradient(135deg, #161a22, #4a5565);
}

.system-icon.gray {
  background: linear-gradient(135deg, #737f90, #343b46);
}

.workspace-card h2 {
  margin: 38px 0 14px;
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.workspace-card p {
  margin: 0;
  color: var(--card-muted);
  font-size: 1rem;
  line-height: 1.48;
  font-weight: 700;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 26px;
  color: var(--red);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.paints-card .card-link {
  color: #5872f4;
}

.card-link.muted {
  color: #8792a2;
}

@media (max-width: 1050px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    justify-self: start;
  }

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

@media (max-width: 640px) {
  .landing-shell {
    padding: 24px 16px 42px;
  }

  .brand-lockup {
    width: 100px;
    height: 100px;
  }

  .status-panel {
    width: 100%;
    min-width: 0;
  }

  .workspace-card {
    min-height: 360px;
  }

  .system-icon {
    width: 74px;
    height: 74px;
    margin-top: 42px;
  }

  .workspace-card h2 {
    margin-top: 42px;
  }
}

@keyframes page-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes grid-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stripe-sweep {
  from {
    opacity: 0;
    transform: translateX(-44px) skewX(-30deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) skewX(-30deg);
  }
}

@keyframes glow-breathe {
  from {
    opacity: 0.58;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0.12);
  }

  50% {
    box-shadow: 0 0 0 18px rgba(34, 197, 94, 0.05);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
