/* =========================================================================
   DeepSeek Harness Desktop Editions — shared stylesheet
   All color/interaction styling is driven by CSS custom properties that
   switch on the <html data-theme="..."> attribute, with a no-JS fallback.
   ========================================================================= */

/* ------------------------------------------------------------------ tokens */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", SFMono-Regular, Consolas,
    "Liberation Mono", Menlo, monospace;

  /* light palette */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #17181c;
  --muted: #5b6270;
  --hairline: #e4e7ef;
  --hairline-strong: #d2d7e4;

  --accent: #4d6bfe;
  --accent-strong: #3a55e8;
  --accent-contrast: #ffffff;
  --accent-soft: #eef1ff;
  --accent-soft-border: #dfe4ff;
  --accent-glow: rgba(77, 107, 254, 0.32);

  --tag-bg: #eef1f7;
  --tag-text: #5b6270;

  --nav-bg: rgba(246, 247, 251, 0.82);
  --shadow-soft: 0 2px 12px rgba(23, 24, 28, 0.05);

  /* hero flourish */
  --glow-a: rgba(77, 107, 254, 0.16);
  --grid-line: rgba(23, 24, 28, 0.035);

  /* app-window shadow */
  --shot-shadow: 0 18px 42px -14px rgba(23, 24, 28, 0.22),
    0 3px 10px -2px rgba(23, 24, 28, 0.08);
  --shot-shadow-hover: 0 34px 68px -20px rgba(23, 24, 28, 0.36),
    0 12px 26px -8px rgba(23, 24, 28, 0.14), 0 0 0 1px var(--accent-glow),
    0 14px 52px -10px var(--accent-glow);

  --ring: var(--accent);

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: 1120px;
}

/* dark palette (mirrored from the @media fallback below) */
html[data-theme="dark"] {
  --bg: #0a0c11;
  --surface: #12151e;
  --surface-2: #171b26;
  --text: #eceef3;
  --muted: #99a1b2;
  --hairline: #232837;
  --hairline-strong: #2e3646;

  --accent: #7c93ff;
  --accent-strong: #95a7ff;
  --accent-contrast: #0c101c;
  --accent-soft: #1a1f2c;
  --accent-soft-border: #2a3146;
  --accent-glow: rgba(124, 147, 255, 0.30);

  --tag-bg: #171b26;
  --tag-text: #99a1b2;

  --nav-bg: rgba(10, 12, 17, 0.82);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.4);

  --glow-a: rgba(124, 147, 255, 0.10);
  --grid-line: rgba(236, 238, 243, 0.045);

  --shot-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.6),
    0 3px 12px -2px rgba(0, 0, 0, 0.5);
  --shot-shadow-hover: 0 36px 70px -18px rgba(0, 0, 0, 0.78),
    0 14px 30px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-glow),
    0 14px 52px -8px var(--accent-glow);
}

/* no-JS fallback: when the inline head script is absent the <html> has no
   theme attribute, so mirror the dark token set to match the OS preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0c11;
    --surface: #12151e;
    --surface-2: #171b26;
    --text: #eceef3;
    --muted: #99a1b2;
    --hairline: #232837;
    --hairline-strong: #2e3646;
    --accent: #7c93ff;
    --accent-strong: #95a7ff;
    --accent-contrast: #0c101c;
    --accent-soft: #1a1f2c;
    --accent-soft-border: #2a3146;
    --accent-glow: rgba(124, 147, 255, 0.3);
    --tag-bg: #171b26;
    --tag-text: #99a1b2;
    --nav-bg: rgba(10, 12, 17, 0.82);
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.4);
    --glow-a: rgba(124, 147, 255, 0.1);
    --grid-line: rgba(236, 238, 243, 0.045);
    --shot-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.6),
      0 3px 12px -2px rgba(0, 0, 0, 0.5);
    --shot-shadow-hover: 0 36px 70px -18px rgba(0, 0, 0, 0.78),
      0 14px 30px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-glow),
      0 14px 52px -8px var(--accent-glow);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(64px + 22px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:active,
.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------- container */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* --------------------------------------------------------------- typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.72rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  border-radius: 999px;
  white-space: normal;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.section-eyebrow::before {
  content: "$";
  color: var(--accent);
  margin-right: 0.4rem;
}

.section {
  padding-block: clamp(4rem, 8vw, 6rem);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}
.section-lede {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease),
    transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
  box-shadow: 0 8px 22px -10px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--hairline);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.icon-btn:hover {
  color: var(--accent);
  border-color: var(--hairline-strong);
}
.icon-btn svg {
  display: block;
}

/* theme-toggle icon swap: in light mode show the moon (click -> dark),
   in dark mode show the sun (click -> light).
   `.icon-btn` prefix keeps these above `.icon-btn svg { display:block }`. */
.icon-btn .i-sun {
  display: none;
}
.icon-btn .i-moon {
  display: block;
}
html[data-theme="dark"] .icon-btn .i-sun {
  display: block;
}
html[data-theme="dark"] .icon-btn .i-moon {
  display: none;
}

/* ------------------------------------------------------------------- nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.brand-suffix {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
.nav-links a {
  padding: 0.42rem 0.7rem;
  font-size: 0.92rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.lang-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.42rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lang-link:hover {
  color: var(--accent);
  border-color: var(--hairline-strong);
}

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(3rem, 6vw, 4.5rem);
}
/* subtle background flourish (radial glow + faint grid) — adapts to theme */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
      60% 55% at 78% 20%,
      var(--glow-a) 0%,
      transparent 68%
    ),
    repeating-linear-gradient(
      90deg,
      var(--grid-line) 0 1px,
      transparent 1px 64px
    ),
    repeating-linear-gradient(
      0deg,
      var(--grid-line) 0 1px,
      transparent 1px 64px
    );
}
.hero > .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  /* copy : screenshot = 1 : 1.44 → the shot renders ~1.5× its former size
     (screenshot column ≈ 722px vs ~477px when the hero container maxes out) */
  grid-template-columns: 1fr 1.44fr;
  gap: clamp(2.25rem, 5vw, 3.75rem);
  align-items: center;
}

/* the hero gets extra room so the product screenshot can be large */
.hero .container {
  max-width: 1380px;
}

.hero-copy {
  min-width: 0;
}
.hero-copy h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-copy .lede {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.trust {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-wrap: balance;
}

/* supported-platform strip — the "four desktops" emphasis under the lede */
.os-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin-top: 1.3rem;
  padding: 0;
  list-style: none;
}
.os-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.os-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: none;
}

/* hero load-in: subtle fade/slide for the copy block + the shot only */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-copy > * {
  animation: riseIn 0.6s var(--ease) backwards;
}
.hero-copy > *:nth-child(1) {
  animation-delay: 0.02s;
}
.hero-copy > *:nth-child(2) {
  animation-delay: 0.1s;
}
.hero-copy > *:nth-child(3) {
  animation-delay: 0.18s;
}
.hero-copy > *:nth-child(4) {
  animation-delay: 0.26s;
}
.hero-copy > *:nth-child(5) {
  animation-delay: 0.34s;
}
.hero-copy > *:nth-child(6) {
  animation-delay: 0.42s;
}
.hero-shot {
  animation: riseIn 0.7s var(--ease) 0.14s backwards;
}

/* app-window presentation of the screenshot */
.hero-visual {
  min-width: 0;
}
.hero-shot {
  margin: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shot-shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.65s var(--ease);
  will-change: transform;
}
.hero-shot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shot-shadow-hover);
}
.hero-shot img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 1px);
}

/* screenshot theme swap — pure CSS, before JS runs.
   Default (no attribute): follow the OS. */
img[data-shot="dark"] {
  display: none;
}
img[data-shot="light"] {
  display: block;
}
@media (prefers-color-scheme: dark) {
  img[data-shot="light"] {
    display: none;
  }
  img[data-shot="dark"] {
    display: block;
  }
}
/* explicit attribute (set by the inline head script) always wins */
html[data-theme="light"] img[data-shot="dark"] {
  display: none;
}
html[data-theme="light"] img[data-shot="light"] {
  display: block;
}
html[data-theme="dark"] img[data-shot="light"] {
  display: none;
}
html[data-theme="dark"] img[data-shot="dark"] {
  display: block;
}

.shot-caption {
  margin-top: 0.9rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* --------------------------------------------------------------- features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
}
.feature-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- platforms */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.8rem 1.6rem;
}

.platform-head h3 {
  font-size: 1.28rem;
  letter-spacing: -0.015em;
}
.platform-tag {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.3rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--tag-text);
  background: var(--tag-bg);
  border-radius: var(--radius-sm);
}

.bullet-list {
  list-style: none;
  margin: 1.4rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.72rem;
}
.bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.repo-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  transition: color 0.2s var(--ease);
}
.repo-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.repo-link svg {
  transition: transform 0.2s var(--ease);
}
.repo-link:hover svg {
  transform: translateX(3px);
}

.disclaimer {
  margin-top: 1.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ how it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 1.1rem;
}

.step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.4rem 1.4rem 1.4rem 1.15rem;
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: var(--radius-lg);
}
.step:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -1.72rem;
  top: 1.6rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  font-family: var(--font-mono);
}
.step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
}
.step h3 {
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.step p {
  color: var(--muted);
  font-size: 0.92rem;
}

.result-badge {
  margin-top: 1.7rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-md);
}

/* ----------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding-block: clamp(2.6rem, 5vw, 3.6rem);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.footer-one-liner {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 24rem;
  font-size: 0.95rem;
}
.footer-copy {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 36rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.3rem;
  align-content: flex-start;
  min-width: 12rem;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-links .ext {
  opacity: 0.6;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-copy .lede {
    max-width: 40rem;
  }
  .hero-visual {
    margin-top: 0.5rem;
  }
}

@media (max-width: 820px) {
  .feature-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-suffix {
    font-size: 0.78rem;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-row .btn {
    justify-content: center;
  }
  /* stack steps vertically and drop the arrow connectors */
  .steps {
    flex-direction: column;
    gap: 1rem;
  }
  .step:not(:last-child)::after {
    content: none;
  }
  .footer-grid {
    flex-direction: column;
    gap: 1.6rem;
  }
}
