/* ============================================
   EasyWidge — GitHub Pages Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-bg: #0a0e1a;
  --color-bg-alt: #111827;
  --color-surface: #1a1f35;
  --color-surface-hover: #232942;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-primary: #38bdf8;
  --color-primary-dark: #0ea5e9;
  --color-accent: #a78bfa;
  --color-accent-pink: #f472b6;
  --gradient-primary: linear-gradient(135deg, #38bdf8, #a78bfa, #f472b6);
  --gradient-surface: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(167, 139, 250, 0.05));
  --gradient-glow: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.15), transparent 70%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(56, 189, 248, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Animated Background Particles --- */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: float 20s infinite ease-in-out;
}

.particle-1 {
  width: 600px;
  height: 600px;
  background: var(--color-primary);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.particle-2 {
  width: 400px;
  height: 400px;
  background: var(--color-accent);
  bottom: -100px;
  left: -100px;
  animation-delay: -5s;
}

.particle-3 {
  width: 300px;
  height: 300px;
  background: var(--color-accent-pink);
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}

.particle-4 {
  width: 200px;
  height: 200px;
  background: var(--color-primary);
  bottom: 30%;
  right: 20%;
  animation-delay: -15s;
}

.particle-5 {
  width: 350px;
  height: 350px;
  background: var(--color-accent);
  top: 60%;
  left: 10%;
  animation-delay: -8s;
}

.particle-6 {
  width: 250px;
  height: 250px;
  background: var(--color-accent-pink);
  top: 10%;
  left: 30%;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.25rem;
}

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

.brand-icon {
  font-size: 1.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--color-border);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--color-border-hover);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

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

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #0a0e1a;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.35);
  color: #0a0e1a;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  color: var(--color-text);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  color: var(--color-text);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* --- Hero Stats --- */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* --- Section Shared --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* --- Screenshot Section --- */
.screenshot-section {
  position: relative;
  z-index: 1;
  padding: 80px 0 100px;
}

.screenshot-showcase {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.screenshot-glow {
  position: absolute;
  inset: -40px;
  background: var(--gradient-glow);
  filter: blur(40px);
  z-index: 0;
}

.screenshot-img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: transform var(--transition-smooth);
}

.screenshot-img:hover {
  transform: scale(1.01);
}

/* --- Features Section --- */
.features-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--gradient-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition-smooth);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- How It Works Section --- */
.how-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #0a0e1a;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--color-border);
  margin-top: 28px;
  flex-shrink: 0;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 80px 0 120px;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 72px 40px;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-card p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 36px;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .brand-icon {
  font-size: 1.8rem;
}

.footer-brand .brand-text {
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-tagline {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  margin-top: 4px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

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

/* --- Legal Pages Shared --- */
.legal-page {
  position: relative;
  z-index: 1;
  padding: 140px 24px 80px;
  min-height: 100vh;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-container h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-updated {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

.legal-container h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-text);
}

.legal-container h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-container p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-container ul,
.legal-container ol {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal-container li {
  margin-bottom: 8px;
}

.legal-container a {
  color: var(--color-primary);
}

.legal-container strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-container code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg-alt);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 4px;
    transition: right var(--transition-smooth);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cta-card {
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Promo Section --- */
.promo-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.promo-content {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 40px;
}

.promo-text {
  flex: 1;
}

.promo-text p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.8;
}

.promo-text strong {
  color: var(--color-primary);
}

.promo-path {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.95rem !important;
  color: var(--color-text) !important;
  margin-bottom: 24px;
}

.promo-path code {
  display: inline-block;
  margin-top: 8px;
  color: var(--color-accent);
  font-family: monospace;
}

.promo-small {
  font-size: 0.85rem !important;
  color: var(--color-text-dim) !important;
  line-height: 1.5;
  margin-bottom: 0 !important;
}

.promo-image {
  flex: 1;
  position: relative;
}

.promo-img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(167, 139, 250, 0.15);
  transition: transform var(--transition-smooth);
}

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

@media (max-width: 768px) {
  .promo-content {
    flex-direction: column-reverse;
    gap: 32px;
  }
}

