/* Qwebs Studio — Priority 2 CSS additions */
/* Добавить в конец qwebs.css */

/* ===== SCROLL ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade-up,
.anim-fade-in,
.anim-scale-in {
  /* opacity controlled by JS - visible by default */
}
.anim-fade-up.visible,
.anim-fade-in.visible,
.anim-scale-in.visible {
  opacity: 1;
}
.anim-fade-up.visible  { animation: fadeUp 0.6s ease-out both; }
.anim-fade-in.visible  { animation: fadeIn 0.5s ease-out both; }
.anim-scale-in.visible { animation: scaleIn 0.5s ease-out both; }

/* Stagger children */
.anim-stagger > * { opacity: 0; }
.anim-stagger.visible > *:nth-child(1) { animation: fadeUp 0.5s ease-out 0.05s both; }
.anim-stagger.visible > *:nth-child(2) { animation: fadeUp 0.5s ease-out 0.15s both; }
.anim-stagger.visible > *:nth-child(3) { animation: fadeUp 0.5s ease-out 0.25s both; }
.anim-stagger.visible > *:nth-child(4) { animation: fadeUp 0.5s ease-out 0.35s both; }
.anim-stagger.visible > *:nth-child(5) { animation: fadeUp 0.5s ease-out 0.45s both; }
.anim-stagger.visible > *:nth-child(6) { animation: fadeUp 0.5s ease-out 0.55s both; }

.anim-stagger-2.visible > *:nth-child(1) { animation: fadeUp 0.5s ease-out 0.15s both; }
.anim-stagger-2.visible > *:nth-child(2) { animation: fadeUp 0.5s ease-out 0.25s both; }
.anim-stagger-2.visible > *:nth-child(3) { animation: fadeUp 0.5s ease-out 0.35s both; }
.anim-stagger-2.visible > *:nth-child(4) { animation: fadeUp 0.5s ease-out 0.45s both; }

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
.bento-card {
  position: relative;
  padding: 28px 24px;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124,58,237,.15);
}
.bento-card .icon-svg {
  width: 36px; height: 36px;
  color: var(--accent);
  margin-bottom: 12px;
}
.bento-card-wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.bento-card-wide .icon-svg {
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.bento-card-tall {
  grid-row: span 2;
}

/* ===== DROPDOWN NAV ===== */
.nav-item {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  z-index: 100;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text2);
  font-size: 14px;
  border-radius: 8px;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: rgba(124,58,237,.1);
  color: var(--text1);
}
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  display: block;
  animation: fadeIn .2s ease-out;
}
.nav-chevron {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  transition: transform .2s;
}
.nav-item:hover .nav-chevron {
  transform: rotate(180deg);
}

/* ===== PRICING PAGE ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.pricing-card {
  padding: 32px 24px;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(124,58,237,.12);
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.04));
  position: relative;
}
.pricing-card.featured::before {
  content: 'Рекомендуем';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.pricing-card h3 { margin: 0 0 8px; font-size: 20px; }
.pricing-card .price { font-size: 36px; font-weight: 800; color: var(--text1); margin: 16px 0 4px; }
.pricing-card .price-note { font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.pricing-card li { padding: 8px 0; font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.pricing-card li::before { content: '✓'; color: var(--accent); font-weight: 700; }

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text2);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text1);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-success { display: none; text-align: center; padding: 32px; }
.form-success.visible { display: block; animation: fadeIn .4s ease-out; }
.form-error { color: #ef4444; font-size: 13px; margin-top: 4px; display: none; }
.form-error.visible { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card-wide { grid-column: span 1; flex-direction: column; text-align: center; }
  .pricing-grid { grid-template-columns: 1fr; }
  .dropdown-menu { display: none; } /* mobile: no dropdown fallback, show inline */
  .nav-links.open .dropdown-menu { display: none; }
  .nav-links.open .nav-item > a { display: block; } /* flatten on mobile */
}
