/**
* GALI-3D — clean modern stylesheet (no Bootstrap)
* Self-contained: layout via CSS Grid/Flex, dark "hybrid" theme.
* Pairs with site.js. Vendor libs still used: Swiper, GLightbox, Bootstrap Icons (font only).
*/

/* ============ Tokens ============ */
:root {
  --bg: #0a0e16;
  --bg-soft: #0e1422;
  --card: #121a2b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #c2cad9;
  --text-bright: #ffffff;
  --muted: #8b93a5;
  --accent: #2f9bff;
  --accent-light: #57acff;
  --accent-2: #2ce0d0;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 78px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text-bright); margin: 0 0 0.6em; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ============ Layout ============ */
.container { width: min(var(--maxw), 92%); margin-inline: auto; }
.section { padding: 90px 0; scroll-margin-top: var(--header-h); }
.section.alt { background: var(--bg-soft); }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem);
  position: relative;
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.section-head p {
  color: #bcc6d8;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.02rem, 0.97rem + 0.35vw, 1.16rem);
  line-height: 1.75;
  letter-spacing: 0.2px;
  margin: 0;
}
.section-head:has(p) {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 40px;
}
@media (max-width: 600px) { .section-head:has(p) { padding: 26px 22px; } }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  padding: 13px 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 26px rgba(47, 155, 255, 0.32); }
.btn-primary:hover { background: var(--accent-light); color: #fff; box-shadow: 0 12px 30px rgba(47, 155, 255, 0.5); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-bright); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Header / nav ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav { width: min(var(--maxw), 92%); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 40px; width: auto; }
.nav-menu ul { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d4dbe8;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-lang { padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 8px; }
.nav-lang:hover { border-color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 0;
}

@media (max-width: 980px) {
  .nav-toggle { display: block; z-index: 1002; }
  .nav-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 80vw);
    background: #0c1220;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    padding: calc(var(--header-h) + 20px) 30px 30px;
    z-index: 1001;
  }
  .nav-menu ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-menu .nav-link { display: block; padding: 12px 0; font-size: 15px; }
  body.nav-open .nav-menu { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
}

/* ============ Hero ============ */
#hero { position: relative; height: 100vh; min-height: 600px; background: var(--bg); overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 72% 35%, rgba(27, 110, 243, 0.30) 0%, rgba(11, 42, 107, 0.10) 45%, transparent 75%),
    radial-gradient(45% 45% at 18% 88%, rgba(44, 224, 208, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, #0b1020 0%, #070b14 100%);
}
.hero-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 40%, #000 35%, transparent 85%);
  mask-image: radial-gradient(ellipse 90% 80% at 60% 40%, #000 35%, transparent 85%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.hero-glow-1 { width: 360px; height: 360px; right: 8%; top: 14%; background: #1b6ef3; opacity: 0.5; }
.hero-glow-2 { width: 300px; height: 300px; left: 4%; bottom: 6%; background: #14a89c; opacity: 0.35; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-swiper { position: relative; z-index: 1; height: 100%; }
.hero-swiper .swiper-slide { display: flex; align-items: center; justify-content: center; }
.hero-content { width: min(var(--maxw), 92%); margin-inline: auto; text-align: center; padding-top: var(--header-h); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(44, 224, 208, 0.35);
  background: rgba(44, 224, 208, 0.06);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 26px;
}
.hero-content h1 {
  font-size: clamp(2rem, 1.1rem + 4vw, 3.4rem);
  letter-spacing: -0.5px;
  margin: 0 0 18px;
  background: linear-gradient(180deg, #ffffff 0%, #b9c6e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p { max-width: 620px; margin: 0 auto 30px; color: #aab3c5; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem); }

/* hero text entrance */
.swiper-slide-active .hero-badge { animation: heroDown 0.7s var(--ease) both; }
.swiper-slide-active .hero-content h1 { animation: heroDown 0.7s 0.05s var(--ease) both; }
.swiper-slide-active .hero-content p { animation: heroUp 0.7s 0.12s var(--ease) both; }
.swiper-slide-active .hero-content .btn { animation: heroUp 0.7s 0.18s var(--ease) both; }
@keyframes heroDown { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }
@keyframes heroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* hero swiper controls */
.hero-swiper .swiper-button-next, .hero-swiper .swiper-button-prev { color: rgba(255, 255, 255, 0.7); transition: color 0.3s; }
.hero-swiper .swiper-button-next:hover, .hero-swiper .swiper-button-prev:hover { color: #fff; }
.hero-swiper .swiper-button-next::after, .hero-swiper .swiper-button-prev::after { font-size: 28px; }
.hero-swiper .swiper-pagination-bullet { background: rgba(255, 255, 255, 0.45); opacity: 1; }
.hero-swiper .swiper-pagination-bullet-active { background: var(--accent); width: 22px; border-radius: 5px; }

.hero-stats {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-family: var(--font-head); font-size: 26px; color: #fff; line-height: 1.1; }
.hero-stats .stat span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .hero-stats { display: none; } }

/* ============ Cards grid (about / services) ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.about-card:hover { transform: translateY(-6px); border-color: rgba(47, 155, 255, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.about-card .thumb { position: relative; }
.about-card .thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.about-card .badge-icon {
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: 4px solid var(--card);
  color: #fff;
  font-size: 26px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.about-card:hover .badge-icon { background: var(--accent-2); color: #0b1020; }
.about-card h3 { text-align: center; font-size: 1.25rem; margin: 44px 16px 12px; }
.about-card p { color: var(--text); font-size: 0.92rem; line-height: 1.65; padding: 0 22px 24px; margin: 0; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 920px) { .services-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.service {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service:hover { transform: translateY(-6px); border-color: rgba(47, 155, 255, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.service .icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--accent);
  background: rgba(47, 155, 255, 0.10);
  border: 1px solid rgba(47, 155, 255, 0.22);
  margin-bottom: 18px;
}
.service h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ============ Clients ============ */
/* full-bleed horizontal blue strip; logos stay centered to the container width.
   Uses margins (not transform) for the bleed so it doesn't clash with .reveal's transform. */
.clients-band {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  background: linear-gradient(180deg, #2c4a6e 0%, #233d5d 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding-block: 48px;
  padding-inline: max(24px, calc(50vw - 588px));
}
.clients-swiper { align-items: center; }
.clients-swiper .swiper-slide { display: flex; align-items: center; justify-content: center; height: 64px; }
.clients-swiper img { max-height: 50px; width: auto; opacity: 0.92; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.clients-swiper img:hover { opacity: 1; transform: scale(1.08); }

/* ============ Call to action ============ */
.cta {
  background: linear-gradient(135deg, rgba(47, 155, 255, 0.22), rgba(44, 224, 208, 0.10)), var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2rem); }
.cta p { color: var(--text); margin-bottom: 26px; }

/* ============ Portfolio ============ */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter-btn {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { color: var(--text-bright); border-color: var(--border-strong); }
.filter-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.portfolio-card.hidden { display: none; }
.portfolio-card:hover { transform: translateY(-6px); border-color: rgba(47, 155, 255, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.portfolio-card a { display: block; position: relative; overflow: hidden; }
.portfolio-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.5s var(--ease); }
.portfolio-card:hover img { transform: scale(1.06); }
.portfolio-card .meta {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 18px 20px;
}
.portfolio-card .meta h3 { font-size: 1.05rem; margin: 0 0 4px; color: #f2f5fb; }
.portfolio-card .meta span { font-size: 13px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.4px; }

/* ============ Contact ============ */
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 26px; justify-content: center; margin-bottom: 46px; }
@media (max-width: 680px) { .contact-cards { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.visitcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.visitcard:hover { transform: translateY(-4px); border-color: rgba(47, 155, 255, 0.4); }
.visitcard h3 { color: var(--accent); font-size: 1.15rem; margin-bottom: 2px; }
.visitcard .role { color: var(--muted); font-style: italic; font-size: 0.9rem; margin-bottom: 12px; }
.visitcard a { color: var(--text); display: inline-block; }
.visitcard a:hover { color: var(--accent); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.contact-block { text-align: center; padding: 10px; }
.contact-block .ico {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(47, 155, 255, 0.16), rgba(44, 224, 208, 0.12));
  border: 1px solid rgba(47, 155, 255, 0.28);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact-block:hover .ico { transform: translateY(-3px); border-color: rgba(44, 224, 208, 0.5); }
.contact-block .ico svg { width: 30px; height: 30px; display: block; }
.contact-block h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 8px; }
.contact-block a, .contact-block address { color: var(--text); font-style: normal; }
.contact-block a:hover { color: var(--accent); }

/* ============ Footimage ============ */
.footimage { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0; text-align: center; }
.footimage img { max-width: 220px; margin-inline: auto; opacity: 0.9; }

/* ============ Footer ============ */
.footer { background: var(--bg); color: var(--text); font-size: 14px; }
.footer-top { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 {
  font-size: 1.6rem;
  letter-spacing: 3px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
  margin-bottom: 16px;
}
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 50px; height: 2px; background: var(--accent); }
.footer-col p { color: var(--text); line-height: 1.7; }
.footer-links li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.footer-links li:last-child { border-bottom: 0; }
.footer-links a { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-links i { color: var(--accent); font-size: 12px; }
.footer-bottom { text-align: center; padding: 24px 0; }

/* ============ Back to top ============ */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.35s var(--ease);
  z-index: 999;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-2); color: #0b1020; }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .swiper-slide-active .hero-badge,
  .swiper-slide-active .hero-content h1,
  .swiper-slide-active .hero-content p,
  .swiper-slide-active .hero-content .btn { animation: none; }
}
