/* PuriArk AI — research team site for ai.puriark.cn
   Type: Clash Display (variable, 200–700) + HarmonyOS Sans SC (subset, 300/400/500)
   Same family as puriark.cn: sky blue, paper white, blue-grey ink */

:root {
  --sky-deep: #14347F;
  --sky-dark: #0F2760;
  --sky-mid: #1B4C9C;
  --sky-line: rgba(255, 255, 255, .22);
  --ink: #0F1B33;
  --dim: #5D6B85;
  --hair: #E6EAF1;
  --paper: #FFFFFF;
  --paper-soft: #F7F9FC;

  --maxw: 1252px;
  --pad: clamp(24px, 5vw, 56px);
  --nav-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@font-face {
  font-family: "Clash Display";
  src: url("../fonts/ClashDisplay-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

/* HarmonyOS Sans SC — subset (site glyphs only), weights 300/400/500 */
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("../fonts/harmonyos-sc-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("../fonts/harmonyos-sc-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("../fonts/harmonyos-sc-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Clash Display", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-synthesis-weight: none;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sky-deep); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F2F4F8; }
::-webkit-scrollbar-thumb { background: #C9D2E0; border-radius: 5px; border: 2px solid #F2F4F8; }
::-webkit-scrollbar-thumb:hover { background: #AEBACD; }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--sky-mid); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  color: #fff;
  transition:
    background-color .45s var(--ease),
    color .45s var(--ease),
    box-shadow .45s var(--ease),
    opacity 1s var(--ease) .8s;
}

.nav__brand {
  display: inline-block;
  font-size: 15px;
  letter-spacing: .22em;
  margin-right: -.22em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
}

.nav__links a {
  position: relative;
  padding: 4px 0;
  font-size: 14px;
  letter-spacing: .02em;
  opacity: .92;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__contact { font-weight: 500; }

.nav__lang {
  position: relative;
  padding: 4px 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 14px;
  letter-spacing: .04em;
  color: inherit;
  opacity: .92;
  cursor: pointer;
}

.nav__lang::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.nav__lang:hover { opacity: 1; }
.nav__lang:hover::after { transform: scaleX(1); }

.nav.is-scrolled {
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--hair);
}

/* ---- Hero: a solid sky world ---- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky-deep);
  color: #fff;
  overflow: hidden;
}

.hero__inner { text-align: center; }

.hero__wordmark {
  font-size: clamp(38px, min(13vh, 9.5vw), 150px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: .055em;
  margin-right: -.055em;
}

.hero__wordmark span { display: inline-block; }
.hero__wordmark .hero__gap { width: .3em; }

.hero__tagline {
  margin-top: clamp(18px, 3.4vh, 36px);
  font-size: clamp(11px, 1.25vh, 13px);
  letter-spacing: .32em;
  text-indent: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .86);
}

.hero__cue {
  position: absolute;
  bottom: clamp(22px, 5vh, 48px);
  left: 50%;
  width: 1px;
  height: clamp(40px, 7vh, 64px);
  background: rgba(255, 255, 255, .26);
  overflow: hidden;
  transform: translateX(-0.5px);
}

.hero__cue::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .9));
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: translateY(0); }
  60%, 100% { transform: translateY(350%); }
}

/* ---- Sections ---- */

.section { padding: clamp(96px, 15vh, 168px) 0; }
.about { background: var(--paper); }
.research { background: var(--paper-soft); }
.results { background: var(--paper); }
.principles { background: var(--paper-soft); }
.apps { background: var(--sky-deep); color: #fff; }

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(22px, 4vh, 40px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dim);
}

.label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.label--light { color: rgba(255, 255, 255, .78); }

section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

.statement {
  margin-bottom: clamp(26px, 4.5vh, 44px);
  font-size: clamp(2.3rem, 5.6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: .01em;
  text-wrap: balance;
}

.lede {
  max-width: 33em;
  font-size: clamp(15px, 1.6vh, 17.5px);
  line-height: 1.85;
  color: var(--dim);
}

.lede--light { color: rgba(255, 255, 255, .74); }

.section__title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.005em;
  text-wrap: balance;
}

.section__title + .lede { margin-top: clamp(16px, 2.4vh, 26px); }

/* ---- Quiet underlined links ---- */

.results__link,
.apps__link,
.skybreak__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(30px, 5vh, 46px);
  padding-bottom: 7px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--hair);
  transition: border-color .3s var(--ease), opacity .3s var(--ease);
}

.apps__link,
.skybreak__mail { color: #fff; border-bottom-color: var(--sky-line); }

.results__link:hover,
.apps__link:hover,
.skybreak__mail:hover { border-bottom-color: currentColor; }

.arrow {
  display: inline-block;
  font-weight: 300;
  transition: transform .45s var(--ease);
}

.results__link:hover .arrow,
.apps__link:hover .arrow,
.skybreak__mail:hover .arrow { transform: translateX(6px); }

/* ---- Research: four directions, hairline grid ---- */

.research__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(48px, 8vh, 88px);
  border-top: 1px solid var(--hair);
}

.research__item {
  padding: clamp(26px, 4vh, 40px) clamp(20px, 2.6vw, 36px) clamp(30px, 5vh, 46px);
  border-bottom: 1px solid var(--hair);
}

.research__item:nth-child(odd) { border-right: 1px solid var(--hair); padding-left: 0; }
.research__item:nth-child(even) { padding-right: 0; }

.research__item h3 {
  margin-bottom: 12px;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: .02em;
}

.research__item p {
  max-width: 30em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--dim);
}

/* ---- Principles: three columns, like the parent site ---- */

.principles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(40px, 7vh, 72px);
}

.principles__col { padding-right: clamp(20px, 2.6vw, 36px); }

.principles__col + .principles__col {
  border-left: 1px solid var(--hair);
  padding-left: clamp(20px, 2.6vw, 36px);
}

.principles__col h3 {
  margin-bottom: 14px;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: .02em;
}

.principles__col p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--dim);
}

/* ---- Sky break: the one photograph ---- */

.skybreak {
  position: relative;
  min-height: min(84vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--sky-deep);
  text-align: center;
}

.skybreak__bg {
  position: absolute;
  inset: -18% 0;
  background: url("../img/sky.jpg") center 62% / cover no-repeat;
  will-change: transform;
}

.skybreak__veil {
  position: absolute;
  inset: 0;
  background: rgba(10, 26, 64, .42);
}

.skybreak__content {
  position: relative;
  z-index: 2;
  padding: clamp(60px, 12vh, 120px) var(--pad);
  color: #fff;
}

.skybreak .label { justify-content: center; }

.skybreak__line {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: .02em;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(10, 26, 64, .35);
}

.skybreak__mail {
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  font-weight: 300;
}

.skybreak__note {
  margin: clamp(18px, 3vh, 28px) auto 0;
  max-width: 30em;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .72);
}

/* ---- Footer ---- */

.footer {
  padding: 44px 0;
  background: var(--sky-dark);
  color: #fff;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer__brand {
  font-size: 14px;
  letter-spacing: .22em;
  margin-right: -.22em;
}

.footer__links {
  display: inline-flex;
  gap: clamp(16px, 2.4vw, 28px);
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
}

.footer__links a { transition: color .3s var(--ease); }
.footer__links a:hover { color: #fff; }

.footer__copy { font-size: 13px; color: rgba(255, 255, 255, .72); }

/* ---- Motion ---- */

.js .reveal { opacity: 0; transform: translateY(26px); }

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.research__grid .reveal:nth-child(2) { transition-delay: .08s; }
.research__grid .reveal:nth-child(3) { transition-delay: .16s; }
.research__grid .reveal:nth-child(4) { transition-delay: .24s; }

.principles__grid .reveal:nth-child(2) { transition-delay: .1s; }
.principles__grid .reveal:nth-child(3) { transition-delay: .2s; }

.js .hero__wordmark span,
.js .hero__tagline { opacity: 0; }

.js .hero__wordmark span {
  transform: translateY(.35em);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i) * .05s);
}

.js .hero__tagline {
  transform: translateY(10px);
  transition: opacity .9s var(--ease) .6s, transform .9s var(--ease) .6s;
}

.js .nav { opacity: 0; }

body.is-loaded .hero__wordmark span,
body.is-loaded .hero__tagline {
  opacity: 1;
  transform: none;
}

body.is-loaded .nav { opacity: 1; }

/* ---- Responsive ---- */

@media (max-width: 860px) {
  :root { --nav-h: 60px; }

  .nav__links a:not(.nav__contact) { display: none; }

  .hero__wordmark { font-size: clamp(38px, min(13vh, 10.5vw), 150px); }

  .statement { font-size: clamp(1.85rem, 7.2vw, 2.5rem); }

  .section__title { font-size: clamp(1.6rem, 6.4vw, 2.2rem); }

  .skybreak__line { font-size: clamp(1.6rem, 6.6vw, 2.4rem); }

  .research__grid { grid-template-columns: 1fr; }

  .research__item:nth-child(odd) {
    border-right: 0;
    padding-left: 0;
  }

  .research__item:nth-child(even) { padding-right: 0; }

  .principles__grid { grid-template-columns: 1fr; }

  .principles__col { padding: 26px 0; }

  .principles__col + .principles__col {
    border-left: 0;
    border-top: 1px solid var(--hair);
    padding-left: 0;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .hero__wordmark span,
  .js .hero__tagline,
  .js .nav { opacity: 1; transform: none; }
  .hero__cue::after { animation: none; }
}
