/* ==========================================================================
   Neodigi — unsloth.ai-inspired layout, single dark purple theme
   Page #120c24 / text #f3f0fb / accent #9b7fe6 (Micro Slats hero follows --accent)
   ========================================================================== */

:root {
  color-scheme: dark;
  --ink: #f3f0fb;
  --muted: #cfc6ee;
  --subtle: #9d93bf;
  --paper: #120c24;
  --soft: #1b1436;
  --card: #1e1739;
  --line: rgba(214, 202, 255, 0.10);
  --accent: #9b7fe6;
  --accent-hover: #b39cf0;
  --accent-text: #b9a4f5;
  --accent-pale: rgba(155, 127, 230, 0.16);
  --on-accent: #120c24;
  --live: #4ade80;
  --btn-solid: #f3f0fb;
  --btn-solid-text: #120c24;
  --btn-solid-hover: #ffffff;
  --grid-line: rgba(155, 127, 230, 0.07);
  --grad-a: rgba(155, 127, 230, 0.22);
  --grad-b: rgba(124, 92, 230, 0.18);
  --grad-base: linear-gradient(135deg, #2c1f5c 0%, #1d1440 55%, #261a52 100%);
  --shadow-soft: 0 14px 42px rgba(4, 0, 18, 0.55);
  --shadow-card: 0 1px 2px rgba(4, 0, 18, 0.45), 0 10px 30px rgba(4, 0, 18, 0.4);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --shell: 1080px;
  --r-lg: 42px;
  --r-md: 24px;
  --r-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 200ms ease, color 200ms ease;
}

body::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Layout shell — content is constrained (no more 100%-width walls)
   -------------------------------------------------------------------------- */

.shell {
  width: min(var(--shell), calc(100% - 32px));
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Floating pill navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 100;
  padding: 0 16px;
}

.nav-row {
  width: min(var(--shell), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  padding: 8px 10px 8px 14px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 8px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.language-switch button {
  min-width: 40px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 140ms ease, color 140ms ease;
}

.language-switch button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.store-btn {
  padding: 9px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 140ms ease;
}

.store-btn:hover {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero — rounded card, grid + radial accent gradients
   -------------------------------------------------------------------------- */

.hero {
  margin: 18px 16px 0;
  padding: 96px 0 84px;
  border-radius: 48px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 8% 12%, var(--grad-a), transparent 35%),
    radial-gradient(circle at 92% 82%, var(--grad-b), transparent 34%),
    var(--grad-base);
  background-size: 88px 88px, 88px 88px, auto, auto, auto;
}

/* Micro Slats canvas 背景层（reactbits.dev 原版 WebGL2 着色器移植，见 micro-slats.js） */
.hero-slat {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
}

.hero .shell {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
}

.hero-copy {
  max-width: 560px;
}

.announcement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 30px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow-card);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.announce-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 7.6vw, 104px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.052em;
  color: var(--ink);
}

.hero-dot {
  color: var(--accent);
}

.hero-sub {
  max-width: 480px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.hero-visual {
  position: relative;
  margin: 0;
}

.hero-visual img {
  width: 100%;
  border-radius: 40px;
  box-shadow: var(--shadow-soft);
}

.hero-visual img {
  border: 1px solid rgba(185, 164, 245, 0.22);
}

.hero-chip {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

/* --------------------------------------------------------------------------
   Buttons — pills
   -------------------------------------------------------------------------- */

.btn {
  min-height: 56px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--btn-solid);
  color: var(--btn-solid-text);
}

.btn-primary:hover {
  background: var(--btn-solid-hover);
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  background: var(--soft);
}

.btn-big {
  min-height: 64px;
  padding: 0 36px;
  font-size: 18px;
}

.text-link {
  padding: 10px 2px;
  border-bottom: 1.5px solid var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease;
}

.text-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Proof strip — quiet, not a loud band
   -------------------------------------------------------------------------- */

.proof-strip {
  padding: 32px 0 0;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
}

.proof-row > span[data-i18n] {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}

.proof-dot {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Product sections
   -------------------------------------------------------------------------- */

.product {
  padding: 80px 0 24px;
}

.product-alt {
  padding-top: 40px;
}

.product-head {
  max-width: 780px;
  margin-bottom: 54px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 26px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-pale);
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kicker-on-grad {
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}

h2 {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.046em;
}

.lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

/* Media card — screenshot in a rounded white frame */

.media-card {
  margin: 0;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-sm);
}

.media-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 16px 10px 6px;
}

.media-card figcaption span:first-child {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.media-card figcaption span:last-child {
  font-size: 14px;
  color: var(--muted);
}

.media-wide {
  width: 100%;
  margin: 64px auto 0;
}

.media-wide img {
  aspect-ratio: 786 / 538;
  object-fit: contain;
  background: var(--soft);
}

.media-wide figcaption {
  justify-content: center;
  text-align: center;
}

.media-wide figcaption span {
  font-size: 14px;
  color: var(--muted);
}

/* Feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-card {
  min-height: 250px;
  padding: 26px 24px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 18px 44px rgba(0, 0, 0, 0.08);
}

.feature-num {
  display: inline-block;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.feature-card h3,
.principle-card h3 {
  margin: 40px 0 12px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.feature-card p,
.principle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 56px;
}

/* Duo cards (workflow) */

.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.duo-card {
  margin: 0;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.duo-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--soft);
  border-radius: var(--r-sm);
}

.duo-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 8px 8px;
}

.duo-label {
  color: var(--accent-text);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.duo-card figcaption strong {
  max-width: 460px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Mouse product layout */

.mouse-layout {
  display: grid;
  grid-template-columns: minmax(300px, 480px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  margin-top: 8px;
}

.mouse-guide {
  margin: 0;
}

.mouse-guide img {
  width: 100%;
  aspect-ratio: 556 / 600;
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.mouse-copy {
  max-width: 640px;
}

.statement {
  margin: 0 0 26px;
  color: var(--accent-text);
  font-size: clamp(40px, 4.6vw, 60px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.mouse-copy > p:not(.statement) {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.mouse-copy .actions {
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   Approach — principles on soft background
   -------------------------------------------------------------------------- */

.approach {
  margin-top: 96px;
  padding: 96px 0;
  background: var(--soft);
}

.approach h2 {
  max-width: 820px;
}

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}

.principle-card {
  min-height: 260px;
  padding: 28px 28px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------------------
   CTA — rounded gradient card
   -------------------------------------------------------------------------- */

.cta {
  padding: 24px 0 96px;
}

.cta-card {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 80px 40px;
  border-radius: var(--r-lg);
  text-align: center;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, var(--grad-a), transparent 40%),
    radial-gradient(circle at 80% 80%, var(--grad-b), transparent 40%),
    var(--grad-base);
  background-size: 88px 88px, 88px 88px, auto, auto, auto;
}

.cta-card h2 {
  max-width: 720px;
}

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

.site-footer {
  padding: 88px 0 36px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px 32px;
  align-items: start;
}

.footer-intro .logo {
  margin-bottom: 18px;
}

.footer-intro p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.footer-col a {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.copyright {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-note {
  margin: 0;
  font-size: 14px;
  color: var(--subtle);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 991px) {
  .hero {
    margin: 14px 12px 0;
    padding: 84px 0 72px;
    border-radius: 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero h1 {
    font-size: clamp(56px, 10vw, 84px);
  }

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

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

  .footer-intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .site-header {
    top: 10px;
    padding: 0 12px;
  }

  .nav-row {
    gap: 12px;
    padding: 8px 10px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
  }

  .nav-links a {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 16px;
  }

  .nav-links a:hover {
    background: var(--soft);
  }

  .nav-links:not(.is-open) {
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .store-btn {
    display: none;
  }

  .hero {
    margin: 12px 10px 0;
    padding: 64px 0 56px;
    border-radius: 30px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-visual img {
    border-radius: 26px;
  }

  .proof-row {
    flex-direction: column;
    gap: 10px;
  }

  .proof-dot {
    display: none;
  }

  .shell {
    width: calc(100% - 28px);
  }

  .product {
    padding: 72px 0 16px;
  }

  .product-head {
    margin-bottom: 36px;
  }

  h2 {
    font-size: clamp(38px, 9vw, 52px);
  }

  .feature-grid,
  .duo-grid,
  .principles {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .principle-card {
    min-height: 0;
  }

  .mouse-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .mouse-guide {
    width: min(100%, 440px);
    margin: 0 auto;
  }

  .mouse-guide img {
    aspect-ratio: auto;
    object-fit: contain;
    background: var(--soft);
  }

  .mouse-copy .btn {
    width: 100%;
    justify-content: center;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
  }

  .actions .text-link {
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  .approach {
    margin-top: 64px;
    padding: 72px 0;
  }

  .cta {
    padding: 16px 0 72px;
  }

  .cta-card {
    min-height: 0;
    padding: 64px 24px;
    border-radius: 30px;
  }

  .cta-card .btn {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    padding: 64px 0 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .feature-card,
  .btn {
    transition: none;
  }
}