/* RubinProjects.fun — design system (shared tokens with RubinCape) */

:root {
  --bg-0: #08080a;
  --bg-1: #0d0d11;
  --bg-2: #14141a;
  --bg-3: #1b1b23;
  --border: #26262e;
  --text-1: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #63636e;
  --ruby-400: #f0616b;
  --ruby-500: #e5484d;
  --ruby-600: #d92638;
  --ruby-700: #a11a26;
  --ruby-glow: rgba(229, 72, 77, 0.32);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body { overflow-x: hidden; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- reveal animation (CSS only) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .gem-spark { animation: none !important; }
}

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { width: 34px; height: 34px; }
.nav-wordmark { font-weight: 700; font-size: 18px; letter-spacing: 0.01em; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu > a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-menu > a:hover { color: var(--text-1); }
.nav-menu > a.is-active { color: var(--text-1); }
.nav-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ruby-500), var(--ruby-700));
  color: #fff;
  box-shadow: 0 6px 24px var(--ruby-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px var(--ruby-glow); }
.btn-ghost { border-color: var(--border); color: var(--text-1); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--text-3); background: rgba(255, 255, 255, 0.05); }
.btn-outline { border-color: var(--border); color: var(--text-1); }
.btn-outline:hover { border-color: var(--ruby-500); color: var(--ruby-400); }
.btn-small { padding: 8px 18px; font-size: 14px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 190px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 78% 30%, rgba(229, 72, 77, 0.13), transparent 65%),
    var(--bg-0);
}
.hero-glow {
  position: absolute;
  width: 560px; height: 560px;
  right: -120px; top: 40px;
  background: radial-gradient(circle, var(--ruby-glow), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  color: var(--ruby-400);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 18px;
}
h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.lead { color: var(--text-2); font-size: 18px; max-width: 480px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }
.gem-wrap { position: relative; width: min(340px, 80%); }
.gem { width: 100%; height: auto; filter: drop-shadow(0 18px 44px rgba(229, 72, 77, 0.35)); }
.gem-spark {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--ruby-400);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  opacity: 0.85;
}
.gem-spark--1 { left: 6%;  top: 18%; animation: twinkle 3.2s ease-in-out infinite; }
.gem-spark--2 { right: 10%; top: 8%;  animation: twinkle 3.2s ease-in-out 1.1s infinite; }
.gem-spark--3 { right: 22%; bottom: 12%; animation: twinkle 3.2s ease-in-out 2.2s infinite; }
@keyframes twinkle {
  0%, 100% { transform: scale(0.6); opacity: 0.25; }
  50%      { transform: scale(1.25); opacity: 0.95; }
}

/* ---------- sections ---------- */
.section { padding: 110px 0; }
.section--alt { background: var(--bg-1); border-block: 1px solid var(--border); }
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 44px;
}

/* ---------- project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: #3a3a46;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.card-gem { width: 58px; height: 64px; margin-bottom: 8px; }
.card-gem svg { width: 100%; height: 100%; }
.card-gem--cape svg { filter: hue-rotate(-18deg) saturate(1.05) brightness(0.92); }
.card-gem--soon svg { filter: grayscale(0.85) brightness(0.75); }
.card-category {
  color: var(--ruby-400);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.card-title { font-size: 22px; font-weight: 700; }
.card-desc { color: var(--text-2); font-size: 15px; flex: 1; }
.card .btn { align-self: flex-start; margin-top: 10px; }
.card--muted { opacity: 0.85; }
.card-note { color: var(--text-3); font-size: 13.5px; margin-top: 10px; font-style: italic; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { color: var(--text-2); font-size: 17px; margin-bottom: 18px; }
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- community ---------- */
.community { text-align: center; }
.community h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-bottom: 14px; }
.community p { color: var(--text-2); margin-bottom: 30px; }
.community-disabled { color: var(--text-3); font-style: italic; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-1); padding: 56px 0 30px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-tagline { width: 100%; color: var(--text-3); font-size: 14px; margin-top: 6px; }
.footer-col h3 {
  color: var(--text-3);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.footer-col a, .footer-disabled { display: block; color: var(--text-2); font-size: 15px; padding: 4px 0; }
.footer-col a:hover { color: var(--text-1); }
.footer-disabled { color: var(--text-3); font-style: italic; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; }
.footer-bottom p { color: var(--text-3); font-size: 13.5px; }

/* ---------- responsive: tablet ---------- */
@media (max-width: 900px) {
  .hero { padding: 150px 0 90px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero-copy, .hero-visual { min-width: 0; }
  .hero-visual { order: -1; }
  .gem-wrap { width: 210px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- responsive: mobile ---------- */
@media (max-width: 620px) {
  .nav-inner { height: 60px; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    cursor: pointer;
    z-index: 60;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 22px;
    margin: 0 auto;
    background: var(--text-1);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-checkbox:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-checkbox:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-checkbox:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu {
    position: fixed;
    inset: 60px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 13, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-checkbox:checked ~ .nav-menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu > a { padding: 13px 4px; border-bottom: 1px solid var(--border); }
  .nav-menu > a.btn { margin-top: 14px; border-bottom: none; text-align: center; }

  .hero { padding: 120px 0 70px; }
  .hero-cta .btn { width: 100%; }
  .section { padding: 72px 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
