/* OSLENS Motion Layer · premium effects aligned to guangdian */
:root {
  --ease-premium: cubic-bezier(.18, .63, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* E5 · staggered entrance */
.wow {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.wow.in { opacity: 1; transform: none; }
.wow.fadeInLeft { transform: translateX(-36px); }
.wow.fadeInLeft.in { transform: none; }
.wow.fadeInRight { transform: translateX(36px); }
.wow.fadeInRight.in { transform: none; }
.wow.fadeInUp { transform: translateY(28px); }
.wow.zoomIn { transform: scale(.94); }
.wow.zoomIn.in { transform: none; }

/* E7 · glass CTA */
.btn-glass {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(110deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color .3s, background .3s, transform .3s var(--ease-premium);
}
.btn-glass::after {
  content: "";
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M4 2l4 4-4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .35s var(--ease-premium), background .3s;
}
.btn-glass:hover { border-color: #fff; transform: translateY(-1px); }
.btn-glass:hover::after { transform: translateX(3px); background-color: var(--brand); }

/* E9 · side toolkit */
.side-box {
  position: fixed; right: 18px; bottom: 28px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: .35s var(--ease-premium);
}
.side-box.on { opacity: 1; pointer-events: auto; transform: none; }
.side-box a, .side-box button {
  width: 44px; height: 44px; border: 0; border-radius: 8px;
  background: #fff; color: var(--brand); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: grid; place-items: center; cursor: pointer; font-size: 12px; font-weight: 700;
}
.side-box .to-top { opacity: 0; pointer-events: none; transition: .3s; }
.side-box .to-top.on { opacity: 1; pointer-events: auto; }

/* E11 · header scroll state */
.header.is-scrolled {
  box-shadow: 0 8px 28px rgba(15, 40, 80, .08);
  height: 64px;
}
.header.is-scrolled + .main { /* padding handled by fixed header */ }

/* E4 · stats countup */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 49, 135, .06);
}
.stats-bar--dense {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px 8px;
  padding: 22px 14px;
}
.stats-bar .item { text-align: center; min-width: 0; }
.stats-bar .num {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 700; color: var(--brand); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stats-bar--dense .num { font-size: clamp(20px, 2.1vw, 30px); }
.stats-bar .num em { font-style: normal; font-size: .55em; margin-left: 2px; }
.stats-bar .lab { margin-top: 8px; font-size: 13px; color: var(--muted); }
.stats-bar--dense .lab {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

/* E6 · mega crossfade */
.mega-preview-img {
  transition: opacity .35s var(--ease-premium), transform .5s var(--ease-premium);
}
.mega-preview-img.is-switching { opacity: .35; transform: scale(1.02); }

/* E12 · card image hover (no scale — avoids clipping product photos) */
.card-media img {
  transition: opacity .35s var(--ease-premium);
}
.card:hover .card-media img { opacity: .92; }
.solution-card { transition: transform .4s var(--ease-premium); }
.solution-card:hover { transform: translateY(-4px); }

/* ========== About · E1 Hero morph ========== */
.oa-hero {
  position: relative; min-height: 100vh; background: #fff; overflow: hidden;
}
.oa-hero-media {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path .65s var(--ease-premium);
  will-change: clip-path;
  background: #0b2754 center/cover no-repeat;
  z-index: 2;
}
.oa-hero-media.is-profile {
  clip-path: polygon(42% 0, 100% 0, 100% 100%, 36% 100%);
}
.oa-hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0,19,56,.55), rgba(0,16,46,.2));
  transition: opacity .5s;
}
.oa-hero-media.is-profile .oa-hero-shade { opacity: .35; }
.oa-hero-title {
  position: absolute; left: 6%; bottom: 12%; z-index: 3; color: #fff;
  transition: opacity .4s, transform .5s var(--ease-premium);
}
.oa-hero-media.is-profile .oa-hero-title { opacity: 0; transform: translateY(20px); }
.oa-hero-title .eyebrow { letter-spacing: .2em; font-size: 12px; opacity: .8; margin-bottom: 10px; }
.oa-hero-title h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 700; }
.oa-profile-panel {
  position: relative; z-index: 1;
  margin-top: -55vh; padding: 0 0 80px;
  pointer-events: none;
}
.oa-profile-panel .inner {
  width: min(100% - 48px, var(--max)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(280px, 38%) 1fr; gap: 40px;
  pointer-events: auto;
}
.oa-profile-copy {
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 12px; padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0,49,135,.1);
  opacity: 0; transform: translateY(24px);
  transition: .6s var(--ease-premium) .1s;
}
.oa-hero.is-pinned .oa-profile-copy { opacity: 1; transform: none; }
.oa-profile-copy .about-label { margin-bottom: 8px; }
.oa-profile-copy h2 { margin: 0 0 16px; font-size: 28px; }
.oa-profile-copy .copy {
  color: #646566; white-space: pre-line; max-height: 280px; overflow: auto; font-size: 14px; line-height: 1.8;
}

/* ========== E2 Values fullscreen ========== */
.oa-values { background: #0b2754; }
.oa-value-panel {
  position: relative; height: 100vh; min-height: 640px; overflow: hidden;
  display: flex; align-items: center;
}
.oa-value-bg {
  position: absolute; inset: 0;
  background-position: center; background-size: cover;
  transform: scale(1.08);
  transition: transform 1.6s var(--ease-premium);
}
.oa-value-panel.is-active .oa-value-bg { transform: scale(1); }
.oa-value-mask {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,39,84,.88) 0%, rgba(11,39,84,.45) 55%, rgba(11,39,84,.2) 100%);
}
.oa-value-copy {
  position: relative; z-index: 2;
  width: min(100% - 48px, 640px); margin-left: max(24px, calc((100% - var(--max)) / 2));
  color: #fff;
  opacity: 0; transform: translateY(28px);
  transition: .7s var(--ease-premium);
}
.oa-value-panel.is-active .oa-value-copy { opacity: 1; transform: none; }
.oa-value-copy .idx { font-size: 13px; letter-spacing: .18em; color: #5AA7FF; margin-bottom: 14px; }
.oa-value-copy h3 { margin: 0 0 16px; font-size: clamp(28px, 4vw, 44px); }
.oa-value-copy p { margin: 0; font-size: 16px; line-height: 1.9; opacity: .92; white-space: pre-line; }

/* ========== E3 History big year ========== */
.oa-history {
  position: relative; background: #071833; color: #fff; padding: 0;
  overflow: hidden;
}
.oa-history-glow {
  position: absolute; width: 50vw; height: 50vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,120,255,.28), transparent 70%);
  filter: blur(10px); pointer-events: none;
  top: 10%; left: -10%; transition: transform .4s linear;
}
.oa-history-wrap {
  width: min(100% - 48px, var(--max)); margin: 0 auto;
  padding: 100px 0 120px;
  display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start;
}
.oa-history-side { position: sticky; top: 120px; }
.oa-history-kicker { font-size: 12px; letter-spacing: .2em; opacity: .65; margin-bottom: 8px; }
.oa-history-year {
  position: relative; height: 220px; display: flex; align-items: center;
}
.oa-history-year > span {
  position: relative; z-index: 2;
  font: 700 clamp(72px, 10vw, 140px)/1 Arial, sans-serif;
  letter-spacing: -.06em; color: #fff;
}
.oa-history-ring {
  --ring-progress: 40deg;
  position: absolute; left: -18px; top: 50%; transform: translateY(-50%);
  width: 210px; height: 210px; border-radius: 50%;
  background:
    conic-gradient(from -90deg, var(--brand) var(--ring-progress), rgba(255,255,255,.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
  transition: --ring-progress .35s linear;
}
.oa-history-years {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0;
}
.oa-history-years button {
  border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff;
  padding: 7px 12px; border-radius: 4px; cursor: pointer; font-size: 13px;
  transition: .25s;
}
.oa-history-years button.is-active {
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0,120,255,.2);
}
.oa-history-events { position: relative; min-height: 320px; }
.oa-history-event {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .45s var(--ease-premium), transform .45s var(--ease-premium);
  padding: 28px 8px; border-top: 1px solid rgba(255,255,255,.12);
}
.oa-history-event.is-active {
  opacity: 1; transform: none; pointer-events: auto;
}
.oa-history-event .index {
  position: absolute; right: 0; top: 28px; font-size: 13px; color: #5AA7FF; letter-spacing: .12em;
}
.oa-history-event .year {
  font-size: 42px; font-weight: 700; color: var(--brand); margin-bottom: 16px;
}
.oa-history-event .text { font-size: 20px; line-height: 1.7; max-width: 28em; }

/* E8 honors upgrade */
.oa-honors { padding: 90px 0 100px; background: #fff; }
.oa-honors h2 { text-align: center; margin: 0 0 48px; font-size: clamp(28px, 3vw, 40px); }
.oa-honor-card {
  height: 420px; padding: 40px 28px 28px; background: #f7f8fa;
  border-bottom: 2px solid var(--brand); border-radius: 4px 4px 0 0;
  display: flex; flex-direction: column;
}
.oa-honor-card img {
  width: 100%; flex: 1; object-fit: cover; border-radius: 4px; background: #fff;
}
.oa-honor-card .txt { margin-top: 16px; font-size: 15px; color: #252626; font-weight: 600; }

/* Video modal */
.video-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.72);
  display: grid; place-items: center; opacity: 0; transition: .3s; padding: 24px;
}
.video-modal.show { opacity: 1; }
.video-box { width: min(960px, 100%); background: #000; border-radius: 8px; overflow: hidden; }
.video-box video { width: 100%; display: block; max-height: 80vh; }
.video-close {
  position: absolute; top: 24px; right: 28px; color: #fff; font-size: 36px; cursor: pointer; line-height: 1;
}
.oa-play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.oa-play i {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  display: grid; place-items: center; background: rgba(255,255,255,.12);
}

@media (max-width: 1100px) {
  .stats-bar--dense { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 18px 12px; gap: 12px; }
  .stats-bar--dense {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0;
    padding: 14px 8px;
  }
  .stats-bar--dense .item {
    flex: 0 0 38%;
    min-width: 112px;
    max-width: 160px;
    padding: 6px 8px;
    scroll-snap-align: start;
  }
  .stats-bar--dense .num { font-size: clamp(18px, 5vw, 24px); }
  .stats-bar--dense .lab { font-size: 11px; }
  .oa-hero-media.is-profile { clip-path: polygon(0 0, 100% 0, 100% 58%, 0 72%); }
  .oa-profile-panel { margin-top: -30vh; }
  .oa-profile-panel .inner { grid-template-columns: 1fr; }
  .oa-value-panel { height: auto; min-height: 0; padding: 72px 0; }
  .oa-value-bg { transform: none !important; background-attachment: scroll !important; }
  .oa-history-wrap { grid-template-columns: 1fr; }
  .oa-history-side { position: relative; top: auto; }
  .oa-history-year { height: auto; }
  .oa-history-year > span { font-size: 56px; }
  .oa-history-ring { display: none; }
  .oa-history-event { position: relative; opacity: 1; transform: none; pointer-events: auto; margin-bottom: 12px; }
  .oa-history-event:not(.is-active) { display: none; }
  .oa-honor-card { height: auto; }
  .wow { transition-duration: .45s; }
  .side-box { right: 12px; bottom: 18px; }
}
@media (max-width: 560px) {
  .stats-bar--dense .item { flex-basis: 46%; min-width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .wow, .wow.fadeInLeft, .wow.fadeInRight, .wow.fadeInUp, .wow.zoomIn,
  .oa-hero-media, .oa-value-bg, .oa-value-copy, .oa-history-event,
  .oa-profile-copy, .btn-glass, .card-media img, .mega-preview-img,
  .wow { opacity: 1; transform: none; }
  .oa-value-bg { transform: none !important; }
}
