/* =========================================================================
   zakesi — 企业官网样式表
   ========================================================================= */

/* ------------------------------- 设计变量 ------------------------------- */
:root {
  --bg: #fffaef;
  --surface: #ffffff;
  --ink: #141111;
  --ink-regular: #3d3535;
  --ink-secondary: #6b5f5f;
  --border: #141111;
  --border-light: #c0b9b1;
  --border-base: #e5e7eb;

  --primary: #5aba42;
  --primary-light: #d8f0cf;
  --accent: #ffd440;
  --lavender: #bbafe6;
  --lime: #a9d877;
  --pink: #fe7da8;
  --red: #f97264;

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  /* 收窄后的内容列：1440 视口下左右各留 144px，视觉重心居中 */
  --container: 1152px;

  --shadow: 2px 2px 0 var(--border);
  --shadow-lg: 4px 4px 0 var(--border);
  --radius: 6px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------- 基础 --------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-base);
}

html {
  line-height: 1.5;
  font-family: var(--font-sans);
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  line-height: inherit;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
pre {
  margin: 0;
}

ul,
ol,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

img,
svg,
video,
canvas {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

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

/* 与原站 Tailwind 的 transition-colors / transition-transform 一致 */
.nav a,
.lang-toggle button,
.footer-col a {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: var(--ease);
  transition-duration: 0.15s;
}

.brand-logo,
.icon-external {
  transition-property: transform;
  transition-timing-function: var(--ease);
  transition-duration: 0.15s;
}

/* ------------------------------- 布局骨架 ------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.section {
  padding-block: 4rem;
}

.section-white {
  background-color: var(--surface);
}

.stack-12 > * + * {
  margin-top: 3rem;
}

.stack-10 > * + * {
  margin-top: 2.5rem;
}

.stack-6 > * + * {
  margin-top: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

/* 标题区：与卡片网格左边缘对齐，文字保持左对齐 */
.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-head p {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  color: var(--ink-secondary);
}

.section-head .section-subtitle {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 0.75rem;
}

/* 团队宣言区居中展示 */
.section-head--center {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.section-head--center h2 {
  margin-bottom: 0.5rem;
}

.section-head--center p {
  font-size: 1rem;
  line-height: 1.625;
}

.group-head {
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

.group-head h3 {
  font-size: 1.5rem;
  line-height: calc(2 / 1.5);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.group-head p {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  color: var(--ink-secondary);
}

.series-label {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 0.75rem;
}

/* 案例区的分组标题用 mb-4（1rem），比产品区的 mb-3 宽一档 */
.series-label--group {
  margin-bottom: 1rem;
}

/* --------------------------------- 头部 --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* 修复：原站 bg-bg/95 解析不到，实际是全透明 header */
  background-color: rgba(255, 250, 239, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
}

.brand-logo {
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.brand:hover .brand-logo {
  transform: rotate(6deg);
}

.brand-name {
  font-size: 1.25rem;
  line-height: calc(1.75 / 1.25);
  font-weight: 700;
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
  justify-self: center;
}

.nav a {
  font-weight: 500;
  color: var(--ink-regular);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

/* --------------------------- 语言切换（修复） --------------------------- */
.lang-toggle {
  display: none;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.lang-toggle button {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--ink-secondary);
  background-color: transparent;
}

/* 修复：原站 bg-bg-white 解析不到，未选中的按钮是透明的（透出 header 的米色） */
.lang-toggle button:hover {
  color: var(--ink);
  background-color: var(--bg);
}

/* 修复：原站 text-bg 解析不到，选中态黑底黑字完全看不见 */
.lang-toggle button[aria-pressed='true'] {
  color: var(--bg);
  background-color: var(--ink);
}

.menu-toggle {
  display: inline-flex;
  padding: 0.5rem;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded='true'] .icon-burger {
  display: none;
}

.menu-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

.menu-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ------------------------------- 移动端菜单 ------------------------------- */
.mobile-nav {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.mobile-nav-list a {
  padding-block: 0.5rem;
  font-weight: 500;
  color: var(--ink-regular);
}

.mobile-nav .lang-toggle {
  display: inline-flex;
}

/* --------------------------------- 首屏 --------------------------------- */
.hero {
  padding-block: 4rem;
}

.hero-inner {
  max-width: 48rem;
}

.hero-badge {
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  line-height: calc(2.5 / 2.25);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.625;
  color: var(--ink-secondary);
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink-regular);
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* --------------------------------- 按钮 --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--surface);
  border: 2px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transition: all 0.1s ease-in-out;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

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

.btn-ghost {
  background-color: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: var(--bg);
  box-shadow: var(--shadow);
}

.btn-white {
  background-color: var(--surface);
}

.btn-sm {
  padding: 8px 16px;
}

/* --------------------------------- 卡片 --------------------------------- */
.card {
  background-color: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  height: 100%;
}

.card-hover {
  transition: all 0.1s ease-in-out;
}

.card-hover:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.card-link {
  display: block;
}

.card h3 {
  font-size: 1.25rem;
  line-height: calc(1.75 / 1.25);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink-secondary);
}

/* 产品卡：p-5 + 文字 text-sm */
.card--product {
  padding: 1.25rem;
}

.card--product p {
  font-size: 0.875rem;
  line-height: 1.625;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 案例卡：标题 mb-3 */
.card--story h3 {
  margin-bottom: 0.75rem;
}

/* 价值卡：标题 text-lg mb-1.5，正文 text-sm */
.card--value h3 {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  margin-bottom: 0.375rem;
}

.card--value p {
  font-size: 0.875rem;
  line-height: 1.625;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.card-title-row h3 {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  margin-bottom: 0;
}

.card-tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--ink-secondary);
}

.icon-external {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--ink-secondary);
}

.card-link:hover .icon-external {
  transform: translate(0.125rem, -0.125rem);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.card > .icon-box {
  margin-bottom: 1rem;
}

.icon-box svg {
  width: 1.25rem;
  height: 1.25rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* 数据行：等宽字体、深色文字（与原站一致，不继承卡片的次级色） */
.card p.metric {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 700;
  color: var(--ink);
}

/* --------------------------------- 徽章 --------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 600;
  color: var(--ink);
  border: 2px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.hero-badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--ink);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* -------------------------------- 背景色 -------------------------------- */
.bg-primary {
  background-color: var(--primary);
}

.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-accent {
  background-color: var(--accent);
}

.bg-lavender {
  background-color: var(--lavender);
}

.bg-lavender-40 {
  background-color: rgba(187, 175, 230, 0.4);
}

.bg-lime {
  background-color: var(--lime);
}

.bg-pink-30 {
  background-color: rgba(254, 125, 168, 0.3);
}

.bg-red {
  background-color: var(--red);
}

.bg-red-30 {
  background-color: rgba(249, 114, 100, 0.3);
}

/* --------------------------------- CTA --------------------------------- */
.cta-panel {
  background-color: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.cta-panel h2 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-panel p {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  color: var(--ink-regular);
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* --------------------------------- 页脚 --------------------------------- */
.site-footer {
  background-color: var(--bg);
  padding-block: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink-secondary);
  max-width: 24rem;
}

.footer-col h4 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col li + li {
  margin-top: 0.5rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--ink-secondary);
}

.footer-filing {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--ink-secondary);
}

.footer-filing a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 外链保留内容展示，但不提供跳转或点击动效。 */
a[aria-disabled='true'] {
  cursor: default;
}

a[aria-disabled='true']:hover,
a[aria-disabled='true']:active {
  transform: none;
  box-shadow: var(--shadow);
}

a.btn-ghost[aria-disabled='true']:hover,
a.btn-ghost[aria-disabled='true']:active {
  box-shadow: none;
}

a[aria-disabled='true'] .icon-external {
  display: none;
}

/* -------------------------------- 响应式 -------------------------------- */
@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }

  .nav {
    display: flex;
  }

  .header-actions .lang-toggle {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

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

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

  /* looploop 系列：768 起两列 */
  .grid-3-late {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding-block: 6rem;
  }

  .section-head {
    margin-bottom: 3.5rem;
  }

  .section-head h2 {
    font-size: 2.25rem;
    line-height: calc(2.5 / 2.25);
  }

  .group-head h3 {
    font-size: 1.875rem;
    line-height: 1.2;
  }

  .hero {
    padding-block: 6rem;
  }

  .hero h1 {
    font-size: 3.75rem;
    line-height: 1;
  }

  .hero-subtitle {
    font-size: 1.5rem;
    line-height: calc(2 / 1.5);
  }

  .cta-panel {
    padding: 3rem;
  }

  .cta-panel h2 {
    font-size: 2.25rem;
    line-height: calc(2.5 / 2.25);
  }

  .site-footer {
    padding-block: 4rem;
  }

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

  .footer-brand {
    grid-column: span 2 / span 2;
  }

  .footer-bottom {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  /* looploop 系列：1024 起三列 */
  .grid-3-late {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
