:root {
  --bg: #f4efe5;
  --bg-soft: rgba(255, 250, 240, 0.72);
  --panel: rgba(255, 249, 240, 0.78);
  --panel-strong: #16352e;
  --ink: #13211d;
  --muted: #5b6b64;
  --line: rgba(19, 33, 29, 0.12);
  --accent: #1f8a70;
  --accent-soft: #d9f3ea;
  --warm: #ca6a3d;
  --shadow: 0 24px 64px rgba(21, 35, 31, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(1.5%, -1.5%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 rgba(31, 138, 112, 0);
  }
  50% {
    box-shadow: 0 10px 30px rgba(31, 138, 112, 0.14);
  }
  100% {
    box-shadow: 0 0 0 rgba(31, 138, 112, 0);
  }
}

@keyframes tiltFloat {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: translate3d(0, -4px, 0) rotateX(1.2deg) rotateY(-1.8deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  }
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 138, 112, 0.18), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(202, 106, 61, 0.18), transparent 22%),
    linear-gradient(180deg, #f7f2e8 0%, #efe7d9 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(19, 33, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 33, 29, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: -8%;
  background:
    radial-gradient(circle at 18% 22%, rgba(31, 138, 112, 0.12), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(202, 106, 61, 0.12), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(31, 138, 112, 0.08), transparent 30%);
  pointer-events: none;
  z-index: -1;
  animation: drift 16s ease-in-out infinite;
}

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

code,
pre {
  font-family: "IBM Plex Mono", monospace;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: fadeUp 0.7s ease-out both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  flex: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  line-height: 1;
}

.brand-copy span {
  font-size: 0.82rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 2px;
}

.nav-link-local {
  opacity: 0.86;
}

.nav-link-local::before {
  content: "·";
  color: var(--warm);
}

.nav-link-page {
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(19, 33, 29, 0.06);
}

.nav-link-page::after {
  content: "↗";
  font-size: 0.8em;
  opacity: 0.7;
}

.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

.nav-link.active.nav-link-page {
  background: rgba(31, 138, 112, 0.14);
}

.nav-link.active.nav-link-page::after {
  content: "";
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.lang-switch button {
  min-width: 48px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--panel-strong);
  color: #f7f3e9;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
  padding: 26px 0 24px;
}

.hero-copy,
.hero-panel,
.feature-card,
.code-card,
.step-card,
.integration-card,
.mode-card,
.footer-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 34px;
  animation: fadeUp 0.8s ease-out both;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(31, 138, 112, 0.42), rgba(31, 138, 112, 0));
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-copy-layered > .hero-topline {
  animation: fadeUp 0.55s ease-out both;
}

.hero-copy-layered > h1 {
  animation: fadeUp 0.72s ease-out both;
}

.hero-copy-layered > .lede {
  animation: fadeUp 0.9s ease-out both;
}

.hero-copy-layered > .cta-row {
  animation: fadeUp 1.02s ease-out both;
}

.hero-copy-layered > .signal-list {
  animation: fadeUp 1.12s ease-out both;
}

.eyebrow,
.feature-kicker,
.mini-label {
  margin: 0 0 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--warm);
}

.hero-status {
  flex: none;
  padding: 8px 12px;
  border: 1px solid rgba(31, 138, 112, 0.18);
  border-radius: 999px;
  background: rgba(217, 243, 234, 0.58);
  color: #0d4b3b;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.home-hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  line-height: 1.02;
  width: 100%;
  text-wrap: wrap;
}

.openclaw-hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
  text-wrap: balance;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.lede,
.feature-card p,
.step-card p,
.integration-card p,
.mode-card p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 28px 0 22px;
}

body[data-page="openclaw"] .cta-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.cta-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button-primary {
  background: var(--panel-strong);
  color: #f7f3e9;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
}

.button-primary:hover {
  box-shadow: 0 14px 34px rgba(19, 53, 46, 0.24);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.72);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3 {
  font-family: "Noto Serif SC", "IBM Plex Sans", serif;
  letter-spacing: 0;
}

html[lang^="zh"] h1 {
  line-height: 1.12;
}

html[lang^="zh"] .home-hero-title {
  line-height: 1.2;
}

html[lang^="zh"] .openclaw-hero-title {
  line-height: 1.22;
}

html[lang^="zh"] h2 {
  line-height: 1.18;
}

html[lang^="zh"] .eyebrow,
html[lang^="zh"] .feature-kicker,
html[lang^="zh"] .mini-label {
  letter-spacing: 0.04em;
  word-spacing: 0;
}

html[lang^="zh"] .hero-status {
  letter-spacing: 0;
}

.signal-list,
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.signal-list li,
.check-list li {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(217, 243, 234, 0.72);
  color: #0d4b3b;
  font-size: 0.93rem;
}

.signal-list li {
  background: linear-gradient(180deg, rgba(217, 243, 234, 0.84), rgba(217, 243, 234, 0.64));
  border: 1px solid rgba(31, 138, 112, 0.08);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(19, 53, 46, 0.96), rgba(14, 28, 26, 0.94)),
    linear-gradient(180deg, #16352e, #0d1715);
  color: #ecf7f2;
  animation: fadeUp 0.95s ease-out both;
  transform-style: preserve-3d;
}

.hero-panel-layered {
  animation:
    fadeUp 0.95s ease-out both,
    tiltFloat 9s ease-in-out 1.2s infinite;
}

.panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.panel-contrast {
  animation: glowPulse 6s ease-in-out infinite;
}

.panel-header {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(244, 239, 229, 0.5);
}

.diff-card {
  display: grid;
  gap: 16px;
}

.diff-card > div + div {
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-panel-kicker {
  margin-bottom: 16px;
  color: rgba(236, 247, 242, 0.74);
}

.diff-card code {
  display: block;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: #effaf5;
  white-space: normal;
  line-height: 1.7;
}

.benchmark-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.benchmark-grid div {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.benchmark-grid span {
  display: block;
  color: rgba(236, 247, 242, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
}

.benchmark-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.32rem;
  line-height: 1.2;
}

.hero-panel:hover .panel {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 40px rgba(8, 18, 16, 0.24);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-strip div {
  padding: 18px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel-note {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 247, 242, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
}

.metric-strip strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.metric-strip span {
  color: rgba(236, 247, 242, 0.78);
  font-size: 0.9rem;
}

.grid-section,
.code-grid,
.step-grid,
.integration-grid,
.mode-grid {
  display: grid;
  gap: 18px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.grid-section {
  grid-template-columns: 1fr 1fr;
  margin: 8px 0 18px;
}

.feature-card,
.code-card,
.step-card,
.integration-card,
.mode-card,
.footer-cta {
  padding: 28px;
}

.proof-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.proof-list li + li {
  margin-top: 10px;
}

.proof-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(217, 243, 234, 0.58);
  color: #0d4b3b;
  border: 1px solid rgba(31, 138, 112, 0.12);
  line-height: 1.6;
}

.terminal-card,
.demo-notes-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal-card {
  background:
    linear-gradient(160deg, rgba(19, 53, 46, 0.98), rgba(13, 23, 21, 0.96)),
    linear-gradient(180deg, #16352e, #0d1715);
  color: #ecf7f2;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.terminal-title {
  margin-left: 6px;
  color: rgba(236, 247, 242, 0.72);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terminal-screen {
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3f8f6;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-screen code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.demo-notes-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.demo-notes-card h3 {
  margin-bottom: 14px;
}

.integration-stack .integration-card {
  padding: 24px 28px 18px 28px;
}

.feature-card,
.code-card,
.step-card,
.integration-card,
.mode-card {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.feature-card:hover,
.code-card:hover,
.step-card:hover,
.integration-card:hover,
.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(19, 33, 29, 0.2);
  box-shadow: 0 30px 56px rgba(21, 35, 31, 0.14);
}

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

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

.reveal-delay-1 {
  transition-delay: 80ms;
}

.reveal-delay-2 {
  transition-delay: 150ms;
}

.reveal-delay-3 {
  transition-delay: 220ms;
}

.reveal-delay-4 {
  transition-delay: 300ms;
}

.content-section {
  margin-top: 18px;
  padding: 34px 0 10px;
}

.single-card {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 120px);
  align-items: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  padding: 26px 8px 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

.section-heading {
  margin-bottom: 18px;
}

.code-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-grid-install {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#install .code-grid-install {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.code-card-wide {
  grid-column: 1 / -1;
}

.code-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.integration-card h3 + pre {
  margin-bottom: 8px;
}

.integration-card p {
  margin: 0;
  margin-top: 4px;
  line-height: 1.5;
  flex-grow: 1;
}

.integration-card pre,
.code-card pre {
  margin: 0;
  padding: 18px;
  overflow-x: hidden;
  border-radius: var(--radius-md);
  background: #112823;
  color: #f3f8f6;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-card pre code,
.integration-card pre code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.code-card pre.code-preserve,
.integration-card pre.code-preserve {
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.code-card pre.code-preserve code,
.integration-card pre.code-preserve code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.workflow .step-grid,
.mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #0e5846;
  font-weight: 700;
}

.integration-grid {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 22px;
  align-items: stretch;
}

.integration-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.integration-stack .integration-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.api-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-card .mini-label {
  margin-bottom: 8px;
}

.api-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-card-wide {
  grid-column: 1 / -1;
}

#integrations .integration-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
}

#integrations .integration-card:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

#integrations .integration-card-stack {
  grid-column: 2;
}

.mode-card code {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(217, 243, 234, 0.72);
  color: #0d4b3b;
}

.footer-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 30px;
  background:
    linear-gradient(135deg, rgba(202, 106, 61, 0.12), rgba(31, 138, 112, 0.1)),
    rgba(255, 249, 240, 0.82);
}

.footer-cta > div:first-child {
  min-width: 0;
}

.footer-cta > div:first-child h2 {
  max-width: 18ch;
}

.footer-cta .cta-row {
  margin: 0;
  justify-content: flex-end;
}

html[lang^="zh"] .footer-cta .eyebrow {
  margin-bottom: 10px;
}

html[lang^="zh"] .footer-cta h2 {
  max-width: 14ch;
  line-height: 1.16;
}

@media (max-width: 980px) {
  .hero,
  .grid-section,
  .proof-grid,
  .demo-grid,
  .code-grid,
  .workflow .step-grid,
  .integration-grid,
  .mode-grid,
  .code-row {
    grid-template-columns: 1fr;
  }

  .footer-cta {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar {
    position: static;
    border-radius: 28px;
    padding: 18px;
  }

  .nav {
    gap: 12px;
  }

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

  .hero-copy,
  .feature-card,
  .code-card,
  .step-card,
  .integration-card,
  .mode-card,
  .footer-cta {
    padding: 22px;
  }

  .hero-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-secondary-row {
    width: 100%;
  }

  h1 {
    font-size: 2.65rem;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

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