/* 
   home-dark.css
   Overrides for the Ethereum-style Dark/Cyber/Ethereal theme on the Homepage.
*/

body.dark-theme {
  background: #030303;
  color: #ededed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  overflow-x: hidden;
}

body.dark-theme::before, body.dark-theme::after {
  display: none; /* Disable light theme backgrounds */
}

/* Typography & Glows */
.glow-text {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(200, 200, 255, 0.2);
  letter-spacing: 0.1em;
}

.site-home {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.home-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.home-nav .brand-link {
  justify-self: start;
}

.home-nav .mega-nav {
  justify-self: center;
}

/* Right-most slot in the .home-nav grid. The legacy
   .wallet-status-minimal element (now an empty visibility:hidden
   spacer on public pages) targets the same slot via this selector. */
.home-nav .wallet-status-minimal,
.home-nav > div:last-child {
  justify-self: end;
}

.home-nav .brand-link {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 28px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0.1em;
  color: #fff;
  /* Leave room for the -2px cyan / +2px magenta dispersion shadow so the
     "M" cap doesn't get clipped by the nav's left edge or by sibling
     elements when the layout is tight. */
  padding-left: 4px;
  padding-right: 4px;
  /* Chromatic-aberration / glitch-art shadow */
  text-shadow: -2px 0px 0px #00ffff, 2px 0px 0px #ff003c;
}

/* Sharp owl-eye X logo icon */
.home-nav .brand-link::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  background: url("/logo.svg") center / contain no-repeat;
  /* Soft glow to separate the logo from the black background */
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.home-nav .mega-nav {
  display: flex;
  gap: 32px;
}

.home-nav .mega-nav a {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.home-nav .mega-nav a:hover {
  color: #fff;
}

/* ── Connect Wallet button (top-nav, all six public pages) ──────────────
   Right-slot replacement for the legacy `.wallet-status-minimal` spacer.
   The button has three visual phases driven by `data-phase` on the
   element: `unauth` (default), `connecting`, and `auth`. */
.home-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.btn-connect-wallet {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #e8e8e8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  white-space: nowrap;
}

.btn-connect-wallet:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(0, 255, 255, 0.55);
  background: rgba(0, 255, 255, 0.06);
}

.btn-connect-wallet:disabled,
.btn-connect-wallet.is-busy {
  cursor: progress;
  opacity: 0.7;
}

.btn-connect-wallet[data-phase="auth"] {
  border-color: rgba(80, 230, 140, 0.55);
  color: #d8f5e2;
  background: rgba(80, 230, 140, 0.06);
}

.btn-connect-wallet .cw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.btn-connect-wallet .cw-dot-on {
  background: #50e68c;
  box-shadow: 0 0 8px rgba(80, 230, 140, 0.7);
}

.btn-connect-wallet .cw-caret {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.btn-connect-wallet .cw-spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: cw-spin 0.7s linear infinite;
}

@keyframes cw-spin {
  to { transform: rotate(360deg); }
}

.connect-wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.connect-wallet-menu[hidden] { display: none; }

.connect-wallet-menu button,
.connect-wallet-menu .menu-link {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  color: #e8e8e8;
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.connect-wallet-menu .menu-link {
  color: #9ad8ff;
}

.connect-wallet-menu .menu-link:hover {
  background: rgba(0, 255, 255, 0.06);
  color: #d8f5ff;
}

.connect-wallet-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ff7c8a;
}

/* ── Connect-wallet inline toast ────────────────────────────────────────
   Transient feedback for connect errors (LOCKED / NOT_READY / USER_REJECTED
   / TIMEOUT / NOT_INSTALLED). Sits directly under .nav-actions, anchored
   to the right edge so it stacks beneath the Connect Wallet button. Auto-
   dismisses after ~7 s; can be re-shown by re-clicking the button. */
.connect-wallet-toast {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  max-width: 320px;
  padding: 10px 12px 11px 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.4;
  color: #f3e8c9;
  background: #1a160b;
  border: 1px solid rgba(255, 196, 89, 0.55);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 200;
  pointer-events: none;
  animation: cw-toast-in 0.18s ease-out;
}

.connect-wallet-toast[hidden] { display: none; }

.connect-wallet-toast.cw-toast-error {
  color: #ffd8d8;
  background: #1d0d0d;
  border-color: rgba(255, 128, 128, 0.55);
}

.connect-wallet-toast.cw-toast-ok {
  color: #d8f5e2;
  background: #0c1a10;
  border-color: rgba(80, 230, 140, 0.55);
}

.connect-wallet-toast .cw-toast-title {
  display: block;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.connect-wallet-toast .cw-toast-hint {
  display: block;
  opacity: 0.8;
}

@keyframes cw-toast-in {
  from { transform: translateY(-4px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Hero Section */
.hero-universe {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 0;
}

.hero-content {
  max-width: 600px;
  z-index: 10;
}

.eyebrow {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.05;
  margin: 0 0 24px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 22px;
  color: #c0c0c0;
  font-weight: 400;
  margin: 0 0 32px 0;
}

.hero-desc {
  font-size: 18px;
  line-height: 1.6;
  color: #888;
  margin: 0 0 48px 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn-primary {
  background: #fff;
  color: #000;
  padding: 16px 32px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  padding: 16px 32px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Abstract Atom CSS Art */
.abstract-atom {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  pointer-events: none;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.orbit-1 { width: 200px; height: 400px; animation: spin 20s linear infinite; }
.orbit-2 { width: 400px; height: 200px; animation: spin 25s linear infinite reverse; }
.orbit-3 { width: 300px; height: 300px; border: 1px dashed rgba(255, 255, 255, 0.05); animation: spin 30s linear infinite; }

.core-singularity {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 60px 20px rgba(255, 255, 255, 0.4);
  animation: pulse 4s ease-in-out infinite;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff;
}

.p1 { top: 10%; left: 50%; animation: orbit1 5s infinite linear; }
.p2 { top: 50%; left: 10%; animation: orbit2 7s infinite linear; }
.p3 { top: 80%; left: 80%; animation: orbit3 6s infinite linear; }

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; box-shadow: 0 0 100px 40px rgba(255, 255, 255, 0.6); } }

/* Manifesto Section */
.manifesto-section {
  padding: 120px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.manifesto-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
}

.manifesto-text {
  font-size: 20px;
  color: #888;
  max-width: 700px;
  line-height: 1.6;
  margin: 0 auto 64px auto;
}

.evolution-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1000px;
}

.step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px;
  text-align: left;
  transition: background 0.3s;
}

.step-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.step-num {
  font-family: "Cascadia Code", Consolas, monospace;
  color: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  margin-bottom: 24px;
}

.step-card h3 {
  font-size: 24px;
  margin: 0 0 16px 0;
  color: #fff;
}

.step-card p {
  color: #888;
  line-height: 1.5;
  margin: 0;
}

/* Lanes Section */
.lanes-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 80px 0 120px 0;
}

.lane {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 60px;
  overflow: hidden;
}

.lane-content {
  position: relative;
  z-index: 2;
}

.lane h2 {
  font-size: 36px;
  margin: 0 0 24px 0;
}

.lane p {
  font-size: 18px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 40px 0;
  max-width: 80%;
}

.lane-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lane-link {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.lane-link:hover {
  opacity: 0.7;
}

.lane-bg-glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  filter: blur(100px);
  opacity: 0.1;
  z-index: 1;
}

.build-glow { background: radial-gradient(circle, #ffffff, transparent); }
.explore-glow { background: radial-gradient(circle, #8888ff, transparent); }

/* Footer */
.home-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #666;
}

.footer-left p { margin: 8px 0 0 0; font-size: 14px; }
.footer-right { display: flex; gap: 24px; }
.footer-right a { color: #666; text-decoration: none; font-size: 14px; }
.footer-right a:hover { color: #fff; }

@media (max-width: 1024px) {
  .hero-universe { flex-direction: column; text-align: center; }
  .abstract-atom { position: relative; right: auto; top: auto; transform: none; margin-top: 60px; width: 300px; height: 300px; }
  .hero-actions { justify-content: center; }
  .evolution-steps { grid-template-columns: 1fr; }
  .lanes-section { grid-template-columns: 1fr; }
}
