/*
Theme Name: Tomist
Theme URI: https://www.tomist.com/
Author: 汤姆科技
Description: 汤姆科技 B2B 服务商官网主题。高转化首页、服务/案例、NAP 与 JSON-LD。
Version: 1.3.2
Text Domain: tomist
*/

:root {
  --bg: #f3f1ec;
  --ink: #121a28;
  --muted: #5c6574;
  --line: #ddd8ce;
  --card: #fff;
  --accent: #0088d4;
  --accent-2: #d45b22;
  --navy: #0d1c32;
  --max: 1160px;
  --radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #f5f5f5;
  border-bottom: 1px solid #e6e6e6;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 80px;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 56px);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo img {
  height: 52px;
  width: auto;
  max-width: min(280px, 56vw);
}

.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  margin-left: auto;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: #333;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.nav a:hover { color: #111; text-decoration: none; }
.nav a.is-current { color: var(--accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-tool,
.header-search summary {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #333;
  cursor: pointer;
}
.header-tool:hover,
.header-search summary:hover { color: #111; text-decoration: none; }

.header-search { position: relative; }
.header-search summary { list-style: none; }
.header-search summary::-webkit-details-marker { display: none; }
.header-search form {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}
.header-search input[type="search"] {
  font: inherit;
  width: 220px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 2px;
}
.header-search button {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #333;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 5px auto;
  background: #333;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Hero carousel */
.hero-slider {
  position: relative;
  min-height: min(78vh, 620px);
  overflow: hidden;
  background: var(--navy);
  color: #f7f3ec;
}
.hero-track { position: relative; min-height: min(78vh, 620px); }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 16, 32, 0.78) 0%, rgba(8, 16, 32, 0.42) 46%, rgba(8, 16, 32, 0.16) 100%);
}
.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}
.hero-copy .wrap { width: min(720px, calc(100% - 40px)); margin-left: max(20px, calc((100% - var(--max)) / 2)); }
.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.35);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.hero-slide h1,
.hero-slide .slide-title {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.22;
  font-weight: 750;
}
.hero .sub { color: #e4ddd2; max-width: 38rem; margin: 0; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.hero-nav,
.hero-dots {
  position: absolute;
  z-index: 3;
}
.hero-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(13, 28, 50, 0.35);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}
.hero-nav:hover { background: var(--accent-2); border-color: var(--accent-2); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots {
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.hero-dots button.is-active { background: #fff; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 650;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent-2); color: #fff; }
.btn-primary:hover { background: #bb4a16; color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: #fff; color: var(--navy); }

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: -36px;
  position: relative;
  z-index: 4;
}
.trust div {
  background: var(--card);
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.trust strong { display: block; font-size: 1.4rem; color: var(--accent); }
.trust span { color: var(--muted); font-size: 0.86rem; }

.section { padding: 72px 0; }
.section h2 { margin: 0 0 8px; font-size: 1.75rem; letter-spacing: -0.02em; }
.lede { color: var(--muted); margin: 0 0 32px; max-width: 40rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h2 { margin: 0; font-size: 1.15rem; }
.card h2 a, .card h3 a { color: inherit; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); text-decoration: none; }
.card.card-with-media {
  padding: 0;
  overflow: hidden;
}
.card-media {
  display: block;
  height: 168px;
  overflow: hidden;
  background: var(--navy);
}
.card-media:hover { text-decoration: none; }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.page-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: var(--navy);
  color: #f7f3ec;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 16, 32, 0.78) 0%, rgba(8, 16, 32, 0.42) 50%, rgba(8, 16, 32, 0.2) 100%);
}
.page-hero-copy {
  position: relative;
  z-index: 2;
  padding: 52px 0;
}
.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.25;
}
.page-hero .sub {
  color: #e4ddd2;
  max-width: 38rem;
  margin: 0;
}

.page-split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}
.page-split .lede { margin-bottom: 16px; }
.page-split h2 { margin-top: 0; }
.nap-card .nap { margin: 0 0 12px; }

.entry p { margin: 0 0 1em; }
.entry h2 { margin: 1.5em 0 0.55em; font-size: 1.28rem; }
.entry ul, .entry ol { margin: 0 0 1em; padding-left: 1.25em; }
.entry li { margin-bottom: 0.35em; }
.article .btn { margin-top: 8px; }
.card p { margin: 0; }
.card .more { margin-top: auto; padding-top: 12px; font-weight: 650; }
.card:hover { border-color: #c9c2b4; }
.meta { color: var(--muted); font-size: 0.86rem; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 650; }

.lead-block {
  background: var(--navy);
  color: #f7f3ec;
}
.lead-block h2, .lead-block .lede { color: inherit; }
.lead-block .lede { color: #d5d0c6; }

.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #fff;
  color: var(--ink);
  padding: 24px;
  border-radius: var(--radius);
}
.lead-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.lead-form textarea, .lead-form select, .lead-form input[type="text"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.lead-form button {
  grid-column: 1 / -1;
  background: var(--accent-2);
  color: #fff;
  border: 0;
  padding: 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
}
.lead-ok { grid-column: 1 / -1; color: #157347; }
.lead-err { grid-column: 1 / -1; color: #b42318; }

.site-footer {
  background: #000;
  color: #c9c4ba;
  padding: 48px 0 28px;
  font-size: 0.92rem;
}
.site-footer a { color: #e7e2d8; }
.footer-logo {
  display: inline-block;
  margin-bottom: 12px;
}
.footer-logo:hover { text-decoration: none; }
.footer-logo img {
  height: 48px;
  width: auto;
  max-width: 220px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.nap { margin: 0; line-height: 1.8; }

.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.article h1 { margin-top: 0; }
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 16px; }

.account-box .lede { margin-bottom: 20px; }
.account-login {
  max-width: 360px;
  margin-top: 8px;
}
.account-login p { margin: 0 0 14px; }
.account-login label { display: block; margin-bottom: 6px; font-size: 0.9rem; }
.account-login input[type="text"],
.account-login input[type="password"] {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.account-login .button,
.account-login input[type="submit"] {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #333;
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
}
.account-actions { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .header-end {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    padding: 16px clamp(20px, 4vw, 56px) 24px;
    background: #f5f5f5;
    border-bottom: 1px solid #e6e6e6;
  }
  .site-header.is-nav-open .header-end { display: flex; }
  .nav {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 14px;
  }
  .header-tools { gap: 22px; }
  .header-search form { position: static; box-shadow: none; margin-top: 8px; }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  align-items: center;
}
.nav-links a, .nav-links span {
  color: #333;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.nav-links .current {
  font-weight: 700;
  border-color: #333;
}

@media (max-width: 860px) {
  .trust, .cards, .lead-form, .footer-grid, .page-split { grid-template-columns: 1fr; }
  .hero-slider, .hero-track { min-height: 520px; }
  .hero-nav { display: none; }
  .page-hero { min-height: 220px; }
}
