/* ============================================
   NEXDOR LANDING PAGE - Premium Design
   Stack: Vanilla CSS + IntersectionObserver
   Colors: Blue #2563eb (app primary / Rise tier),
           Spark Orange #EA580C (app Spark tier accent),
           Legacy Gold #CA8A04 (premium accent),
           Dark #0f172a
   Token names mirror docs/superpowers/specs/2026-04-26-arc-rebrand-design.md
   Font: Inter (Google Fonts)
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* --- Design Tokens --- */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #EA580C;
  --orange-dark: #C2410C;
  --orange-light: #FB923C;
  --gold: #CA8A04;
  --gold-light: #FEF9C3;
  --dark: #0f172a;
  --dark-card: rgba(30, 41, 59, 0.8);
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-900: #0f172a;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 24px 48px rgba(0,0,0,0.1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Utilities --- */
.text-gradient-orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-white { color: #fff; }

/* --- Section Containers --- */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-label-light { color: var(--orange); }

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.reveal-left {
  transform: translateX(-40px);
}
.reveal.reveal-right {
  transform: translateX(40px);
}
.reveal.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.navbar.scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
  background: rgba(255,255,255,0.95);
}
.navbar.nav-hidden {
  transform: translateY(-100%);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  transition: opacity var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo:hover { opacity: 0.8; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  position: relative;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transition: width var(--transition-base);
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.btn-cta {
  background: var(--blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}
.btn-cta:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-cta:active { transform: scale(0.97); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}
.mobile-menu.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu.active span:nth-child(2) { opacity: 0; }
.mobile-menu.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 140px 0 80px;
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--orange);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 20px;
}
.hero-desc {
  color: var(--gray-500);
  font-size: 1rem;
  margin-top: 16px;
  line-height: 1.75;
  max-width: 520px;
}
.store-badges { display: flex; gap: 12px; margin-top: 36px; }
.store-badge {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border-radius: 8px;
  cursor: pointer;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store-badge:active { transform: scale(0.97); }
.store-badge img { height: 48px; border-radius: 8px; }
.hero-image {
  position: relative;
}
.hero-image-glow {
  position: absolute;
  top: 20%;
  left: 10%;
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.12), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}
.hero-image img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-xl);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-image:hover img {
  transform: scale(1.02) rotate(0.5deg);
}

/* ============================================
   ABOUT
   ============================================ */
.about { padding: 120px 0; }
.about h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 72px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-image img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-image:hover img { transform: scale(1.02); }
.about-text p {
  color: var(--gray-500);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* ============================================
   ARC SCORE (dark section)
   ============================================ */
.arc {
  padding: 120px 0;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.arc::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.08), transparent 70%);
  pointer-events: none;
}
.arc h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.arc-desc {
  color: var(--gray-400);
  font-size: 1rem;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 72px;
  line-height: 1.8;
}
.arc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.arc-card {
  background: var(--dark-card);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  cursor: default;
}
.arc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 48px rgba(245, 158, 11, 0.08);
}
.arc-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 14px;
  margin-bottom: 20px;
}
.arc-card h3 {
  color: var(--orange);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.arc-card p {
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.75;
}
.arc-quote {
  color: var(--orange);
  font-size: 1.375rem;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  margin-top: 72px;
  letter-spacing: -0.01em;
}

/* ============================================
   CHALLENGES
   ============================================ */
.challenges { padding: 120px 0; }
.challenges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.challenges-text h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.challenges-text p {
  color: var(--gray-500);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.challenges-highlight { color: var(--gray-900); font-weight: 600; }

/* Challenge mock card */
.challenge-mock {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xl);
  max-width: 360px;
  margin: 0 auto;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.challenge-mock:hover { transform: translateY(-8px) rotate(-1deg); }
.mock-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.mock-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.mock-name { font-weight: 700; font-size: 0.95rem; color: var(--gray-900); }
.mock-sub { color: var(--gray-500); font-size: 0.8rem; }
.mock-body {
  text-align: center;
  padding: 28px 0;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.mock-title { font-weight: 700; font-size: 1.05rem; margin-top: 8px; color: var(--gray-900); }
.mock-arc { color: var(--blue); font-size: 0.825rem; font-weight: 600; margin-top: 4px; }
.mock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-accept, .mock-decline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: none;
}
.mock-accept {
  background: var(--gray-900);
  color: #fff;
}
.mock-decline {
  background: #fff;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.mock-accept:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.mock-decline:hover { transform: scale(1.03); }

/* ============================================
   FEATURES
   ============================================ */
.features { padding: 120px 0; background: var(--gray-50); }
.features h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.features-desc {
  color: var(--gray-500);
  font-size: 1rem;
  text-align: center;
  max-width: 650px;
  margin: 0 auto 72px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}
.feature-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 13px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-900);
}
.feature-card p {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* ============================================
   PHONE PREVIEW
   ============================================ */
.preview { padding: 80px 0; background: var(--gray-50); }
.phone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.phone-mock { text-align: center; }
.phone-frame {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}
.phone-frame:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.phone-notch {
  width: 60px;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  margin: 0 auto 12px;
}
.phone-screen { padding: 12px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.screen-circle { width: 36px; height: 36px; background: var(--gray-200); border-radius: 50%; }
.screen-line { height: 10px; background: var(--gray-100); border-radius: 5px; }
.screen-block { height: 44px; background: var(--gray-50); border-radius: 8px; }
.w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.phone-label { margin-top: 16px; font-size: 0.875rem; font-weight: 600; color: var(--gray-600); }

/* ============================================
   DOWNLOAD CTA
   ============================================ */
.download {
  padding: 120px 0;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #3b82f6 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.download::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06), transparent 60%);
  pointer-events: none;
}
.download h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
  position: relative;
}
.download-desc {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.8;
  position: relative;
}
.download-buttons { display: flex; gap: 16px; justify-content: center; position: relative; }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--gray-900);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}
.dl-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.dl-btn:active { transform: scale(0.97); }

/* ============================================
   FOOTER
   ============================================ */
.footer { padding: 48px 0 24px; background: #1e293b; color: var(--gray-400); }
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.footer-tagline { font-size: 0.85rem; }
.footer-links { display: flex; gap: 32px; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #334155;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.5rem; }
  .about h2, .arc h2, .challenges-text h2, .features h2, .download h2 { font-size: 2rem; }
  .arc-cards, .features-grid { grid-template-columns: 1fr 1fr; }
  .phone-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a::after { display: none; }
  .btn-cta { display: none; }
  .mobile-menu { display: flex; }

  .hero { padding: 120px 0 60px; }
  .hero-container { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.25rem; }
  .hero-image { order: -1; }

  .about, .arc, .challenges, .features, .download { padding: 80px 0; }
  .about h2, .arc h2, .features h2, .download h2 { font-size: 1.75rem; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .arc-cards { grid-template-columns: 1fr; }
  .challenges-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .phone-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .download-buttons { flex-direction: column; align-items: center; }

  .footer-container { flex-direction: column; gap: 24px; }
  .footer-links { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .about h2, .arc h2, .features h2, .download h2 { font-size: 1.5rem; }
  .store-badges { flex-direction: column; }
  .store-badge img { height: 44px; }
  .phone-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
