body {
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  #bgCanvas {
    display: none;
  }
}

.landing-hero {
  padding-top: 20px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  gap: 20px;
}

.landing-nav-list {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-nav-list a {
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.landing-nav-list a:hover {
  color: var(--color-accent);
}

.landing-nav-actions {
  display: flex;
  gap: 12px;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--color-text-main);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: 0 0 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
}

.landing-section {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 40px;
  color: var(--color-text-main);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 0;
}

.story-card {
  background: var(--color-bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.story-visual {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-border);
}

.story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-text {
  padding: 20px;
}

.story-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
}

.story-card p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.fact-card {
  text-align: center;
}

.fact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 24px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.fact-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-main);
  margin: 0;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.role-card {
  background: var(--color-bg-secondary);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s;
}

.role-card:hover {
  transform: translateY(-4px);
}

.role-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-border);
}

.role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text-main);
}

.role-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.security-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.security-card {
  background: var(--color-bg-secondary);
  border-radius: 8px;
  padding: 24px;
}

.security-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
}

.security-card p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.for-foundations-content {
  text-align: center;
}

.for-foundations-text {
  font-size: 16px;
  color: var(--color-text-main);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.section-cta {
  background: var(--color-bg-secondary);
  text-align: center;
}

.cta-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-text-main);
}

.cta-content p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: 0 0 32px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .landing-nav {
    flex-direction: column;
    margin-bottom: 40px;
  }

  .landing-nav-list {
    flex-direction: column;
    gap: 12px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .roles-grid {
    grid-template-columns: 1fr;
  }

  .security-cards {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }
}

/* Hero: фото-подложка с ken-burns и плавающими стеклянными карточками (набор agy 63). */
.landing-hero.agy-hero {
  overflow: hidden;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.landing-hero.agy-hero .hero-title,
.landing-hero.agy-hero .hero-subtitle,
.landing-hero.agy-hero .landing-nav-list a,
.landing-hero.agy-hero .btn-outline {
  color: #fff;
}

.landing-hero.agy-hero .btn-outline {
  border-color: #fff;
}

.landing-hero.agy-hero .btn-outline:hover {
  background: #fff;
  color: var(--color-primary);
}

.agy-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background-color: #0e3553;
}

.agy-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  animation: ken-burns 20s linear infinite alternate;
}

.agy-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 53, 83, 0.9) 0%, rgba(14, 53, 83, 0.6) 40%, rgba(14, 53, 83, 0.2) 100%);
  z-index: 1;
}

.agy-hero-container {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.agy-hero-content {
  text-align: left;
  margin-top: 40px;
  max-width: 650px;
}

.agy-hero-content .hero-title {
  font-size: 56px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.agy-hero-content .hero-subtitle {
  margin-left: 0;
  margin-right: 0;
  font-size: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.agy-hero-content .hero-cta {
  justify-content: flex-start;
}

/* Карточки — в свободной середине кадра: справа на фото люди. */
.agy-hero-cards {
  position: absolute;
  left: 56%;
  top: 58%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  pointer-events: none;
}

.agy-hero-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--glass-bg-subtle);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  animation: float-card 6s ease-in-out infinite;
}

.agy-hero-card::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
}

.agy-hero-card.card-1 { animation-delay: 0s; margin-left: -40px; }
.agy-hero-card.card-2 { animation-delay: -2s; margin-left: 20px; }
.agy-hero-card.card-3 { animation-delay: -4s; margin-left: -10px; }

@keyframes ken-burns {
  0% { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1%, -1%); }
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 1024px) {
  .agy-hero-cards {
    display: none;
  }
}

@media (max-width: 768px) {
  .agy-hero-overlay {
    background: linear-gradient(180deg, rgba(14, 53, 83, 0.55) 0%, rgba(14, 53, 83, 0.85) 55%, rgba(14, 53, 83, 0.92) 100%);
  }

  .agy-hero-content {
    margin-top: auto;
    text-align: center;
  }

  .agy-hero-content .hero-cta {
    justify-content: center;
  }

  .agy-hero-content .hero-title {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agy-hero-img,
  .agy-hero-card {
    animation: none;
    transform: none;
  }
}
