:root {
  --ink: #11210c;
  --paper: #f6fbf3;
  --field: #2f7f2f;
  --wheat: #f4be2e;
  --sky: #2fa7ec;
  --tomato: #e85d3f;
  --soil: #57422f;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  background: radial-gradient(circle at 15% 5%, #e7f8e2 0%, rgba(231, 248, 226, 0) 38%),
    radial-gradient(circle at 90% 20%, #e4f4ff 0%, rgba(228, 244, 255, 0) 32%),
    linear-gradient(180deg, #f8fcf6 0%, #f1f8ef 100%);
  min-height: 100vh;
  color: var(--ink);
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

[class*='tracking-'] {
  letter-spacing: 0 !important;
}

.font-display {
  font-family: 'Bebas Neue', sans-serif;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(9, 34, 21, 0.78), rgba(9, 34, 21, 0.95)),
    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1800&q=80') center/cover;
  color: #fff;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-field {
  position: absolute;
  inset: auto -8vw -12vh -8vw;
  height: 46vh;
  perspective: 680px;
  transform: rotateX(58deg);
  transform-origin: center bottom;
}

.loader-field span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 190, 46, 0.85), transparent);
  animation: field-line 1.5s linear infinite;
}

.loader-field span:nth-child(1) {
  top: 16%;
}

.loader-field span:nth-child(2) {
  top: 38%;
  animation-delay: 0.2s;
}

.loader-field span:nth-child(3) {
  top: 60%;
  animation-delay: 0.4s;
}

.loader-field span:nth-child(4) {
  top: 82%;
  animation-delay: 0.6s;
}

.loader-content {
  position: relative;
  z-index: 1;
  width: min(86vw, 430px);
  text-align: center;
}

.loader-content p {
  font-size: clamp(2.7rem, 8vw, 5.4rem);
  line-height: 0.92;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.loader-content small {
  display: block;
  margin-top: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.loader-bar {
  height: 8px;
  margin-top: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, var(--wheat), #fff2cf, var(--sky));
  animation: loader-slide 1.2s ease-in-out infinite;
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--wheat), var(--field), var(--sky));
  box-shadow: 0 0 18px rgba(244, 190, 46, 0.45);
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: linear-gradient(to right, rgba(47, 127, 47, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(47, 127, 47, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}

.site-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(244, 190, 46, 0.1) 49%, transparent 54%),
    linear-gradient(90deg, rgba(232, 93, 63, 0.06), transparent 28%, rgba(47, 167, 236, 0.07));
  animation: sky-sweep 9s ease-in-out infinite alternate;
}

.nav-shell {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(38, 101, 40, 0.16);
  backdrop-filter: blur(12px);
}

#mainNav.scrolled .nav-shell {
  margin-top: 0.25rem;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(38, 101, 40, 0.22);
  box-shadow: 0 14px 30px rgba(28, 62, 28, 0.12);
}

.nav-link {
  position: relative;
  color: #264c20;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--field), var(--wheat));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.nav-link:hover {
  color: #11210c;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.mobile-link {
  display: block;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  color: #2b5f26;
}

.mobile-link:hover {
  background: #e6f4e2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.hero-copy {
  overflow: hidden;
}

.hero-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.45) 48%, transparent 58%);
  transform: translateX(-120%);
}

.page-ready .hero-copy::before {
  animation: hero-shine 1.4s ease 0.5s forwards;
}

.kinetic-title span {
  display: block;
  opacity: 0;
  transform: translateY(24px);
}

.page-ready .kinetic-title span:first-child {
  animation: title-rise 0.76s cubic-bezier(0.17, 0.84, 0.44, 1) 0.18s forwards;
}

.page-ready .kinetic-title span:last-child {
  animation: title-rise 0.76s cubic-bezier(0.17, 0.84, 0.44, 1) 0.32s forwards;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(2, 7, 3, 0.1) 0%, rgba(5, 17, 8, 0.58) 72%, rgba(5, 17, 8, 0.86) 100%);
}

#heroVisual {
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.28s ease;
}

#heroVisual:hover {
  box-shadow: 0 28px 70px rgba(13, 35, 14, 0.22);
}

#heroVisual img {
  transform: scale(1.04);
  transition: transform 3.2s ease;
}

.page-ready #heroVisual img {
  transform: scale(1);
}

.field-scan {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background:
    repeating-linear-gradient(105deg, transparent 0 16px, rgba(255, 255, 255, 0.13) 17px 18px),
    linear-gradient(180deg, transparent, rgba(47, 127, 47, 0.28));
  mix-blend-mode: screen;
  transform: translateX(-30%);
  animation: scan-pass 5s ease-in-out infinite;
}

.live-panel {
  position: absolute;
  right: 1.15rem;
  top: 1.15rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 185px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(9, 34, 21, 0.64);
  padding: 0.8rem 0.9rem;
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.live-panel small {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.live-panel strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.35rem;
  line-height: 1;
  color: #ffe39c;
}

.live-panel span {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffe39c;
  border-right-color: var(--sky);
  border-radius: 50%;
  animation: spin 1.6s linear infinite;
}

.glass-chip {
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 47, 0.18);
  background: rgba(255, 255, 255, 0.66);
  padding: 0.95rem 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.glass-chip::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--field), var(--wheat), var(--sky));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.glass-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 127, 47, 0.34);
  background: rgba(255, 255, 255, 0.84);
}

.glass-chip:hover::after {
  transform: scaleX(1);
}

.glass-chip p {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: #1f5622;
}

.glass-chip span {
  margin-top: 0.3rem;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #3a6c35;
}

.section-kicker {
  display: inline-flex;
  border-radius: 999px;
  background: #dff3dd;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #275b27;
}

.mini-card {
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 47, 0.16);
  background: #ffffff;
  padding: 1rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.mini-card:hover {
  border-color: rgba(232, 93, 63, 0.24);
  box-shadow: 0 18px 35px rgba(22, 51, 19, 0.1);
}

.mini-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #244d21;
}

.mini-card p {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #4b5e49;
}

.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 47, 0.14);
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: 0 16px 34px rgba(26, 52, 19, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.service-card::before,
.project-card::before,
.news-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 38%, rgba(255, 255, 255, 0.62) 50%, transparent 62%);
  opacity: 0;
  transform: translateX(-90%);
  transition: opacity 0.25s ease, transform 0.5s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-7px);
  border-color: rgba(47, 127, 47, 0.32);
  box-shadow: 0 24px 44px rgba(26, 52, 19, 0.16);
}

.service-card:hover::before,
.project-card:hover::before,
.news-card:hover::before {
  opacity: 1;
  transform: translateX(90%);
}

.service-badge {
  display: inline-flex;
  border-radius: 999px;
  background: #e7f6e3;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #2e6d2b;
}

.service-card h4 {
  margin-top: 0.8rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: #183f1b;
}

.service-card p {
  margin-top: 0.55rem;
  font-size: 0.94rem;
  line-height: 1.62;
  color: #4b5f48;
}

.service-card a {
  margin-top: 0.9rem;
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #2f7f2f;
}

.progress-row {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.progress-row.ready {
  opacity: 1;
  transform: translateX(0);
}

.progress-track {
  margin-top: 0.45rem;
  height: 0.52rem;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe39c, #f4be2e);
  transition: width 1.2s ease;
}

.dashboard-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(29, 68, 31, 0.98), rgba(17, 33, 12, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(255, 255, 255, 0.04) 53px);
}

.dashboard-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 44%, rgba(244, 190, 46, 0.18) 52%, transparent 62%);
  transform: translateX(-100%);
  animation: dashboard-sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 47, 0.14);
  background: rgba(255, 255, 255, 0.95);
  padding: 1.2rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.project-card:hover {
  border-color: rgba(47, 167, 236, 0.26);
  box-shadow: 0 22px 42px rgba(20, 48, 20, 0.12);
}

.project-card h4 {
  font-size: 1.02rem;
  font-weight: 800;
  color: #19431f;
}

.project-card p {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: #4f644d;
}

.project-card span {
  margin-top: 0.75rem;
  display: inline-flex;
  border-radius: 999px;
  background: #eaf8e4;
  padding: 0.2rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #2d6a2b;
}

.news-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 47, 0.13);
  background: #ffffff;
  box-shadow: 0 15px 34px rgba(18, 37, 17, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.news-card:hover {
  border-color: rgba(232, 93, 63, 0.22);
  box-shadow: 0 24px 46px rgba(18, 37, 17, 0.14);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.news-card:hover img {
  transform: scale(1.08);
}

.news-card div {
  padding: 1rem;
}

.news-card p {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #4f644d;
}

.news-card h4 {
  margin-top: 0.55rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  color: #1a3f1d;
}

.cta-box {
  background: linear-gradient(120deg, rgba(244, 190, 46, 0.28), rgba(223, 245, 255, 0.5) 42%, rgba(226, 247, 220, 0.8));
  border: 1px solid rgba(47, 127, 47, 0.17);
  box-shadow: 0 20px 45px rgba(30, 61, 27, 0.11);
  position: relative;
  overflow: hidden;
}

.cta-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(47, 127, 47, 0.07) 23px 24px);
  opacity: 0.6;
  pointer-events: none;
}

.form-field {
  display: grid;
  gap: 0.5rem;
}

.form-field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #2a5828;
}

.form-field input,
.form-field textarea {
  border-radius: 0.8rem;
  border: 1px solid rgba(47, 127, 47, 0.22);
  background: #fbfffa;
  padding: 0.8rem 0.95rem;
  font-size: 0.92rem;
  color: #1c2b1c;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #2f7f2f;
  box-shadow: 0 0 0 3px rgba(47, 127, 47, 0.14);
}

.reveal {
  opacity: 0;
  transform: translateY(38px) scale(0.98);
  filter: blur(8px);
  transition: opacity 0.8s cubic-bezier(0.17, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.17, 0.84, 0.44, 1), filter 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.shine-btn {
  position: relative;
  overflow: hidden;
}

.shine-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, 0.34) 50%, transparent 64%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.shine-btn:hover::after {
  transform: translateX(120%);
}

.magnetic-btn {
  transform-style: preserve-3d;
  will-change: transform;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes field-line {
  from {
    transform: translateY(24vh) scaleX(0.35);
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  to {
    transform: translateY(-18vh) scaleX(1.18);
    opacity: 0;
  }
}

@keyframes loader-slide {
  0% {
    transform: translateX(-110%);
  }

  50% {
    transform: translateX(85%);
  }

  100% {
    transform: translateX(260%);
  }
}

@keyframes sky-sweep {
  from {
    transform: translateX(-3%);
  }

  to {
    transform: translateX(3%);
  }
}

@keyframes hero-shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes title-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-pass {
  0%,
  100% {
    transform: translateX(-34%);
    opacity: 0.2;
  }

  48% {
    transform: translateX(34%);
    opacity: 0.58;
  }
}

@keyframes dashboard-sweep {
  0%,
  55% {
    transform: translateX(-105%);
  }

  100% {
    transform: translateX(105%);
  }
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #mainNav {
    top: 0.2rem;
  }

  .news-card img {
    height: 190px;
  }

  .live-panel {
    left: 1rem;
    right: auto;
    top: 1rem;
    min-width: 168px;
  }

  .loader-content p {
    font-size: 3.2rem;
  }

  #heroCarousel {
    min-height: 380px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
  }
}

/* ═══ CAROUSEL ════════════════════════════════════════════════════════════ */
#heroCarousel {
  min-height: 520px;
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(9, 34, 21, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(9, 34, 21, 0.82);
  transform: translateY(-50%) scale(1.08);
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
  padding: 0;
}

.carousel-dot.active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* ═══ LEADER CARD ═════════════════════════════════════════════════════════ */
.leader-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.leader-card:hover {
  box-shadow: 0 20px 45px rgba(17, 33, 12, 0.16);
}

/* ═══ TELEGRAM WIDGET ═════════════════════════════════════════════════════ */
.telegram-widget-container {
  overflow: hidden;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
