/* --- ЭТАП 0: ГЛОБАЛЬНЫЕ СТИЛИ --- */
:root {
  --bg-color: #050608;
  --surface-color: #0d0f14;
  --accent-color: #00f2ff;
  --text-primary: #e0e6ed;
  --text-secondary: #94a3b8;
  --border-color: rgba(0, 242, 255, 0.15);
  --grid-gap: 20px;
  --font-main: "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  /* Эффект сетки на фоне */
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 50px 50px;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* --- ЭТАП 1: ХЕДЕР --- */
.header {
  height: 90px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.8);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color);
}

.logo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__list {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav__link:hover {
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color);
}

.nav__link--cta {
  padding: 10px 20px;
  border: 1px solid var(--accent-color);
  border-radius: 0px;
  position: relative;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.nav__link--cta:hover {
  background: var(--accent-color);
  color: var(--bg-color);
}

/* Бургер */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
}

.burger span,
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
}

.burger::before {
  top: 0;
}
.burger span {
  top: 9px;
}
.burger::after {
  bottom: 0;
}

/* --- ЭТАП 2: ФУТЕР --- */
.footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
  margin-top: 100px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer__title {
  font-family: var(--font-mono);
  color: var(--accent-color);
  margin-bottom: 24px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.footer__list li {
  margin-bottom: 12px;
}

.footer__list a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer__list a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer__tagline {
  color: var(--text-secondary);
  margin-top: 20px;
  max-width: 280px;
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer__icon {
  width: 18px;
  height: 18px;
  color: var(--accent-color);
  flex-shrink: 0;
}

.footer__bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Адаптивність */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background: var(--bg-color);
    padding: 40px;
    transition: var(--transition);
  }
  .nav.active {
    left: 0;
  }
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
  }
  .burger {
    display: block;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --- ЭТАП 3: HERO & BENTO --- */

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  overflow: hidden;
}

.hero__scanner {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent-color),
    transparent
  );
  opacity: 0.1;
  z-index: 1;
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% {
    top: -10%;
  }
  100% {
    top: 110%;
  }
}

.hero__container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-bottom: 24px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 242, 255, 0.05);
}

.hero__dot {
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
  border-radius: 50%;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-color);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 40px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background: var(--accent-color);
  color: var(--bg-color);
  border: none;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 85% 100%, 0 100%);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  margin-left: 20px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2);
}

/* HUD Visual */
.hud-box {
  border: 1px solid var(--border-color);
  background: rgba(13, 15, 20, 0.6);
  padding: 20px;
  position: relative;
  backdrop-filter: blur(5px);
}

.hud-box::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--accent-color);
  border-left: 2px solid var(--accent-color);
}

.hud-box__header {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  opacity: 0.6;
}

/* Bento Grid */
.neural-daily {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 16px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: var(--grid-gap);
}

.bento-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: var(--transition);
}

.bento-item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item--wide {
  grid-column: span 2;
}

.bento-item:hover {
  border-color: var(--accent-color);
  background: rgba(0, 242, 255, 0.02);
}

.bento-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.bento-item h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.bento-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.bento-item__deco {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  opacity: 0.2;
  font-size: 0.8rem;
}

.bento-link {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: var(--accent-color);
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__subtitle {
    margin: 0 auto 40px;
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-item--large,
  .bento-item--wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* --- ЭТАП 3: EDUCATION & TOOLS --- */

.tag {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
}

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

/* Education Layout */
.education {
  padding: 100px 0;
  background: linear-gradient(
    180deg,
    var(--bg-color) 0%,
    var(--surface-color) 100%
  );
}

.edu-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.edu-stats {
  display: flex;
  gap: 40px;
  margin: 40px 0;
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-color);
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* Accordion */
.edu-accordion {
  border-top: 1px solid var(--border-color);
}

.acc-item {
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.acc-header {
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.acc-num {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.acc-header h3 {
  font-size: 1.2rem;
  flex-grow: 1;
}

.acc-icon {
  width: 20px;
  transition: var(--transition);
}

.acc-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease-out;
  color: var(--text-secondary);
  padding-left: 40px;
}

.acc-item.active .acc-content {
  max-height: 200px;
  padding-bottom: 24px;
}

.acc-item.active .acc-icon {
  transform: rotate(180deg);
  color: var(--accent-color);
}

/* Tools Grid */
.tools {
  padding: 100px 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.tool-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 40px;
  position: relative;
  transition: var(--transition);
}

.tool-card:hover {
  background: rgba(0, 242, 255, 0.05);
  transform: translateY(-10px);
  border-color: var(--accent-color);
}

.tool-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.tool-card__icon {
  width: 50px;
  height: 50px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.tool-card__status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.tool-card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.tool-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.tool-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  opacity: 0.6;
}

.tool-btn {
  color: var(--accent-color);
}

/* Адаптив */
@media (max-width: 992px) {
  .edu-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* --- ЭТАП 3: CASES --- */

.cases {
  padding: 100px 0;
  position: relative;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 60px;
}

.case-card {
  display: grid;
  grid-template-columns: 450px 1fr;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.case-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.05);
}

.case-card__visual {
  position: relative;
  height: 100%;
  min-height: 300px;
  background: #000;
}

.case-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  filter: grayscale(1);
  transition: var(--transition);
}

.case-card:hover .case-card__visual img {
  opacity: 0.8;
  filter: grayscale(0);
}

.case-card__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--accent-color);
  color: var(--bg-color);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.case-card__content {
  padding: 50px;
  display: flex;
  flex-direction: column;
}

.case-card__meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-bottom: 15px;
  opacity: 0.7;
}

.case-card__title {
  font-size: 2rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.case-card__text {
  color: var(--text-secondary);
  margin-bottom: auto;
  max-width: 600px;
}

.case-card__footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
}

.case-result {
  display: flex;
  flex-direction: column;
}

.case-result__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.case-result__value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: 700;
}

.case-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.case-link:hover {
  color: var(--accent-color);
}

.cases-cta {
  margin-top: 60px;
  text-align: center;
  padding: 40px;
  border: 1px dashed var(--border-color);
  background: rgba(0, 242, 255, 0.02);
}

.cases-cta p {
  margin-bottom: 25px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Адаптив для кейсов */
@media (max-width: 992px) {
  .case-card {
    grid-template-columns: 1fr;
  }
  .case-card__content {
    padding: 30px;
  }
}

/* --- ЭТАП 4: CONTACT FORM & CAPTCHA --- */
.contact {
  padding: 100px 0;
  background: var(--surface-color);
}

.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.contact__field {
  margin-bottom: 20px;
  position: relative;
}

.contact__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 18px;
  color: #fff;
  font-family: var(--font-mono);
  outline: none;
  transition: var(--transition);
}

.contact__input:focus {
  border-color: var(--accent-color);
  background: rgba(0, 242, 255, 0.05);
}

.error-msg {
  color: #ff4d4d;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  display: none;
  margin-top: 5px;
}

/* Капча и чекбоксы */
.captcha,
.agreement {
  margin-bottom: 20px;
}

.captcha__container,
.agreement__container {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.captcha__checkmark {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  position: relative;
  background: var(--bg-color);
}

.captcha__container input:checked ~ .captcha__checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-color);
  font-weight: bold;
}

.form-success {
  display: none;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--accent-color);
  background: rgba(0, 242, 255, 0.1);
}

.form-success.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* --- ЭТАП 5: COOKIE POP-UP --- */
.cookie-popup {
  position: fixed;
  bottom: 30px;
  left: 30px;
  right: 30px;
  background: var(--surface-color);
  border: 1px solid var(--accent-color);
  padding: 20px;
  z-index: 9999;
  transform: translateY(200%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-popup.active {
  transform: translateY(0);
}

.cookie-popup__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.btn--small {
  padding: 10px 20px;
  font-size: 0.7rem;
}

/* --- ЭТАП 5.2: СТИЛИ СТОРІНОК ПОЛІТИК --- */
.pages {
  padding: 140px 0 80px;
  min-height: 80vh;
}

.pages h1 {
  font-size: 3rem;
  margin-bottom: 40px;
  color: var(--accent-color);
}
.pages h2 {
  font-size: 1.8rem;
  margin: 30px 0 20px;
}
.pages p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.pages ul {
  margin-bottom: 30px;
  padding-left: 20px;
}
.pages li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  position: relative;
  list-style: square;
}
.pages a {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Адаптив */
@media (max-width: 768px) {
  .contact__wrapper {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .cookie-popup__content {
    flex-direction: column;
    text-align: center;
  }
}
