/* ============================================
   NEBULA — Pure HTML/CSS/JS Landing Page
   ============================================ */

/* --- CSS Variables --- */
:root {
  --brand-purple: #7B61FF;
  --deep-purple: #5A4BD0;
  --dark-navy: #2C2344;
  --lavender-bg: #EBE8FD;
  --soft-lavender: #E8E4FF;
  --light-lavender: #F3F0FF;
  --near-white: #FAFAFF;
  --white: #FFFFFF;
  --muted-text: #6B6680;
  --light-text: #9B96B0;
  --light-border: #D4CFF7;
  --card-border: rgba(123, 97, 255, 0.15);
  --card-shadow: 0 4px 24px rgba(123, 97, 255, 0.08);

  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 100px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--dark-navy);
  background: linear-gradient(180deg, #EBE8FD 0%, #E8E4FF 30%, #F3F0FF 70%, #FAFAFF 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.text-center {
  text-align: center;
}

.section {
  padding-top: 120px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(235, 232, 253, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(212, 207, 247, 0.5);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  transition: transform 0.2s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-navy);
  opacity: 0.8;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand-purple);
  opacity: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-menu-btn:hover {
  background: var(--lavender-bg);
  border-color: rgba(123, 97, 255, 0.3);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(212, 207, 247, 0.5);
  padding: 24px clamp(20px, 4vw, 48px);
}

.mobile-menu.open {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--dark-navy);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--brand-purple);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--deep-purple);
  color: var(--white);
  padding: 12px 28px;
}

.btn-primary:hover {
  background: #6B52FF;
  box-shadow: 0 4px 20px rgba(90, 75, 208, 0.3);
  transform: scale(1.03);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-light {
  background: var(--white);
  color: var(--dark-navy);
  padding: 12px 28px;
}

.btn-light:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-light:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 15px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* --- Hero --- */
.hero {
  padding: 120px clamp(20px, 4vw, 48px) 16px;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-card {
  position: relative;
  width: 100%;
  min-height: 560px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #1A1033;
}

.hero-card canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  min-height: 560px;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, transparent 70%);
}

.hero-tagline {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-headline {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  max-width: 600px;
}

.hero-cta {
  position: relative;
  margin-top: 32px;
}

/* Hero entrance animations */
.hero-card {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  animation: heroCardIn 1s ease 0.3s forwards;
}

.hero-tagline {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-headline {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.75s forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.7s ease 0.95s forwards;
}

@keyframes heroCardIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section Headline --- */
.section-headline {
  text-align: center;
  margin-bottom: 48px;
}

.section-headline h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--dark-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.inline-ghost {
  display: inline-block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  vertical-align: middle;
  margin-top: -4px;
}

.link-see-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--brand-purple);
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.link-see-more:hover {
  color: var(--deep-purple);
  text-decoration: underline;
}

.link-see-more svg {
  transition: transform 0.2s ease;
}

.link-see-more:hover svg {
  transform: translate(2px, -2px);
}

/* --- Feature Card --- */
.feature-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.feature-body {
  display: flex;
  flex-direction: column;
}

.feature-text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-image {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: opacity 0.35s ease;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  width: fit-content;
  margin-bottom: 20px;
}

.tag-active {
  background: rgba(123, 97, 255, 0.08);
  color: var(--brand-purple);
}

.feature-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--dark-navy);
  margin-bottom: 16px;
}

.feature-desc {
  color: var(--muted-text);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Carousel Navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--light-border);
  transition: all 0.3s ease;
}

.dot.active {
  width: 24px;
  background: var(--brand-purple);
}

.dot:hover {
  background: rgba(123, 97, 255, 0.4);
}

.carousel-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy);
  transition: all 0.2s ease;
}

.arrow-btn:hover {
  background: var(--lavender-bg);
  border-color: rgba(123, 97, 255, 0.3);
}

/* --- Security Section --- */
.security-container {
  background: var(--dark-navy);
  border-radius: var(--radius-xl);
  padding: 64px 24px;
}

.security-card {
  margin-bottom: 24px;
}

.security-card:last-child {
  margin-bottom: 0;
}

/* --- CTA Section --- */
.cta-section {
  padding-bottom: 80px;
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--dark-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.text-muted {
  color: var(--muted-text);
  font-size: 14px;
}

/* --- Footer --- */
.footer {
  padding: 80px clamp(20px, 4vw, 48px) 48px;
  border-top: 1px solid var(--light-border);
  background: var(--light-lavender);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--dark-navy);
  margin-bottom: 8px;
}

.newsletter {
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
}

.input-field {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--dark-navy);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder {
  color: var(--light-text);
}

.input-field:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 64px;
}

.footer-col-header {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-navy);
  font-size: 16px;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand-purple);
}

.footer-links a svg {
  color: var(--muted-text);
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--light-border);
  gap: 16px;
}

.footer-bottom p {
  font-size: 14px;
  color: var(--light-text);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--light-text);
}

.footer-legal a {
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--muted-text);
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utilities --- */
.hidden-sm {
  display: none;
}

/* ============================================
   CONNECT WALLET MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 16, 51, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-dialog {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.modal-close:hover {
  background: var(--lavender-bg);
  color: var(--dark-navy);
}

/* Modal Header */
.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--dark-navy);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--muted-text);
}

/* Modal Steps */
.modal-step {
  animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progress Bar */
.progress-container {
  margin: 20px 0 16px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--light-border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-purple), var(--deep-purple));
  border-radius: 2px;
  animation: progressFill 2.5s ease-in-out forwards;
}

@keyframes progressFill {
  0% { width: 0%; }
  30% { width: 60%; }
  60% { width: 85%; }
  100% { width: 100%; }
}

.progress-text {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-navy);
  margin-top: 20px;
}

.progress-sub {
  text-align: center;
  font-size: 13px;
  color: var(--light-text);
  font-style: italic;
  margin-top: 4px;
}

/* Error Box */
.error-box {
  padding: 12px 16px;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.04);
}

/* Phrase Form */
.form-group {
  margin-bottom: 4px;
}

.phrase-input {
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-navy);
  background: var(--white);
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phrase-input::placeholder {
  color: var(--light-text);
  font-size: 15px;
}

.phrase-input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.12);
}

.phrase-hint {
  font-size: 13px;
  color: var(--light-text);
  margin-top: 8px;
  text-align: center;
}

.phrase-hint.valid {
  color: #16a34a;
}

.phrase-hint.invalid {
  color: #dc2626;
}

/* Modal Security Footer */
.modal-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--light-border);
  font-size: 13px;
  color: var(--light-text);
}

.modal-security svg {
  flex-shrink: 0;
}

/* Button loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

/* ============================================
   RESPONSIVE — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-menu-btn {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }

  .hidden-sm {
    display: inline-flex;
  }

  .feature-body {
    flex-direction: row;
  }

  .feature-body-reverse {
    flex-direction: row-reverse;
  }

  .feature-text {
    width: 40%;
    padding: 48px;
  }

  .feature-image {
    width: 60%;
    min-height: 400px;
  }

  .feature-image-wide + .feature-text,
  .feature-body-reverse .feature-text {
    width: 45%;
  }

  .feature-image-wide,
  .feature-body-reverse .feature-image {
    width: 55%;
  }

  .security-container {
    padding: 80px 48px;
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
  }
}

/* ============================================
   RESPONSIVE — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .feature-text {
    padding: 56px 64px;
  }

  .hero-overlay {
    padding: 100px 48px;
  }
}
