:root {
  color-scheme: dark;
  --bg: #070706;
  --panel: #151515;
  --panel-soft: #1c1c1c;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.15);
  --text: #f6f6f3;
  --muted: #9b9b9f;
  --accent: #7c3aed;
  --accent-soft: #a855f7;
  --accent-dark: #5b21b6;
  --accent-glow: rgba(124, 58, 237, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 17% 82%, rgba(124, 58, 237, 0.15), transparent 28rem),
    radial-gradient(circle at 74% 9%, rgba(168, 85, 247, 0.08), transparent 25rem),
    radial-gradient(circle at 50% 50%, rgba(91, 33, 182, 0.05), transparent 40rem),
    linear-gradient(180deg, #0d0d0c 0%, var(--bg) 42%, #050504 100%);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1), transparent 70%);
  bottom: -150px;
  left: -50px;
  animation-delay: -10s;
  animation-duration: 25s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

a {
  color: inherit;
}

.platform-shell {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 40px 80px;
  position: relative;
  z-index: 2;
}

.hero {
  display: flex;
  min-height: 286px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 150px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 64px;
  object-fit: contain;
}

.ai-badge {
  display: inline-flex;
  width: 58px;
  min-width: 58px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 18px rgba(124, 58, 237, 0.45);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  animation: aiBadgePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes aiBadgePulse {
  0%,
  100% {
    background: var(--accent);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 18px rgba(124, 58, 237, 0.45);
    opacity: 1;
  }

  50% {
    background: var(--accent-soft);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.18),
      0 0 28px rgba(168, 85, 247, 0.7);
    opacity: 0.56;
  }
}

.hero h1 {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease-out;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.hero-subtitle {
  margin: 16px 0 0;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 500;
  animation: fadeInUp 0.6s ease-out 0.1s both,
    subtitleBlink 1.6s ease-in-out 0.7s infinite;
}

@keyframes subtitleBlink {
  0%,
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    background-color: var(--accent-glow);
    box-shadow: 0 0 24px 4px var(--accent-glow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-subtitle {
    animation: fadeInUp 0.6s ease-out 0.1s both;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 50px;
}

.tool-card {
  position: relative;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%),
    linear-gradient(180deg, #1a1a1a 0%, #0e0e0e 100%);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 0;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  animation: cardFadeIn 0.5s ease-out backwards;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
}

.tool-card:nth-child(1) { --card-index: 0; }
.tool-card:nth-child(2) { --card-index: 1; }
.tool-card:nth-child(3) { --card-index: 2; }
.tool-card:nth-child(4) { --card-index: 3; }
.tool-card:nth-child(5) { --card-index: 4; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent), var(--accent-dark));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  text-align: left;
}

.card-visual {
  position: relative;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  background: #111111;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 42px rgba(0, 0, 0, 0.28);
}

.card-visual::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.28) 100%),
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.16), transparent 34%);
  content: "";
  pointer-events: none;
}

.card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover .card-visual img,
.tool-card:focus-visible .card-visual img {
  transform: scale(1.07);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 22px 24px 28px;
}

.card-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.92) 0%, rgba(91, 33, 182, 0.88) 100%);
  color: #ffffff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(124, 58, 237, 0.6);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-icon svg {
  width: 38px;
  height: 38px;
}

.tool-card:hover .card-icon,
.tool-card:focus-visible .card-icon {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(168, 85, 247, 0.75);
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  border: 1px solid rgba(168, 85, 247, 0.24);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  padding: 6px 10px;
  color: #d8b4fe;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 0 60px rgba(124, 58, 237, 0.15);
  transform: translateY(-8px) scale(1.02);
}

.tool-card:hover .card-glow,
.tool-card:focus-visible .card-glow {
  opacity: 0.15;
}

.tool-card:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.6);
  outline-offset: 4px;
}

.card-title {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: left;
  transition: color 0.3s ease;
}

.tool-card:hover .card-title {
  color: #ffffff;
}

.card-description {
  display: block;
  width: 100%;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  transition: color 0.3s ease;
}

.tool-card:hover .card-description {
  color: #b5b5b8;
}

.start-button {
  display: inline-flex;
  min-width: 128px;
  height: 54px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 14px 25px rgba(124, 58, 237, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.09);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .platform-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 36px;
  }
}

@media (max-width: 720px) {
  .platform-shell {
    padding: 0 20px 48px;
  }

  .hero {
    min-height: auto;
    padding: 80px 0 40px;
  }

  .brand {
    margin-bottom: 24px;
  }

  .brand-logo {
    height: 48px;
  }

  .ai-badge {
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 14px;
    border-radius: 7px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    max-width: 28rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 40px;
  }

  .tool-card {
    min-height: 0;
    padding: 0;
    border-radius: 18px;
  }

  .card-visual {
    width: calc(100% - 20px);
    margin: 10px 10px 0;
    border-radius: 15px;
  }

  .card-body {
    padding: 20px 20px 24px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .card-description {
    margin-top: 14px;
    font-size: 0.85rem;
  }

  .glow-orb-1,
  .glow-orb-2 {
    display: none;
  }
}
