:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  background-color: #000000;
  /* Allow page to scroll vertically on small screens */
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.threads-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(0.4px);
  opacity: 0.75;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Crect width='1' height='2' fill='%23ffffff' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.4;
}

.glass-panel {
  backdrop-filter: blur(22px);
  background: linear-gradient(135deg, rgba(6, 0, 15, 0.82), rgba(10, 8, 24, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 55px rgba(2, 0, 11, 0.6);
}

.floaty {
  animation: floaty 8s ease-in-out infinite;
}

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

.cta-button {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f0a24, #1a1342);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f8f5ff;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 10px 22px rgba(21, 0, 53, 0.45);
  margin-top: 4vh;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(35, 0, 82, 0.60);
  border-color: rgba(255, 255, 255, 0.55);
}

.cta-button:active {
  transform: scale(0.97);
}

/* remove shine animation, keep static */


.star-border__inner {
  position: relative;
  display: inline-flex;
  border-radius: inherit;
}

.star-border {
  border-radius: 999px;
}

.star-border::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--star-border-thickness, 1.5px));
  padding: var(--star-border-thickness, 1.5px);
  border-radius: inherit;
  background: conic-gradient(from 0deg, var(--star-border-color, rgba(255, 255, 255, 0.85)), rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 78%, var(--star-border-color, rgba(255, 255, 255, 0.85)));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: star-border-rotate var(--star-border-speed, 6s) linear infinite;
  pointer-events: none;
}

@keyframes star-border-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ---- Transparent footer ---- */
.footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Keep footer behind primary content panels */
  z-index: 10;
  padding: 10px 14px;
  background: transparent;
  pointer-events: none; /* allow clicks through except links */
}

.footer-content {
  margin: 0 auto;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  pointer-events: auto; /* re-enable for its children */
}

.footer-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-link:hover { color: #e7e3ff; }

/* Respect newlines in multi-line taglines */
.preserve-newlines { white-space: pre-line; }

/* ---- Features modal ---- */
.features-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(70, 40, 120, 0.18), transparent),
              rgba(6, 0, 15, 0.65);
  backdrop-filter: blur(6px);
}

.features-panel {
  position: relative;
  width: min(980px, 92vw);
  max-height: min(86vh, 820px);
  background: linear-gradient(180deg, rgba(14, 10, 25, 0.92), rgba(12, 8, 22, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(3, 0, 10, 0.65);
  /* Use flex layout so the scroll area can flex */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.features-scroll {
  position: relative;
  /* Take remaining height and scroll */
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 24px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Mobile tweaks: reduce heading sizes a bit */
@media (max-width: 640px) {
  .features-panel header h2 { font-size: 1.25rem; }
}

.features-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.features-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.features-card h4 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f6f1ff;
}

.features-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45rem;
  color: rgba(233, 230, 255, 0.8);
}

.scroll-stack-shadow {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.scroll-stack-shadow.top { top: 54px; background: linear-gradient(180deg, rgba(12, 8, 22, 0.9), rgba(12, 8, 22, 0)); }
.scroll-stack-shadow.bottom { bottom: 0; background: linear-gradient(0deg, rgba(12, 8, 22, 0.9), rgba(12, 8, 22, 0)); }
