:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-alt: #080808;
  --panel: rgba(34, 0, 52, 0.55);
  --panel-strong: rgba(15, 0, 30, 0.85);
  --grid-line: rgba(57, 255, 20, 0.35);
  --neon: #39ff14;
  --text: #e6ffe9;
  --text-dim: rgba(230, 255, 233, 0.7);
  --accent: #00f5ff;
  --warning: #ffd166;
  font-size: clamp(15px, 1.25vw, 18px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Chakra Petch", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

canvas#neon-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background: radial-gradient(circle at 20% 20%, rgba(57, 255, 20, 0.1), transparent 45%);
}

.noise-overlay,
.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.noise-overlay {
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Crect width='160' height='160' fill='black'/%3E%3Crect width='1' height='1' fill='%2339ff14'/%3E%3C/svg%3E");
}

.scanline-overlay {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0px, rgba(0, 0, 0, 0.4) 1px, transparent 2px, transparent 4px);
  opacity: 0.3;
}

.hero {
  position: relative;
  padding: clamp(1.5rem, 5vw, 4rem);
  padding-bottom: 4rem;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(4, 7, 8, 0.65), rgba(4, 7, 8, 0.95));
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.top-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  width: 100%;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid var(--neon);
  border-radius: 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
  width: 160px;
  height: 160px;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-glyph {
  font-size: 3rem;
  color: #8844ff;
  line-height: 1;
  display: inline-block;
  width: 1em;
  height: 1em;
  background: #8844ff;
  border: 2px solid var(--neon);
  box-sizing: border-box;
}

.logo-cube-canvas {
  width: 75px;
  height: 75px;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.logo-label {
  margin: 0;
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
}

.logo-name {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  font-size: 0.9rem;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon);
  border: 2px solid var(--neon);
  border-radius: 0;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
  flex-shrink: 0;
}

.pulse-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 0;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.5;
  }
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1400px;
  width: 100%;
  margin-top: 0; /* further align with .app/.net */
  box-sizing: border-box;
}

.hero-content {
  max-width: 820px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.hero-cube-container {
  position: relative;
  border: 2px solid var(--neon);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 180px; /* More space so controls clear the cube */
}

.desktop-cube {
  grid-column: 2;
  width: clamp(280px, 30vw, 450px);
  height: clamp(280px, 30vw, 450px);
  aspect-ratio: 1 / 1;
  max-width: 100%;
  flex-shrink: 1;
}

.mobile-cube {
  display: none;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 2rem 0;
  box-sizing: border-box;
  min-width: 0; /* Allow shrinking below content size */
}

#cube-canvas,
#cube-canvas-desktop,
#cube-canvas-mobile {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  max-width: 100%;
  max-height: 100%;
}

#cube-canvas:active,
#cube-canvas-desktop:active,
#cube-canvas-mobile:active {
  cursor: grabbing;
}

/* Vortex Controls */
.vortex-controls {
  position: absolute;
  bottom: -150px; /* Move further below to avoid overlap */
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--neon);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
  z-index: 10;
}

.vortex-control-label {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.vortex-control-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
}

.vortex-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.vortex-slider {
  flex: 1;
  height: 6px;
  background: rgba(57, 255, 20, 0.2);
  border: 1px solid var(--neon);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.vortex-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--neon);
  border: 2px solid #000;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon);
}

.vortex-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--neon);
  border: 2px solid #000;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon);
}

.vortex-display {
  font-family: "Chakra Petch", monospace;
  font-size: 0.9rem;
  color: var(--neon);
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

/* Special styling for pattern row to keep label and value close */
.vortex-control-row:last-child {
  gap: 0.5rem;
}

.vortex-control-row:last-child .vortex-display {
  margin-left: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

.hero-content .eyebrow {
  margin-bottom: 0.25rem;
  font-size: 0.8rem; /* match .app/.net */
  letter-spacing: 0.35em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4.8rem);
  margin: 0;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 60ch;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.primary-button {
  border-radius: 0;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--neon);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, background 0.2s;
}

.primary-button {
  background: rgba(0, 0, 0, 0.9);
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 0 25px rgba(57, 255, 20, 0.35);
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(57, 255, 20, 0.55);
}

.secondary-button {
  background: transparent;
  border: 2px solid var(--neon);
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
  cursor: pointer;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, background 0.2s;
}

.secondary-button:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
}

.casual-note {
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--neon);
  border: 1px dashed var(--neon);
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.4);
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.2rem;
}

.meta-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.meta-value {
  margin: 0.4rem 0 0;
  font-size: 1rem;
}

.section-heading {
  margin-bottom: 2.5rem;
  max-width: 700px;
}

section {
  padding: clamp(2.5rem, 6vw, 4.5rem);
}

section:not(.hero) {
  position: relative;
}

.status-section,
.feature-section,
.updates-section {
  background: var(--bg-alt);
  border-top: 2px solid var(--grid-line);
  border-bottom: 2px solid var(--grid-line);
}

.status-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.status-card,
.feature-card {
  padding: 1.75rem;
  background: var(--panel);
  border: 2px solid var(--neon);
  border-radius: 0;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
  position: relative;
  overflow: hidden;
}

.status-card::after,
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0;
  font-size: 0.75rem;
  margin-top: 1rem;
  border: 2px solid currentColor;
  background: rgba(0, 0, 0, 0.4);
}

.chip--ready {
  color: var(--neon);
}

.chip--progress {
  color: var(--accent);
}

.chip--soon {
  color: var(--warning);
}

.feature-card {
  padding-top: 3rem;
}

.feature-icon {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.2);
}

.timeline-section {
  background: radial-gradient(circle at top, rgba(57, 255, 20, 0.12), transparent 50%);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: center;
}

.timeline-node {
  border: 2px solid var(--neon);
  border-radius: 0;
  padding: 1.5rem;
  min-height: 220px;
  background: var(--panel-strong);
  position: relative;
}

.timeline-stage {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.timeline-connector {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.7), transparent);
}

.timeline-node.complete {
  border-color: var(--grid-line);
}

.timeline-node.active {
  border-color: var(--neon);
}

.timeline-node.upcoming {
  border-color: rgba(255, 255, 255, 0.25);
}

.updates-section {
  position: relative;
  overflow: hidden;
}

.updates-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at right, rgba(14, 255, 194, 0.18), transparent 45%);
  pointer-events: none;
}

.updates-content {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.updates-panel {
  border: 2px solid var(--neon);
  border-radius: 0;
  padding: 1.5rem;
  background: var(--panel-strong);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.updates-panel a {
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
  border-bottom: 1px solid transparent;
}

.updates-panel a:hover {
  opacity: 0.8;
  border-bottom-color: var(--neon);
}

.footer-blurb a {
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.footer-blurb a:hover {
  opacity: 0.8;
}

.donate-section {
  background: var(--bg-alt);
  border-top: 2px solid var(--grid-line);
  border-bottom: 2px solid var(--grid-line);
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.donate-card {
  padding: 2rem 1.5rem;
  background: var(--panel);
  border: 2px solid var(--neon);
  border-radius: 0;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.donate-icon {
  font-size: 2.5rem;
  color: var(--neon);
  margin: 0 auto;
}

.donate-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.donate-address {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.donate-address code {
  word-break: break-all;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.75rem;
  border: 1px dashed var(--grid-line);
  font-size: 0.85rem;
  color: var(--text-dim);
  width: 100%;
  display: block;
}

.copy-btn {
  background: transparent;
  border: 2px solid var(--neon);
  color: var(--neon);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--neon);
  color: #000;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.copy-btn.copied {
  background: var(--neon);
  color: #000;
}

.paypal-link {
  color: var(--neon);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--neon);
  display: inline-block;
  transition: all 0.2s;
}

.paypal-link:hover {
  background: var(--neon);
  color: #000;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

footer {
  padding: 2.5rem clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--neon);
  background: #020304;
}

.footer-blurb {
  color: var(--text-dim);
  max-width: 38ch;
}

.footer-meta {
  text-align: right;
  color: var(--text-dim);
  font-size: 0.9rem;
}

@media (max-width: 968px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .desktop-cube {
    display: none;
  }

  .mobile-cube {
    display: flex;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    height: auto;
    box-sizing: border-box;
    padding: 0;
    min-width: 0; /* Allow shrinking below content size */
  }

  .hero-cube-container.mobile-cube {
    max-width: 100%;
    overflow: visible;
    margin: 0 auto 10rem; /* Add bottom margin for spacing from content below (vortex controls height + gap) */
    width: min(100%, 520px);
    min-width: 0;
    display: block; /* Use block instead of flex so canvas determines container height */
    position: relative;
  }

  /* On mobile, position vortex controls below the container, not inside it */
  .hero-cube-container.mobile-cube .vortex-controls {
    position: absolute !important;
    bottom: auto !important;
    top: calc(100% + 1rem) !important; /* Position below container with 1rem gap */
    left: 0 !important;
    right: 0 !important;
    margin: 0;
    width: 100%;
  }
  
  /* Ensure canvas inside mobile cube maintains square aspect ratio */
  .hero-cube-container.mobile-cube canvas {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    max-width: 100%;
    max-height: none;
    display: block;
  }
  
  .hero-content {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0; /* Allow shrinking */
  }
  
  .hero-layout {
    min-width: 0; /* Allow grid to shrink */
  }
  
  /* Add top margin to hero-buttons to clear the absolutely positioned vortex controls */
  .hero-content .hero-buttons {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }

  .logo {
    width: 120px;
    height: 120px;
    padding: 0.5rem;
  }

  .logo-glyph {
    font-size: 2rem;
  }

  .logo-label {
    font-size: 0.55rem;
  }

  .logo-name {
    font-size: 0.75rem;
  }

  .hero-status-pill {
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-meta {
    text-align: center;
  }
}

