/* --- VARIABLES: Tech Blue & Strict Shapes --- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f1f5f9; /* Светло-серый/голубой */
  --color-text: #334155; /* Серый асфальт */
  --color-heading: #0f172a; /* Почти черный синий */
  --color-accent: #2563eb; /* Tech Blue */
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-white: #ffffff;

  --font-main: "Inter", sans-serif;

  --container-width: 1200px;
  --spacing-unit: 1rem;
  --header-height: 80px;

  /* Shape DNA: Strict */
  --radius: 0px;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  font-weight: 800; /* Heavy headings */
  line-height: 1.2;
}

/* --- HEADER --- */
.header {
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-heading);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.header__logo-img {
  height: 32px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__list {
  display: flex;
  gap: 30px;
}

.header__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-heading);
  position: relative;
  padding-bottom: 4px;
}

/* Micro-interaction: Hover underline slide */
.header__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.header__link:hover::after {
  width: 100%;
}

.header__cta {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius); /* Strict shape */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.header__cta:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px); /* Micro-interaction: Shift */
}

.header__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-heading);
}

/* --- FOOTER --- */
.footer {
  background-color: var(--color-heading); /* Dark footer for contrast */
  color: #94a3b8; /* Muted text */
  padding-top: 80px;
  border-top: 4px solid var(--color-accent);
}

.footer__container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr; /* Asymmetric Grid feel */
  gap: 40px;
  padding-bottom: 60px;
}

.footer__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
  display: block;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.footer__desc {
  font-size: 0.9rem;
  max-width: 300px;
}

.footer__title {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__list,
.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__link {
  font-size: 0.9rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

/* Micro-interaction: Slide right */
.footer__link:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
}

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

.footer__bottom {
  background-color: #020617; /* Even darker */
  padding: 20px 0;
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- MEDIA QUERIES --- */
@media (max-width: 992px) {
  .header__container {
    padding: 0 20px;
  }

  .header__burger {
    display: block;
  }

  .header__nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-white);
    flex-direction: column;
    justify-content: center;
    transition: right 0.4s ease-in-out;
    border-top: 1px solid var(--color-border);
  }

  .header__nav.active {
    right: 0;
  }

  .header__list {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
  }

  .header__link {
    font-size: 1.2rem;
  }

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

@media (max-width: 576px) {
  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__contact-item {
    justify-content: center;
  }

  .footer__logo,
  .footer__desc {
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh; /* Full viewport height */
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Behind content */
  opacity: 0.6; /* Subtle effect */
}

.hero__container {
  position: relative;
  z-index: 2; /* Above canvas */
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* Asymmetric split */
  width: 100%;
  align-items: center;
}

.hero__content {
  padding-right: 40px;
}

/* Decorative Line Label */
.hero__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}

.hero__line {
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Typography */
.hero__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Responsive Giant Text */
  line-height: 1.1;
  margin-bottom: 30px;
  color: var(--color-heading);
}

.text-accent {
  color: var(--color-accent);
  display: block; /* Break line specifically */
}

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

.hero__highlight {
  background-color: var(--color-bg-alt);
  color: var(--color-heading);
  font-weight: 600;
  padding: 2px 6px;
}

/* Buttons (Strict Shape) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  border-radius: var(--radius); /* 0px */
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 0 var(--color-heading); /* Retro/Strict shadow instead of blur */
  transform: translateY(0);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--color-heading);
}

.btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--color-heading);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.hero__note {
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
}

/* Media Queries for Hero */
@media (max-width: 992px) {
  .hero__container {
    grid-template-columns: 1fr; /* Stack */
    text-align: center;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .hero__content {
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__label {
    justify-content: center;
  }
}
/* --- COMMON SECTION STYLES --- */
.section {
  padding: 100px 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.section-label__square {
  width: 12px;
  height: 12px;
  background-color: var(--color-heading);
}

.highlight-text {
  background: linear-gradient(
    180deg,
    transparent 60%,
    rgba(37, 99, 235, 0.2) 60%
  );
  font-weight: 600;
}

/* --- METHODOLOGY SECTION (Asymmetric Sticky) --- */
.methodology {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.methodology__container {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Asymmetry: Left narrow, Right wide */
  gap: 80px;
  position: relative;
  align-items: start; /* Important for sticky */
}

.methodology__info {
  position: sticky;
  top: 120px; /* Offset from header */
}

.methodology__title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--color-heading);
}

.methodology__desc {
  font-size: 1rem;
  color: var(--color-text);
  max-width: 400px;
}

/* Steps Grid */
.methodology__steps {
  display: flex;
  flex-direction: column;
  gap: 0; /* No gap, borders will separate them */
}

/* Step Card: Strict & Structural */
.step-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: none; /* Collapse borders */
  padding: 50px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.step-card:last-child {
  border-bottom: 1px solid var(--color-border);
}

/* Micro-interaction: Hover Highlight */
.step-card:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-accent);
}

/* Add a colored line on hover */
.step-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 0%;
  background-color: var(--color-accent);
  transition: height 0.3s ease;
}

.step-card:hover::before {
  height: 100%;
}

.step-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.step-card__num {
  font-size: 3rem;
  font-weight: 800;
  color: #cbd5e1; /* Light gray number */
  line-height: 1;
}

.step-card__icon {
  width: 32px;
  height: 32px;
  stroke: var(--color-heading);
  stroke-width: 1.5;
}

.step-card__title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--color-heading);
}

.step-card__text {
  font-size: 1rem;
  color: var(--color-text);
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .methodology__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .methodology__info {
    position: static; /* Disable sticky on mobile */
    margin-bottom: 20px;
  }

  .step-card {
    padding: 30px;
  }
}

/* --- OPPORTUNITIES GRID (Strict Bento) --- */
.section-header {
  margin-bottom: 60px;
  max-width: 700px;
}

.section-title {
  font-size: 2.5rem;
  color: var(--color-heading);
}

.grid-system {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 1px; /* Gap creates the border effect */
  background-color: var(--color-border); /* Color of the gaps/borders */
  border: 1px solid var(--color-border);
}

.grid-item {
  background-color: var(--color-white);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

/* Make the first item span 2 columns */
.grid-item--large {
  grid-column: span 2;
}

.grid-item--dark {
  background-color: var(--color-heading);
  color: var(--color-white);
}

.grid-item:hover {
  background-color: #f8fafc;
}

.grid-item--dark:hover {
  background-color: #020617;
}

.grid-item__icon {
  width: 40px;
  height: 40px;
  stroke: var(--color-accent);
  margin-bottom: 24px;
}

.grid-item__title {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--color-heading);
}

.text-white {
  color: var(--color-white);
}
.text-gray {
  color: #94a3b8;
}

.grid-item__desc {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 20px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
}

.link-arrow:hover {
  color: var(--color-heading);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-heading);
  padding: 12px 24px;
  font-weight: 700;
  display: inline-block;
  text-align: center;
  border-radius: var(--radius);
  transition: transform 0.2s ease;
}

.btn--white:hover {
  transform: translateY(-2px);
  background-color: #e2e8f0;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .grid-system {
    grid-template-columns: 1fr;
  }

  .grid-item--large {
    grid-column: span 1;
  }
}

/* --- BLOG SECTION (Editorial List) --- */
.blog {
  background-color: var(--color-bg-alt); /* Slight contrast background */
}

.blog__container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr; /* Asymmetric split */
  gap: 80px;
}

.blog__desc {
  margin-bottom: 30px;
  color: var(--color-text);
  max-width: 350px;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-heading);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.btn-text:hover {
  border-color: var(--color-accent);
}

/* Article List Item */
.article-item {
  display: flex;
  flex-direction: column;
  padding: 30px 0;
  border-bottom: 1px solid #cbd5e1;
  position: relative;
  transition: padding-left 0.3s ease;
  cursor: pointer;
}

.article-item:first-child {
  border-top: 1px solid #cbd5e1;
}

/* Micro-interaction: Shift right on hover */
.article-item:hover {
  padding-left: 20px;
}

.article-item__meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.article-item__tag {
  color: var(--color-accent);
}

.article-item__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-heading);
  padding-right: 40px;
  transition: color 0.3s ease;
}

.article-item:hover .article-item__title {
  color: var(--color-accent);
}

.article-item__arrow {
  position: absolute;
  top: 30px;
  right: 0;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--color-accent);
}

/* Show arrow on hover */
.article-item:hover .article-item__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .blog__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* --- FAQ SECTION --- */
.faq {
  background-color: var(--color-white);
}

.faq__container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr; /* Asymmetric Split */
  gap: 80px;
}

.faq__desc {
  color: var(--color-text);
  margin-bottom: 30px;
}

/* Accordion Item */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.3s ease;
}

.faq-item__trigger:hover .faq-item__question {
  color: var(--color-accent);
}

.faq-item__question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  padding-right: 20px;
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  stroke: var(--color-heading);
  transition: transform 0.3s ease, stroke 0.3s ease;
}

/* Active State Styles */
.faq-item.active .faq-item__icon {
  transform: rotate(45deg); /* Plus becomes X */
  stroke: var(--color-accent);
}

.faq-item.active .faq-item__question {
  color: var(--color-accent);
}

.faq-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item__text {
  padding-bottom: 24px;
  color: var(--color-text);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .faq__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* --- CONTACT SECTION --- */
.contact {
  background-color: var(
    --color-heading
  ); /* Dark background for contrast section */
  color: var(--color-white);
}

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

.contact__desc {
  color: #94a3b8; /* Muted text */
  margin-bottom: 30px;
}

.contact__features {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.contact__features i {
  stroke: var(--color-accent);
  width: 20px;
  height: 20px;
}

/* Form Styles */
.contact__form-wrapper {
  background-color: var(--color-white);
  padding: 50px;
  color: var(--color-heading);
  border: 1px solid var(--color-border);
  position: relative; /* For success message overlay */
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 15px;
  font-family: var(--font-main);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  background-color: #f8fafc;
  color: var(--color-heading);
  border-radius: var(--radius); /* 0px Strict */
  transition: border-color 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-accent);
  background-color: var(--color-white);
}

.form-input.error {
  border-color: #ef4444;
}

.error-msg {
  display: none;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 5px;
}

.form-input.error + .error-msg {
  display: block;
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.custom-checkbox-wrapper input {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.custom-checkbox-wrapper input:checked + .custom-checkbox {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.custom-checkbox-wrapper input:checked + .custom-checkbox::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

.captcha-group {
  background-color: #f1f5f9;
  padding: 15px;
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.form-btn {
  width: 100%;
}

.success-message {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  z-index: 10;
}

.success-message.active {
  display: flex;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  width: 60px;
  height: 60px;
  color: #22c55e; /* Green */
  margin-bottom: 20px;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-popup {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--color-heading);
  color: var(--color-white);
  padding: 20px 0;
  z-index: 2000;
  transition: bottom 0.5s ease;
  border-top: 4px solid var(--color-accent);
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* --- LEGAL PAGES STYLES (Stage 5.2) --- */
.pages {
  padding: 120px 0 80px; /* Padding for fixed header */
}

.pages h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--color-heading);
}

.pages h2 {
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.pages p {
  margin-bottom: 15px;
  color: var(--color-text);
}

.pages ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.pages li {
  margin-bottom: 8px;
  color: var(--color-text);
}

/* Mobile Adaptation */
@media (max-width: 992px) {
  .contact__container {
    grid-template-columns: 1fr;
  }

  .contact__form-wrapper {
    padding: 30px;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}
