/**
 * NEXUSPRIME ELITE STABILIZATION V3
 * Pure OLED Elite Architecture
 */
:root {
  --ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --section-gap: 160px;
  --accent-apple: #0071e3;
  --bg-pure: #000;
  --text-pure: #fff;
}

:root {}

@media (prefers-color-scheme: light) {
  :root {}
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* 1. Navigazione */
.local-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 52px;
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.local-nav-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
}

.local-nav-title {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}


/* 2. Hero Section - Massive Impact Video */
.apple-hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--bg-primary);
  overflow: hidden;
  transition: background-color 0.5s ease;
  margin-bottom: 5rem;
}

.hero-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-full-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.apple-hero-section .hero-content {
  position: relative;
  z-index: 2;
  padding: 14px 14px;
  color: var(--text-pure);
}

.mega-display {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  /* color: var(--text-secondary); */
  max-width: 800px;
  margin: 0 auto;
}

.hero-footer {
  position: absolute;
  bottom: 40px;
  color: rgb(255 255 255 / 77%);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.apple-showcase-item.reverse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-bottom: 6rem;
  padding: 0px 80px;
  overflow: hidden;
}

.apple-showcase-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-bottom: 6rem;
  padding: 0px 80px;
  overflow: hidden;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.apple-showcase-item.reverse .showcase-content {
  order: 1;
}

.apple-showcase-item.reverse .showcase-visual {
  order: 2;
}

.apple-showcase-item.reverse .showcase-content,
.apple-showcase-item.reverse .showcase-visual {
  display: grid;
  direction: ltr;
}

.showcase-content {
  padding: 80px;
  max-width: 700px;
}

.showcase-content .eyebrow {
  color: var(--accent-info);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 7px;
  display: block;
}

.showcase-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem !important;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  /* color: var(--text-pure); */
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  text-decoration: 2px wavy;
}

.showcase-content p {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 3. Cinematic Loop Engine */
.visual-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  /* Square by default as requested */
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  /* box-shadow: 0 50px 100px rgba(0,0,0,0.5); */
}

.loop-asset {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease-apple);
  z-index: 1;
}

.loop-asset.active {
  opacity: 1;
}

.motivational-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  transition: opacity 1.2s var(--ease-apple);
  z-index: 2;
  padding: 40px;
  text-align: center;
}

.motivational-overlay.visible {
  opacity: 1;
}

.motivational-overlay span {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #fff;
  transform: translateY(20px);
  transition: transform 1.2s var(--ease-apple);
}

.motivational-overlay.visible span {
  transform: translateY(0);
}

/* 4. Elite Form */
.apple-elite-form {
  margin-top: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.btn-apple-cta {
  width: 100%;
  padding: 20px;
  background: var(--accent-apple);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.btn-apple-cta:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-apple), transform 1s var(--ease-apple);
}

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

/* UTILITY: IS-SQUARE */
.is-square {
  aspect-ratio: 1/1 !important;
  object-fit: cover;
}

.visual-wrap.is-square {
  aspect-ratio: 1/1;
}

/* 5. Elite Registration Finale */
.onboarding-finale {
  position: relative;
  min-height: 100vh;
  padding: 160px 24px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.onboarding-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 600px;
  background: radial-gradient(circle at center, rgba(0, 113, 227, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.onboarding-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  /* Increased for better grid spacing */
  background: var(--ce-bg-glow);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  padding: 60px;
  text-align: center;
}

.form-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.form-header p {
  color: var(--text-secondary);
}

.form-grid-centered {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  text-align: left;
}

.input-wrap {
  grid-column: span 3;
}

.input-wrap.full-width {
  grid-column: span 6;
}

.input-wrap.mini {
  grid-column: span 1;
}

.input-wrap.large {
  grid-column: span 2;
}

.apple-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 10px;
}

.apple-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
}

.apple-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: light) {
  .apple-input {}

  .apple-input:focus {
    background: #fff;
  }
}

.checkbox-wrap {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.checkbox-wrap input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .experience-flow {
    margin-top: 98px;
  }

  .apple-hero-section {
    height: 80vh !important;
    /* Slightly shorter for better text focus */
  }

  .mega-display {
    font-size: clamp(2.5rem, 8vw, 4rem) !important;
    line-height: 1.1 !important;
    margin-bottom: 2rem !important;
    padding: 0 10px;
  }

  .hero-lead {
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
    max-width: 90% !important;
    margin: 0 auto !important;
  }

  .apple-showcase-item,
  .apple-showcase-item.reverse {
    display: flex !important;
    flex-direction: column !important;
    padding: 24px !important;
    min-height: auto;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-top: 2rem !important;
    margin-bottom: 4rem !important;
    gap: 2rem;
  }

  .showcase-visual {
    order: -1 !important;
    /* Force Video Top */
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .showcase-content {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  .visual-wrap {
    max-width: 100%;
    aspect-ratio: 1/1;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
  }

  .loop-asset {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
  }
}

@media (max-width: 768px) {
  .checkbox-wrap {
    display: flex;
    align-items: center;
    flex-direction: column;
  }

  .experience-flow {
    margin-top: 139px;
  }

  .onboarding-card {
    padding: 40px 24px;
  }

  .form-grid-centered {
    grid-template-columns: 1fr;
  }

  .input-wrap,
  .input-wrap.full-width,
  .input-wrap.mini,
  .input-wrap.large {
    grid-column: span 1;
  }
}


/* Force OLED Elite Theme & Kill Blocking Preloader */
#nx-app-preloader {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body {
  background: #000 !important;
  color: #fff !important;
}

.experience-flow {}

/* NEWSLETTER INTEGRATION (NX COMPATIBILITY) */
.nx-newsletter-integration {
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.nx-newsletter-form {
  margin-top: 30px;
}

.nx-newsletter-input-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
}

.nx-newsletter-input {
  flex: 1;
  min-width: 280px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1rem;
}

.nx-btn-sober {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 25px;
  border: none;
  border-radius: 40px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 50px;
}

.nx-newsletter-disclaimer {
  margin-top: 15px;
  font-size: 0.85rem;
}

.nx-newsletter-privacy-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-wrap: wrap;
  justify-content: center;
}

input[type="checkbox" i] {
  min-width: 20px;
  min-height: 20px;
}

.nx-newsletter-message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 20px;
  font-weight: 500;
}

.nx-newsletter-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.nx-newsletter-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ELITE FEEDBACK SIGNALS */
.form-feedback {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  display: none;
  animation: slideDown 0.4s var(--ease-apple);
}

.form-feedback.success {
  display: block;
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.form-feedback.error {
  display: block;
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

.nx-pwa-v-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}