*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #0a0f14;
  --surface: rgba(22, 32, 46, 0.72);
  --surface-hover: rgba(32, 48, 68, 0.88);
  --border: rgba(120, 150, 180, 0.18);
  --border-strong: rgba(140, 175, 210, 0.35);
  --text: #e9eef5;
  --muted: #8ea0b5;
  --accent: #3d9ef0;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.45;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(45, 110, 180, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 20%, rgba(30, 90, 70, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(20, 40, 70, 0.35), transparent 60%),
    linear-gradient(165deg, #0c1219 0%, #0a1018 45%, #0d1520 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.top,
.stage {
  position: relative;
  z-index: 1;
}

.top {
  padding: max(1.75rem, env(safe-area-inset-top)) 1.75rem 0;
  padding-left: max(1.75rem, env(safe-area-inset-left));
  padding-right: max(1.75rem, env(safe-area-inset-right));
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  animation: rise 0.7s ease-out both;
}

.logo {
  display: block;
  width: clamp(180px, 28vw, 260px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.tagline {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.75rem 3.5rem;
  padding-left: max(1.75rem, env(safe-area-inset-left));
  padding-right: max(1.75rem, env(safe-area-inset-right));
  padding-bottom: max(3.5rem, env(safe-area-inset-bottom));
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1.5rem 1.35rem;
  text-decoration: none;
  text-align: center;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--surface);
  backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  animation: rise 0.75s ease-out both;
}

.tile:nth-child(1) { animation-delay: 0.2s; }
.tile:nth-child(2) { animation-delay: 0.28s; }
.tile:nth-child(3) { animation-delay: 0.36s; }
.tile:nth-child(4) { animation-delay: 0.44s; }
.tile:nth-child(5) { animation-delay: 0.52s; }

.tile:hover,
.tile:focus-visible {
  outline: none;
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background:
    linear-gradient(145deg, rgba(61, 158, 240, 0.08), transparent 45%),
    var(--surface-hover);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.tile:active {
  transform: translateY(-1px);
}

.tile-name {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--accent);
}

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

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

  .tile {
    min-height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
