/* === ROOT === */
:root {
  --bg: #0b1020;
  --bg-soft: rgba(14, 22, 40, 0.85);
  --fg: #e7edf7;
  --fg-muted: #a5b0c7;
  --accent: #4f8bff;
  --accent-soft: rgba(79, 139, 255, 0.15);
  --card-bg: rgba(13, 19, 35, 0.9);
  --card-border: rgba(255, 255, 255, 0.05);
  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.5);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms ease-out;
}

/* Reset / Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

/* PAGE WRAPPER */
.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  isolation: isolate;
}

.bg-gradient {
  position: fixed;
  inset: -30%;
  z-index: -2;
  background: radial-gradient(circle at 10% 0%, #4f8bff 0, transparent 55%),
              radial-gradient(circle at 85% 100%, #ff4fb8 0, transparent 55%),
              radial-gradient(circle at 0% 100%, #29e4a5 0, transparent 55%);
  opacity: 0.55;
  filter: blur(5px);
  pointer-events: none;
}

/* Noise overlay */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.25' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Shell container */
.shell {
  width: 100%;
  max-width: 1120px;
  background: linear-gradient(135deg, var(--bg-soft), rgba(8, 12, 26, 0.95));
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Shell highlight */
.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, var(--accent-soft), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
  z-index: -1;
}

/* HEADER */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 0, #ffffff, transparent 55%),
              linear-gradient(135deg, #4f8bff, #ff4fb8);
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.brand-text h1 {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.brand-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* LAYOUT */
main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
}

@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .controls { align-self: stretch; justify-content: space-between; }
}

/* HERO */
.hero-eyebrow {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 10px;
  color: var(--fg-muted);
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 0.96rem;
  color: var(--fg-muted);
  max-width: 32rem;
  margin-bottom: 18px;
}

/* META */
.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-meta span {
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  color: var(--fg-muted);
}

/* LINK CARDS */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 14px;
}

.link-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.26);
  transition: 260ms ease-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,139,255,0.3);
}

/* BUTTON */
.pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.26);
  border: 1px solid rgba(255,255,255,0.14);
  text-decoration: none;
  color: inherit;
  transition: 160ms ease-out;
}

.pill:hover {
  background: var(--accent);
  color: #fff;
}

/* FOOTER */
footer {
  margin-top: 22px;
  border-top: 1px dashed rgba(255,255,255,0.16);
  padding-top: 12px;
  font-size: 0.75rem;
  color: var(--fg-muted);
  display: flex;
  justify-content: space-between;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #29e4a5;
  display: inline-block;
}

/* PARTICLES */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  opacity: 0;
  animation: floatParticle 16s linear infinite;
}

@keyframes floatParticle {
  0% { transform: translate3d(0,30vh,0); opacity: 0; }
  10% { opacity: 0.25; }
  50% { opacity: 0.4; }
  100% { transform: translate3d(10vw,-40vh,0); opacity: 0; }
}

/* Particle positions */
.particle:nth-child(1) { left: 8%; animation-duration: 18s; animation-delay: -3s; }
.particle:nth-child(2) { left: 26%; animation-duration: 22s; animation-delay: -8s; }
.particle:nth-child(3) { left: 41%; animation-duration: 19s; animation-delay: -12s; }
.particle:nth-child(4) { left: 63%; animation-duration: 24s; animation-delay: -5s; }
.particle:nth-child(5) { left: 79%; animation-duration: 20s; animation-delay: -15s; }
.particle:nth-child(6) { left: 90%; animation-duration: 26s; animation-delay: -9s; }
