@font-face {
  font-family: "Nurjanbay";
  src: url("./Nurjanbay.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #64748b;
  --line: #e2e8f0;
  --primary: #0f4c81;
  --primary-soft: rgba(15, 76, 129, 0.08);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 20px 48px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --container: min(1240px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, "Noto Sans Arabic", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: #ffffff;
}

body.lang-ug {
  font-family: "Nurjanbay", "Noto Sans Arabic", sans-serif;
}

body.lang-zh {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}

body.lang-en {
  font-family: "Manrope", Inter, sans-serif;
}

body.lang-ug .brand,
body.lang-ug .site-nav a,
body.lang-ug .lang-btn,
body.lang-ug .section-heading h2,
body.lang-ug .service-card h3,
body.lang-ug .scope-card h3,
body.lang-ug .detail-body h3,
body.lang-ug .carousel-overlay strong {
  font-family: "Nurjanbay", "Noto Sans Arabic", sans-serif;
}

body.lang-zh .brand,
body.lang-zh .site-nav a,
body.lang-zh .lang-btn,
body.lang-zh .section-heading h2,
body.lang-zh .service-card h3,
body.lang-zh .scope-card h3,
body.lang-zh .detail-body h3,
body.lang-zh .carousel-overlay strong {
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}

body.lang-en .brand,
body.lang-en .site-nav a,
body.lang-en .lang-btn,
body.lang-en .section-heading h2,
body.lang-en .service-card h3,
body.lang-en .scope-card h3,
body.lang-en .detail-body h3,
body.lang-en .carousel-overlay strong {
  font-family: "Manrope", Inter, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}

.site-nav {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  color: rgba(15, 23, 42, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.lang-btn {
  border: 0;
  padding: 4px 8px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--text);
}

.lang-btn.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero {
  position: relative;
  padding: 26px 0 68px;
}

.hero-stage {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
}

.hero p,
.section-heading p,
.service-card p,
.scope-card p,
.contact-panel p,
.contact-panel a {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-secondary {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #dde6f0;
  box-shadow: var(--shadow-md);
}

.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.28) 100%);
  pointer-events: none;
  z-index: 1;
}

.carousel-track {
  position: relative;
  min-height: 440px;
}

.carousel-large,
.carousel-large .carousel-track {
  min-height: 680px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(10px) scale(1.004);
  transition:
    transform 1.05s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.95s ease,
    visibility 0s linear 1.05s;
}

.carousel-slide.is-current,
.carousel-slide.is-flipping-in,
.carousel-slide.is-flipping-out {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.carousel-slide.is-current {
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.carousel-slide.is-flipping-in {
  transform: translateX(0) scale(1);
  z-index: 3;
}

.carousel-slide.is-flipping-out {
  transform: translateX(-8px) scale(0.998);
  opacity: 0;
  z-index: 2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  left: 40px;
  bottom: 40px;
  z-index: 2;
  max-width: max-content;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
}

.carousel-overlay strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
}

.carousel-dots {
  position: absolute;
  left: 42px;
  bottom: 34px;
  z-index: 2;
  display: inline-flex;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dot.active {
  width: 30px;
  background: #fff;
}

.section {
  padding: 84px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading-centered .eyebrow {
  justify-content: center;
}

.section-heading h2 {
  margin: 16px 0 12px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.card-grid,
.scope-grid {
  display: grid;
  gap: 24px;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scope-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.scope-card,
.contact-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.service-card,
.scope-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.service-card::before,
.scope-card::before {
  content: none;
}

.service-card:hover,
.scope-card:hover,
.license-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.service-card,
.scope-card,
.license-panel {
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.service-media {
  width: calc(100% + 48px);
  max-width: none;
  height: 260px;
  margin: -24px -24px 24px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
}

.service-card h3,
.scope-card h3 {
  margin: 0 0 12px;
  font-size: 1.26rem;
  line-height: 1.28;
}

.scope-card {
  min-height: 220px;
  padding-top: 30px;
}

.scope-meta {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.detail-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.detail-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.detail-media {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.detail-body {
  padding: 24px;
}

.detail-category {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
}

.detail-body h3 {
  margin: 0 0 12px;
  font-size: 1.26rem;
  line-height: 1.28;
}

.detail-body p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.license-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.25fr);
  gap: 30px;
  align-items: start;
}

.license-layout .section-heading {
  margin-bottom: 0;
  position: sticky;
  top: 112px;
}

.license-panel {
  padding: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 100%);
}

.contact-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.contact-item {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.contact-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.contact-item strong {
  color: var(--text);
  font-size: 0.98rem;
}

.site-footer {
  padding: 30px 0 40px;
  background: transparent;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.footer-icp {
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  color: #16a34a;
  word-break: break-all;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.18);
  animation: icpPulse 2.8s ease-in-out infinite;
}

.footer-icp:hover,
.footer-icp:focus-visible {
  color: #15803d;
  text-decoration: underline;
}

@keyframes icpPulse {
  0%,
  100% {
    opacity: 0.82;
    transform: translateY(0);
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.12);
  }

  50% {
    opacity: 1;
    transform: translateY(-1px);
    text-shadow: 0 0 14px rgba(34, 197, 94, 0.24);
  }
}

body[dir="ltr"] .site-nav,
body[dir="ltr"] .hero-actions,
body[dir="ltr"] .footer-inner,
body[dir="ltr"] .contact-item {
  direction: ltr;
}

body[dir="rtl"] .carousel-overlay {
  left: auto;
  right: 40px;
}

body[dir="rtl"] .carousel-dots {
  left: auto;
  right: 42px;
}

@media (max-width: 1180px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .license-layout {
    grid-template-columns: 1fr;
  }

  .license-layout .section-heading {
    position: static;
  }
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 4px;
  }

  .carousel-large,
  .carousel-large .carousel-track {
    min-height: 600px;
  }

  .scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --container: min(100% - 28px, 1000px);
  }

  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    min-height: 68px;
    padding: 10px 0;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: start;
    gap: 16px;
    padding: 16px 0 6px;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: var(--shadow-sm);
  }

  .site-nav.open {
    display: grid;
  }

  .lang-switcher {
    grid-column: auto;
    justify-self: end;
    padding-left: 10px;
  }

  .hero {
    padding: 12px 0 54px;
  }

  .hero-stage {
    display: block;
  }

  .carousel-large,
  .carousel-large .carousel-track {
    min-height: 360px;
  }

  .carousel {
    border-radius: 28px;
  }

  .carousel::after {
    background: linear-gradient(180deg, rgba(10, 18, 31, 0.12) 0%, rgba(10, 18, 31, 0.42) 100%);
  }

  .carousel-overlay {
    left: 18px;
    bottom: 18px;
    right: auto;
    max-width: calc(100% - 36px);
    padding: 14px 16px;
  }

  .carousel-dots {
    left: 18px;
    bottom: 16px;
  }

  body[dir="rtl"] .carousel-overlay {
    left: auto;
    right: 18px;
  }

  body[dir="rtl"] .carousel-dots {
    right: 18px;
  }

  .section {
    padding: 68px 0;
  }

  .card-grid,
  .scope-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .scope-card,
  .license-panel {
    border-radius: 24px;
  }

  .service-card,
  .scope-card {
    padding: 20px;
  }

  .service-media {
    width: calc(100% + 40px);
    height: 220px;
    margin: -20px -20px 20px;
    border-radius: 24px 24px 0 0;
  }

  .detail-card {
    border-radius: 24px;
  }

  .detail-media {
    height: 220px;
  }

  .detail-body {
    padding: 20px;
  }

  .contact-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0;
  }

  .license-panel {
    padding: 24px 20px;
  }
}
