/* ============================================================
   KAISON global tokens + base — per 网站设计规范.md v1.1
   ============================================================ */

:root {
  --color-polar-white: #f8fbfd;
  --color-white: #ffffff;
  --color-ink: #0e1621;
  --color-deep-graphite: #17212b;
  --color-slate: #394756;
  --color-cool-gray: #6b7a89;
  --color-line-gray: #d8e1e8;
  --color-mist: #eef4f7;
  --color-precision-blue: #0b66c3;
  --color-glacier-blue: #dceff7;
  --color-steel-cyan: #16a6b6;
  --color-signal-amber: #f5a524;
  --color-success: #1f9d63;
  --color-warning: #f5a524;
  --color-error: #d64545;

  --font-display: "Sora", "Inter", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --font-data: "JetBrains Mono", Consolas, monospace;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --container: 1200px;
  --container-wide: 1320px;

  --shadow-card: 0 8px 24px rgba(14, 22, 33, 0.08);
  --shadow-card-hover: 0 14px 34px rgba(14, 22, 33, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-polar-white);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
}

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

/* Typography below is scoped to the theme's own page shell so it never
   interferes with Elementor-built pages (homepage etc.), which carry
   their own styles and must match the live site exactly. */

.kaison-page a { color: var(--color-precision-blue); }

.kaison-page h1, .kaison-page h2, .kaison-page h3,
.kaison-page h4, .kaison-page h5, .kaison-page h6 {
  margin: 0 0 16px;
  color: var(--color-ink);
  font-family: var(--font-display);
  letter-spacing: 0;
}

.kaison-page h1 { font-size: 44px; line-height: 54px; font-weight: 700; }
.kaison-page h2 { font-size: 34px; line-height: 42px; font-weight: 700; }
.kaison-page h3 { font-size: 26px; line-height: 34px; font-weight: 650; }
.kaison-page h4 { font-size: 20px; line-height: 28px; font-weight: 650; }
.kaison-page h5 { font-size: 17px; line-height: 25px; font-weight: 650; }
.kaison-page h6 { font-size: 13px; line-height: 20px; font-weight: 700; }

@media (max-width: 1023px) {
  .kaison-page h1 { font-size: 36px; line-height: 44px; }
  .kaison-page h2 { font-size: 28px; line-height: 36px; }
  .kaison-page h3 { font-size: 24px; line-height: 32px; }
  .kaison-page h4 { font-size: 19px; line-height: 27px; }
  .kaison-card__body h3 { font-size: 19px; line-height: 27px; }
  .kaison-kicker { font-size: 12.5px; }
}

@media (max-width: 639px) {
  .kaison-page h1 { font-size: 30px; line-height: 38px; }
  .kaison-page h2 { font-size: 24px; line-height: 32px; }
  .kaison-page h3 { font-size: 22px; line-height: 30px; }
  .kaison-page h4 { font-size: 18px; line-height: 26px; }
  .kaison-card__body h3 { font-size: 18px; line-height: 26px; }
  .kaison-kicker { font-size: 12px; }
}

/* Layout container */
.kaison-container {
  width: min(var(--container), calc(100% - 80px));
  margin: 0 auto;
}
.kaison-container--wide { width: min(var(--container-wide), calc(100% - 80px)); }

@media (max-width: 1023px) {
  .kaison-container, .kaison-container--wide { width: min(var(--container), calc(100% - 56px)); }
}
@media (max-width: 639px) {
  .kaison-container, .kaison-container--wide { width: calc(100% - 40px); }
}

/* Buttons (spec section 6) */
.kaison-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-precision-blue);
  color: var(--color-white) !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s, box-shadow 0.16s;
}
.kaison-btn:hover { background: #0957a6; }
.kaison-btn:active { background: #074986; }

.kaison-btn--conversion { background: var(--color-signal-amber); color: var(--color-ink) !important; }
.kaison-btn--conversion:hover { background: #e39516; }
.kaison-btn--conversion:active { background: #c97d0f; }

.kaison-btn--secondary {
  background: var(--color-white);
  border-color: #b9c7d3;
  color: var(--color-deep-graphite) !important;
}
.kaison-btn--secondary:hover { background: var(--color-mist); }

.kaison-btn--large { min-height: 52px; padding: 0 24px; font-size: 16px; }
.kaison-btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* Inner-page content shell. Scoped to a direct .kaison-container child —
   only the plain fallback templates (page.php, search.php, 404.php,
   single.php, archive.php, index.php) nest it that way; hero-driven
   templates put .container/.kaison-container inside a <section>, so
   they never picked up this padding as an unwanted gap above the hero. */
.kaison-page > .kaison-container {
  padding: 72px 0;
}
.kaison-page__header { margin-bottom: 36px; }
.kaison-kicker {
  color: var(--color-precision-blue);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.kaison-entry-content p { color: var(--color-slate); }

/* Card grid used on archives. auto-fit + minmax: fills the row and settles
   near 3 columns wide, but a lone card (thin content, new sites) stretches
   to fill the row instead of sitting stranded next to empty tracks. */
.kaison-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.kaison-card {
  overflow: hidden;
  max-width: 420px;
  border: 1px solid var(--color-line-gray);
  border-radius: var(--radius-md);
  background: var(--color-white);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.kaison-card:hover { border-color: var(--color-precision-blue); box-shadow: var(--shadow-card-hover); }
.kaison-card__thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-mist); }
.kaison-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.18s; }
.kaison-card:hover .kaison-card__thumb img { transform: scale(1.03); }
.kaison-card__body { padding: 20px; }
.kaison-card__body h3 { font-size: 20px; line-height: 28px; margin: 0 0 8px; }
.kaison-card__body p { margin: 0; color: var(--color-cool-gray); font-size: 14px; line-height: 22px; }

@media (max-width: 639px) {
  .kaison-card-grid { grid-template-columns: 1fr; }
}

/* Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(11, 102, 195, 0.55);
  outline-offset: 2px;
}

/* 仅降级平滑滚动；跑马灯/滚动带等内容性动画保留
   （否则 Windows 关闭“动画效果”的用户会看到证书/伙伴滚动带静止） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Screen-reader helper */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}
