/* styles.css */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Gilroy";
  src: url("./assets/fonts/Gilroy-Light.woff2") format("woff2"),
       url("./assets/fonts/Gilroy-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("./assets/fonts/Gilroy-Regular.woff2") format("woff2"),
       url("./assets/fonts/Gilroy-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("./assets/fonts/Gilroy-Medium.woff2") format("woff2"),
       url("./assets/fonts/Gilroy-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("./assets/fonts/Gilroy-Bold.woff2") format("woff2"),
       url("./assets/fonts/Gilroy-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
:root {
  --bg: #090E1B;
  --white: #ffffff;
  --accent: #00d7f7;
  --muted: #697284;

  --header-h: 104px;
  --hero-h: 619px;

  /* mobile tuning */
  --container-pad: 24px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: "Gilroy", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---------- Global “auto-layout sections” ---------- */
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  background-color: transparent;
}

/* ---------- Header (fixed, ALWAYS visible) ---------- */
.site-header {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);

  height: var(--header-h);
  width: min(1260px, calc(100vw - 20px));

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  --hdrp: 0;

  background: rgba(26, 76, 107, calc(var(--hdrp) * 0.10));
  border: 1px solid rgba(0, 72, 90, calc(var(--hdrp) * 0.40));
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, calc(var(--hdrp) * 0.22));

  -webkit-backdrop-filter: blur(calc(var(--hdrp) * 14px)) saturate(calc(100% + var(--hdrp) * 60%));
  backdrop-filter: blur(calc(var(--hdrp) * 14px)) saturate(calc(100% + var(--hdrp) * 60%));
}

.brand {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand-logo {
  width: 80px;
  height: 80px;
  display: block;
}

/* ---------- First screen wrapper ---------- */
.top-wrap {
  position: relative;
  height: calc(var(--header-h) + var(--hero-h));
  overflow: hidden;

  background-color: var(--bg);
  background-image: url("./assets/bg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  isolation: isolate;

  padding-top: var(--header-h);
}

/* BG lines */
.bg-lines-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;

  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.bg-lines {
  position: absolute;
  inset: 0;
  margin: auto;

  width: 898px;
  height: 1436px;

  background-image: url("./assets/bg_lines.gif");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;

  opacity: 0.10;

  transform: rotate(90deg) scale(1.05) translateZ(0);
  -webkit-transform: rotate(90deg) scale(1.05) translateZ(0);
  transform-origin: center;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;

  mix-blend-mode: screen;
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 2; height: var(--hero-h); }

.hero-inner {
  height: var(--hero-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-subtitle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.subtitle-white, .subtitle-accent {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0em;
  text-align: center;
}
.subtitle-white { color: var(--white); }
.subtitle-accent { color: var(--accent); }

.hero-title {
  margin: 40px 0 0 0;
  font-weight: 700;
  font-size: 60px;
  line-height: 1.2;
  letter-spacing: 0em;
  text-align: center;
}
.title-white { color: var(--white); }
.title-accent { color: var(--accent); }

.hero-lead {
  margin: 20px 0 0 0;
  font-weight: 300;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0em;
  text-align: center;
  color: var(--white);
  opacity: 0.85;
}

.hero-block-1 { margin-top: 62px; }
.hero-block-2 { margin-top: 62px; }

.hero-kicker {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.6;
  color: var(--accent);
  text-align: center;
}
.hero-uppercase {
  margin-top: 8px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
}
.hero-note-accent {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--accent);
}
.hero-note-muted {
  margin-top: 6px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.hero-bottom-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 3;
}

/* ---------- Section 1 ---------- */
.section-1-inner { display: flex; flex-direction: column; align-items: center; }

.section-1-title {
  margin: 0 0 60px 0;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.2;
  text-align: center;
}

.section-1-grid {
  display: grid;
  grid-template-columns: repeat(2, 486px);
  gap: 30px;
  justify-content: center;
}

.s1-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;

  width: 486px;
  height: 210px;
  padding: 25px 30px;

  background-color: #0e141f;
  border: 1px solid #162030;
  border-radius: 20px;

  transition: border-color 220ms ease, transform 220ms ease;
}
.s1-card:hover { border-color: #00485a; transform: translateY(-2px); }

.s1-icon-wrap { position: relative; width: 40px; height: 40px; }
.s1-icon { position: absolute; inset: 0; width: 40px; height: 40px; object-fit: contain; transition: opacity 200ms ease; }
.s1-icon-hover { opacity: 0; }
.s1-card:hover .s1-icon-default { opacity: 0; }
.s1-card:hover .s1-icon-hover { opacity: 1; }

.s1-title { font-weight: 700; font-size: 24px; line-height: 1.2; color: #ffffff; transition: color 200ms ease; }
.s1-card:hover .s1-title { color: #00d7f7; }

.s1-desc { font-weight: 300; font-size: 16px; line-height: 1.2; color: #ffffff; transition: font-weight 200ms ease; }
.s1-card:hover .s1-desc { font-weight: 700; }

/* ---------- Section 2 ---------- */
.section-2-inner { display: flex; flex-direction: column; align-items: center; }

.section-2-title {
  margin: 0 0 40px 0;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.2;
  text-align: center;
}

.s2-stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.s2-cards {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0;
}

.s2-card {
  width: 320px;
  height: 210px;
  padding: 25px 30px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;

  border-radius: 20px;
  background: transparent;

  position: relative;
}

.s2-title { font-weight: 700; font-size: 24px; line-height: 1.2; color: #ffffff; transition: color 200ms ease; }
.s2-desc { font-weight: 500; font-size: 16px; line-height: 1.2; color: #98a1b0; transition: color 200ms ease, font-weight 200ms ease; }

.s2-card:hover .s2-title { color: #00d7f7; }
.s2-card:hover .s2-desc { color: #ffffff; font-weight: 700; }

.s2-icon-wrap { position: relative; width: 54px; height: 54px; }
.s2-icon {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
  margin: auto;
  object-fit: contain;
  transition: opacity 200ms ease, width 220ms ease, height 220ms ease;
}
.s2-card:hover .s2-icon { width: 54px; height: 54px; }

.s2-icon-hover { opacity: 0; }
.s2-card:hover .s2-icon-default { opacity: 0; }
.s2-card:hover .s2-icon-hover { opacity: 1; }

.s2-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;

  width: 1px;
  height: 100%;

  background-image: url("./assets/line-1.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto 100%;

  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.s2-card:hover::before { opacity: 1; }

/* ---------- Section 3 ---------- */
.section-3-inner { display: flex; flex-direction: column; align-items: center; }

.section-3-title {
  margin: 0 0 60px 0;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.2;
  text-align: center;
}

.s3-box {
  width: 992px;
  height: 396px;
  margin: 0 auto;
  background-color: #0c121d;
  border: 1px solid #131d2b;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  padding: 0 80px;

  position: relative;
}

.s3-box::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;

  background:
    linear-gradient(to right,
      #00687F 0 20px,
      transparent 20px calc(100% - 20px),
      #00687F calc(100% - 20px) 100%
    ) top / 100% 1px no-repeat,

    linear-gradient(to right,
      #00687F 0 20px,
      transparent 20px calc(100% - 20px),
      #00687F calc(100% - 20px) 100%
    ) bottom / 100% 1px no-repeat,

    linear-gradient(to bottom,
      #00687F 0 20px,
      transparent 20px calc(100% - 20px),
      #00687F calc(100% - 20px) 100%
    ) left / 1px 100% no-repeat,

    linear-gradient(to bottom,
      #00687F 0 20px,
      transparent 20px calc(100% - 20px),
      #00687F calc(100% - 20px) 100%
    ) right / 1px 100% no-repeat;
}

.s3-list { display: flex; flex-direction: column; gap: 40px; width: 100%; }
.s3-item { display: flex; align-items: center; gap: 24px; }
.s3-icon { width: 32px; height: 32px; object-fit: contain; flex: 0 0 32px; }
.s3-text { font-weight: 700; font-size: 24px; line-height: 1.2; color: #ffffff; }

/* ---------- Section 4 ---------- */
.section-4 { background-color: transparent; }

.section-4-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-4-title {
  margin: 0 0 60px 0;
  font-family: 'Gilroy';
  font-weight: 700;
  font-size: 42px;
  line-height: 1.2;
  text-align: center;
}

.s4-grid {
  display: grid;
  grid-template-columns: repeat(2, 486px);
  gap: 30px;
  justify-content: center;
}

.s4-card {
  display: flex;
  align-items: center;
  gap: 20px;

  width: 486px;
  height: 108px;
  padding: 25px 30px;

  background: rgba(14, 20, 31, 0.55);
  border: 1px solid rgba(22, 32, 48, 1);
  border-radius: 20px;

  transition: border-color 220ms ease, transform 220ms ease;
}

.s4-card:hover {
  border-color: #00485a;
  transform: translateY(-2px);
}

.s4-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 215, 247, 0.10);
  border: 1px solid rgba(0, 72, 90, 0.35);
}

.s4-badge-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.s4-text {
  font-family: 'Gilroy';
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  text-align: left;
  color: #ffffff;
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: transparent;
  padding: 60px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0;
}

.footer-subtitle { margin: 0; }

.footer-contact-title {
  margin-top: 60px;
  font-family: 'Gilroy';
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: #697284;
}

.footer-icons {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-icon-link {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
}

.footer-icon-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.footer-copy {
  margin-top: 60px;
  font-family: 'Gilroy';
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: #697284;
}

.footer-hero-block { margin-top: 40px; }

/* BG after hero (starts from <main>) */
main {
  background-color: var(--bg);
  background-image: url("./assets/bg-1-1.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

/* ===========================
   MOBILE / RESPONSIVE
   =========================== */

/* tablets */
@media (max-width: 1024px) {
  :root {
    --container-pad: 20px;
    --hero-h: 640px; /* a bit more room when text wraps */
  }

  .hero-title { font-size: 44px; }
  .hero-lead  { font-size: 22px; }

  .section-1-title,
  .section-2-title,
  .section-3-title,
  .section-4-title { font-size: 34px; }

  .section-1-grid,
  .s4-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .s1-card,
  .s4-card {
    width: 100%;
  }

  .s3-box {
    width: 100%;
    height: auto;
    padding: 44px 40px;
  }

  .s2-cards {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
  }

  .s2-card {
    width: min(420px, 100%);
    height: auto;
  }
}

/* phones */
@media (max-width: 768px) {
  :root {
    --container-pad: 16px;
    --header-h: 86px;

    /* ✅ щоб низ не був пустим після підйому контенту */
    --hero-h: 620px;
  }

  .site-header {
    top: 10px;
    width: calc(100vw - 20px);
    border-radius: 18px;
  }

  .brand,
  .brand-logo {
    width: 64px;
    height: 64px;
  }

  .top-wrap {
    height: calc(var(--header-h) + var(--hero-h));
    padding-top: var(--header-h);
  }

  .bg-lines {
    width: 720px;
    height: 1150px;
    opacity: 0.10;
    transform: rotate(90deg) scale(1.1) translateZ(0);
  }

  .hero-inner {
    height: var(--hero-h);

    /* ✅ головне: відстань зверху 20px */
    justify-content: flex-start;
    padding-top: 20px;
  }

  .hero-subtitle {
    flex-direction: column;
    gap: 6px;
  }

  .hero-title {
    margin-top: 22px;
    font-size: 34px;
    line-height: 1.15;
  }

  .hero-lead {
    font-size: 18px;
    line-height: 1.25;
  }

  .hero-block-1,
  .hero-block-2 { margin-top: 28px; }

  .hero-kicker { font-size: 16px; }
  .hero-uppercase { font-size: 14px; }

  .section { padding: 44px 0; }

  .section-1-title,
  .section-2-title,
  .section-3-title,
  .section-4-title {
    font-size: 28px;
    margin-bottom: 28px;
    line-height: 1.15;
  }

  .section-1-grid,
  .s4-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }

  .s1-card {
    height: auto;
    padding: 20px;
    gap: 14px;
  }

  .s1-title { font-size: 20px; }
  .s1-desc  { font-size: 14px; line-height: 1.35; }

  .s2-cards {
    flex-direction: column;
    width: 100%;
  }

  .s2-card {
    width: 100%;
    height: auto;
    padding: 20px;
    gap: 14px;
  }

  .s2-title { font-size: 20px; }
  .s2-desc  { font-size: 14px; line-height: 1.35; }

  .s3-box {
    padding: 28px 18px;
  }

  .s3-list { gap: 18px; }
  .s3-item { gap: 14px; }
  .s3-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .s3-text { font-size: 16px; line-height: 1.35; }

  .s4-card {
    width: 100%;
    height: auto;
    padding: 18px 18px;
    gap: 14px;
    align-items: flex-start;
  }

  .s4-text { font-size: 16px; line-height: 1.35; }

  .footer-contact-title { margin-top: 44px; }
  .footer-copy { margin-top: 44px; }
}

/* small phones */
@media (max-width: 420px) {
  :root {
    /* ✅ трохи більше, бо на вузьких екранах заголовок вище */
    --hero-h: 660px;
  }

  .hero-title { font-size: 30px; }
  .hero-lead  { font-size: 16px; }
}
