/* ===================================================================
   Server PowerToys Landing Page — Design System
   Dark premium theme with cyan/blue accents
   =================================================================== */

/* ─── Reset & Variables ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-elevated: #111111;
  --bg-hover: #1a1a1a;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --text-tertiary: rgba(255,255,255,0.4);
  --cyan: #00dbff;
  --cyan-dim: rgba(0,219,255,0.12);
  --blue: #3b82f6;
  --purple: #a855f7;
  --green: #22c55e;
  --yellow: #eab308;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-w: 1200px;
  --transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--cyan-dim);
  color: var(--text);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  font-size: 24px;
}

.logo-accent {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--cyan) !important;
  color: #000 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  opacity: 0.9;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  box-shadow: 0 0 24px rgba(0,219,255,0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 40px rgba(0,219,255,0.35);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--cyan);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 14px;
}

/* ─── Gradient Text ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Section Header ─── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--cyan-dim);
  color: var(--cyan);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--cyan);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.15;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--blue);
  bottom: 0;
  left: -100px;
  opacity: 0.1;
}

.glow-3 {
  width: 300px;
  height: 300px;
  background: var(--purple);
  bottom: 100px;
  right: -50px;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--mono);
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ─── App Preview (Fake Screenshot) ─── */
.hero-visual {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.app-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5), 0 0 60px rgba(0,219,255,0.08);
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border);
}

.titlebar-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.titlebar-title {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--mono);
}

.app-body {
  display: flex;
  min-height: 280px;
}

.app-sidebar {
  width: 180px;
  background: #080808;
  border-right: 1px solid var(--border);
  padding: 12px 8px;
}

.sidebar-item {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  cursor: default;
}

.sidebar-item.active {
  background: var(--cyan-dim);
  color: var(--cyan);
}

.app-content {
  flex: 1;
  padding: 0;
}

.app-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
}

.app-tabs .tab {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  cursor: default;
  position: relative;
}

.app-tabs .tab.active {
  color: var(--cyan);
}

.app-tabs .tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px 2px 0 0;
}

.app-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.mini-card {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.card-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.card-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  margin-bottom: 8px;
}

.card-value.cyan { color: var(--cyan); }
.card-value.purple { color: var(--purple); }
.card-value.green { color: var(--green); }

.card-bar {
  height: 4px;
  background: #1a1a1a;
  border-radius: 4px;
  overflow: hidden;
}

.card-bar .bar-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 4px;
  transition: width 1.5s ease;
}

.card-bar.purple .bar-fill { background: var(--purple); }
.card-bar.green .bar-fill { background: var(--green); }

/* ─── Features ─── */
.features {
  padding: 120px 0;
  background: linear-gradient(180deg, transparent, rgba(0,219,255,0.02), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card.featured {
  border-color: rgba(0,219,255,0.2);
  background: linear-gradient(180deg, rgba(0,219,255,0.04), transparent);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-tier {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

.feature-tier.pro {
  background: rgba(59,130,246,0.12);
  color: var(--blue);
}

.feature-tier.team {
  background: rgba(168,85,247,0.12);
  color: var(--purple);
}

/* ─── How It Works ─── */
.how-it-works {
  padding: 120px 0;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(0,219,255,0.2);
}

.step-connector {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  margin-top: 28px;
  opacity: 0.3;
  flex-shrink: 0;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Pricing ─── */
.pricing {
  padding: 120px 0;
  background: linear-gradient(180deg, transparent, rgba(0,219,255,0.02), transparent);
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.toggle-label {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color var(--transition);
  cursor: pointer;
}

.toggle-label.active {
  color: var(--text);
}

.save-badge {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.toggle-switch {
  width: 48px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}

.toggle-switch:hover {
  border-color: var(--cyan);
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  background: var(--cyan);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform var(--transition);
}

.toggle-switch.yearly .toggle-thumb {
  transform: translateX(20px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(0,219,255,0.06), var(--bg-card));
  box-shadow: 0 0 40px rgba(0,219,255,0.08);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.plan-header {
  margin-bottom: 16px;
}

.plan-icon-badge {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.plan-header h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price .price {
  font-size: 36px;
  font-weight: 900;
  font-family: var(--mono);
}

.plan-price .period {
  font-size: 14px;
  color: var(--text-tertiary);
}

.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.check {
  color: var(--cyan);
  font-weight: 600;
}

/* ─── Download CTA ─── */
.download {
  padding: 120px 0;
}

.download-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 80px 40px;
  text-align: center;
  overflow: hidden;
}

.download-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--cyan);
  border-radius: 50%;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(150px);
  opacity: 0.08;
}

.download-card h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.download-card p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  position: relative;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  margin-bottom: 32px;
}

.download-info {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--mono);
}

.download-security {
  display: flex;
  gap: 32px;
  justify-content: center;
  position: relative;
}

.download-security span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Footer ─── */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 240px;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ─── Animations ─── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: animateIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes animateIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 100px 16px 60px; }
  .hero-title { font-size: 36px; }
  .hero-desc { font-size: 16px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; gap: 24px; }
  .step-connector { width: 2px; height: 40px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .download-security { flex-direction: column; gap: 12px; align-items: center; }
  .app-sidebar { display: none; }
  .app-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
