/* 极K (jik.kol.bbroot.com) — Landing Page Styles
 * Design tokens calibrated directly to the lhk.ai minimalist dark/light grammar:
 * obsidian canvas, crisp white display type, luminous blue gradient frame, restrained 2×2 gallery.
 */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --page-bg: #ffffff;
  --surface: #f7f8fa;
  --surface-hover: #f0f2f6;
  --header-bg: rgba(255, 255, 255, 0.88);
  --ink: #111214;
  --ink-strong: #050607;
  --muted: #666b73;
  --muted-soft: #8c9199;
  --line: rgba(17, 18, 20, 0.11);
  --line-strong: rgba(17, 18, 20, 0.2);
  --button-bg: #111214;
  --button-text: #ffffff;
  --button-hover: #2a2c30;
  --utility-icon: #525963;
  --utility-hover-bg: rgba(31, 93, 224, 0.12);
  --utility-hover-ink: #1952c7;
  --brand-bg: #111214;
  --brand-fg: #ffffff;
  --media-radius: 14px;
  --media-frame-size: 4px;
  --media-frame: linear-gradient(118deg, #2f6cff 0%, #0a347f 100%);
  --media-shadow: 0 24px 72px rgba(25, 75, 190, 0.16);
  --card-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(15, 23, 42, 0.08);
  --footer-bg: #fafafa;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #090a0c;
  --surface: #111318;
  --surface-hover: #171a21;
  --header-bg: rgba(9, 10, 12, 0.86);
  --ink: #f1f2f3;
  --ink-strong: #ffffff;
  --muted: #a4a8af;
  --muted-soft: #757a83;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --button-bg: #f4f5f6;
  --button-text: #0b0c0e;
  --button-hover: #ffffff;
  --utility-icon: #c7cbd2;
  --utility-hover-bg: rgba(109, 155, 255, 0.16);
  --utility-hover-ink: #b7ccff;
  --brand-bg: #f4f5f6;
  --brand-fg: #090a0c;
  --media-shadow: 0 28px 88px rgba(16, 55, 158, 0.26);
  --card-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(0, 0, 0, 0.32);
  --footer-bg: #090a0c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  transition: background-color 0.24s ease, color 0.24s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

.landing-page {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--page-bg);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---- Header ---- */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  background: transparent;
  transition: background-color 0.22s ease, border-color 0.22s ease;
  border-bottom: 1px solid transparent;
}
.landing-header--scrolled,
.landing-header--menu-open {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.landing-header__inner {
  position: relative;
  width: min(1500px, calc(100% - 48px));
  height: 76px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
}

.landing-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 7.5px;
  overflow: hidden;
  flex: none;
}
.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.brand-mark__bg {
  fill: var(--brand-bg);
}
.brand-mark__fg {
  fill: var(--brand-fg);
}
.brand-word {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 2.5vw, 42px);
}
.desktop-nav a {
  position: relative;
  padding: 10px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.22s ease;
}
.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.landing-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-toggle,
.mobile-menu-trigger {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--utility-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.icon-toggle:hover,
.icon-toggle:focus-visible,
.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus-visible {
  background: var(--utility-hover-bg);
  color: var(--utility-hover-ink);
  outline: none;
}
.icon-toggle svg,
.mobile-menu-trigger svg {
  width: 18px;
  height: 18px;
}

/* Theme icon visibility */
html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }

.header-cta {
  min-height: 46px;
  padding: 5px 6px 5px 20px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.header-cta i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--button-text) 13%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-cta svg {
  width: 17px;
  height: 17px;
}
.header-cta:hover,
.header-cta:focus-visible {
  background: var(--button-hover);
  color: var(--button-text);
  transform: translateY(-2px);
}

.mobile-menu-trigger,
.mobile-nav {
  display: none;
}
.mobile-menu-trigger .menu-close-icon { display: none; }
.landing-header--menu-open .mobile-menu-trigger .menu-open-icon { display: none; }
.landing-header--menu-open .mobile-menu-trigger .menu-close-icon { display: block; }

/* ---- Hero ---- */
#workspace,
#features,
#sources,
#download {
  scroll-margin-top: 84px;
}

.hero-section {
  position: relative;
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
  padding: clamp(54px, 5vw, 82px) 0 88px;
}

.hero-copy {
  max-width: 1180px;
  margin-inline: auto;
  text-align: center;
}
.hero-copy h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(48px, 5.4vw, 84px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.04em;
}
.hero-copy h1 span {
  display: block;
}
.hero-lead {
  max-width: 820px;
  margin: 32px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 18.5px);
  line-height: 1.8;
}

.hero-preview {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: clamp(48px, 5vw, 72px) auto 0;
  padding: var(--media-frame-size);
  overflow: hidden;
  border-radius: var(--media-radius);
  background: var(--media-frame);
  box-shadow: var(--media-shadow);
}
.hero-preview__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--media-radius) - var(--media-frame-size));
  background: #0b0c0e;
}
.hero-preview__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.28s ease;
}
html[data-theme="dark"] .hero-preview__img--dark { opacity: 1; }
html[data-theme="dark"] .hero-preview__img--light { opacity: 0; pointer-events: none; }
html[data-theme="light"] .hero-preview__img--dark { opacity: 0; pointer-events: none; }
html[data-theme="light"] .hero-preview__img--light { opacity: 1; }

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-enter {
  opacity: 0;
  transform: translateY(20px);
  animation: heroEnter 0.74s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-enter--delay-1 { animation-delay: 90ms; }
.hero-enter--delay-2 { animation-delay: 180ms; }

/* ---- 2x2 Gallery ---- */
.landing-gallery {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
  padding: 20px 0 clamp(88px, 9vw, 136px);
}
.landing-gallery h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
.landing-gallery__lead {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

.landing-gallery__grid {
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 28px;
}
.landing-gallery__grid figure {
  margin: 0;
}
.landing-gallery__frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0b0c0e;
  box-shadow: var(--card-shadow);
  cursor: zoom-in;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.landing-gallery__frame:hover,
.landing-gallery__frame:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--line-strong), 0 24px 56px rgba(16, 55, 158, 0.2);
  outline: none;
}
.landing-gallery__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.landing-gallery figcaption {
  margin-top: 18px;
}
.landing-gallery figcaption strong {
  display: block;
  color: var(--ink-strong);
  font-size: 17px;
  font-weight: 500;
}
.landing-gallery figcaption span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ---- Data Sources Strip ---- */
.sources-section {
  border-top: 1px solid var(--line);
  padding: clamp(72px, 7vw, 108px) 0;
}
.sources-inner {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
}
.sources-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 4.5vw, 56px);
}
.sources-head h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(26px, 2.7vw, 38px);
  font-weight: 500;
  line-height: 1.2;
}
.sources-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}
.sources-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.source-item {
  padding: 24px 22px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.source-item__label {
  display: inline-block;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.source-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---- Download Section ---- */
.download-section {
  border-top: 1px solid var(--line);
  padding: clamp(76px, 8vw, 120px) 0;
}
.download-inner {
  width: min(980px, calc(100% - 64px));
  margin-inline: auto;
  text-align: center;
}
.download-inner h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.2;
}
.download-lead {
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.download-cards {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  text-align: left;
}
.dl-card {
  padding: 28px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.dl-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}
.dl-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.os-icon {
  width: 30px;
  height: 30px;
  color: var(--ink-strong);
  flex: none;
}
.dl-card__head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-strong);
}
.dl-card__meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 14.5px;
  font-weight: 500;
  transition: transform 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}
.dl-btn svg {
  width: 17px;
  height: 17px;
}
.dl-btn:hover,
.dl-btn:focus-visible {
  background: var(--button-hover);
  transform: translateY(-1.5px);
}
.dl-btn[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  cursor: default;
  transform: none;
}
.dl-btn[aria-disabled="true"]:hover {
  background: transparent;
  transform: none;
}
.dl-btn[aria-disabled="true"] svg {
  display: none;
}
.dl-card__note {
  margin: -6px 0 0;
  font-size: 12.5px;
  color: var(--muted-soft);
}
.dl-footnote {
  margin: 28px 0 0;
  font-size: 13.5px;
  color: var(--muted-soft);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  padding: 64px 0 72px;
}
.site-footer__inner {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.1fr);
  gap: 32px;
}
.footer-col h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-strong);
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  color: var(--muted);
  font-size: 13.5px;
  transition: color 0.16s ease;
}
.footer-col a:hover {
  color: var(--ink-strong);
}

.footer-brand__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-strong);
}
.footer-brand__slogan {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-brand__copy {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted-soft);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lightbox[hidden] {
  display: none;
}
.lightbox img {
  max-width: min(1360px, 94vw);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 32px 96px rgba(0, 0, 0, 0.65);
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(15, 17, 22, 0.78);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__close svg {
  width: 20px;
  height: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .landing-header__inner {
    width: calc(100% - 36px);
    height: 70px;
    grid-template-columns: 1fr auto;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-menu-trigger {
    display: inline-flex;
  }
  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 2;
    height: calc(100svh - 70px);
    padding: 24px 24px 40px;
    background: var(--page-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .mobile-nav[hidden] {
    display: none;
  }
  .mobile-nav a {
    min-height: 58px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    align-items: center;
    font-size: 17px;
  }
  .mobile-nav .mobile-nav__cta {
    min-height: 50px;
    margin-top: 28px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--button-bg);
    color: var(--button-text);
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
  }
  .sources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root,
  html[data-theme="dark"],
  html[data-theme="light"] {
    --media-radius: 10px;
    --media-frame-size: 2px;
  }
  .landing-header__inner {
    width: calc(100% - 28px);
    height: 64px;
  }
  .landing-header__actions {
    gap: 4px;
  }
  .icon-toggle,
  .mobile-menu-trigger {
    width: 38px;
    height: 38px;
  }
  .header-cta {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
  }
  .header-cta i {
    display: none;
  }
  .hero-section {
    width: calc(100% - 28px);
    padding: 40px 0 60px;
  }
  .hero-copy h1 {
    font-size: clamp(34px, 9.6vw, 48px);
    line-height: 1.08;
    letter-spacing: 0.02em;
  }
  .hero-lead {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.7;
  }
  .hero-preview {
    margin-top: 38px;
  }
  .landing-gallery,
  .sources-inner,
  .download-inner,
  .site-footer__inner {
    width: calc(100% - 28px);
  }
  .landing-gallery {
    padding-bottom: 72px;
  }
  .landing-gallery__grid,
  .sources-grid,
  .download-cards,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .landing-gallery__grid {
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
