:root {
  --bg-top: #070b1a;
  --bg-bottom: #03050c;
  --card: rgba(10, 18, 42, 0.62);
  --line: rgba(94, 241, 255, 0.32);
  --text-main: #e8f5ff;
  --text-soft: #91a7cf;
  --cyan: #5ef1ff;
  --magenta: #ff4db8;
  --amber: #ffb020;
  --neon-lime: #6dff7d;
  --pilot-card-width: 228px;
  --shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 12%, rgba(94, 241, 255, 0.2), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(255, 77, 184, 0.17), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(45, 74, 146, 0.42), transparent 50%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

body::after {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background:
    conic-gradient(from 90deg at 22% 20%, rgba(94, 241, 255, 0.08), transparent 22%),
    conic-gradient(from 260deg at 78% 82%, rgba(255, 77, 184, 0.08), transparent 25%);
  filter: blur(20px);
  animation: drift-neon 12s ease-in-out infinite alternate;
}

.hero {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 42px 0 20px;
  text-align: center;
}

.brand-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  perspective: 900px;
}

.brand-logo {
  width: auto;
  height: clamp(74px, 12vw, 120px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(94, 241, 255, 0.34))
    drop-shadow(0 0 22px rgba(255, 77, 184, 0.2));
  transform-origin: center 78%;
  animation: logo-float 3.6s ease-in-out infinite;
  transition: filter 0.25s ease;
}

.brand-logo:nth-child(1) {
  animation-delay: 0s;
}

.brand-logo:nth-child(2) {
  animation-delay: 0.45s;
}

.brand-logo:hover {
  animation:
    logo-float 3.6s ease-in-out infinite,
    logo-jelly 0.9s cubic-bezier(0.24, 1.42, 0.33, 1) 1;
  filter:
    drop-shadow(0 0 18px rgba(94, 241, 255, 0.55))
    drop-shadow(0 0 32px rgba(255, 77, 184, 0.4));
}

.brand-name {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

h1 {
  margin: 8px 0;
  font-size: clamp(22px, 3.6vw, 36px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.quick-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(220px, 24vw, 280px);
  text-decoration: none;
  color: #03050c;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.quick-link.analyzer {
  background: linear-gradient(135deg, var(--cyan), #47b9ff);
}

.quick-link.flasher {
  background: linear-gradient(135deg, var(--magenta), #ff8f4d);
}

.quick-link.event {
  background: linear-gradient(135deg, var(--neon-lime), #2dffb2);
  color: #022a16;
}

.quick-links a[href*="/event/"] {
  background: linear-gradient(135deg, var(--neon-lime), #2dffb2);
  color: #022a16;
}

main {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 18px 0 38px;
}

.section-head {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head p {
  margin: 0;
  color: var(--cyan);
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pilot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.pilot-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transform: translateY(10px);
  opacity: 0;
  animation: rise-in 0.5s ease forwards;
  position: relative;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .pilot-card {
    background: rgba(10, 18, 42, 0.9);
  }
}

.pilot-card::before {
  content: "";
  position: absolute;
  top: -140%;
  left: -60%;
  width: 46%;
  height: 340%;
  background: linear-gradient(
    120deg,
    transparent 12%,
    rgba(255, 255, 255, 0.05) 32%,
    rgba(94, 241, 255, 0.5) 48%,
    rgba(255, 77, 184, 0.35) 60%,
    transparent 82%
  );
  transform: rotate(18deg) translateX(-220%);
  pointer-events: none;
  z-index: 3;
}

.pilot-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(94, 241, 255, 0.1), rgba(255, 77, 184, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.pilot-card:hover {
  transform: translateY(-12px) scale(1.035);
  box-shadow:
    0 30px 56px rgba(6, 14, 32, 0.8),
    0 0 28px rgba(94, 241, 255, 0.34),
    0 0 58px rgba(255, 77, 184, 0.22);
  border-color: rgba(109, 255, 125, 0.75);
}

.pilot-card:hover::after {
  opacity: 1;
}

.pilot-card:hover::before {
  animation: sweep-neon 0.95s ease-out 1;
}

.pilot-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.pilot-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.2) contrast(1.12) brightness(1.03);
}

.pilot-meta {
  padding: 10px 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pilot-name {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pilot-tag {
  font-size: 12px;
  color: var(--amber);
  font-weight: 700;
}

.core-team {
  margin: 22px auto 0;
  width: min(760px, 100%);
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.core-card {
  width: min(var(--pilot-card-width), calc(50% - 8px));
}

footer {
  text-align: center;
  color: var(--text-soft);
  padding: 0 16px 30px;
}

@keyframes rise-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes sweep-neon {
  from {
    transform: rotate(18deg) translateX(-220%);
  }
  to {
    transform: rotate(18deg) translateX(370%);
  }
}

@keyframes drift-neon {
  from {
    transform: translate3d(-1.6%, -1%, 0) scale(1);
    opacity: 0.66;
  }
  to {
    transform: translate3d(1.8%, 1.2%, 0) scale(1.02);
    opacity: 0.92;
  }
}

@keyframes logo-float {
  0% {
    transform: translateY(0) rotate(-1deg) scale(1);
  }
  35% {
    transform: translateY(-7px) rotate(1.2deg) scale(1.02);
  }
  68% {
    transform: translateY(2px) rotate(-0.8deg) scale(0.995);
  }
  100% {
    transform: translateY(0) rotate(-1deg) scale(1);
  }
}

@keyframes logo-jelly {
  0% {
    transform: translateY(0) scale3d(1, 1, 1);
  }
  22% {
    transform: translateY(-8px) scale3d(0.88, 1.16, 1);
  }
  42% {
    transform: translateY(3px) scale3d(1.14, 0.88, 1);
  }
  60% {
    transform: translateY(-3px) scale3d(0.96, 1.06, 1);
  }
  78% {
    transform: translateY(1px) scale3d(1.03, 0.97, 1);
  }
  100% {
    transform: translateY(0) scale3d(1, 1, 1);
  }
}

@media (max-width: 640px) {
  .hero {
    width: min(1100px, 94vw);
    padding-top: calc(28px + env(safe-area-inset-top));
  }

  .brand-logo {
    height: 64px;
  }

  .quick-links {
    width: 100%;
  }

  .quick-link {
    flex: 0 1 280px;
    width: min(100%, 280px);
    min-width: 220px;
    text-align: center;
    padding: 12px 14px;
  }

  .pilot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .core-team {
    gap: 12px;
  }

  .core-card {
    width: calc(50% - 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo,
  .brand-logo:hover {
    animation: none;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .pilot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .core-card {
    width: 100%;
    max-width: var(--pilot-card-width);
  }
}

@media (hover: none) and (pointer: coarse) {
  .pilot-card,
  .pilot-card:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--line);
  }

  .pilot-card::before,
  .pilot-card::after,
  .pilot-card:hover::before,
  .pilot-card:hover::after {
    opacity: 0;
    animation: none;
  }

  .pilot-card img,
  .pilot-card:hover img {
    transform: none;
    filter: none;
  }

  .brand-logo,
  .brand-logo:hover {
    animation: logo-float 4.2s ease-in-out infinite;
  }
}
