/* ============================================================
   Union Corp — Landing Page
   Tema: Space Exploration · Energetik · Modern
   ============================================================ */

:root {
  /* Primary */
  --space-blue: #1e3a8b;
  --space-blue-deep: #0f1f4d;
  --space-blue-darker: #081435;
  --cosmic-cyan: #38bdf8;
  --cosmic-cyan-deep: #0ea5e9;
  --ice-white: #ffffff;
  --ice-tint: #e0f2fe;

  /* Accent */
  --starlight-gold: #fbbf24;
  --rocket-orange: #f97316;
  --rocket-red: #ef4444;

  /* Text */
  --text: #e8f1ff;
  --text-muted: #9fb6d6;
  --text-dim: #6e85a8;

  /* Surface */
  --glass: rgba(13, 28, 64, 0.55);
  --glass-border: rgba(120, 170, 240, 0.18);
  --card: rgba(15, 31, 77, 0.5);

  /* Layout */
  --maxw: 1180px;
  --radius: 18px;
  --radius-lg: 28px;

  --font-head: "Space Grotesk", "Outfit", system-ui, sans-serif;
  --font-body: "Inter", "Roboto", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--space-blue-darker);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Cosmic background layers ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(30, 58, 139, 0.55), transparent 70%),
    linear-gradient(180deg, var(--space-blue-darker) 0%, #0a1740 45%, var(--space-blue-darker) 100%);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.7;
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

/* Organic fluid wave divider */
.wave {
  display: block;
  width: 100%;
  line-height: 0;
}
.wave svg { width: 100%; height: auto; display: block; }

/* ---------- Shared layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cosmic-cyan);
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  margin-bottom: 18px;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; font-weight: 700; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.section-title .accent { color: var(--starlight-gold); }

.section-sub {
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 48px;
  font-size: 1.05rem;
}

.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--starlight-gold), #f59e0b);
  color: #14110a;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.28);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(251, 191, 36, 0.5);
}

.btn-ghost {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--ice-tint);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--cosmic-cyan);
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.35);
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 20, 53, 0.7);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--glass-border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ice-white);
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ice-white); background: rgba(56, 189, 248, 0.08); }
.nav-links .btn { padding: 10px 20px; font-size: 0.9rem; }
.nav-links .btn-primary, .nav-links .btn-primary:hover {
  background: linear-gradient(135deg, var(--starlight-gold), #f59e0b);
  color: #14110a;
}
.nav-links .btn-ghost, .nav-links .btn-ghost:hover {
  background: rgba(56, 189, 248, 0.06);
  color: var(--ice-tint);
}

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--ice-white); margin: 5px 0; border-radius: 2px;
  transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.hero-copy h1 .grad {
  background: linear-gradient(120deg, var(--cosmic-cyan), var(--starlight-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-stats .stat .num {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ice-white);
}
.hero-stats .stat .lbl {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Hero visual / logo orbit */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.orbit-ring {
  position: absolute;
  border: 1px dashed rgba(120, 170, 240, 0.25);
  border-radius: 50%;
}
.orbit-ring.r1 { width: 360px; height: 360px; animation: spin 40s linear infinite; }
.orbit-ring.r2 { width: 480px; height: 480px; animation: spin 70s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-logo {
  width: min(330px, 70vw);
  filter: drop-shadow(0 30px 60px rgba(56, 189, 248, 0.35));
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

.orbit-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--starlight-gold);
  box-shadow: 0 0 18px var(--starlight-gold);
}
.orbit-dot.d1 { top: 8%; left: 50%; }
.orbit-dot.d2 { bottom: 12%; right: 14%; background: var(--rocket-orange); box-shadow: 0 0 18px var(--rocket-orange); }

.rocket {
  position: absolute;
  font-size: 2rem;
  bottom: 6%;
  left: 6%;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.6));
}

/* ---------- Section padding ---------- */
.block { padding: 90px 0; }

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 50px rgba(8, 20, 53, 0.6);
}
.card .ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(251, 191, 36, 0.12));
  border: 1px solid var(--glass-border);
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, rgba(30, 58, 139, 0.7), rgba(14, 165, 233, 0.35));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.cta-banner p { color: var(--ice-tint); max-width: 540px; margin: 0 auto 30px; }
.cta-banner .hero-cta { justify-content: center; }

/* ---------- Community / social links ---------- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.social {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.social:hover { transform: translateY(-5px); }
.social .si {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
}
.social .si svg { width: 24px; height: 24px; }
.social.discord:hover { border-color: #5865f2; box-shadow: 0 14px 36px rgba(88, 101, 242, 0.35); }
.social.discord .si { background: #5865f2; }
.social.instagram:hover { border-color: #e1306c; box-shadow: 0 14px 36px rgba(225, 48, 108, 0.3); }
.social.instagram .si { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.social.tiktok:hover { border-color: #25f4ee; box-shadow: 0 14px 36px rgba(37, 244, 238, 0.25); }
.social.tiktok .si { background: #010101; }
.social .meta { display: flex; flex-direction: column; gap: 3px; }
.social .meta .t { font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.2; }
.social .meta .h { color: var(--text-dim); font-size: 0.85rem; line-height: 1.2; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 56px 0 36px;
  margin-top: 40px;
  background: rgba(6, 15, 40, 0.6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer .brand { margin-bottom: 16px; }
.footer p { color: var(--text-dim); font-size: 0.92rem; max-width: 320px; }
.footer h4 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cosmic-cyan);
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.2s;
}
.footer ul a:hover { color: var(--ice-white); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 36px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ---------- Legal pages (tos / privacy) ---------- */
.legal-hero {
  padding: 150px 0 50px;
  text-align: center;
}
.legal-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.legal-hero .updated {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}
.legal-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 100px;
}
.legal-card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  backdrop-filter: blur(10px);
}
.legal-card .intro { color: var(--text-muted); margin-bottom: 14px; }
.legal-card h2 {
  font-size: 1.3rem;
  margin: 34px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--glass-border);
  color: var(--ice-white);
}
.legal-card h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-card h2 .n { color: var(--starlight-gold); margin-right: 8px; }
.legal-card p { color: var(--text-muted); margin-bottom: 12px; }
.legal-card ul { margin: 0 0 14px 4px; padding-left: 22px; color: var(--text-muted); }
.legal-card ul li { margin-bottom: 8px; }
.legal-card strong { color: var(--ice-tint); }
.legal-nav { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-visual { order: -1; min-height: 320px; }
  .orbit-ring.r2 { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links {
    position: fixed;
    top: 68px; right: 16px; left: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px;
    background: rgba(8, 20, 53, 0.96);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
}
@media (max-width: 520px) {
  .legal-card { padding: 30px 22px; }
  .cta-banner { padding: 40px 24px; }
}
