/* ═══════════════════════════════════════════════════════════
   DIVVIT DESIGN SYSTEM — styles.css
   Premium Financial Editorial (Outfit · Purple · Glassmorphism)
   ═══════════════════════════════════════════════════════════ */

/* ───────── Design Tokens ───────── */
:root {
  /* ─ Surfaces ─ */
  --surface: #f9f9ff;
  --surface-dim: #d3daef;
  --surface-bright: #f9f9ff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f1f3ff;
  --surface-container: #e9edff;
  --surface-container-high: #e1e8fd;
  --surface-container-highest: #dce2f7;

  /* ─ On-Surface ─ */
  --on-surface: #141b2b;
  --on-surface-variant: #484554;
  --inverse-surface: #293040;
  --inverse-on-surface: #edf0ff;

  /* ─ Outline ─ */
  --outline: #797585;
  --outline-variant: #cac4d6;

  /* ─ Primary ─ */
  --primary: #6346cd;
  --primary-dim: #4b29b4;
  --on-primary: #ffffff;
  --primary-container: #6346cd;
  --on-primary-container: #ded4ff;
  --inverse-primary: #cbbeff;
  --primary-fixed: #e6deff;
  --primary-fixed-dim: #cbbeff;

  /* ─ Secondary ─ */
  --secondary: #6042c9;
  --on-secondary: #ffffff;
  --secondary-container: #795de4;
  --on-secondary-container: #fffbff;

  /* ─ Tertiary ─ */
  --tertiary: #703900;
  --on-tertiary: #ffffff;
  --tertiary-container: #934d00;

  /* ─ Error ─ */
  --error: #ba1a1a;

  /* ─ Misc ─ */
  --surface-tint: #6245cc;
  --background: #f9f9ff;

  /* ─ Shadows ─ */
  --shadow-sm: 0 2px 8px rgba(99, 70, 205, 0.06);
  --shadow-md: 0 8px 30px rgba(99, 70, 205, 0.10);
  --shadow-lg: 0 20px 50px rgba(99, 70, 205, 0.15);
  --shadow-xl: 0 25px 60px rgba(99, 70, 205, 0.20);

  /* ─ Radii ─ */
  --radius-sm: 0.5rem;
  --radius: 1rem;
  --radius-md: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --radius-full: 9999px;

  /* ─ Spacing ─ */
  --base: 8px;
  --container-max: 1280px;
  --gutter: 24px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;

  /* ─ Transitions ─ */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--background);
  overflow-x: hidden;
}

::selection {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ───────── Utility Classes ───────── */
.text-primary { color: var(--primary); }
.font-semibold { font-weight: 600; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ───────── Glass Card ───────── */
.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ═══════════════════════════════════════════════════════════
   AMBIENT BACKGROUND
   ═══════════════════════════════════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
  will-change: transform;
  transition: transform 0.6s var(--ease-out-expo);
}
.blob-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: rgba(99, 70, 205, 0.18);
  animation: blobPulse 8s ease-in-out infinite;
}
.blob-2 {
  width: 500px; height: 500px;
  top: 40%; right: -100px;
  background: rgba(75, 41, 180, 0.10);
  animation: blobPulse 10s ease-in-out 2s infinite;
}
.blob-3 {
  width: 400px; height: 400px;
  bottom: 0; left: 20%;
  background: rgba(96, 66, 201, 0.10);
  animation: blobPulse 12s ease-in-out 4s infinite;
}
@keyframes blobPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 249, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(202, 196, 214, 0.25);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-container {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.75rem 0.75rem 1.75rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.nav-spacer { flex: 1; }
.brand-wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8C52FF;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--on-surface-variant);
  transition: color 0.2s;
  position: relative;
}
.nav-link--active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
}
.nav-link:hover { color: var(--primary); }
.nav-cta { display: block; }
.mobile-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--on-surface);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out-expo);
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn--primary {
  background: var(--primary-dim);
  color: var(--on-primary);
  box-shadow: 0 8px 24px rgba(75, 41, 180, 0.25);
}
.btn--primary:hover {
  background: var(--primary);
  box-shadow: 0 12px 32px rgba(99, 70, 205, 0.30);
  transform: translateY(-1px);
}
.btn--primary:active { transform: scale(0.96) translateY(0); }
.btn--sm { padding: 0.625rem 1.5rem; font-size: 0.9rem; }
.btn--lg { padding: 1rem 2.5rem; font-size: 1.125rem; }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-inner { position: relative; }
.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--on-surface-variant);
  line-height: 1.6;
}

/* ── Waitlist Form ── */
.hero-form-wrapper {
  max-width: 460px;
  margin: 0 auto;
}
.hero-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--surface-container-lowest);
  border-radius: var(--radius-full);
  border: 1px solid rgba(202, 196, 214, 0.40);
  box-shadow: var(--shadow-xl);
  transition: box-shadow 0.3s ease;
}
.hero-form:focus-within {
  box-shadow: var(--shadow-xl), 0 0 0 3px rgba(99, 70, 205, 0.15);
}
.hero-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--on-surface);
  padding: 0.75rem 1.75rem;
  min-width: 0;
}
.hero-input::placeholder { color: var(--outline); }
.hero-form-btn {
  flex-shrink: 0;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}
.hero-disclaimer {
  margin-top: 1rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--outline);
}

/* ═══════════════════════════════════════════════════════════
   REWARD CARD SECTION
   ═══════════════════════════════════════════════════════════ */
.reward-section { padding: 5rem 0; }
.reward-center { display: flex; justify-content: center; }
.reward-card-border {
  width: 100%;
  max-width: 768px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(99,70,205,0.20), transparent 50%, rgba(75,41,180,0.10));
  border-radius: var(--radius-lg);
}
.reward-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-xl);
}
@media (min-width: 768px) {
  .reward-card { padding: 3.5rem 3rem; }
}
.reward-glow {
  position: absolute;
  width: 12rem; height: 12rem;
  border-radius: var(--radius-full);
  filter: blur(60px);
  pointer-events: none;
}
.reward-glow--tr { top: -6rem; right: -6rem; background: rgba(99, 70, 205, 0.10); }
.reward-glow--bl { bottom: -6rem; left: -6rem; background: rgba(75, 41, 180, 0.10); }
.reward-content { position: relative; z-index: 2; }

/* Icon ring */
.reward-icon-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem; height: 5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  padding: 3px;
  box-shadow: 0 8px 24px rgba(99, 70, 205, 0.25);
  margin-bottom: 2rem;
}
.reward-icon-inner {
  width: 100%; height: 100%;
  background: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.reward-icon-symbol {
  font-size: 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.reward-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 1rem;
}
.reward-points-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.reward-points {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.reward-pts-label {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-left: 0.5rem;
}
.reward-value-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 70, 205, 0.10);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.reward-desc {
  max-width: 540px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
  color: var(--on-surface-variant);
}

/* ═══════════════════════════════════════════════════════════
   LIVE DEMO SECTION
   ═══════════════════════════════════════════════════════════ */
.demo-section { padding: 6rem 0; overflow: hidden; }
.demo-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .demo-grid {
    flex-direction: row;
    gap: 4rem;
  }
}
.demo-copy { flex: 1; }
.section-label {
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
  margin-bottom: 1rem;
}
.demo-headline {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.demo-body {
  color: var(--on-surface-variant);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Feature list with animated checks */
.feature-list { display: flex; flex-direction: column; gap: 1.25rem; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.feature-check {
  flex-shrink: 0;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-full);
  background: rgba(75, 41, 180, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dim);
}
.feature-text {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--on-surface);
}

/* ── Checkmark animation ── */
@keyframes check-pop {
  0%   { transform: scale(0.5); opacity: 0; clip-path: inset(0 100% 0 0); }
  60%  { transform: scale(1.1); opacity: 1; clip-path: inset(0 0 0 0); }
  100% { transform: scale(1);   opacity: 1; clip-path: inset(0 0 0 0); }
}
.animate-check {
  opacity: 0;
  animation: check-pop 0.8s var(--ease-spring) forwards;
  animation-iteration-count: infinite;
  animation-duration: 4s;
}
.check-delay-1 { animation-delay: 0.1s; }
.check-delay-2 { animation-delay: 0.3s; }
.check-delay-3 { animation-delay: 0.5s; }

.demo-phone-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  width: 320px;
  height: 660px; /* Adjusted for exactly 1:2.16 screen with 14px bezel */
  margin: 0 auto;
}

.demo-phone-glow {
  position: absolute;
  inset: -15%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 70, 205, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  filter: blur(40px);
}

.phone-frame {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--inverse-surface, #2A2D3A);
  border-radius: 44px;
  box-shadow: 
    0 0 0 6px rgba(220, 226, 247, 0.30),
    0 0 0 12px rgba(220, 226, 247, 0.15),
    0 40px 80px -20px rgba(99, 70, 205, 0.25);
}



.phone-inner-bezel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 44px;
  background: transparent;
  box-shadow: none;
}

.phone-screen {
  position: absolute;
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  transform: translateZ(0);
}

/* Classic Notch */
.phone-notch {
  position: absolute;
  top: 0; 
  left: 50%;
  transform: translateX(-50%);
  width: 120px; 
  height: 28px;
  background: var(--inverse-surface, #2A2D3A);
  border-radius: 0 0 16px 16px;
  z-index: 30;
  box-shadow: none;
}

/* Hardware Buttons */
.phone-btn {
  position: absolute;
  background: var(--inverse-surface, #2A2D3A);
  box-shadow: none;
}
.phone-btn-left { top: 90px; left: -6px; width: 6px; height: 32px; border-radius: 4px 0 0 4px; }
.phone-btn-left-2 { top: 140px; left: -6px; width: 6px; height: 50px; border-radius: 4px 0 0 4px; }
.phone-btn-left-3 { top: 200px; left: -6px; width: 6px; height: 50px; border-radius: 4px 0 0 4px; }

.phone-btn-right {
  top: 150px; right: -6px; width: 6px; height: 75px; border-radius: 0 4px 4px 0;
  background: var(--inverse-surface, #2A2D3A);
  box-shadow: none;
}

/* ── App Demo Video ── */
.demo-video {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Prevents absolutely any cropping */
  object-position: center;
  display: block;
  background: transparent; /* Match app background */
}


/* ═══════════════════════════════════════════════════════════
   FINAL CTA (with integrated footer)
   ═══════════════════════════════════════════════════════════ */
.cta-section { padding: 6rem 0 0; }
.cta-card {
  position: relative;
  overflow: hidden;
  background: rgba(99, 70, 205, 0.08);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem 2.5rem;
  text-align: center;
}
.cta-card--fullbleed {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin: 0;
  padding: 5rem 2rem 3rem;
}
@media (min-width: 768px) {
  .cta-card--fullbleed { padding: 5rem 3rem 3.5rem; }
}
.cta-glow {
  position: absolute;
  width: 20rem; height: 20rem;
  border-radius: var(--radius-full);
  filter: blur(100px);
  pointer-events: none;
}
.cta-glow--tr { top: -5rem; right: -5rem; background: rgba(99,70,205,0.18); }
.cta-glow--bl { bottom: -5rem; left: -5rem; background: rgba(75,41,180,0.18); }
.cta-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}
.cta-btn {
  position: relative;
  z-index: 2;
  box-shadow: 0 12px 40px rgba(99, 70, 205, 0.25);
}
.cta-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 16px 50px rgba(99, 70, 205, 0.30);
}

/* ── Integrated Footer inside CTA ── */
.cta-footer {
  position: relative;
  z-index: 2;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(99, 70, 205, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}
.cta-footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #8B6CE7;
}
.cta-footer-copy {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(72, 69, 84, 0.45);
}

/* ═══════════════════════════════════════════════════════════
   SCROLL-REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-form { flex-direction: column; border-radius: var(--radius-md); }
  .hero-form-btn { width: 100%; }
  .demo-section { padding: 3rem 0; }
  .demo-phone-wrapper { width: 260px; height: 536px; }
  .reward-card { padding: 2rem 1.5rem; }
  .cta-card { padding: 3rem 1.5rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .demo-grid { gap: 3rem; }
}
