:root {
  --ink: #eef7ff;
  --muted: #9ec1db;
  --bg: #03101d;
  --surface: #08233b;
  --surface-2: #0c2e4f;
  --line: #2d5f84;
  --accent: #59d7ff;
  --accent-2: #bffb77;
  --danger: #ff8585;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 500px at 10% -20%, #12639e70 0%, transparent 62%),
    radial-gradient(1000px 500px at 90% -10%, #57902f4f 0%, transparent 60%),
    linear-gradient(160deg, #020a12 0%, #06172a 45%, #010812 100%);
}

#sceneCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 20% 10%, #ffffff22 20%, transparent 70%),
    radial-gradient(1px 1px at 80% 30%, #ffffff2d 20%, transparent 70%),
    radial-gradient(1.5px 1.5px at 45% 70%, #ffffff22 20%, transparent 70%),
    radial-gradient(1px 1px at 60% 50%, #ffffff20 20%, transparent 70%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: #041223ce;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #2a5776;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-wrap h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-wrap p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #53d8ff, #acf366);
  color: #041020;
  font-weight: 700;
  box-shadow: 0 0 25px #58dfff66;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

main {
  width: min(1180px, 100% - 2rem);
  margin: 1.4rem auto 2.8rem;
  display: grid;
  gap: 1.3rem;
}

.hero,
.content-block,
.auth-wrap,
footer {
  border: 1px solid #2f607f;
  border-radius: 18px;
  background: linear-gradient(160deg, #081f36c9, #041426d4);
  box-shadow: 0 20px 80px #00000059;
}

.hero {
  padding: clamp(1rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
}

.hero h2 {
  margin: 0.5rem 0;
  line-height: 1.15;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
}

.hero-sub {
  margin: 0;
  color: #c3dbeb;
  max-width: 60ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #59d7ff, #bffb77);
  color: #04253a;
  border: 0;
}

.btn-ghost {
  background: #0f3150a8;
}

.hero-3d {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.cube-scene {
  width: 190px;
  height: 190px;
  transform-style: preserve-3d;
  animation: levitate 8s ease-in-out infinite;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: spin 12s linear infinite;
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1px solid #78def6;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px #00131f;
  background: linear-gradient(130deg, #0f67958a, #58c57163);
}

.front { transform: translateZ(95px); }
.back { transform: rotateY(180deg) translateZ(95px); }
.left { transform: rotateY(-90deg) translateZ(95px); }
.right { transform: rotateY(90deg) translateZ(95px); }
.top { transform: rotateX(90deg) translateZ(95px); }
.bottom { transform: rotateX(-90deg) translateZ(95px); }

.ring {
  position: absolute;
  border: 1px dashed #75ddff66;
  border-radius: 999px;
}

.ring-1 { width: 280px; height: 280px; animation: ring 18s linear infinite; }
.ring-2 { width: 360px; height: 360px; animation: ring 24s linear infinite reverse; }
.ring-3 { width: 430px; height: 430px; animation: ring 30s linear infinite; }

.content-block {
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.content-block h3 {
  margin-top: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.mission p {
  margin-bottom: 0;
  max-width: 80ch;
  color: #c5dded;
}

.grid-cards,
.income-grid,
.portal-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.grid-cards article,
.income-grid article,
.portal-grid article {
  border: 1px solid #335f83;
  border-radius: 14px;
  padding: 0.85rem;
  background: #0b2b47bd;
}

article h4,
article h5 {
  margin: 0 0 0.4rem;
}

article p,
article li {
  color: #bdd7ea;
}

.auth-wrap {
  padding: clamp(1rem, 2.8vw, 1.8rem);
}

.auth-head h3 {
  margin: 0;
}

.auth-head p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.auth-shell {
  border: 1px solid #325f81;
  border-radius: 14px;
  background: #08243dcf;
}

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

.auth-tab {
  border: 0;
  border-bottom: 1px solid #2f5d7e;
  border-right: 1px solid #2f5d7e;
  background: #0d3254;
  color: #d1e8f6;
  padding: 0.8rem;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab:last-child {
  border-right: 0;
}

.auth-tab.active {
  background: linear-gradient(135deg, #16527f, #2f7247);
}

.auth-body {
  padding: 1rem;
}

.auth-panel {
  display: none;
  gap: 0.75rem;
}

.auth-panel.active {
  display: grid;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
}

input {
  border: 1px solid #3f6d8e;
  border-radius: 10px;
  padding: 0.68rem;
  background: #082b46;
  color: #e8f4fc;
}

.auth-message {
  margin: 0;
  min-height: 2.3rem;
  padding: 0.7rem 1rem 1rem;
  color: var(--accent-2);
}

.auth-message.error {
  color: var(--danger);
}

.portal-shell {
  margin-top: 1rem;
  border: 1px solid #355f81;
  border-radius: 14px;
  background: #08253ee0;
  padding: 1rem;
}

.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

footer {
  width: min(1180px, 100% - 2rem);
  margin: 0 auto 1.6rem;
  padding: 0.8rem 1rem;
  text-align: center;
  color: var(--muted);
}

@keyframes spin {
  from { transform: rotateX(-20deg) rotateY(0); }
  to { transform: rotateX(-20deg) rotateY(360deg); }
}

@keyframes ring {
  from { transform: rotateX(75deg) rotateZ(0); }
  to { transform: rotateX(75deg) rotateZ(360deg); }
}

@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

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

  nav {
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-tab {
    border-right: 0;
  }
}
