/* loads the same local font files on standalone pages and the homepages. */
@import url('/g/fonts.css');

/* defines Kimi's dark fluid visual language across the public website. */
:root {
  --kimi-ink: #050a0f;
  --kimi-ink-soft: #0b1720;
  --kimi-ivory: #ede8e4;
  --kimi-ivory-muted: rgba(237, 232, 228, 0.72);
  --kimi-cyan: #30b0d0;
  --kimi-cyan-bright: #68d6ec;
  --kimi-line: rgba(237, 232, 228, 0.16);
  --kimi-serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --kimi-sans: "Noto Sans SC", "Microsoft YaHei", "Lato", Arial, sans-serif;
}

/* establishes the fluid field and shared typography across the public website. */
body.site-theme {
  isolation: isolate;
  min-height: 100vh;
  background-color: var(--kimi-ink) !important;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(48, 176, 208, 0.16), transparent 32rem),
    radial-gradient(circle at 14% 68%, rgba(15, 80, 120, 0.2), transparent 38rem) !important;
  color: var(--kimi-ivory) !important;
  font-family: var(--kimi-sans) !important;
  font-size: 16px;
  line-height: 1.65;
}

body.site-theme::before {
  animation: kimiAmbientDrift 18s ease-in-out infinite alternate;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(48, 176, 208, 0.12), transparent 48%),
    radial-gradient(ellipse at 80% 72%, rgba(10, 82, 128, 0.16), transparent 52%);
  content: "";
  inset: -18%;
  pointer-events: none;
  position: fixed;
  transform: translate3d(0, 0, 0);
  z-index: -1;
}

.kimi-fluid-canvas {
  height: 100vh;
  inset: 0;
  opacity: 0.58;
  pointer-events: none;
  position: fixed;
  width: 100vw;
  z-index: -1;
}

@keyframes kimiAmbientDrift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.06);
  }
}

/* applies Kimi's editorial type hierarchy to all page content. */
body.site-theme h1,
body.site-theme h2,
body.site-theme h3,
body.site-theme h4 {
  color: #fff !important;
  font-family: var(--kimi-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

body.site-theme p,
body.site-theme a,
body.site-theme li,
body.site-theme label,
body.site-theme input,
body.site-theme select,
body.site-theme textarea,
body.site-theme button {
  font-family: var(--kimi-sans) !important;
}


/* keeps body text and nested inline content on the same locally served homepage font. */
body.site-theme :is(span, strong, em, small, td, th, legend, .label-group) {
  font-family: var(--kimi-sans);
}
body.site-theme :is(h1, h2, h3, h4) :is(a, span, strong, em) {
  font-family: inherit !important;
}

/* matches page titles to the homepage while keeping article sections and card headings compact. */
body.site-theme:not(.index) h1 {
  font-size: 56px !important;
  line-height: 1.15 !important;
  overflow-wrap: anywhere;
}
body.site-theme:not(.index) h2 {
  font-size: 32px !important;
  line-height: 1.25;
}
body.site-theme:not(.index) :is(h3, h4, .os-card__title) {
  font-family: var(--kimi-serif) !important;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card) h2 {
  font-size: 26px !important;
  line-height: 1.3;
}
body.site-theme:not(.index) :is(p, li, .summary, .lead, .hero-copy, .research-card .summary) {
  color: var(--kimi-ivory);
  font-size: 16px;
  line-height: 1.65;
}

/* carries the dark glass surfaces into cards, articles, forms and download dialogs. */
body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card,
  .news-hero, .hero, .article-box, .benchmark-article, .content-section, .feature-card, .related-card,
  .registration-card, .os-card, .modal__panel, .guidelines-modal) {
  background: rgba(7, 19, 28, 0.9);
  border: 1px solid var(--kimi-line);
  border-radius: 12px;
  box-shadow: none;
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.paper-preview, .benchmark-preview, .file-row, .empty-state, .guidelines-modal-shell) {
  background: var(--kimi-ink-soft);
  border-color: var(--kimi-line);
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card, .related-card, .os-card) {
  transition: background-color 240ms ease, border-color 240ms ease, transform 240ms ease;
}
body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card, .related-card, .os-card):is(:hover, :focus-within) {
  background: rgba(12, 31, 43, 0.9);
  border-color: rgba(48, 176, 208, 0.62);
  transform: translateY(-5px);
}

/* preserves legible secondary text and cyan links against the shared dark surfaces. */
body.site-theme:not(.index) :is(.meta, .summary, .lead, .hero-copy, .os-card__meta, .file-details,
  .empty-state, .field-help, .section-note, .terms-status, figcaption, .related-card span, .feature-card p, .site-footer) {
  color: var(--kimi-ivory-muted);
}
body.site-theme:not(.index) :is(a, .cta, .eyebrow, .guidelines-link, .registration-link, .home-news-link) {
  color: var(--kimi-cyan-bright);
}
body.site-theme:not(.index) :is(.news-card, .item-card) > a,
body.site-theme:not(.index) :is(.paper-card, .research-card, .benchmark-card, .related-card, .file-name) {
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) a:hover {
  color: var(--kimi-ivory);
}

/* extends the homepage content width while retaining narrower reading and form columns. */
body.site-theme:not(.index) :is(.wrap, .topbar-inner, .site-header__inner, .page-shell, .content-section, .site-footer),
body.site-theme.product-page .hero {
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: 1468px;
  margin-inline: auto;
}
body.site-theme:not(.index) :is(.wrap, .topbar-inner) {
  padding-inline: 0;
}
body.site-theme.article-page .wrap,
body.site-theme .benchmark-article {
  max-width: 1100px;
}
body.site-theme .registration-card {
  max-width: 1100px;
}
body.site-theme .registration-wrapper {
  width: 100%;
}
body.site-theme :is(.article-box, .benchmark-article) {
  padding: clamp(1.25rem, 4vw, 3rem);
}

/* lets the page background continue through secondary navigation while retaining styled buttons. */
body.site-theme:not(.index) :is(.topbar, .site-header, .registration-header) {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  box-shadow: none;
}
body.site-theme:not(.index) :is(.logo, .site-brand, .home-link, .link, .breadcrumbs a, .registration-header nav a) {
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.home-link, .link, .breadcrumbs, .registration-header nav a) {
  font-size: 0.83rem;
  letter-spacing: 0.04em;
}
body.site-theme:not(.index) :is(.lang, .lang-link, .lang-links a, .language-switch a, .top-link, .button, .file-link, .guidelines-close) {
  background: rgba(5, 10, 15, 0.26);
  border: 1px solid rgba(237, 232, 228, 0.28);
  border-radius: 999px;
  box-shadow: none;
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.lang.active, .lang-link.active, .lang-links a.active, .language-switch a[aria-current="page"]) {
  background: rgba(237, 232, 228, 0.16);
  border-color: var(--kimi-ivory);
  color: var(--kimi-ivory);
}
body.site-theme:not(.index) :is(.button.button--primary, a.file-link, button.guidelines-close) {
  background: var(--kimi-cyan);
  color: var(--kimi-ink);
}
body.site-theme:not(.index) :is(.lang, .lang-link, .lang-links a, .language-switch a, .top-link, .button, .file-link, .guidelines-close):hover {
  background: var(--kimi-cyan-bright);
  border-color: var(--kimi-cyan-bright);
  color: var(--kimi-ink);
}
body.site-theme .registration-header .logo-link img {
  content: url('/images/synacore-white.svg');
}

/* styles controls and validation feedback for the dark registration form without altering validation. */
body.site-theme.registration-page :is(.label-group, label, .terms-prefix) {
  color: var(--kimi-ivory);
  font-family: var(--kimi-sans);
}
body.site-theme.registration-page :is(input, textarea, select) {
  background: var(--kimi-ink-soft);
  border-color: rgba(237, 232, 228, 0.35);
  color: var(--kimi-ivory);
  color-scheme: dark;
  accent-color: var(--kimi-cyan-bright);
  font-size: 16px;
}
body.site-theme.registration-page :is(input, textarea)::placeholder {
  color: var(--kimi-ivory-muted);
  opacity: 1;
}
body.site-theme.registration-page :is(input, textarea, select):focus {
  border-color: var(--kimi-cyan-bright);
  box-shadow: 0 0 0 3px rgba(48, 176, 208, 0.2);
}
body.site-theme.registration-page :is(.field-validation, .status-message.error) {
  color: #ffaaa3;
}
/* retains compact password guidance beneath the form field. */
body.site-theme.registration-page .field-validation {
  font-size: 0.78rem;
  line-height: 1.35;
}
body.site-theme.registration-page :is(.terms-status.accepted, .status-message.success) {
  color: #8ce4b4;
}
body.site-theme.registration-page .status-message {
  color: var(--kimi-cyan-bright);
}
body.site-theme.registration-page #submit-button {
  background: #293841;
  color: #b9c3c9;
}
body.site-theme.registration-page #submit-button.enabled {
  background: var(--kimi-cyan);
  color: var(--kimi-ink);
}
body.site-theme :is(.guidelines-modal-footer, .modal__panel, .file-row) {
  border-color: var(--kimi-line);
}
body.site-theme .modal__close {
  background: var(--kimi-ink-soft);
  color: var(--kimi-ivory);
}
body.site-theme .guidelines-modal::backdrop,
body.site-theme .modal {
  background: rgba(5, 10, 15, 0.78);
}

/* preserves visible keyboard focus on navigation, cards, dialogs and form controls. */
body.site-theme:not(.index) :is(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--kimi-cyan-bright);
  outline-offset: 3px;
}

/* brings the exported legal pages onto the same readable dark article surface. */
body.site-theme :is(#ed-1122202135, #ed-1122202117) > .inner {
  background: rgba(7, 19, 28, 0.9);
  border: 1px solid var(--kimi-line);
  border-radius: 12px;
  color: var(--kimi-ivory);
  margin-block: 2rem;
  padding: clamp(1.25rem, 4vw, 3rem) !important;
}
body.site-theme :is(#ed-1122202135, #ed-1122202117) :is(p, li) {
  color: var(--kimi-ivory) !important;
}
body.site-theme:not(.index) :is(.back-button, .back-button > .inner) {
  background: transparent !important;
}
body.site-theme:not(.index) .back-button a {
  border-radius: 999px;
  background: var(--kimi-ink-soft) !important;
  color: var(--kimi-ivory) !important;
}

/* reduces heading sizes and wraps navigation at the same homepage breakpoints. */
@media screen and (max-width: 975px) {
  body.site-theme:not(.index) h1 { font-size: 46px !important; }
  body.site-theme:not(.index) h2 { font-size: 28px !important; }
  body.site-theme:not(.index) :is(.topbar-inner, .site-header__inner, .top-left, .breadcrumbs, .nav-left, .nav-right) {
    flex-wrap: wrap;
  }
  .kimi-fluid-canvas { opacity: 0.46; }
}
@media screen and (max-width: 600px) {
  body.site-theme:not(.index) h1 { font-size: 36px !important; }
  body.site-theme:not(.index) h2 { font-size: 26px !important; }
  body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card) h2 {
    font-size: 24px !important;
  }
  body.site-theme.registration-page .registration-card { padding: 1.25rem; }
  body.site-theme.registration-page .guidelines-modal-body { padding: 1.25rem; }
  /* lets the form shrink to mobile width instead of clipping fixed-width option columns. */
  body.site-theme.registration-page .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  body.site-theme.registration-page .options-list-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  body.site-theme.registration-page .options-list-3 > :nth-child(3) {
    grid-column: auto;
    margin-left: 0;
  }
  body.site-theme.registration-page .options-list-3 .inline-other label {
    column-gap: 0.6rem;
  }
  body.site-theme.registration-page .inline-other input[type="checkbox"] {
    margin-left: 0;
  }
}

/* reveals the same compact cards and homepage sections prepared by the shared visual script. */
body.site-theme.kimi-motion-ready .kimi-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--kimi-reveal-delay, 0ms),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--kimi-reveal-delay, 0ms);
}
body.site-theme.kimi-motion-ready .kimi-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* keeps the shared theme still when the visitor requests reduced motion. */
@media (prefers-reduced-motion: reduce) {
  body.site-theme::before { animation: none; }
  body.site-theme .kimi-reveal { transition: none !important; }
  body.site-theme:not(.index) :is(.news-card, .paper-card, .item-card, .research-card, .benchmark-card, .related-card, .os-card) {
    transition: none;
    transform: none;
  }
}
