/* Главная страница ItGo — современный стиль */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@800&family=Manrope:wght@400;500;600;700&family=Montserrat:wght@600&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 24px;
}

.index-page {
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.index-card {
  background: rgba(255, 252, 248, 0.95);
  padding: 48px 40px;
  border-radius: 24px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: indexFadeIn 0.6s ease-out;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.12);
  max-width: 720px;
  margin: 0 auto;
}

.index-card-hero {
  padding: 40px 36px;
}

.index-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.index-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.index-logo {
  width: 100%;
  max-width: 392px;
  margin-bottom: 0;
  animation: logoFloat 3.2s ease-in-out infinite;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,0.18));
}

.index-hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Exo 2', sans-serif;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  letter-spacing: 0.01em;
  text-transform: none;
}

.index-hero-title-line {
  display: block;
}

.index-hero-motto {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 600;
  line-height: 1.45;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.03em;
}

.index-auth {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.index-auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 280px;
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 45%, #8b5cf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 4px 14px rgba(59, 130, 246, 0.35),
    0 18px 40px rgba(124, 58, 237, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.index-auth-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.15) 55%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.index-auth-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.index-auth-btn-text {
  position: relative;
  z-index: 1;
}

.index-auth-btn-arrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease;
}

.index-auth-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(59, 130, 246, 0.45),
    0 24px 48px rgba(124, 58, 237, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
}

.index-auth-btn:hover .index-auth-btn-glow {
  transform: translateX(120%);
}

.index-auth-btn:hover .index-auth-btn-arrow {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.32);
}

.index-auth-btn:active {
  transform: translateY(-1px) scale(1);
}

.index-auth-btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 3px;
}

@keyframes indexFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .index-logo {
    max-width: 336px;
  }

  .index-card,
  .index-card-hero {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .index-auth-btn {
    width: 100%;
    min-width: 0;
    padding: 15px 20px;
    font-size: 0.95rem;
  }
}

.index-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 8px 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.index-subtitle {
  font-size: 1.05rem;
  color: #334155;
  margin: 0 0 14px 0;
  line-height: 1.4;
  font-weight: 700;
}

.index-tagline {
  font-size: 1rem;
  color: #475569;
  margin: 0 0 18px 0;
  line-height: 1.55;
}

.index-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.index-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1;
  padding: 20px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 0;
}

.index-btn:hover {
  transform: translateY(-2px);
}

.index-btn-teacher {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.index-btn-teacher:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.index-btn-student {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.index-btn-student:hover {
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.5);
}

.index-btn-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.index-btn-fallback {
  font-size: 3rem;
  line-height: 1;
}

.index-btn-label {
  font-size: 1rem;
  font-weight: 600;
}

.index-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

.index-feature {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  color: #334155;
}

@media (max-width: 520px) {
  .index-page {
    max-width: 520px;
  }
  .index-platform-grid {
    grid-template-columns: 1fr;
  }
  .bg-token-16,
  .bg-token-17,
  .bg-token-18,
  .bg-token-19,
  .bg-token-20,
  .index-bg-chip-4,
  .index-bg-chip-5 {
    display: none;
  }
}

.index-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.index-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(59, 130, 246, 0.28), transparent 38%),
    radial-gradient(circle at 82% 18%, rgba(124, 58, 237, 0.24), transparent 36%),
    radial-gradient(circle at 60% 90%, rgba(45, 212, 191, 0.20), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(135deg, #fef7ed 0%, #fed7aa 40%, #fdba74 70%, #f97316 100%);
}

.index-bg-stars {
  position: absolute;
  inset: -120px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.75) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
  animation: starsDrift 18s linear infinite;
}

.index-bg-board {
  position: absolute;
  inset: -120px;
  background-image:
    linear-gradient(to right, rgba(59, 130, 246, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 58, 237, 0.12) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: rotate(-10deg);
  opacity: 0.22;
}

.index-bg-network {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(45, 212, 191, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 38%, rgba(59, 130, 246, 0.40) 0 2px, transparent 3px),
    radial-gradient(circle at 38% 18%, rgba(124, 58, 237, 0.36) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 72%, rgba(45, 212, 191, 0.40) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 28%, rgba(59, 130, 246, 0.40) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 62%, rgba(124, 58, 237, 0.36) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 88%, rgba(45, 212, 191, 0.38) 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, rgba(59, 130, 246, 0.10) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(45deg, rgba(124, 58, 237, 0.06) 0 1px, transparent 1px 34px),
    linear-gradient(115deg, rgba(59, 130, 246, 0.08), transparent 45%, rgba(124, 58, 237, 0.08));
  opacity: 0.55;
  filter: blur(0.2px);
}

.index-bg-chip {
  position: absolute;
  width: 140px;
  height: 92px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(59, 130, 246, 0.16);
  box-shadow: 0 26px 60px rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(10px);
}

.index-bg-chip::before {
  content: "";
  position: absolute;
  inset: 18px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(124, 58, 237, 0.38);
}

.index-bg-chip::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), transparent);
}

.index-bg-chip-1 {
  top: 6%;
  left: 3%;
  transform: rotate(-8deg);
}

.index-bg-chip-2 {
  bottom: 8%;
  right: 4%;
  transform: rotate(10deg);
  width: 160px;
  height: 110px;
}

.index-bg-chip-3 {
  top: 42%;
  left: 1%;
  transform: rotate(6deg);
  width: 120px;
  height: 78px;
}

.index-bg-chip-4 {
  top: 18%;
  right: 2%;
  transform: rotate(-12deg);
  width: 130px;
  height: 86px;
}

.index-bg-chip-5 {
  bottom: 22%;
  left: 6%;
  transform: rotate(14deg);
  width: 110px;
  height: 72px;
}

.bg-token {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.50);
  border: 1px solid rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
  opacity: 0.62;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.10);
  animation: tokenFloat 6s ease-in-out infinite;
}

.bg-token:nth-child(odd) {
  animation-duration: 7.5s;
}

.bg-token-1 { top: 8%; left: 12%; --r: -6deg; animation-delay: 0s; }
.bg-token-2 { top: 14%; right: 10%; --r: 4deg; color: #7c3aed; border-color: rgba(124, 58, 237, 0.18); animation-delay: 0.4s; }
.bg-token-3 { top: 28%; left: 5%; --r: -8deg; color: #0ea5e9; border-color: rgba(14, 165, 233, 0.18); animation-delay: 0.8s; }
.bg-token-4 { top: 34%; right: 6%; --r: 6deg; color: #7c3aed; animation-delay: 1.2s; }
.bg-token-5 { top: 48%; left: 8%; --r: -5deg; color: #0ea5e9; animation-delay: 1.6s; }
.bg-token-6 { top: 52%; right: 12%; --r: 3deg; animation-delay: 2s; }
.bg-token-7 { top: 62%; left: 4%; --r: -7deg; color: #7c3aed; animation-delay: 2.4s; }
.bg-token-8 { top: 68%; right: 5%; --r: 5deg; animation-delay: 2.8s; }
.bg-token-9 { top: 78%; left: 10%; --r: -4deg; color: #0ea5e9; animation-delay: 3.2s; }
.bg-token-10 { top: 82%; right: 14%; --r: 7deg; animation-delay: 3.6s; }
.bg-token-11 { top: 22%; left: 18%; --r: -3deg; animation-delay: 0.2s; }
.bg-token-12 { top: 38%; right: 18%; --r: 8deg; color: #7c3aed; animation-delay: 0.6s; }
.bg-token-13 { top: 58%; left: 16%; --r: -6deg; animation-delay: 1s; }
.bg-token-14 { top: 72%; right: 20%; --r: 4deg; color: #0ea5e9; animation-delay: 1.4s; }
.bg-token-15 { top: 88%; left: 22%; --r: -9deg; animation-delay: 1.8s; }
.bg-token-16 { top: 10%; left: 42%; --r: 5deg; animation-delay: 2.2s; }
.bg-token-17 { top: 90%; right: 38%; --r: -5deg; animation-delay: 2.6s; }
.bg-token-18 { top: 46%; left: 2%; --r: 6deg; animation-delay: 3s; }
.bg-token-19 { top: 56%; right: 2%; --r: -7deg; color: #7c3aed; animation-delay: 3.4s; }
.bg-token-20 { top: 74%; left: 28%; --r: 3deg; color: #0ea5e9; animation-delay: 3.8s; }

.index-banner {
  margin: 18px 0 18px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 55%, #ec4899 100%);
  color: #ffffff;
  box-shadow: 0 26px 70px rgba(124, 58, 237, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  width: 100%;
  position: relative;
  z-index: 2;
}

.index-banner-full {
  max-width: 980px;
  margin-left: 0;
  margin-right: 0;
}

.index-banner-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.index-banner-emoji {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1.25rem;
}

.index-banner-title {
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: 0.98rem;
}

.index-banner-text {
  margin-top: 12px;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.35;
}

.index-banner-meta {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.index-banner-meta-item {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
}

.index-banner-link {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  color: #0f172a;
  background: #ffffff;
  padding: 12px 16px;
  font-weight: 900;
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.index-banner-link:hover {
  transform: translateY(-2px);
}

.index-platform {
  margin-top: 18px;
}

.index-section-title {
  text-align: left;
  margin: 0 0 14px 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
}

.index-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.index-platform-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 18px;
  padding: 14px 14px;
  font-weight: 900;
  color: #0f172a;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.index-platform-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.16);
  border-color: rgba(124, 58, 237, 0.22);
}

.index-motivation {
  margin-top: 0;
  text-align: left;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.10));
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 22px;
  padding: 16px 16px;
}

.index-motivation-text {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.6;
}

.index-page::before {
  display: none;
}

.index-card {
  z-index: 2;
}

.index-card::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -55%;
  width: 60%;
  height: 190%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: rotate(18deg);
  animation: cardShine 4.6s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes tokenFloat {
  0%, 100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-10px) rotate(var(--r, 0deg));
  }
}

@keyframes logoFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes starsDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 80px 120px;
  }
}

@keyframes cardShine {
  0% {
    opacity: 0;
    transform: translateX(-40%) rotate(18deg);
  }
  22% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
    transform: translateX(180%) rotate(18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-logo {
    animation: none;
  }
  .index-bg-stars {
    animation: none;
  }
  .index-card::after {
    animation: none;
  }
  .bg-token {
    animation: none;
  }
}
