/* ============================================================
   MIT Design System — Light theme
   Primary #0055FF · Accent #00F0FF · Background #FFFFFF
   ============================================================ */
:root {
  --primary: #0055FF;
  --primary-deep: #0037b3;
  --cyan: #00A8C6;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FD;
  --bg-card: #FFFFFF;
  --line: rgba(17, 28, 51, 0.10);
  --text: #111C33;
  --text-dim: #5A6B8C;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(30, 50, 100, 0.10);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
::selection { background: var(--primary); color: #fff; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--cyan)); border-radius: 6px; }

/* ============================================================
   Buttons + Ripple
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 30px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s;
}
.btn i { font-size: .92em; }
.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, #3b7bff 60%, var(--cyan) 130%);
  box-shadow: 0 8px 28px rgba(0, 85, 255, 0.30);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 38px rgba(0, 85, 255, 0.35);
}
.btn--ghost {
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
.btn--line {
  background: transparent;
  border: 1px solid rgba(0, 85, 255, 0.45);
  color: var(--primary);
  padding: 9px 20px;
  font-size: 13.5px;
  border-radius: 10px;
}
.btn--line:hover { background: rgba(0, 85, 255, 0.06); box-shadow: 0 0 22px rgba(0, 85, 255, 0.15); }
.btn--sm { padding: 10px 22px; font-size: 13.5px; }

/* Click ripple */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple-anim .65s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}
.btn--ghost .ripple-effect, .btn--line .ripple-effect, .nav .ripple-effect {
  background: rgba(0, 85, 255, 0.20);
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ============================================================
   Navbar
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease, backdrop-filter .35s;
}
.nav--scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: .5px; color: var(--text); }
.nav__logo i { font-size: 24px; color: var(--primary); filter: drop-shadow(0 0 6px rgba(0, 85, 255, 0.3)); }
.nav__logo em { font-style: normal; font-size: 11px; color: var(--text-dim); margin-left: 6px; font-weight: 400; }
.nav__menu { display: flex; gap: 6px; }
.nav__link {
  position: relative;
  padding: 9px 18px;
  font-size: 14.5px;
  color: var(--text-dim);
  border-radius: 10px;
  transition: color .25s, background .25s;
}
.nav__link::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 4px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav__link:hover { color: var(--text); background: rgba(0, 85, 255, 0.05); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; }

/* Products dropdown */
.nav__link--btn { background: none; border: none; font-size: 14.5px; color: var(--text-dim); }
.nav__link--btn:hover { color: var(--text); background: rgba(0, 85, 255, 0.05); }
.nav__caret { margin-left: 6px; font-size: 11px; transition: transform .3s ease; }
.nav__dropdown { position: relative; }
.nav__dropdown:hover .nav__caret, .nav__dropdown.open .nav__caret { transform: rotate(180deg); }
.dropdown {
  position: absolute;
  top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(30, 50, 100, 0.18);
  opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(12px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
/* Desktop: open on hover (incl. transition bridge) */
@media (min-width: 901px) {
  .nav__dropdown:hover .dropdown, .nav__dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
}
.dropdown::before {
  content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.dropdown__group { padding: 6px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown__group:last-of-type { border-bottom: none; margin-bottom: 0; }
.dropdown__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim);
  padding: 6px 10px;
}
.dropdown__title i { color: var(--cyan); font-size: 12px; }
.dropdown__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px; color: var(--text);
  transition: background .2s, color .2s, transform .2s;
}
.dropdown__link:hover { background: rgba(0, 85, 255, 0.06); color: var(--primary); transform: translateX(3px); }
.dropdown__icon {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px; color: #fff;
}
.dropdown__icon img {
  width: 30px; height: 30px; border-radius: 8px;
  object-fit: cover;
  display: block;
}
.dropdown__footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  margin-top: 6px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: rgba(0, 85, 255, 0.08);
  transition: background .2s;
}
.dropdown__footer:hover { background: rgba(0, 85, 255, 0.14); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(0, 85, 255, 0.10), transparent 55%),
    radial-gradient(100% 80% at 10% 110%, rgba(0, 200, 255, 0.10), transparent 50%),
    var(--bg);
}
.hero__canvas { position: absolute; inset: 0; z-index: 1; }
.hero__grid-overlay {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(0, 85, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 85, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 30%, transparent 75%);
}
.hero__content {
  position: relative; z-index: 2;
  padding-top: 90px;
  max-width: 860px;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; color: var(--primary);
  border: 1px solid rgba(0, 85, 255, 0.25);
  background: rgba(0, 85, 255, 0.06);
  box-shadow: inset 0 0 18px rgba(0, 85, 255, 0.06);
  margin-bottom: 26px;
}
.hero__title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .5px;
  margin-bottom: 22px;
  color: var(--text);
}
.hero__title--glow {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub { max-width: 600px; font-size: 17px; color: var(--text-dim); margin-bottom: 36px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }

.hero__stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__value {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(120deg, #111C33, var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 13px; color: var(--text-dim); margin-top: 2px; letter-spacing: 1px; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; z-index: 2;
  transform: translateX(-50%);
  color: var(--text-dim); font-size: 20px;
  animation: scroll-bounce 2s infinite;
}
@keyframes scroll-bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ============================================================
   Sections (shared)
   ============================================================ */
.section { padding: 110px 0; position: relative; }
.section--alt { background: var(--bg-soft); }
.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head__sub {
  display: inline-block;
  font-size: 12.5px; font-weight: 700; letter-spacing: 4px;
  color: var(--primary);
  padding: 6px 14px; border-radius: 8px;
  background: rgba(0, 85, 255, 0.06);
  border: 1px solid rgba(0, 85, 255, 0.18);
  margin-bottom: 16px;
}
.section-head__title { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-bottom: 14px; color: var(--text); }
.section-head__desc { max-width: 640px; color: var(--text-dim); }
.section-head--center .section-head__desc { margin: 0 auto; }

/* ============================================================
   Core apps card grid
   ============================================================ */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.06);
  transition: transform .4s cubic-bezier(.2,.7,.3,1), box-shadow .4s ease, border-color .4s;
}
.app-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 85, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 85, 255, 0.15);
}
.app-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.app-card__thumb {
  position: relative;
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 20px;
  overflow: hidden;
}
.app-card__glow {
  position: absolute; inset: 0; opacity: .9;
  transition: transform .45s ease;
}
.app-card:hover .app-card__glow { transform: scale(1.15) rotate(4deg); }
.app-card__icon { position: relative; font-size: 32px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.app-card__icon img {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.app-card__tag {
  font-size: 12.5px; color: var(--primary);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(0, 85, 255, 0.06);
  border: 1px solid rgba(0, 85, 255, 0.18);
  white-space: nowrap;
}
.app-card__name { font-size: 21px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.app-card__desc { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }

/* ============================================================
   Game Studio (full-width showcase cards, alternating sides)
   ============================================================ */
.games { background: linear-gradient(180deg, transparent, var(--bg-soft) 30%, var(--bg-soft) 70%, transparent); }
.games__bg { position: absolute; inset: 0; opacity: .35; background: radial-gradient(60% 60% at 50% 40%, rgba(0, 85, 255, 0.10), transparent 70%); }
.games .container, .games__cards { position: relative; z-index: 2; }

.games__cards {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 10px 0 8px;
}
.game-card {
  position: relative;
  display: flex;
  min-height: 340px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(30, 50, 100, 0.08);
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 85, 255, 0.35);
  box-shadow: 0 26px 60px rgba(0, 85, 255, 0.16);
}

/* Left/right visual area */
.game-card__visual {
  position: relative;
  flex: 0 0 44%;
  overflow: hidden;
}
.game-card__bg { position: absolute; inset: 0; }
.game-card__visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(255, 255, 255, 0.95) 100%);
}
.game-card--rev .game-card__visual::after {
  background: linear-gradient(270deg, transparent 60%, rgba(255, 255, 255, 0.95) 100%);
}
.game-card__glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: clamp(84px, 12vw, 150px);
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.35));
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.game-card__glyph img {
  width: min(46%, 220px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.35));
}
.game-card:hover .game-card__glyph { transform: scale(1.12) rotate(-4deg); }
.game-card__badge {
  position: absolute; top: 22px; left: 22px; z-index: 2;
  font-size: 11px; letter-spacing: 3px; font-weight: 700; color: #fff;
  padding: 6px 13px; border-radius: 6px;
  background: rgba(17, 28, 51, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

/* Content area */
.game-card__inner {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 44px;
  gap: 12px;
  background: #FFFFFF;
}
.game-card__title h3 { font-size: 32px; font-weight: 800; color: var(--text); }
.game-card__style { font-size: 14px; color: var(--primary); margin-top: 2px; letter-spacing: 1.5px; }
.game-card__tags { display: flex; gap: 9px; margin: 4px 0 6px; }
.game-card__tag {
  font-size: 12px; color: var(--primary);
  padding: 5px 14px; border-radius: 999px;
  background: rgba(0, 85, 255, 0.08);
  border: 1px solid rgba(0, 85, 255, 0.25);
}
.game-card__desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.8; max-width: 520px; }
.game-card__cta { margin-top: 8px; align-self: flex-start; }

/* Even rows reversed (visual on the right) */
.game-card--rev .game-card__visual { order: 2; }
.game-card--rev .game-card__inner { order: 1; }

@media (max-width: 900px) {
  .game-card { flex-direction: column; min-height: 0; }
  .game-card__visual { flex: 0 0 210px; order: 0 !important; }
  .game-card--rev .game-card__visual { order: 0 !important; }
  .game-card__visual::after,
  .game-card--rev .game-card__visual::after {
    background: linear-gradient(180deg, transparent 50%, rgba(255, 255, 255, 0.95) 100%);
  }
  .game-card__inner { padding: 28px 24px; }
  .game-card__glyph { font-size: 88px; }
  .game-card__title h3 { font-size: 26px; }
}

/* ============================================================
   Technology & Innovation
   ============================================================ */
.tech { background: linear-gradient(180deg, transparent, var(--bg-soft) 40%, transparent); }
.tech__stats {
  display: flex; gap: 56px; flex-wrap: wrap;
  padding: 26px 0 10px;
}
.tech__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.05);
  transition: transform .35s ease, border-color .35s, box-shadow .35s;
}
.tech-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 85, 255, 0.35);
  box-shadow: 0 18px 44px rgba(0, 85, 255, 0.14);
}
.tech-card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 21px; color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.12), rgba(0, 200, 255, 0.12));
  margin-bottom: 18px;
}
.tech-card h4 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.tech-card p { font-size: 14px; color: var(--text-dim); }

/* ============================================================
   Mission · Vision · Values
   ============================================================ */
.mvv { background: linear-gradient(180deg, transparent, var(--bg-soft) 40%, transparent); }
.mvv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.mvv-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.05);
  transition: transform .35s ease, border-color .35s, box-shadow .35s;
}
.mvv-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 85, 255, 0.35);
  box-shadow: 0 18px 44px rgba(0, 85, 255, 0.14);
}
.mvv-card::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  opacity: .8;
}
.mvv-card__icon {
  width: 62px; height: 62px; border-radius: 18px;
  display: grid; place-items: center;
  font-size: 26px; color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.12), rgba(0, 200, 255, 0.12));
  margin: 6px auto 20px;
  transition: transform .35s ease;
}
.mvv-card:hover .mvv-card__icon { transform: scale(1.1) rotate(-5deg); }
.mvv-card__title {
  font-size: 22px; font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}
.mvv-card__text { font-size: 14.5px; color: var(--text-dim); line-height: 1.9; }

/* ============================================================
   About (subpage)
   ============================================================ */
.about__inner { display: flex; flex-direction: column; gap: 34px; }
.about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.05);
  transition: transform .35s ease, border-color .35s, box-shadow .35s;
}
.about-card:hover { transform: translateY(-6px); border-color: rgba(0, 85, 255, 0.35); box-shadow: 0 18px 44px rgba(0, 85, 255, 0.14); }
.about-card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 21px; color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.12), rgba(0, 200, 255, 0.12));
  margin-bottom: 18px;
}
.about-card h4 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.about-card p { font-size: 14px; color: var(--text-dim); }
.about__desc p { max-width: 720px; color: var(--text-dim); font-size: 15px; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-soft) 0%, #EAF0FA 100%);
  padding: 56px 0 30px;
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer__logo { color: var(--text); }
.footer__slogan { font-size: 13px; color: var(--text-dim); margin-top: 6px; letter-spacing: 3px; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { font-size: 14px; color: var(--text-dim); transition: color .25s; }
.footer__links a:hover { color: var(--primary); }
.footer__social { display: flex; gap: 12px; }
.footer__social-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 17px; color: var(--text-dim);
  background: #FFFFFF;
  border: 1px solid var(--line);
  transition: all .3s ease;
}
.footer__social-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 85, 255, 0.15);
}
.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 24px;
  font-size: 12.5px; color: var(--text-dim);
}

/* ============================================================
   Directional fade reveals (IntersectionObserver)
   Fade up/down/left/right + scale
   ============================================================ */
.fade-up,
.fade-down,
.fade-left,
.fade-right,
.fade-scale {
  opacity: 0;
  transition:
    opacity .85s ease,
    transform .85s cubic-bezier(.2, .7, .3, 1);
  will-change: opacity, transform;
}
.fade-up    { transform: translateY(46px); }
.fade-down  { transform: translateY(-46px); }
.fade-left  { transform: translateX(60px); }
.fade-right { transform: translateX(-60px); }
.fade-scale { transform: scale(.9); }
.fade-up.fade-in,
.fade-down.fade-in,
.fade-left.fade-in,
.fade-right.fade-in,
.fade-scale.fade-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-down, .fade-left, .fade-right, .fade-scale {
    opacity: 1; transform: none; transition: none;
  }
  html { scroll-behavior: auto; }
  .hero__scroll { animation: none; }
}

/* ============================================================
   Back to top
   ============================================================ */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--primary); font-size: 16px;
  box-shadow: 0 8px 24px rgba(30, 50, 100, 0.12);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all .35s ease;
  overflow: hidden;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { box-shadow: 0 0 22px rgba(0, 85, 255, 0.25); }

/* ============================================================
   Subpages (About / Contact / Privacy / Terms / Product)
   ============================================================ */
body.subpage { padding-top: 0; }
.subpage .nav { position: absolute; }

.page, .product {
  position: relative;
  padding: 150px 0 110px;
  min-height: 100vh;
  background:
    radial-gradient(100% 60% at 85% -10%, rgba(0, 85, 255, 0.08), transparent 55%),
    radial-gradient(80% 50% at 5% 105%, rgba(0, 200, 255, 0.08), transparent 55%),
    var(--bg);
}
.page__bg, .product__bg {
  position: absolute; inset: 0; opacity: .5;
  background:
    linear-gradient(rgba(0, 85, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 85, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
.page .container, .product .container { position: relative; z-index: 2; }

/* Page header */
.page__head { margin-bottom: 42px; }
.page__head h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; margin-top: 6px; color: var(--text); }
.page__updated { color: var(--text-dim); font-size: 13px; margin-top: 10px; }
.page__intro { max-width: 760px; color: var(--text-dim); font-size: 16px; margin-bottom: 48px; }

/* Stats bar */
.page__stats {
  display: flex; gap: 56px; flex-wrap: wrap;
  padding: 30px 0; margin-bottom: 44px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

/* Generic content block */
.page__block { margin-bottom: 52px; }
.product__block-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: 2px;
  color: var(--primary); text-transform: uppercase;
  margin-bottom: 26px;
}
.product__block-title i { font-size: 15px; }

/* About */
.page__mission { max-width: 780px; color: var(--text-dim); font-size: 15.5px; line-height: 2; }

/* Contact */
.contact__wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 34px;
  align-items: start;
}
.contact__info { display: grid; gap: 14px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 22px rgba(30, 50, 100, 0.05);
  transition: border-color .3s, transform .3s;
}
.contact-item:hover { border-color: rgba(0, 85, 255, 0.4); transform: translateY(-3px); }
.contact-item__icon {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px; color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 85, 255, 0.12), rgba(0, 200, 255, 0.12));
}
.contact-item span { display: block; font-size: 12px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.contact-item a, .contact-item p { font-size: 14.5px; color: var(--text); }
.contact-item a:hover { color: var(--primary); }

.contact__form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.06);
}
.contact__form h3 { font-size: 19px; margin-bottom: 22px; color: var(--text); }
.form-field { margin-bottom: 16px; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit; font-size: 14px;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.12);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-dim); }
.form-status { margin-top: 14px; font-size: 13.5px; min-height: 20px; }
.form-status.ok { color: #0E9F6E; }
.form-status.err { color: #E02424; }

/* Privacy / Terms documents */
.page__docs { max-width: 820px; display: grid; gap: 34px; }
.doc-section {
  border-left: 3px solid var(--primary);
  padding: 4px 0 4px 24px;
}
.doc-section h2 { font-size: 19px; margin-bottom: 12px; color: var(--text); }
.doc-section p { color: var(--text-dim); font-size: 15px; line-height: 1.9; }

/* ============ Product detail page ============ */
.product__crumb {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 13.5px;
  margin-bottom: 34px;
  transition: color .25s;
}
.product__crumb:hover { color: var(--primary); }
.product__hero { display: flex; gap: 26px; align-items: center; margin-bottom: 36px; }
.product__icon {
  flex: 0 0 auto;
  width: 96px; height: 96px; border-radius: 26px;
  display: grid; place-items: center;
  font-size: 42px; color: #fff;
  box-shadow: 0 16px 44px rgba(0, 85, 255, 0.30);
}
.product__icon img {
  width: 100%; height: 100%;
  border-radius: 26px;
  object-fit: cover;
  display: block;
}
.product__titles h1 { font-size: clamp(30px, 4.5vw, 42px); font-weight: 800; color: var(--text); }
.product__style { color: var(--primary); font-size: 15px; margin-top: 4px; letter-spacing: .5px; }
.product__tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.product__tag {
  font-size: 12.5px; color: var(--primary);
  padding: 4px 13px; border-radius: 999px;
  background: rgba(0, 85, 255, 0.08);
  border: 1px solid rgba(0, 85, 255, 0.25);
}
.product__tag--ghost {
  background: rgba(17, 28, 51, 0.04);
  border-color: var(--line);
  color: var(--text-dim);
}
.product__desc {
  max-width: 780px;
  color: var(--text-dim);
  font-size: 16px; line-height: 2;
  margin-bottom: 50px;
}

.product__block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(30, 50, 100, 0.05);
}
.product__features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 28px; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text); }
.feature-item i { color: var(--primary); margin-top: 5px; }

.product__log { display: grid; gap: 0; }
.log-item {
  display: flex; gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.log-item:last-child { border-bottom: none; }
.log-item__meta { flex: 0 0 150px; display: flex; flex-direction: column; align-items: flex-end; }
.log-item__v { font-weight: 700; color: var(--primary); font-size: 14px; }
.log-item__d { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.log-item__note { color: var(--text-dim); font-size: 14px; }

.product__download {
  display: flex; gap: 22px; align-items: center;
  padding: 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-soft);
}
.product__qr {
  flex: 0 0 auto;
  width: 132px; height: 132px; border-radius: 14px;
  display: grid; place-items: center;
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(30, 50, 100, 0.15);
  overflow: hidden;
}
.product__qr img { width: 100%; height: 100%; object-fit: cover; }
.product__qr--placeholder { font-size: 64px; color: var(--primary); background: #FFFFFF; }
.product__dl-info { text-align: left; }
.product__dl-info strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--text); }
.product__dl-info span { display: block; font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.product__dl-info em { display: block; font-style: normal; font-size: 12px; color: var(--text-dim); margin-top: 8px; }

.product__back {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 30px;
  border-top: 1px solid var(--line);
}

/* 404 */
.product__notfound { text-align: center; padding: 60px 0; }
.product__notfound i { font-size: 72px; color: var(--text-dim); margin-bottom: 20px; }
.product__notfound h1 { font-size: 34px; margin-bottom: 12px; color: var(--text); }
.product__notfound p { color: var(--text-dim); margin-bottom: 30px; }

/* Navbar active state */
.nav__link--active { color: var(--text); }
.nav__link--active::after { transform: scaleX(1); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav__menu {
    position: fixed; top: 0; right: -100%; z-index: 99;
    width: min(300px, 78vw); height: 100vh;
    flex-direction: column; justify-content: center; align-items: center; gap: 14px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--line);
    transition: right .4s cubic-bezier(.2,.7,.3,1);
  }
  .nav__menu.open { right: 0; }
  .nav__toggle { display: block; z-index: 100; }
  /* Mobile: dropdown fills the drawer */
  .nav__dropdown { width: 100%; }
  .nav__link--btn { justify-content: center; }
  .nav__caret { margin-left: 8px; }
  .dropdown {
    position: static; transform: none;
    width: min(280px, 86%);
    margin: 8px auto 0;
    max-height: 0; padding-top: 0; padding-bottom: 0;
    overflow: hidden;
    opacity: 1; visibility: visible;
    transition: max-height .4s ease, padding .4s ease;
  }
  .nav__dropdown.open .dropdown {
    max-height: 520px;
    padding-top: 10px; padding-bottom: 10px;
  }
  .hero__stats { gap: 30px; }
  .hero__cta { margin-bottom: 44px; }
  .contact__wrap { grid-template-columns: 1fr; }
  .page, .product { padding: 130px 0 90px; }
  .product__hero { flex-direction: column; text-align: center; }
  .product__tags { justify-content: center; }
  .product__log .log-item { flex-direction: column; gap: 6px; }
  .log-item__meta { align-items: flex-start; flex-direction: row; gap: 10px; }
  .product__download { flex-direction: column; text-align: center; }
  .product__dl-info { text-align: center; }
}
@media (max-width: 560px) {
  .section { padding: 80px 0; }
  .hero__stats { gap: 22px; }
  .stat__value { font-size: 24px; }
}
