/* style.css - Premium "Wow" Redesign */
:root {
  /* Deep Space & Neon Palette */
  --bg-deep: #030407;
  --bg-card: rgba(20, 25, 35, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);

  --primary: #2AABEE;
  /* Telegram Blue */
  --primary-glow: rgba(42, 171, 238, 0.4);
  --accent: #bc13fe;
  /* Electric Purple */
  --accent-glow: rgba(188, 19, 254, 0.4);

  --text-main: #ffffff;
  --text-muted: #94a3b8;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(42, 171, 238, 0.3);

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(42, 171, 238, 0.08), transparent 25%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Typography & Utilities --- */
h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--primary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(42, 171, 238, 0.2);
}

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

p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

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

a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Header & Nav --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 4, 7, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  transition: all 0.3s ease;
}

header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(42, 171, 238, 0.1);
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ghost {
  padding: 10px 20px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.ghost:hover {
  color: #fff;
  background: var(--bg-glass);
}

/* --- Buttons --- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  font-size: 1rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px var(--primary-glow);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--primary-glow);
  background: #fff;
  color: var(--primary);
}

.cta img {
  width: 20px;
  height: 20px;
  filter: brightness(0);
}

.btn-ghost {
  padding: 14px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s;
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: var(--bg-glass);
}

/* --- Hero Section --- */
.hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 24px auto 40px;
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(188, 19, 254, 0.1);
  border: 1px solid rgba(188, 19, 254, 0.3);
  border-radius: 100px;
  color: #eebaff;
  font-size: 0.9rem;
}

.code {
  font-family: 'SF Mono', monospace;
  color: var(--primary);
  font-weight: 700;
}

/* --- Cards & Grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card h3 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 12px;
}

/* --- Testimonials --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  position: relative;
}

.testimonial-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(42, 171, 238, 0.2);
}

.testimonial-card blockquote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.testimonial-card cite {
  display: block;
  font-weight: 700;
  color: #fff;
  font-style: normal;
}

.testimonial-card cite span {
  display: block;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 400;
  margin-top: 4px;
}

/* --- Steps --- */
.steps {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.step:last-child {
  margin-bottom: 0;
}

.step:before {
  content: '';
  width: 40px;
  height: 40px;
  background: rgba(42, 171, 238, 0.1);
  border: 1px solid rgba(42, 171, 238, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300ffa3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* --- FAQ --- */
details {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

details[open] {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

summary {
  padding: 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 40px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

details p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  margin-top: 80px;
  background: linear-gradient(to bottom, var(--bg-deep), #000);
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-column h4 {
  color: #fff;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}

/* Stagger delays for reveals if needed, handled by JS intersection observer usually, 
   but we can add default delays for initial load items */
.hero.reveal {
  animation-delay: 0.1s;
}

.hamburger {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .hamburger div {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(3, 4, 7, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
  }

  nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .ghost {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 60px 0;
  }

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