/* ========== Этап 0: глобальные стили ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  background-color: #fdfdfd;
  color: #222;
  line-height: 1.6;
}

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

a:hover {
  color: #2a7dfb;
}

h1, h2, h3 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 0.5em;
}

/* Контейнер */
.header__container, 
.footer__container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========== Хедер ========== */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1em 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2a7dfb;
}

.header__nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
}

.header__nav a {
  font-weight: 500;
  position: relative;
}

.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #2a7dfb;
  transition: width 0.3s;
}

.header__nav a:hover::after {
  width: 100%;
}

/* ========== Футер ========== */
.footer {
  background: #111;
  color: #fff;
  padding: 2em 0;
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2em;
}

.footer__col h3 {
  margin-bottom: 1em;
  font-size: 1.1rem;
  color: #2a7dfb;
}

.footer__col ul {
  list-style: none;
  padding: 0;
}

.footer__col li {
  margin-bottom: 0.6em;
  font-size: 0.95rem;
}

.footer__col a {
  color: #ddd;
}

.footer__col a:hover {
  color: #2a7dfb;
}

.footer__col--logo h2 {
  font-size: 1.4rem;
  color: #fff;
}

/* ===== Палитра и утилиты ===== */
:root{
  --bg: #0e1013;
  --bg-soft: #14171c;
  --text: #e8ebf0;
  --muted: #a9b2bf;
  --brand: #2a7dfb;        /* уже использовался в шапке */
  --accent: #8b5cf6;       /* фиолетовый акцент */
  --card: #181c22;
  --stroke: #242a33;
  --shadow: 0 8px 30px rgba(0,0,0,.25);
}

.btn{
  display:inline-flex; align-items:center; gap:.55rem;
  padding:.85rem 1.1rem; border-radius:12px; font-weight:600;
  border:1px solid transparent; box-shadow: var(--shadow);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn i{ width:18px; height:18px; }
.btn--primary{ background: linear-gradient(120deg, var(--brand), var(--accent)); color:#fff; }
.btn--primary:hover{ transform: translateY(-2px); opacity:.95; }
.btn--ghost{ background: transparent; color: var(--text); border-color: #2a7dfb33; }
.btn--ghost:hover{ border-color: var(--brand); transform: translateY(-2px); }

/* ===== Hero ===== */
.hero{
  position: relative;
  background: radial-gradient(1200px 600px at 20% -10%, #1b222d 0%, rgba(27,34,45,0) 60%), var(--bg);
  color: var(--text);
  overflow: clip;
  border-bottom: 1px solid var(--stroke);
}

.hero__canvas{
  position:absolute; inset:0; width:100%; height:100%; z-index:0; opacity:.5;
}

.hero__container{
  position: relative; z-index: 1;
  width: 90%; max-width: 1200px; margin: 0 auto; 
  display:grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.2rem, 3vw, 2.2rem);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero__content{ align-self:center; }
.hero__title{
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.1; letter-spacing: 0.3px;
  background: linear-gradient(180deg, #fff, #cfe1ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .5rem;
}
.hero__cursor{ color:#7aa7ff; margin-left:.1rem; }

.hero__subtitle{
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 1.1rem;
}

.hero__list{ list-style:none; display:grid; gap:.6rem; margin: 1rem 0 1.4rem; }
.hero__list-item{
  display:flex; align-items:center; gap:.6rem;
  background: linear-gradient(180deg, #141922, #10141b);
  border: 1px solid #2e3744; border-radius: 12px;
  padding:.6rem .75rem;
}
.hero__icon{ width:18px; height:18px; color:#9dc1ff; }

.hero__cta{ display:flex; gap:.8rem; margin: .4rem 0 1.2rem; flex-wrap: wrap; }

.hero__stats{ display:flex; gap:1rem; flex-wrap: wrap; }
.hero__stat{
  background: var(--card); border: 1px solid var(--stroke); border-radius: 12px;
  padding:.8rem .9rem; text-align:left; min-width: 140px;
}
.hero__stat strong{ display:block; font-size:1.1rem; color:#dfe9ff; }

.hero__media{ display:flex; align-items:center; justify-content:center; }
.hero__image{
  width:100%; max-width: 460px; border-radius: 16px;
  border:1px solid var(--stroke); box-shadow: var(--shadow); filter:saturate(1.02);
}

/* Адаптивность */
@media (max-width: 980px){
  .hero__container{ grid-template-columns: 1fr; }
  .hero__media{ order:-1; }
}

/* ===== Базовая сетка секций ===== */
.about, .modules, .cases, .faq{
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--stroke);
}
.about__container, .modules__container, .cases__container, .faq__container{
  width: 90%; max-width: 1200px; margin: 0 auto;
  padding: clamp(2.8rem, 6vw, 4rem) 0;
}
.about__title, .modules__title, .cases__title, .faq__title{
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  margin-bottom: .4rem;
}
.about__text, .modules__text, .cases__text, .faq__text{ color: var(--muted); }

/* ===== About ===== */
.about__grid{
  display:grid; gap:1rem; margin: 1.4rem 0 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
}
.about__card{
  background: var(--card); border:1px solid var(--stroke);
  border-radius:16px; padding:1rem; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.about__card:hover{ transform: translateY(-2px); border-color:#2a7dfb66; }
.about__icon{ width:20px; height:20px; color:#9dc1ff; }
.about__card-title{ margin:.4rem 0 .3rem; }
.about__cta{ margin-top: .6rem; display:flex; gap:.8rem; flex-wrap:wrap; }

/* ===== Modules ===== */
.modules__header{ margin-bottom: .8rem; }
.modules__filters{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.6rem; }
.modules__filter{
  background:#11161e; color:#dfe9ff; border:1px solid #2e3744;
  padding:.5rem .8rem; border-radius: 10px; cursor:pointer; font-weight:600;
  transition: background .2s, border-color .2s, transform .2s;
}
.modules__filter:hover{ transform: translateY(-1px); border-color: var(--brand); }
.modules__filter.is-active{ background: linear-gradient(120deg, var(--brand), var(--accent)); color:#fff; border-color: transparent; }

.modules__grid{
  display:grid; gap:1rem; margin-top:1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
}
.module-card{
  background: var(--card); border:1px solid var(--stroke);
  border-radius:16px; overflow:hidden; display:flex; flex-direction:column;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.module-card:hover{ transform: translateY(-3px); border-color:#2a7dfb66; box-shadow: var(--shadow); }
.module-card__img{ width:100%; height:160px; object-fit:cover; display:block; }
.module-card__body{ padding:.9rem; display:flex; flex-direction:column; gap:.5rem; }
.module-card__tags{ display:flex; gap:.4rem; flex-wrap:wrap; }
.tag{
  background:#0f1420; border:1px solid #2e3744; color:#cfe1ff;
  padding:.2rem .45rem; border-radius:8px; font-size:.8rem;
}
.module-card__title{ font-size:1rem; }
.module-card__meta{ color: var(--muted); font-size:.9rem; }
.module-card__cta{ margin-top:auto; color:#9dc1ff; font-weight:600; }

/* ===== Cases ===== */
.cases__grid{
  display:grid; gap:1rem; margin-top:1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
}
.case-card{
  background: var(--card); border:1px solid var(--stroke);
  border-radius:16px; padding:1rem; display:flex; flex-direction:column; gap:.5rem;
  transition: transform .2s, border-color .2s;
}
.case-card:hover{ transform: translateY(-2px); border-color:#2a7dfb66; }
.case-card__header{ display:flex; align-items:center; gap:.6rem; }
.case-card__icon{ width:20px; height:20px; color:#9dc1ff; }
.case-card__title{ font-size:1rem; }
.case-card__desc{ color: var(--muted); }
.case-card__cta{ color:#9dc1ff; font-weight:600; margin-top:auto; }

/* ===== FAQ ===== */
.faq__list{ margin-top:1rem; display:grid; gap:.6rem; }
.faq-item{
  background: var(--card); border:1px solid var(--stroke);
  border-radius:12px; overflow:hidden;
}
.faq-item__summary{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:.8rem 1rem; cursor:pointer; list-style:none;
}
.faq-item__summary::-webkit-details-marker{ display:none; }
.faq-item[open] .faq-item__summary{ border-bottom:1px solid var(--stroke); }
.faq-item__icon{ width:18px; height:18px; transition: transform .2s; }
.faq-item[open] .faq-item__icon{ transform: rotate(180deg); }
.faq-item__content{ padding: .8rem 1rem; color: var(--muted); }
.faq__cta{ margin-top: 1rem; }

/* ===== Contact ===== */
.contact{
  background: var(--bg-soft);
  color: var(--text);
  border-bottom: 1px solid var(--stroke);
}
.contact__container{
  width: 90%; max-width: 1100px; margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4rem) 0;
}
.contact__title{
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  margin-bottom: .4rem;
}
.contact__text{ color: var(--muted); max-width: 60ch; }

.contact__grid{
  display:grid; gap: clamp(1rem, 3vw, 1.6rem);
  grid-template-columns: 1.2fr .8fr;
  margin-top: 1.2rem;
}
@media (max-width: 900px){
  .contact__grid{ grid-template-columns: 1fr; }
}

.contact-form{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.2rem);
  box-shadow: var(--shadow);
}
.contact-form__row{ margin-bottom: .9rem; }
.contact-form__label{ display:block; margin-bottom: .35rem; font-weight: 600; }
.contact-form__field{
  display:flex; align-items:center; gap:.5rem;
  background:#0f1420; border:1px solid #2e3744; border-radius:12px;
  padding:.55rem .7rem; transition: border-color .2s, box-shadow .2s;
}
.contact-form__field:focus-within{ border-color: var(--brand); box-shadow: 0 0 0 4px rgba(42,125,251,.12); }
.contact-form__field i{ width:18px; height:18px; color:#a8c6ff; }
.contact-form__input{
  flex:1; background:transparent; border:0; color: var(--text);
  outline:none; min-height: 36px; font-size: 1rem;
}
.contact-form__input::placeholder{ color:#7e8aa1; }
.contact-form__input--sm{ max-width: 120px; text-align:center; }

.contact-form__captcha{
  display:flex; align-items:center; gap:.6rem; flex-wrap: wrap;
}
.contact-form__captcha-task{
  background:#0f1420; border:1px dashed #2e3744; padding:.45rem .6rem; border-radius:10px;
  font-weight:700; letter-spacing:.5px;
}
.contact-form__captcha-refresh{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:10px; border:1px solid #2e3744;
  background:#0f1420; cursor:pointer; transition: transform .2s, border-color .2s;
}
.contact-form__captcha-refresh:hover{ transform: translateY(-2px); border-color: var(--brand); }

.contact-form__row--check{ margin-top: .2rem; }
.contact-form__check{ display:flex; gap:.6rem; align-items:flex-start; }
.contact-form__check input{ margin-top:.25rem; }
.contact-form__check a{ color:#9dc1ff; text-decoration: underline; }

.contact-form__error{
  color:#ffb4b4; font-size:.9rem; min-height: 1.2em;
  margin-top:.3rem;
}

.contact-form__actions{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.4rem; }
.contact-form__submit.is-loading{
  pointer-events:none; opacity:.8; position:relative;
}
.contact-form__submit.is-loading::after{
  content:""; position:absolute; right:.9rem; top:50%; transform:translateY(-50%);
  width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.6); border-top-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: translateY(-50%) rotate(360deg); } }

.contact-form__note{ color: #cfe1ff; min-height:1.2em; margin-top:.2rem; }
.contact-form__success{
  display:none; align-items:center; gap:.5rem; margin-top:.6rem;
  background:#102214; color:#d8ffe2; border:1px solid #1b4d2b; border-radius:12px; padding:.7rem .9rem;
}
.contact-form__success.is-visible{ display:flex; }
.contact-form__success i{ width:20px; height:20px; }

.contact__aside{}
.contact__card{
  background: var(--card); border:1px solid var(--stroke); border-radius:16px;
  padding:1rem; box-shadow: var(--shadow); display:flex; flex-direction:column; gap:.6rem;
}
.contact__card-title{ font-size:1.05rem; }
.contact__list{ list-style:none; display:grid; gap:.45rem; }
.contact__list i{ width:18px; height:18px; color:#a8c6ff; margin-right:.3rem; }
.contact__image{
  width:100%; height:160px; object-fit:cover; border-radius:12px; border:1px solid var(--stroke);
  margin-top:.4rem;
}

/* Фокус для клавиатуры */
:focus-visible{ outline: 2px solid var(--brand); outline-offset: 2px; }

/* ===== Cookie Pop-up ===== */
.cookie{
  position: fixed; inset-inline: 0; bottom: 0;
  transform: translateY(110%); opacity: 0; pointer-events: none;
  transition: transform .35s ease, opacity .35s ease;
  z-index: 9999;
}
.cookie.is-visible{ transform: translateY(0); opacity: 1; pointer-events: auto; }

.cookie__container{
  margin: 0 auto; width: min(100%, 980px);
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem;
  align-items: center;
  background: var(--card); color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 16px 16px 0 0;
  padding: .9rem 1rem;
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
.cookie__icon{ width: 20px; height: 20px; color: #ffd79a; }
.cookie__text a{ color:#9dc1ff; text-decoration: underline; }
.cookie__actions .cookie__btn{ padding: .65rem .9rem; }

@media (max-width: 720px){
  .cookie__container{
    grid-template-columns: 1fr; text-align: left; gap: .7rem;
    border-radius: 12px 12px 0 0;
  }
  .cookie__actions{ display: flex; }
}

/* ===== Сторінки політик (фіксована структура) ===== */
/* Очікувана HTML-структура:
<main>
  <section class="pages">
    <div class="container">
      <h1>...</h1>
      <p>...</p>
      <h2>...</h2>
      <p>...</p>
      <ul>...</ul>
    </div>
  </section>
</main>
*/

.pages{
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.pages .container{
  width: 90%; max-width: 900px; margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.pages h1{
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  line-height: 1.15; margin-bottom: .7rem;
  letter-spacing: 0.2px;
}
.pages h2{
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin: 1.2rem 0 .4rem;
}
.pages p{
  margin: .7rem 0;
  color: var(--muted);
  max-width: 75ch;
}
.pages ul{
  margin: .6rem 0 .9rem 1.2rem;
  display: grid; gap: .4rem;
}
.pages li{
  color: var(--text);
}
.pages li strong{
  color: #e7f0ff;
}
.pages a{
  color: #9dc1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pages blockquote{
  border-left: 3px solid #2a7dfb; padding-left: .8rem; color: var(--muted);
  margin: .8rem 0;
}
.pages code{
  background:#0f1420; border:1px solid #2e3744; padding: .1rem .35rem; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em;
}

/* Зручність читання на мобільних */
@media (max-width: 600px){
  .pages .container{ width: 92%; }
  .pages ul{ margin-left: 1rem; }
}
