@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* spacing scale — 4px база */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* border — только тонкая линия, никакого neon/glow */
  --border-color: rgba(0, 0, 0, 0.08);
  --border: 1px solid var(--border-color);

  /* elevation — мягкие тени вместо стекломорфизма */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* z-index scale */
  --z-dropdown: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* палитра — приглушённая, без ярких/неоновых акцентов */
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #666666;
  --surface: #fafafa;
  --accent: #111111;
  --accent-hover: #333333;
  --accent-fg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.75);
  --header-border: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --fg-muted: #a3a3a3;
  --surface: #121212;
  --border-color: rgba(255, 255, 255, 0.08);
  --accent: #f5f5f5;
  --accent-hover: #e5e5e5;
  --accent-fg: #0a0a0a;
  --header-bg: rgba(10, 10, 10, 0.75);
  --header-border: rgba(255, 255, 255, 0.05);
}


.ruble {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: inherit;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

.hero-bg-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 85%; /* Extends lower for a longer, smoother fade span */
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

#particles {
  width: 100%;
  height: 100%;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-12); /* Pushed further down from titles */
  text-align: center; /* Centered section titles */
}

h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
}

p {
  color: var(--fg-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  transition: background-color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--r-xs);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), 
              background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  border: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--fg);
  border: var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface);
  transform: translateY(-1px);
}

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

.btn-compact {
  padding: var(--sp-2) var(--sp-4);
  font-size: 0.875rem;
  border-radius: var(--r-sm);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.theme-toggle:hover {
  background-color: var(--surface);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

/* Sections (No border lines between sections, clean white space) */
.section {
  padding: 140px 0; /* More generous vertical separation between sections */
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 130px; /* Offset the 70px fixed header + standard padding */
  padding-bottom: var(--sp-16);
  text-align: center;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  max-width: 900px;
  margin: 0 auto var(--sp-4);
  line-height: 0.95;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto var(--sp-8);
  color: var(--fg-muted);
}

/* Feature Cards (Bento grid style) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

.feature-card {
  background-color: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 40px;
  height: 40px;
  color: var(--fg);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

/* How It Works Section */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-8);
  margin-top: var(--sp-8);
}

.step-card {
  position: relative;
  padding-left: var(--sp-6);
}

.step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--fg);
  opacity: 0.15;
  margin-bottom: var(--sp-2);
}

.step-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--sp-2);
}

/* FAQ Accordion */
.faq-container {
  max-width: 720px;
  margin: var(--sp-8) auto 0;
}

.faq-item {
  border-bottom: var(--border);
  padding: var(--sp-4) 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--fg);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--sp-3) 0;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform var(--dur-base) var(--ease);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease), padding var(--dur-base) var(--ease);
  padding-right: var(--sp-8);
}

.faq-answer p {
  padding-bottom: var(--sp-4);
  font-size: 0.95rem;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 200px; /* Достаточно для текста */
}

/* Footer */
.footer {
  padding: var(--sp-8) 0 var(--sp-12) 0;
  margin-top: var(--sp-12);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-minimal {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.footer-minimal a {
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease);
}

.footer-minimal a:hover {
  color: var(--fg);
}

.footer-divider {
  color: var(--border-color);
  opacity: 0.6;
}

/* Pricing Grid & Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.pricing-card {
  background-color: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.pricing-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-md);
}

.pricing-card.featured {
  background-color: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.pricing-card.featured .pricing-period {
  color: var(--bg);
  opacity: 0.8;
}

.pricing-card.featured .pricing-price {
  color: var(--bg);
}

.pricing-card.featured .pricing-desc {
  color: var(--bg);
  opacity: 0.7;
}

.pricing-period {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-bottom: var(--sp-2);
}

.pricing-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: var(--sp-4);
}

.pricing-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: var(--sp-6);
  flex-grow: 1;
  line-height: 1.4;
}

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

/* Hero Mockup Styling */
.hero-mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
  pointer-events: none; /* Ignore mouse hover completely */
}

.hero-mockup {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
}

/* Pricing Price layout with old/new price alignment */
.pricing-price-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--sp-4);
}

.pricing-old-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  text-decoration: line-through;
  color: var(--fg-muted);
  opacity: 0.55;
  font-weight: 500;
}

.pricing-card.featured .pricing-old-price {
  color: var(--bg);
  opacity: 0.55;
}


/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* View Transition Theme Wave */
.theme-transitioning,
.theme-transitioning * {
  transition: none !important;
}

.theme-transitioning::view-transition-old(root),
.theme-transitioning::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--sp-4);
  }
  
  .header {
    top: 0;
    width: 100%;
    height: 64px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--header-border);
  }
  
  .header-inner {
    padding: 0 var(--sp-4);
  }
  
  .logo {
    font-size: 1.1rem;
  }

  .logo-image {
    width: 32px;
    height: 32px;
  }

  .theme-toggle {
    padding: 10px; /* Tap target compliance */
  }

  .section {
    padding: 100px 0; /* Generous spacing on mobile/tablet */
  }

  .hero-section {
    padding-top: 110px;
    padding-bottom: var(--sp-12);
  }

  .hero-title {
    font-size: clamp(2.4rem, 8vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: var(--sp-4);
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: var(--sp-8);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    margin-top: var(--sp-8);
  }

  .feature-card {
    padding: var(--sp-8);
    border-radius: var(--r-lg);
  }

  /* Left-aligned structured grid layout for steps */
  .steps-container {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    margin-top: var(--sp-8);
  }

  .step-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-areas: 
      "num title"
      ". desc";
    gap: 4px var(--sp-3);
    text-align: left;
    padding: 0;
    background: none;
    border: none;
  }

  .step-number {
    grid-area: num;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    opacity: 0.35;
    line-height: 1.2;
    margin-bottom: 0;
    color: var(--fg);
  }

  .step-title {
    grid-area: title;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    padding-top: 1px;
  }

  .step-card p {
    grid-area: desc;
    font-size: 0.95rem;
    color: var(--fg-muted);
    line-height: 1.5;
    margin: 0;
  }

  /* Swipeable horizontal card layout with snap-centering on mobile */
  .pricing-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 24px calc(50vw - 140px); /* Centering padding for 280px width card */
    gap: var(--sp-6);
    align-items: stretch;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }

  .pricing-grid::-webkit-scrollbar {
    display: none;
  }

  .pricing-card {
    flex: 0 0 280px;
    max-width: 280px;
    scroll-snap-align: center;
    scroll-snap-stop: always; /* Force snap to center on touch release */
    padding: var(--sp-8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border-radius: var(--r-lg);
    transition: box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
  }

  .pricing-card.featured {
    transform: none !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  }

  .pricing-card:hover,
  .pricing-card.featured:hover {
    transform: none !important;
  }

  .faq-container {
    margin-top: var(--sp-8);
  }

  .faq-question-btn {
    font-size: 1.05rem;
    padding: var(--sp-4) 0;
  }
  
  .faq-answer p {
    font-size: 0.95rem;
    line-height: 1.5;
  }



  .hero-mockup-container {
    display: none;
  }

  .hero-bg-canvas-wrapper {
    display: block;
    height: 70%; /* Keep at the top of hero section */
  }

  .logo-text {
    display: inline !important;
    font-size: 1.05rem;
    font-weight: 900;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--sp-4);
  }

  .header {
    top: 0;
    width: 100%;
    height: 52px;
  }

  .logo-text {
    display: inline !important;
    font-size: 1.05rem;
  }
  
  .nav-actions {
    gap: var(--sp-2);
  }

  .btn-compact {
    padding: var(--sp-2) 14px;
    font-size: 0.8rem;
    border-radius: var(--r-sm);
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-mockup-container {
    display: none;
  }

  .footer-links {
    gap: var(--sp-4);
  }
}

/* Copy protection: disable text selection and image dragging */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
