/* =========================================================
   TC ANBO — unified layout system
   Compact, coordinated, technology-first.
   Loaded after styles.css; intentionally overrides legacy rules.
   ========================================================= */

:root {
  --container: 1200px;
  --navy: #0a2233;
  --navy-2: #0e2d42;
  --blue: #0b63f6;
  --blue-2: #2a8bff;
  --cyan: #10bfe8;
  --ink: #102b3d;
  --muted: #607d8f;
  --line: #dce9f2;
  --surface: #ffffff;
  --surface-2: #f4f9fd;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 53, 79, 0.06);
}

html { scroll-behavior: smooth; }

body {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink);
  background: #f6fafd;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

/* ---------- rhythm ---------- */
.section { padding: 44px 0; }
.section--tight { padding: 34px 0; }
.section-line { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.section-head h2,
.section-title {
  margin: 4px 0 0;
  font-size: clamp(24px, 2.35vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.section-desc {
  margin: 7px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--blue);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kicker > span {
  width: 18px;
  height: 1px;
  background: var(--blue);
}

/* ---------- headings & prose ---------- */
h1, h2, h3, h4 { color: var(--navy); }
.prose { font-size: 13.5px; line-height: 1.85; color: #35566a; }
.prose h2 { margin: 26px 0 10px; font-size: 21px; line-height: 1.35; }
.prose h3 { margin: 20px 0 8px; font-size: 16px; line-height: 1.4; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 8px 0 14px; padding-left: 18px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--blue), #2f8dff);
  box-shadow: 0 8px 20px rgba(11, 99, 246, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11, 99, 246, 0.28); }
.btn-ghost {
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
}
.btn-ghost:hover { border-color: #b8d3e8; background: #f8fcff; }
.btn-block { width: 100%; }

/* ---------- home hero ---------- */
.hero {
  position: relative;
  padding: 46px 0 38px;
  background:
    linear-gradient(rgba(11, 99, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 246, 0.035) 1px, transparent 1px),
    radial-gradient(800px 420px at 76% 0%, rgba(16, 191, 232, 0.12), transparent 64%),
    linear-gradient(180deg, #fbfdff, #f3f9fd);
  background-size: 42px 42px, 42px 42px, auto, auto;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 46px;
  align-items: center;
}
.hero h1 {
  margin: 8px 0 0;
  font-size: clamp(34px, 3.7vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.hero-lead {
  max-width: 590px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stats > * {
  flex: 1 1 0;
  min-width: 100px;
  padding: 12px 16px 0 0;
}
.hero-stats strong { display: block; color: var(--navy); font-size: 23px; line-height: 1.15; }
.hero-stats span { color: var(--muted); font-size: 11px; }
.hero-visual { min-width: 0; }
.hero-visual img, .hero-visual svg { max-width: 100%; height: auto; }

/* ---------- page hero (inner pages) ---------- */
.page-hero,
.solution-hero,
.product-hero,
.article-hero,
.case-hero,
.cases-hero,
.news-hero {
  position: relative;
  padding: 36px 0 30px !important;
  background:
    linear-gradient(rgba(11, 99, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 246, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdff, #f4f9fd);
  background-size: 42px 42px, 42px 42px, auto;
  border-bottom: 1px solid var(--line);
}
.page-hero h1,
.solution-hero h1,
.product-hero h1,
.article-hero h1,
.case-hero h1,
.cases-hero h1,
.news-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.page-hero .lead,
.solution-hero .lead,
.product-hero .lead,
.article-hero .lead,
.case-hero .lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}
.page-hero .breadcrumbs, .breadcrumbs { margin-bottom: 10px; }

/* ---------- shared cards ---------- */
.solution-card,
.software-card,
.industry-card,
.case-card,
.article-card,
.product-card,
.tech-layer,
.side-card,
.contact-form,
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 53, 79, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.solution-card:hover,
.software-card:hover,
.case-card:hover,
.article-card:hover,
.product-card:hover {
  border-color: #bcd9ec;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ---------- solutions / software / industries ---------- */
.solutions-grid,
.software-grid,
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.solution-card,
.software-card,
.industry-card { padding: 18px; }
.solution-card h3,
.software-card h3,
.industry-card h3 { margin: 10px 0 6px; font-size: 16px; line-height: 1.4; }
.solution-card p,
.software-card p,
.industry-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.solution-icon,
.software-icon,
.industry-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d7e9f6;
  border-radius: 9px;
  color: var(--blue);
  background: #f2f9ff;
}
.solution-card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--blue); font-size: 12px; font-weight: 600; }

/* ---------- product cards ---------- */
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.product-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  padding: 10px !important;
  overflow: hidden;
}
.product-card-top {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  position: relative;
}
.product-card .product-thumb {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 122px !important;
  display: grid !important;
  place-items: center !important;
  padding: 6px !important;
  border: 1px solid #e1edf6 !important;
  border-radius: 9px !important;
  background: linear-gradient(160deg, #fbfdff, #f2f8fd) !important;
  overflow: hidden;
}
.product-card .product-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 5px 10px rgba(20, 60, 90, 0.10));
}
.product-card-body {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 10px 4px 4px !important;
}
.product-card-body small {
  color: #6c8899;
  font-size: 10px;
  letter-spacing: 0.03em;
}
.product-card-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--navy);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 40px;
}
.product-card-body em {
  margin-top: 5px;
  color: #7792a2;
  font-size: 10.5px;
  font-style: normal;
}
.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto !important;
  padding-top: 10px;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 600;
}
.mini-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #cfe9f5;
  border-radius: 20px;
  color: #1584a8;
  background: #f0fbff;
  font-size: 9px;
}

/* ---------- cases & news ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.case-card { overflow: hidden; }
.case-cover { aspect-ratio: 16 / 9; overflow: hidden; background: #eaf4fa; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-body { padding: 14px 16px 16px; }
.case-body h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.45; }
.case-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.news-grid, .articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.article-card { overflow: hidden; }
.article-cover, .article-cover-full { aspect-ratio: 16 / 9; overflow: hidden; background: #eaf4fa; }
.article-cover img, .article-cover-full img { width: 100%; height: 100%; object-fit: cover; }
.article-body, .article-text { padding: 14px 16px 16px; }
.article-body h3, .article-text h3 { margin: 4px 0 7px; font-size: 15px; line-height: 1.45; }
.article-excerpt { color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ---------- detail layout ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.detail-side { position: sticky; top: 92px; display: grid; gap: 12px; }
.side-card { padding: 18px; }
.side-card h3 { margin: 0 0 8px; font-size: 15px; }
.side-card p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* ---------- product detail ---------- */
.product-template .product-hero { padding: 32px 0 28px !important; }
.product-template .product-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
  gap: 34px !important;
  align-items: center !important;
}
.product-template .product-photo {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  aspect-ratio: 16 / 11 !important;
  height: auto !important;
  padding: 18px !important;
  border: 1px solid #dbeaf4 !important;
  border-radius: 14px !important;
  background:
    linear-gradient(rgba(11, 99, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 246, 0.035) 1px, transparent 1px),
    linear-gradient(160deg, #fbfdff, #f1f8fd) !important;
  background-size: 32px 32px, 32px 32px, auto !important;
  overflow: hidden !important;
}
.product-template .product-photo img {
  width: auto !important;
  height: auto !important;
  max-width: 280px !important;
  max-height: 280px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 14px 22px rgba(20, 60, 90, 0.14));
}
.product-template .product-hero-copy h1 { font-size: clamp(28px, 3vw, 38px) !important; line-height: 1.2 !important; }
.product-template .product-model { margin-top: 8px !important; font-size: 11px !important; }
.product-template .product-hero-copy .lead { margin-top: 10px !important; font-size: 13px !important; line-height: 1.75 !important; }
.product-template .product-hero-actions { margin-top: 16px !important; }
.product-template .product-hero + .section { padding-top: 34px; }

/* ---------- product list rows ---------- */
.product-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.product-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.35fr) minmax(0, 1.4fr) 92px;
  gap: 16px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.product-row-thumb { width: 64px; height: 48px; display: grid; place-items: center; background: #f4f9fd; border: 1px solid #e2eef6; border-radius: 6px; overflow: hidden; }
.product-row-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-row-main small { display: block; color: #7a94a4; font-size: 9.5px; }
.product-row-main strong { display: block; color: var(--navy); font-size: 12.5px; line-height: 1.45; }
.product-row-main em { display: block; color: #7d97a7; font-size: 9.5px; font-style: normal; }
.product-row-summary { color: var(--muted); font-size: 11px; line-height: 1.65; }
.product-row-action { color: var(--blue); font-size: 11px; font-weight: 600; text-align: right; }

/* ---------- about / contact ---------- */
.about-grid, .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}
.about-media { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #eaf3f9; }
.about-media img, .about-media svg { width: 100%; height: 100%; object-fit: cover; }
.contact-form { padding: 22px; }
.map-card { overflow: hidden; }
.map-card iframe, .map-card img { display: block; width: 100%; aspect-ratio: 16 / 7; height: auto; border: 0; object-fit: cover; }

/* ---------- footer ---------- */
.site-footer { padding: 38px 0 22px; }
.footer-grid { gap: 22px; }
.footer-brand p { max-width: 320px; font-size: 11.5px; line-height: 1.8; }
.footer-col a { font-size: 11.5px; }
.footer-bottom { margin-top: 22px; padding-top: 14px; font-size: 10.5px; }

/* ---------- compact proof / stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-item { padding: 14px 16px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-item strong { display: block; color: var(--navy); font-size: 24px; line-height: 1.1; }
.stat-item span { color: var(--muted); font-size: 10.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .solutions-grid, .software-grid, .industry-grid, .cases-grid, .news-grid, .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; }
  .hero-inner { gap: 30px; }
}
@media (max-width: 860px) {
  .container { width: min(100% - 32px, var(--container)); }
  .section { padding: 34px 0; }
  .hero { padding: 34px 0 30px; }
  .hero-inner, .product-template .product-hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr !important; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .solutions-grid, .software-grid, .industry-grid, .cases-grid, .news-grid, .articles-grid { grid-template-columns: 1fr; }
  .page-hero, .solution-hero, .product-hero, .article-hero, .case-hero { padding: 28px 0 24px !important; }
  .product-list .product-row { grid-template-columns: 56px minmax(0, 1fr); }
  .product-row-summary, .product-row-action { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stats > * { flex: 1 0 45%; }
  .product-card .product-thumb { height: 108px !important; }
}
