/* 第三版 · 深色云海 — presentation, interaction and motion layer. Loaded after origin.css.
   Two layers of cloud drift at different speeds and the page flies up through them as you scroll;
   dark cards catch a glow that follows the cursor; data keeps flowing along the research network. */

/* ---------- hero: the promise leads ---------- */
.o-mark {
  margin: 0 0 14px;
  font-family: "Origin Display", Georgia, serif;
  font-size: 34px;
  line-height: 1.1;
  color: #d8d8de;
}
#homepage .f-hero h1.o-promise {
  font-size: 68px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
#homepage .f-hero h1.o-promise .o-line {
  display: block;
}
@media (max-height: 740px) and (min-width: 801px) {
  #homepage .f-hero h1.o-promise {
    font-size: 54px;
  }
  .o-mark {
    font-size: 28px;
    margin-bottom: 8px;
  }
}
@media (max-width: 800px) {
  #homepage .f-hero h1.o-promise {
    font-size: 38px;
  }
  .o-mark {
    font-size: 26px;
  }
}
@media (max-width: 360px) {
  #homepage .f-hero h1.o-promise {
    font-size: 32px;
  }
}

/* ---------- hero: two layers of cloud ---------- */
.o-front {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 38%, #000 72%);
  mask-image: linear-gradient(180deg, transparent 38%, #000 72%);
}
.o-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%;
  transform: scale(1.12);
}
.o-fly {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 16, 17, 0) 20%, #0f1011 95%);
  opacity: 0;
  pointer-events: none;
}
.o-cloudy .f-hero-breath,
.o-cloudy .o-front {
  will-change: transform;
}
.o-cloudy .f-hero-breath img {
  animation: o-drift-back 38s ease-in-out infinite alternate;
}
.o-cloudy .o-front img {
  animation: o-drift-front 22s ease-in-out infinite alternate;
}
@keyframes o-drift-back {
  from { transform: scale(1.06) translate3d(-1.2%, 0, 0); }
  to { transform: scale(1.06) translate3d(1.2%, -0.6%, 0); }
}
@keyframes o-drift-front {
  from { transform: scale(1.14) translate3d(2.2%, 0.4%, 0); }
  to { transform: scale(1.14) translate3d(-2.2%, -0.4%, 0); }
}

/* ---------- glow that follows the cursor on dark cards ---------- */
.o-glow-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(209, 201, 255, 0.07), transparent 62%);
}
.o-glow-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(209, 201, 255, 0.75), rgba(144, 184, 240, 0.25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.o-glow.is-glowing > .o-glow-fx {
  opacity: 1;
}
.o-glow-host {
  position: relative;
}

/* ---------- 研究资产: constellation (replaces the flowchart) ---------- */
.o-sky-on .f-network-map {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.o-sky {
  width: 100%;
}
.o-sky svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.o-field circle {
  fill: #ffffff;
}
.o-field .is-twinkle {
  animation: o-twinkle 4.5s ease-in-out infinite;
}
@keyframes o-twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.8; }
}
.o-edge {
  stroke: #3a3a40;
  stroke-width: 1;
  fill: none;
}
.o-edge.is-pending,
.o-line-ink.is-pending {
  stroke-dasharray: 4 6;
}
.o-line-ink {
  fill: none;
  stroke: #d1c9ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(209, 201, 255, 0.7));
  transition: opacity 0.35s ease;
}
.o-line-ink.is-pending {
  stroke: #dd90d8;
  filter: drop-shadow(0 0 4px rgba(221, 144, 216, 0.6));
}
.o-line-ink.is-active {
  opacity: 1;
}
.o-tag text {
  text-anchor: middle;
  paint-order: stroke;
  stroke: #0f1011;
  stroke-linejoin: round;
}
.o-tag-label {
  fill: #6f6f76;
  font-family: var(--o-mono);
  transition: fill 0.35s ease;
}
.o-tag.is-active .o-tag-label {
  fill: #e3e3e7;
}
.o-tag-note {
  fill: #a9a2e0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.o-tag.is-active .o-tag-note {
  opacity: 1;
}
.is-compact .o-tag:not(.is-active),
.is-compact .o-tag-note {
  display: none;
}
.o-star-halo {
  opacity: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.4s ease;
}
.o-star.is-active .o-star-halo {
  opacity: 1;
}
.o-star-ring {
  fill: none;
  stroke: #d1c9ff;
  stroke-width: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.o-star.is-active .o-star-ring {
  opacity: 0.7;
}
.o-star-core {
  fill: #8c8c94;
  transition: fill 0.4s ease;
}
.o-star.is-active .o-star-core {
  fill: #ffffff;
}
.o-star-num {
  fill: #a9a2e0;
  font-family: var(--o-mono);
  letter-spacing: 0.08em;
}
.o-star text {
  paint-order: stroke;
  stroke: #0f1011;
  stroke-linejoin: round;
}
.o-star-label {
  fill: #8c8c94;
  font-family: var(--o-display);
  transition: fill 0.4s ease;
}
.o-star.is-active .o-star-label {
  fill: #f5f5f7;
}
.o-star-detail {
  fill: #6f6f76;
}
.o-packets circle {
  fill: #ffffff;
  filter: drop-shadow(0 0 4px rgba(209, 201, 255, 0.95));
}
.o-packets circle.is-pending {
  fill: #f2c4ef;
  filter: drop-shadow(0 0 4px rgba(221, 144, 216, 0.9));
}

/* ---------- about: dark like the rest of the page ---------- */
#homepage .f-about {
  position: relative;
  isolation: isolate;
  background: #0b0c0d;
  color: #f5f5f7;
  border-top: 1px solid rgb(255 255 255 / 8%);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}
#homepage .f-about::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 90% at 50% 0%, rgba(209, 201, 255, 0.12), transparent 70%);
}
#homepage .f-about h2 {
  color: #f5f5f7;
}
#homepage .f-about-copy > p {
  color: #a9a9ac;
}
#homepage .f-about-copy > p:first-of-type {
  color: #e3e3e7;
}

/* ---------- 产品短片《夜航》: chapters are waypoints on a course ---------- */
.o-film {
  position: relative;
  padding: 96px 0 72px;
  background: #0f1011;
  color: #f5f5f7;
}
.o-film::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(209, 201, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.o-film .f-container {
  position: relative;
}
.o-film-head {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}
.o-film-kicker {
  margin: 0 0 16px;
  color: #a9a2e0;
  font-family: var(--o-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}
.o-film-head h2 {
  margin: 0;
  font-family: var(--o-display);
  font-size: 52px;
  font-weight: 400;
  line-height: 1.32;
}
.o-film-head h2 span {
  display: inline-block;
}
.o-film-lead {
  max-width: 700px;
  margin: 22px auto 0;
  color: #a9a9ac;
  font-size: 15px;
  line-height: 1.9;
  text-wrap: pretty;
}
.o-film-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 18px;
  background: #07080b;
  box-shadow: 0 40px 120px -40px rgba(209, 201, 255, 0.22);
}
.o-film-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #07080b;
}
.o-course {
  position: relative;
  margin-top: 40px;
}
.o-course-line {
  position: absolute;
  top: 11px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: repeating-linear-gradient(90deg, #4a4a52 0 2px, transparent 2px 10px);
}
.o-course-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #d1c9ff 80%, #ff9c86 80%);
  clip-path: inset(0 max(0%, calc(100% - var(--p) * 120%)) 0 0);
  filter: drop-shadow(0 0 4px rgba(209, 201, 255, 0.6));
}
.o-course-craft {
  position: absolute;
  top: -3px;
  left: calc(min(var(--p) * 120%, 100%));
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #ff9c86;
  box-shadow: 0 0 0 4px rgba(255, 156, 134, 0.18), 0 0 14px rgba(255, 156, 134, 0.9);
  animation: o-blink 0.625s steps(1) infinite;
}
@keyframes o-blink {
  0%, 18% { opacity: 1; }
  19%, 100% { opacity: 0.45; }
}
.o-course-stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.o-course-stops button {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 4px 8px;
  border: 0;
  background: none;
  color: #8c8c94;
  font: inherit;
  cursor: pointer;
}
.o-stop-dot {
  width: 10px;
  height: 10px;
  margin: 3px 0 6px;
  border: 1px solid #6f6f76;
  border-radius: 50%;
  background: #0f1011;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.o-course-stops .is-passed .o-stop-dot {
  border-color: #d1c9ff;
  background: #d1c9ff;
  box-shadow: 0 0 10px rgba(209, 201, 255, 0.8);
}
.o-course-stops .is-yours.is-passed .o-stop-dot {
  border-color: #ff9c86;
  background: #ff9c86;
  box-shadow: 0 0 10px rgba(255, 156, 134, 0.8);
}
.o-stop-time {
  color: #6f6f76;
  font-family: var(--o-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.o-stop-name {
  font-family: var(--o-display);
  font-size: 17px;
  transition: color 0.3s ease;
}
.o-course-stops button:hover .o-stop-name,
.o-course-stops button[aria-pressed="true"] .o-stop-name {
  color: #f5f5f7;
}
.o-course-stops .is-yours button[aria-pressed="true"] .o-stop-name {
  color: #ffb9a9;
}
.o-course-stops button:focus-visible {
  outline: 1px solid #d1c9ff;
  outline-offset: 2px;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .o-film {
    padding: 64px 0 48px;
  }
  .o-film-head h2 {
    font-size: 34px;
  }
  .o-film-frame {
    border-radius: 12px;
  }
  .o-course-line {
    display: none;
  }
  .o-course-stops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
  }
  .o-course-stops button {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-align: left;
  }
  .o-stop-dot {
    margin: 0;
  }
  .o-stop-name {
    font-size: 15px;
  }
}
@media (max-width: 560px) {
  .o-film-head h2 {
    font-size: 28px;
  }
  .o-course-stops {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .o-course-stops button {
    padding: 9px 0;
  }
}

/* ---------- reveals: hidden until origin-motion.js brings them out of the haze ---------- */
.motion #homepage :is(.o-film-head > *, .o-film-frame, .o-course, .f-hero-copy > *, .f-work-intro > *, .f-work-demo > .f-tabs, .f-work-panel, .f-work-bottom,
  .p-intro h2 > span, .p-intro > p, .p-stage, .f-memory h2, .f-memory .f-container > p, .f-network-tabs, .f-network-story,
  .f-network-figure, .f-network-origin, .f-about-copy > *, .f-trial-intro > *, .f-trial-content):not(.in) {
  opacity: 0;
}
.motion .f-footer :is(.f-footer-top > *, .f-footer-bottom):not(.in) {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .o-field .is-twinkle {
    animation: none;
  }
  .o-cloudy .f-hero-breath img,
  .o-cloudy .o-front img {
    animation: none;
  }
  .o-glow-fx {
    transition: none;
  }
}

/* 2026-10-21 · 第五版 rules: a calmer hero, and one size for every section heading with no mid-line wraps */
@media (min-width: 801px) {
  #homepage .f-hero h1.o-promise { font-size: clamp(40px, 4.2vw, 58px); }
  #homepage :is(.o-film-head h2, .f-work-intro h2, .p-intro h2, .f-memory h2, .f-about h2) { font-size: min(44px, calc((min(100vw, 1440px) - 96px) / 21)); }
  #homepage :is(h2 .ln, .p-intro h2 > span, .o-film-head h2 span) { white-space: nowrap; }
}
@media (max-width: 800px) {
  #homepage :is(.o-film-head h2, .f-work-intro h2, .p-intro h2, .f-memory h2, .f-about h2) { font-size: min(30px, calc((100vw - 40px) / 12.4)); }
}
@media (max-width: 800px) {
  #homepage .f-hero h1.o-promise { font-size: min(38px, calc((100vw - 48px) / 10.6)); }
}

/* ---------- section rhythm: each part of the page reads as its own leg ---------- */
/* base and raised night tones alternate, every section opens on a hairline and a small label */
#homepage {
  --o-base: #0f1011;
  --o-raised: #1b1c1f;
}
#homepage :is(.f-work, .p-research, .f-memory, .f-about, .f-trial) {
  border-top: 1px solid rgb(255 255 255 / 9%);
}
#homepage :is(.o-film, .p-research) {
  background: var(--o-base);
}
#homepage :is(.f-work, .f-memory, .f-trial) {
  background: var(--o-raised);
}
#homepage .f-about {
  border-bottom: 0;
}
.f-footer {
  background: #08090a;
}
#homepage .p-carousel-ready .p-photo,
#homepage :is(.p-slide, .p-fallback-scene)::after {
  background: #17181b;
}
#homepage .p-carousel-ready .p-photo {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}
#homepage .f-trial :is(input, textarea, .f-select-trigger, button[aria-haspopup]) {
  background: var(--o-base);
}
#homepage .f-memory :is(.o-tag text, .o-star text) {
  stroke: var(--o-raised);
}
.o-kicker {
  margin: 0 0 16px;
  color: #a9a2e0;
  font-family: var(--o-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}
