/* ============================================================
   UNDERTALE: MULTIVERSE TEAM - SHARED STYLESHEET
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --border: #23232f;
  --border-bright: #2e2e3d;
  --text: #f5f5fa;
  --text-muted: #9090a0;
  --text-dim: #606070;
  --accent: #ff5277;
  --accent-glow: rgba(255, 82, 119, 0.15);
  --accent-2: #5b8def;
  --accent-3: #ffd166;
  --gradient: linear-gradient(135deg, #ff5277 0%, #5b8def 100%);
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(at 20% 0%, rgba(255, 82, 119, 0.08) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(91, 141, 239, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
::selection { background: var(--accent); color: var(--bg); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 1.1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.nav-brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--gradient);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 0.85rem; color: white;
}
.nav-links { display: flex; gap: 2rem; list-style: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a { color: var(--text-muted); position: relative; padding: 0.3rem 0; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.4rem; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-elevated);
    border-bottom: 1px solid var(--border); padding: 1rem 2rem 1.5rem;
  }
  .nav-links.open { display: flex; }
}

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-narrow { max-width: 820px; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem; padding: 0.35rem 0.7rem;
  border: 1px solid var(--accent); border-radius: 4px;
  background: var(--accent-glow);
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }

.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; margin-bottom: 2rem; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.2s ease; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #ff6b8b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 82, 119, 0.35); }
.btn-secondary { background: var(--accent-2); color: white; }
.btn-secondary:hover { background: #7aa3f5; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(91, 141, 239, 0.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-bright); }
.btn-ghost:hover { border-color: var(--text-muted); background: var(--bg-card); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }

/* CARDS */
.card-grid { display: grid; gap: 1.5rem; }
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border); padding: 3rem 0 2rem;
  margin-top: 6rem; color: var(--text-muted); font-size: 0.9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { max-width: 320px; }
.footer-brand p { margin-top: 0.6rem; font-size: 0.88rem; }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 0.82rem; font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.82rem; color: var(--text-dim);
}

/* HERO */
.hero { padding: 6rem 0 5rem; position: relative; }
.hero-content { max-width: 820px; }
.hero-stats { display: flex; gap: 3rem; margin-top: 4rem; flex-wrap: wrap; }
.hero-stat .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem; font-weight: 700; color: var(--text);
  display: block; line-height: 1;
}
.hero-stat .label {
  font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* PROJECT CARDS */
.project-preview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  position: relative; overflow: hidden; transition: all 0.3s ease;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
}
.project-card.dnd::before { background: var(--accent-2); }
.project-card:hover {
  transform: translateY(-4px); border-color: var(--border-bright);
  box-shadow: var(--shadow);
}
.project-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.8rem;
}
.project-card.dnd .project-card-tag { color: var(--accent-2); }
.project-card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.project-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.2rem; }
.project-card-meta {
  display: flex; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border); font-size: 0.85rem;
  color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
}

/* FEATURE GRID */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.feature {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.4rem;
  transition: border-color 0.2s ease;
}
.feature:hover { border-color: var(--border-bright); }
.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; display: block; }
.feature h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.feature p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* STATS TABLE */
.stat-table {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 2rem; margin: 2rem 0;
}
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .label { color: var(--text-muted); }
.stat-row .value { font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* CHIPS */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 2rem; }
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; padding: 0.4rem 0.8rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px;
}

/* TIER (gacha) */
.tier {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem; background: var(--bg-card); border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted); border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
}
.tier.common    { border-left-color: #c0c0c5; }
.tier.rare      { border-left-color: #5b8def; }
.tier.epic      { border-left-color: #b070ff; }
.tier.legendary { border-left-color: #ffd166; }
.tier-name { font-weight: 600; }
.tier-rate { font-family: 'JetBrains Mono', monospace; color: var(--text-muted); font-size: 0.95rem; }

/* TEAM */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.member {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.5rem 2rem;
  text-align: center; transition: all 0.3s ease;
}
.member:hover { transform: translateY(-4px); border-color: var(--border-bright); box-shadow: var(--shadow); }
.member-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--gradient); margin: 0 auto 1.2rem;
  display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; color: white;
}
.member-avatar.dusty { background: linear-gradient(135deg, #5b8def 0%, #b070ff 100%); }
.member h3 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.member-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem;
}
.member.dusty .member-role { color: var(--accent-2); }
.member-bio { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.member-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 1.5rem; }
.member-tags .chip { font-size: 0.75rem; padding: 0.25rem 0.6rem; }

/* CONTACT */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: all 0.3s ease; display: flex; flex-direction: column;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--border-bright); box-shadow: var(--shadow); }
.contact-icon { font-size: 1.8rem; margin-bottom: 0.8rem; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.contact-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.2rem; flex: 1; }
.contact-card .btn { align-self: flex-start; }

/* LEGAL */
.legal { max-width: 760px; margin: 0 auto; padding: 4rem 2rem; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-size: 1.4rem; margin: 2.5rem 0 0.8rem; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: 0.96rem; line-height: 1.75; margin-bottom: 1rem; }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal li { margin-bottom: 0.4rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; color: var(--text-dim); margin-bottom: 2rem;
}

/* ANIMATIONS */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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