/* ============================================================
   Reset & Custom Properties
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:     #6680ff;
  --primary-h:   #4d66ff;
  --bg:          #ffffff;
  --bg-alt:      #f4f4f9;
  --text:        #1a1a2e;
  --muted:       #6b6b85;
  --border:      #e0e0ee;
  --hdr-h:       64px;
  --ftr-h:       48px;
  --max-w:       1100px;
  --ease:        0.28s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0c0c18;
    --bg-alt:    #111120;
    --text:      #ddddf0;
    --muted:     #8080a0;
    --border:    #242434;
  }
}

/* ============================================================
   Base
   ============================================================ */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;   /* Swiper controls all scrolling */
  line-height: 1.7;
}

a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
address { font-style: normal; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
   Header
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hdr-h);
  z-index: 200;
  transition: background var(--ease), box-shadow var(--ease);
  /* transparent by default */
}

#site-header.solid {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}

/* Hero slide: header is transparent, force white text */
#site-header.on-hero .logo-text,
#site-header.on-hero .nav-item {
  color: #fff;
}
#site-header.on-hero .menu-btn span {
  background: #fff;
}

/* ============================================================
   Nav
   ============================================================ */
#site-nav { height: 100%; }

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  flex-shrink: 0;
}

.logo-text {
  color: var(--text);
  transition: color var(--ease);
}

/* Desktop nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 3px;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width var(--ease);
}

.nav-item:hover            { color: var(--text); }
.nav-item.active           { color: var(--text); }
.nav-item.active::after    { width: 100%; }

/* On hero: override nav item colours */
#site-header.on-hero .nav-item {
  color: rgba(255,255,255,0.6);
}
#site-header.on-hero .nav-item:hover,
#site-header.on-hero .nav-item.active {
  color: #fff;
}

/* Hamburger button — hidden on desktop */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  z-index: 201;
}

.menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform var(--ease), opacity var(--ease), background var(--ease);
}

.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Main & Swiper Shell
   ============================================================ */
#site-main {
  position: fixed;
  top: var(--hdr-h);
  left: 0; right: 0;
  bottom: var(--ftr-h);
}

.swiper { width: 100%; height: 100%; }

/* ============================================================
   Slides — common
   ============================================================ */
.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.swiper-slide:nth-child(even) { background: var(--bg-alt); }

.slide-inner {
  max-width: var(--max-w);
  width: 100%;
  padding: 40px 24px;
}

/* Slide entrance animation */
.slide-inner {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.swiper-slide-active .slide-inner {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow */
.eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Headings */
h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 20px;
}
h1 em {
  font-style: normal;
  color: var(--primary);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* CTA button */
.cta {
  display: inline-block;
  padding: 11px 30px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}
.cta:hover {
  background: var(--primary-h);
  transform: translateY(-1px);
}

/* ============================================================
   Slide 01 · Hero
   ============================================================ */
#hero {
  background: linear-gradient(140deg, #08081c 0%, #12124a 55%, #0a1535 100%) !important;
  position: relative;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 65% 45%,
              rgba(102, 128, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
#hero .eyebrow { color: rgba(102,128,255,0.9); }

.hero-lead {
  font-size: 1rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 32px;
}

/* ============================================================
   Slide 02 · About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 14px;
}
.about-text p:last-child { margin-bottom: 0; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat {
  padding: 18px 16px;
  border-left: 3px solid var(--primary);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat b {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat span {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ============================================================
   Slide 03 · Services
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.service-card {
  background: var(--bg);
  padding: 28px 22px;
  transition: background var(--ease);
}
.service-card:hover { background: var(--bg-alt); }

.svc-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.22;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ============================================================
   Slide 04 · Advantages
   ============================================================ */
.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top:  1px solid var(--border);
  border-left: 1px solid var(--border);
}

.adv-item {
  display: flex;
  gap: 18px;
  padding: 28px 24px;
  border-right:  1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}
.adv-item:hover { background: var(--bg); }

.adv-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.14;
  line-height: 1;
  flex-shrink: 0;
  width: 46px;
}

.adv-item p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ============================================================
   Slide 05 · Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  align-items: baseline;
}

.contact-info dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}

.contact-info dd {
  font-size: 0.875rem;
  color: var(--muted);
}
.contact-info a:hover { color: var(--primary); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--ease);
  border-radius: 0; /* enforce no rounded corners */
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; min-height: 80px; }

.contact-form .cta.submit-btn {
  width: 100%;
  text-align: center;
  border-radius: 0;
}

/* ============================================================
   Swiper Pagination — vertical dots on right
   ============================================================ */
.swiper-pagination {
  right: 20px !important;
  top: 50% !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

.swiper-pagination-bullet {
  width: 5px !important;
  height: 5px !important;
  background: var(--muted) !important;
  opacity: 0.35 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  transition: height var(--ease), opacity var(--ease), background var(--ease) !important;
}

.swiper-pagination-bullet-active {
  background: var(--primary) !important;
  opacity: 1 !important;
  height: 18px !important;
}

/* ============================================================
   Footer
   ============================================================ */
#site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--ftr-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copyright,
.icp {
  font-size: 0.7rem;
  color: var(--muted);
}

.icp a { transition: color var(--ease); }
.icp a:hover { color: var(--primary); }

/* ============================================================
   Responsive · Tablet  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Responsive · Mobile  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --hdr-h: 56px;
    --ftr-h: 54px;
  }

  /* Show hamburger, hide desktop menu */
  .menu-btn { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--hdr-h);
    left: 0; right: 0;
    bottom: var(--ftr-h);
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity var(--ease), transform var(--ease);
    z-index: 199;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Always use normal colours inside mobile overlay */
  #site-header.on-hero .nav-menu .nav-item { color: var(--muted); }
  #site-header.on-hero .nav-menu .nav-item:hover,
  #site-header.on-hero .nav-menu .nav-item.active { color: var(--text); }

  .nav-item { font-size: 1rem; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Advantages */
  .adv-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Footer */
  .footer-container {
    flex-direction: column;
    gap: 3px;
    justify-content: center;
  }

  /* Hide sidebar pagination on narrow screens */
  .swiper-pagination { display: none !important; }
}

/* ============================================================
   Responsive · Small Mobile  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root { --ftr-h: 60px; }

  .services-grid { grid-template-columns: 1fr; }
  .stats         { grid-template-columns: 1fr 1fr; }

  .hero-lead     { font-size: 0.875rem; }
}
