/* ============================================================
   GitPulse Website — Design System
   ============================================================
   Source of truth: app/src/main/res/values/colors.xml
   Font: Poppins (Google Fonts)
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Reset
   ---------------------------------------------------------- */
*, *::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: var(--font-primary);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

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

ul, ol {
  list-style: none;
}

/* ----------------------------------------------------------
   2. Design Tokens (CSS Custom Properties)
   ---------------------------------------------------------- */
:root {
  /* --- Colors (from colors.xml) --- */
  --bg:                  #000000;
  --bg-alt:              #000000;
  --surface:             #151518;
  --surface-alt:         #0C0611;
  --surface-elevated:    #21212F;
  --surface-subtle:      #363549;

  --primary:             #645EDE;
  --primary-variant:     #9260EF;
  --primary-light:       #AF86F6;
  --primary-dark:        #331D4D;
  --primary-glow:        #5A5DDA;

  --accent:              #AD2A9B;
  --accent-strong:       #E5186A;

  --text-primary:        #FCFCFC;
  --text-secondary:      #C0C0C0;
  --text-muted:          #9F9FA0;
  --text-disabled:       #5E5E61;

  --success:             #2B8A45;
  --success-bg:          rgba(43, 138, 69, 0.15);
  --warning:             #DEA707;
  --warning-bg:          rgba(222, 167, 7, 0.15);
  --error:               #CA392D;
  --error-bg:            rgba(202, 57, 45, 0.15);

  --border-subtle:       #3B4841;
  --border-strong:       #58585C;
  --divider:             #525656;

  /* --- Gradients --- */
  --gradient-primary:    linear-gradient(135deg, var(--primary-variant), var(--primary));
  --gradient-accent:     linear-gradient(135deg, var(--accent), var(--primary));
  --gradient-hero:       radial-gradient(ellipse at 30% 20%, rgba(146, 96, 239, 0.15) 0%, transparent 50%),
                         radial-gradient(ellipse at 70% 60%, rgba(100, 94, 222, 0.1) 0%, transparent 50%);
  --gradient-glow:       radial-gradient(circle, rgba(146, 96, 239, 0.3) 0%, transparent 70%);

  /* --- Typography --- */
  --font-primary:        'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Spacing Scale --- */
  --space-xs:            4px;
  --space-s:             8px;
  --space-m:             12px;
  --space-l:             16px;
  --space-xl:            24px;
  --space-2xl:           32px;
  --space-3xl:           48px;
  --space-4xl:           64px;
  --space-5xl:           96px;
  --space-6xl:           128px;

  /* --- Border Radius --- */
  --radius-sm:           8px;
  --radius-md:           12px;
  --radius-lg:           16px;
  --radius-xl:           24px;
  --radius-pill:         999px;

  /* --- Transitions --- */
  --transition-fast:     0.2s ease;
  --transition-normal:   0.3s ease;
  --transition-slow:     0.6s ease;
  --transition-spring:   0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-Index Scale --- */
  --z-base:              1;
  --z-nav:               100;
  --z-modal:             200;
  --z-toast:             300;

  /* --- Layout --- */
  --max-width:           1200px;
  --nav-height:          72px;
}

/* ----------------------------------------------------------
   3. Base Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   4. Utility Classes
   ---------------------------------------------------------- */

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-xl);
}

.section {
  padding-block: var(--space-5xl);
  position: relative;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-light);
  margin-bottom: var(--space-l);
}

.section-title {
  margin-bottom: var(--space-l);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Glassmorphism --- */
.glass {
  background: rgba(21, 21, 24, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: rgba(21, 21, 24, 0.85);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-2xl);
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: 0 4px 24px rgba(146, 96, 239, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(146, 96, 239, 0.4);
  color: var(--text-primary);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 16px rgba(146, 96, 239, 0.2);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(146, 96, 239, 0.06);
  transform: translateY(-2px);
}

.btn-ghost:active {
  transform: translateY(0);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: var(--space-2xl);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: rgba(146, 96, 239, 0.15);
  box-shadow: 0 8px 40px rgba(146, 96, 239, 0.08);
  transform: translateY(-4px);
}

.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.card-glow:hover::before {
  opacity: 0.15;
}

/* ----------------------------------------------------------
   5. Animation Base Classes (Initial States for GSAP)
   ---------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

.fade-in {
  opacity: 0;
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
}

.scale-in {
  opacity: 0;
  transform: scale(0.95);
}

.blur-in {
  opacity: 0;
  filter: blur(10px);
}

/* ----------------------------------------------------------
   6. Responsive Breakpoints
   ---------------------------------------------------------- */

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-2xl);
  }

  .section {
    padding-block: var(--space-6xl);
  }

  .hide-tablet {
    display: none !important;
  }

  .show-tablet {
    display: block !important;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-3xl);
  }

  .hide-desktop {
    display: none !important;
  }

  .show-desktop {
    display: block !important;
  }
}

/* --- Large (1440px+) --- */
@media (min-width: 1440px) {
  .container {
    padding-inline: var(--space-4xl);
  }
}

/* --- Mobile utilities --- */
.show-tablet,
.show-desktop {
  display: none !important;
}

/* ----------------------------------------------------------
   7. Reduced Motion
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up,
  .fade-in,
  .fade-left,
  .fade-right,
  .scale-in,
  .blur-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ----------------------------------------------------------
   8. Scrollbar Styling
   ---------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* ----------------------------------------------------------
   9. Selection Styling
   ---------------------------------------------------------- */
::selection {
  background: rgba(146, 96, 239, 0.3);
  color: var(--text-primary);
}

/* ----------------------------------------------------------
   10. Navbar
   ---------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-nav);
  padding: var(--space-l) 0;
  transition: padding 0.4s ease, background 0.4s ease, backdrop-filter 0.4s ease;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#navbar.scrolled {
  padding: var(--space-s) 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.8125rem;
  padding: var(--space-s) var(--space-xl);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-s);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav drawer */
@media (max-width: 767px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(8, 8, 12, 0.97);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-2xl) var(--space-3xl);
    gap: var(--space-xs);
    align-items: center;
    justify-content: flex-start;
    z-index: 999;
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links .nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    padding: var(--space-l) 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: color var(--transition-fast);
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link:active {
    color: var(--text-primary);
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
    position: relative;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: var(--space-xl);
    padding: var(--space-l) var(--space-2xl);
    font-size: 1rem;
  }

  /* Legal accordion group */
  .nav-group {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-group-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-s);
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 500;
    padding: var(--space-l) 0;
    cursor: pointer;
    transition: color var(--transition-fast);
  }

  .nav-group-trigger:hover {
    color: var(--text-primary);
  }

  .nav-group-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }

  .nav-group-trigger[aria-expanded="true"] .nav-group-chevron {
    transform: rotate(180deg);
  }

  .nav-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-group.open .nav-group-items {
    max-height: 200px;
  }

  .nav-group-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-s);
    padding: var(--space-m) 0;
    color: var(--text-muted);
    font-size: 1rem;
    text-align: center;
    transition: color var(--transition-fast);
    margin-bottom: var(--space-xs);
  }

  .nav-group-link::after {
    content: '›';
    font-size: 1.1rem;
    color: var(--text-disabled);
  }

  .nav-group-link:hover {
    color: var(--text-primary);
  }
}

/* Hide nav-group on desktop */
.nav-group {
  display: none;
}

@media (max-width: 767px) {
  .nav-group {
    display: block;
  }
}


/* ----------------------------------------------------------
   11. Hero Section
   ---------------------------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--gradient-hero);
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146, 96, 239, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  animation: heroOrb1 8s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 94, 222, 0.1) 0%, transparent 70%);
  filter: blur(60px);
  animation: heroOrb2 10s ease-in-out infinite alternate;
}

@keyframes heroOrb1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.2); }
}

@keyframes heroOrb2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, -30px) scale(1.15); }
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text {
  max-width: 560px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.03em;
  overflow: visible;
}

.hero-cycle-line {
  white-space: nowrap;
  display: inline-block;
  padding-bottom: 0.05em;
}

.hero-cycle {
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-3xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-l);
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

/* Phone mockup */
.phone-mockup {
  width: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 40px; /* match image corners */
  position: relative;
  box-shadow:
    0 0 60px rgba(146, 96, 239, 0.15),
    0 0 120px rgba(100, 94, 222, 0.08),
    0 25px 60px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

/* Removed phone-notch since figma images have notches */

.phone-screen {
  width: 100%;
  display: flex;
}

.phone-screen img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 40px;
}

/* Hero responsive */
@media (max-width: 1023px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-3xl);
  }

  .hero-text {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    max-width: 500px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .phone-mockup {
    width: 240px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .phone-mockup {
    width: 200px;
  }
}

/* ----------------------------------------------------------
   12. Social Proof
   ---------------------------------------------------------- */
#social-proof {
  padding-block: var(--space-3xl);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.proof-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

.proof-text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.proof-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.proof-divider {
  width: 1px;
  height: 32px;
  background: var(--divider);
}

.counter {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.proof-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0.6;
}

@media (max-width: 767px) {
  .proof-bar {
    flex-direction: column;
    gap: var(--space-l);
  }

  .proof-divider {
    display: none;
  }
}

/* ----------------------------------------------------------
   13. Features
   ---------------------------------------------------------- */
.features-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.features-header .section-subtitle {
  margin-inline: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(146, 96, 239, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-l);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary-light);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-s);
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   14. How It Works
   ---------------------------------------------------------- */
.steps-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.step {
  text-align: center;
  padding: 0 var(--space-2xl);
  position: relative;
}

.step-number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-l);
  opacity: 0.25;
  line-height: 1;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-l);
}

.step-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary-light);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-s);
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin-inline: auto;
}

.step-connector {
  position: absolute;
  top: 1.5rem;
  right: -1px;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, transparent, rgba(146, 96, 239, 0.2), transparent);
}

/* Desktop: horizontal connectors */
@media (min-width: 768px) {
  .step-connector {
    top: auto;
    bottom: auto;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, rgba(146, 96, 239, 0.15), transparent);
  }

  .step:last-child .step-connector {
    display: none;
  }
}

@media (max-width: 767px) {
  .steps-container {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .step {
    padding: 0;
  }

  .step-connector {
    position: relative;
    top: auto;
    right: auto;
    width: 2px;
    height: 32px;
    margin: var(--space-xl) auto 0;
    background: linear-gradient(to bottom, rgba(146, 96, 239, 0.2), transparent);
  }

  .step:last-child .step-connector {
    display: none;
  }
}

/* ----------------------------------------------------------
   15. Screenshots Showcase
   ---------------------------------------------------------- */
.screenshots-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

/* Two-column showcase layout */
.showcase-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

/* Left: tab list */
.showcase-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.showcase-tab {
  display: flex;
  align-items: flex-start;
  gap: var(--space-l);
  padding: var(--space-l) var(--space-xl);
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
  font-family: var(--font-primary);
  width: 100%;
}

.showcase-tab:hover {
  background: rgba(255, 255, 255, 0.03);
}

.showcase-tab.active {
  background: rgba(146, 96, 239, 0.08);
  border-color: rgba(146, 96, 239, 0.2);
}

/* Dot indicator */
.tab-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-subtle);
  margin-top: 5px;
  transition: background var(--transition-fast);
}

.showcase-tab.active .tab-dot {
  background: var(--primary-light);
  box-shadow: 0 0 8px rgba(175, 134, 246, 0.6);
}

/* Tab text */
.tab-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.tab-text strong {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.showcase-tab.active .tab-text strong {
  color: var(--text-primary);
}

.tab-text span {
  font-size: 0.875rem;
  color: var(--text-disabled);
  line-height: 1.5;
  transition: color var(--transition-fast);
}

.showcase-tab.active .tab-text span {
  color: var(--text-muted);
}

/* Right: phone frame */
.showcase-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146, 96, 239, 0.2) 0%, transparent 70%);
  pointer-events: none;
  transition: background var(--transition-slow);
}

.showcase-phone-frame {
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 60px rgba(146, 96, 239, 0.15),
    0 25px 60px rgba(0, 0, 0, 0.5);
  border-radius: 40px;
}

.showcase-screen {
  display: flex;
}

.showcase-screen img {
  height: 520px;
  width: auto;
  object-fit: contain;
  border-radius: 40px;
  display: block;
  transition: opacity 0.2s ease;
}

/* Responsive */
@media (max-width: 1023px) {
  .showcase-layout {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .showcase-phone-wrap {
    order: -1; /* phone first on mobile */
  }

  .showcase-screen img {
    height: 400px;
  }

  .showcase-glow {
    width: 260px;
    height: 260px;
  }
}

@media (max-width: 480px) {
  .showcase-screen img {
    height: 320px;
  }
}



/* ----------------------------------------------------------
   16. Security Section (Redesigned)
   ---------------------------------------------------------- */
.security-section {
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(100, 94, 222, 0.04) 50%, transparent 100%);
  overflow: hidden;
}

.security-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(146, 96, 239, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Header */
.security-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.security-lead {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-top: var(--space-l);
  line-height: 1.7;
}

/* Pillar grid */
.security-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-4xl);
}

.security-pillar {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.security-pillar:hover {
  border-color: rgba(146, 96, 239, 0.2);
  transform: translateY(-4px);
}

/* Pillar icon containers */
.pillar-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.pillar-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.pillar-icon--lock {
  background: linear-gradient(135deg, rgba(146, 96, 239, 0.25), rgba(100, 94, 222, 0.1));
  border: 1px solid rgba(146, 96, 239, 0.2);
}
.pillar-icon--lock svg { stroke: #AF86F6; }

.pillar-icon--shield {
  background: linear-gradient(135deg, rgba(43, 138, 69, 0.25), rgba(43, 138, 69, 0.08));
  border: 1px solid rgba(43, 138, 69, 0.2);
}
.pillar-icon--shield svg { stroke: #5ece85; }

.pillar-icon--code {
  background: linear-gradient(135deg, rgba(222, 167, 7, 0.2), rgba(222, 167, 7, 0.06));
  border: 1px solid rgba(222, 167, 7, 0.2);
}
.pillar-icon--code svg { stroke: #f5c842; }

.security-pillar h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-m);
}

.security-pillar p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Bottom quote */
.security-quote {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.quote-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-light);
  opacity: 0.6;
  margin: 0 auto var(--space-l);
}

.security-quote blockquote {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--space-m);
  font-weight: 400;
}

.security-quote cite {
  font-size: 0.875rem;
  color: var(--text-disabled);
  font-style: normal;
}

@media (max-width: 900px) {
  .security-pillars {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ----------------------------------------------------------
   17. Download CTA
   ---------------------------------------------------------- */
.cta-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5xl) var(--space-5xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146, 96, 239, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: var(--space-l);
  position: relative;
  z-index: 1;
  line-height: 1.15;
}

.cta-card p {
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  font-size: 1.125rem;
  position: relative;
  z-index: 1;
}

.btn-lg {
  padding: var(--space-l) var(--space-3xl);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.cta-card small {
  display: block;
  margin-top: var(--space-l);
  color: var(--text-disabled);
  font-size: 0.8125rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .cta-card {
    padding: var(--space-3xl) var(--space-xl);
  }
  .btn-lg {
    padding: var(--space-m) var(--space-m);
    font-size: 0.875rem;
    gap: var(--space-xs);
    width: 100%;
    white-space: nowrap;
  }
}

/* ----------------------------------------------------------
   18. Footer
   ---------------------------------------------------------- */
#footer {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand .nav-logo {
  margin-bottom: var(--space-l);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 280px;
  margin-bottom: var(--space-m);
}

.footer-brand small {
  color: var(--text-disabled);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-l);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: var(--space-xl);
  text-align: center;
  color: var(--text-disabled);
  font-size: 0.8125rem;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-brand .nav-logo {
    justify-content: center;
  }
}

/* ----------------------------------------------------------
   19. Lightbox Modal
   ---------------------------------------------------------- */
.clickable-img {
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.clickable-img:hover {
  transform: scale(1.02);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: var(--space-2xl);
}

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

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform var(--transition-spring);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: var(--surface-elevated);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transition: background var(--transition-fast);
  z-index: 1001;
}

.lightbox-close:hover {
  background: var(--surface-subtle);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* ----------------------------------------------------------
   19. Legal Pages (Privacy, Terms)
   ---------------------------------------------------------- */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-4xl)) var(--space-xl) var(--space-5xl);
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: var(--space-s);
  letter-spacing: -0.02em;
}

.legal-effective-date {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-disabled);
  margin-bottom: var(--space-3xl);
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-l);
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.0625rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-m);
  color: var(--text-secondary);
}

.legal-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-l);
}

.legal-content ul,
.legal-content ol {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  padding-left: var(--space-2xl);
  margin-bottom: var(--space-l);
}

.legal-content li {
  margin-bottom: var(--space-s);
}

.legal-content a {
  color: var(--primary-light);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.legal-content a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.legal-content strong {
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   20. 404 Page
   ---------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl);
}

.error-code {
  font-size: clamp(6rem, 20vw, 10rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-l);
  letter-spacing: -0.04em;
}

.error-page p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: var(--space-2xl);
}
