:root {
  --page-bg: #f0f0f0;
  --brand-orange: #ff6e14;
  --card-bg: #ffffff;
  --soft-card-bg: #e6e6e6;
  --text: #1f1f1f;
  --muted: #9d9d9d;
  --gap: 25px;
  --radius: 24px;
  --page-max: 1200px;

  /* Layout tuning: design.png is visually close to balanced columns.
     Change to 38.2fr / 61.8fr here if you need a strict golden-ratio split. */
  --left-column: minmax(0, 0.98fr);
  --right-column: minmax(0, 1fr);

  /* Left-card background image tuning. Adjust these three values to fine-tune logo_pixels.png. */
  --pixel-bg-size: 100%;
  --pixel-bg-right: -23%;
  --pixel-bg-bottom: -16%;

  /* Usage-card illustration tuning. */
  --paste-img-width: 130%;
  --paste-img-left: -79%;
  --paste-img-bottom: 12%;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
}

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

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

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

[data-current-lang="zh"] [data-lang="en"],
[data-current-lang="en"] [data-lang="zh"],
[data-current-lang="zh"] .target-zh,
[data-current-lang="en"] .target-en {
  display: none;
}

.page-shell {
  width: min(calc(100% - 48px), var(--page-max));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 40px) 0 clamp(18px, 3vh, 28px);
  display: flex;
  flex-direction: column;
}

.bento {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: var(--left-column) var(--right-column);
  gap: var(--gap);
  align-items: stretch;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

/* ── Card hover: scale + shadow ── */

[data-hover="card"] {
  will-change: transform;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

[data-hover="card"]:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.hero-card[data-hover="card"]:hover {
  box-shadow: 0 16px 40px rgba(111, 38, 0, 0.15);
}

.hero-card {
  min-height: clamp(600px, 78vh, 665px);
  isolation: isolate;
  background: var(--brand-orange);
  color: #fff;
}

.hero-card::after {
  position: absolute;
  right: var(--pixel-bg-right);
  bottom: var(--pixel-bg-bottom);
  z-index: -1;
  width: var(--pixel-bg-size);
  aspect-ratio: 1464 / 1306;
  content: "";
  background: url("imgs/logo_pixels.webp") center / contain no-repeat;
  opacity: 0.11;
  pointer-events: none;
  will-change: transform;
  transform: translate(var(--parallax-x, 0px), var(--parallax-y, 0px));
  transition: transform 0.2s ease-out;
}

.language-switch {
  position: absolute;
  top: 40px;
  right: 42px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.language-switch img {
  width: 20px;
  height: 20px;
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 44px 42px 42px;
  display: flex;
  flex-direction: column;
}

.brand-logo {
  width: 52px;
  height: auto;
  margin-bottom: 42px;
}

.brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 4vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 600;
}

.subtitle {
  margin: 10px 0 0;
  color: #fff;
  font-size: clamp(15px, 1.5vw, 15px);
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.intro {
  width: min(100%, 560px);
  margin-top: clamp(32px, 6vh, 44px);
  color: #fff;
  font-size: clamp(15px, 1.3vw, 15px);
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.intro p {
  margin: 0;
}

.intro p + p {
  margin-top: 24px;
}

.cta-group {
  margin-top: auto;
  padding-top: 40px;
  width: fit-content;
  text-align: center;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 144px;
  min-height: 48px;
  padding: 0 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-orange);
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 10px 28px rgba(111, 38, 0, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(111, 38, 0, 0.13);
}

.download-button:focus-visible,
.language-switch:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 4px;
}

.site-footer a:focus-visible {
  outline-color: rgba(255, 107, 15, 0.45);
}

.download-button img {
  width: 14px;
  height: 14px;
}

.note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
}

.kv {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(335px, 1fr) minmax(225px, 0.61fr);
  gap: var(--gap);
}

.robot-card {
  display: grid;
  place-items: center;
  background: var(--soft-card-bg);
  transition: filter 0.25s ease;
  border: 0.5px solid #d6d6d6;
  cursor: pointer;
}

.robot-card:hover {
  filter: brightness(1.05);
}

.robot {
  width: min(80%, 470px);
}

.robot-message {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 24px 18px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.robot-card:hover .robot-message {
  opacity: 1;
}

.robot-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
}

.robot-message p + p {
  margin-top: 3px;
}

.faq-hint {
  margin-top: 8px !important;
  font-weight: 400;
  color: var(--brand-orange) !important;
}

/* ── FAQ Modal ── */
.faq-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.faq-overlay.open {
  opacity: 1;
  visibility: visible;
}

.faq-modal {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: min(80vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 44px 0 32px 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-overlay.open .faq-modal {
  transform: translateY(0) scale(1);
}

.faq-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.faq-close:hover {
  color: var(--text);
  background: #eaeaea;
}

.faq-close svg {
  display: block;
}

.faq-content {
  overflow-y: auto;
  padding-right: 40px;
  min-height: 0;
}

.faq-content::-webkit-scrollbar {
  width: 6px;
}

.faq-content::-webkit-scrollbar-track {
  background: transparent;
}

.faq-content::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

.faq-content h2 {
  margin: 46px 0 16px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
  color: #202020;
  letter-spacing: -0.02em;
}

.faq-content h2:first-child {
  margin-top: 0;
}

.faq-content p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.faq-content p:last-child {
  margin-bottom: 0;
}

.usage-card {
  min-height: 225px;
  background: var(--card-bg);
}

.paste-graphic {
  position: absolute;
  left: var(--paste-img-left);
  bottom: var(--paste-img-bottom);
  width: var(--paste-img-width);
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transform: translate(
    var(--parallax-paste-x, 0px),
    var(--parallax-paste-y, 0px)
  );
  transition: transform 0.2s ease-out;
}

.usage-copy {
  position: absolute;
  top: 50%;
  right: clamp(42px, 7.6%, 68px);
  width: 39%;
  transform: translateY(-50%);
  color: #202020;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.025em;
  text-align: center;
}

.usage-copy p,
.usage-copy strong {
  margin: 0;
}

.usage-copy strong {
  display: block;
  font-weight: 400;
}

.usage-copy .keys {
  margin-bottom: 7px;
  font-size: clamp(16px, 1.5vw, 16px);
  letter-spacing: -0.01em;
  font-weight: 550;
  font-weight: 400;
}

.usage-copy .desc {
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 400;
}

kbd {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 4px;
}

.site-footer {
  flex: 0 0 auto;
  padding-top: clamp(26px, 4.8vh, 43px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.site-footer a {
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: var(--brand-orange);
}

.site-footer small {
  font: inherit;
}

@media (max-width: 1100px) {
  :root {
    /* Usage-card illustration tuning. */
    --paste-img-width: 130%;
    --paste-img-left: -79%;
    --paste-img-bottom: 12%;
  }

  .page-shell {
    width: min(calc(100% - 36px), var(--page-max));
  }

  .hero-content {
    padding: 38px 34px 36px;
  }

  .language-switch {
    top: 34px;
    right: 34px;
  }

  .intro {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  :root {
    --radius: 22px;
    --pixel-bg-size: 78%;
    --pixel-bg-right: -18%;
    --pixel-bg-bottom: -16%;
    /* Usage-card illustration tuning. */
    --paste-img-width: 130%;
    --paste-img-left: -79%;
    --paste-img-bottom: 12%;
  }

  .page-shell {
    padding-top: 20px;
  }

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

  .hero-card {
    min-height: 560px;
  }

  .intro {
    width: min(100%, 620px);
  }

  .kv {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(250px, auto);
  }

  .robot-card,
  .usage-card {
    min-height: 260px;
  }

  .robot {
    width: min(90%, 350px);
  }

  .usage-copy {
    right: 24px;
    width: 45%;
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  :root {
    --gap: 16px;
    --radius: 20px;
    --pixel-bg-size: 112%;
    --pixel-bg-right: -46%;
    --pixel-bg-bottom: -9%;
    /* Usage-card illustration tuning. */
    --paste-img-width: 130%;
    --paste-img-left: -83%;
    --paste-img-bottom: 12%;
  }

  .page-shell {
    width: min(calc(100% - 24px), var(--page-max));
    padding-top: 12px;
  }

  .bento,
  .kv {
    gap: var(--gap);
  }

  .hero-card {
    min-height: 640px;
  }

  .hero-content {
    padding: 30px 26px 30px;
  }

  .language-switch {
    top: 26px;
    right: 26px;
    font-size: 15px;
  }

  .brand-logo {
    width: 52px;
    margin-bottom: 28px;
  }

  .brand h1 {
    font-size: clamp(40px, 13vw, 52px);
  }

  .subtitle {
    font-size: 18px;
  }

  .intro {
    margin-top: 30px;
    font-size: 15px;
    line-height: 1.72;
  }

  .intro p + p {
    margin-top: 20px;
  }

  .cta-group {
    padding-top: 32px;
  }

  .download-button {
    min-width: 136px;
    min-height: 48px;
    font-size: 14px;
  }

  .kv {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .robot-card {
    min-height: 300px;
  }

  .robot {
    width: min(90%, 350px);
  }

  .usage-card {
    min-height: 245px;
  }

  .usage-copy {
    right: 20px;
    width: 54%;
    font-size: 15px;
  }

  .faq-overlay {
    padding: 12px;
  }

  .faq-modal {
    padding: 36px 24px 28px;
    max-height: 90vh;
  }

  .faq-content h2 {
    font-size: 15px;
    margin-top: 28px;
    margin-bottom: 12px;
  }

  .faq-content p {
    font-size: 14px;
    line-height: 1.7;
  }

  .site-footer {
    padding-top: 26px;
    flex-wrap: wrap;
    row-gap: 4px;
    font-size: 13px;
  }
}

@media (max-width: 390px) {
  .hero-card {
    min-height: 690px;
  }

  .usage-copy {
    width: 58%;
    right: 16px;
    font-size: 14px;
  }
}

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