/* KAYZ Consortium Limited — website v2 (multi-page redesign) */
:root {
  --measure: 760px;
  --section-y: 64px;
  --section-y-same: 0;
  --block-gap: 48px;
  --head-gap: 32px;
  --green: #138D44;
  --green-dark: #0E6E35;
  --ink: #161616;
  --muted: #5B6470;
  --bg: #FFFFFF;
  --bg-soft: #F4F6F5;
  --dark: #131F1A;
  --dark-2: #1B2B23;
  --line: #E2E6E2;
  --radius: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 1440px) { .wrap { max-width: 1280px; } }
p, li { text-wrap: pretty; }
.prose, .prose-2col { max-width: var(--measure); }
.prose-2col { column-count: 1; max-width: 760px; } /* V3: 5/6参照网站用单栏 */

.media-row { display: flex; gap: 36px; align-items: flex-start; max-width: 920px; }
.media-row .ammon-logo { margin-top: 4px; }
.media-row > a { flex: 0 0 auto; }

h1, h2, h3 { line-height: 1.22; letter-spacing: -0.01em; font-weight: 600; }
h1 { font-size: 56px; margin: 14px 0 18px; }
h2 { font-size: 40px; margin: 10px 0 16px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
p { margin-bottom: 14px; }

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

img { max-width: 100%; }

.eyebrow {
  color: var(--green);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.eyebrow-light { color: #8FD6A8; }

.lede { font-size: 20px; color: var(--muted); max-width: 760px; }
/* Two-column page header (text + side card) */
.head-grid { display: grid; grid-template-columns: 1fr 330px; gap: 56px; align-items: end; }
section:has(.head-grid) { padding-bottom: 56px; }
.head-card { background: var(--bg-soft); border: 1px solid var(--line); padding: 22px 26px; margin-top: 6px; }
.head-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.head-card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 6px; }
.head-card-num { font-size: 1.45rem; font-weight: 700; margin: 2px 0 14px; }
.head-card-num a { color: var(--green); text-decoration: none; }
.head-card .btn { margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-outline-light { color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 72px; width: auto; display: block; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.2; }
.brand-name small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a:not(.btn) { color: var(--ink); font-size: 0.95rem; font-weight: 500; }
.main-nav a:not(.btn):hover { color: var(--green); text-decoration: none; }
.main-nav a.active { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); padding-bottom: 2px; }
.main-nav .btn { padding: 10px 22px; font-size: 0.92rem; }
/* Mobile nav toggle + menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 6px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }
.mobile-nav { display: none; }
.mobile-nav a.active { color: var(--green); }

/* Hero (home) */
.hero-photo img {
  width: 100%;
  height: 62vh;
  min-height: 420px;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}
.hero-intro h1 { max-width: 640px; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Page banner (inner pages): full-width photo, title below on white */
.page-banner { position: relative; }
/* Option A: inner page title overlaid on banner */
.page-banner-overlay { position: relative; }
.page-banner-overlay .banner-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.28) 70%, transparent 100%);
  padding: 72px 0 36px;
}
.page-banner-overlay .banner-overlay .crumbs,
.page-banner-overlay .banner-overlay .crumbs a { color: rgba(255,255,255,0.82); }
.page-banner-overlay .banner-overlay h1 { color: #fff; margin: 10px 0 12px; }
.page-banner-overlay .banner-overlay .lede { color: rgba(255,255,255,0.88); max-width: 760px; }
@media (max-width: 640px) {
  .page-banner-overlay .banner-overlay { padding: 48px 0 24px; }
}

.page-banner picture { display: block; }
.page-banner .banner-credit {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.45);
  padding: 4px 9px;
}
.page-banner img {
  width: 100%;
  height: 48vh;
  min-height: 320px;
  max-height: 540px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.page-intro h1 { max-width: 720px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

/* Sections */
.section { padding: var(--section-y) 0; }
/* 同背景相邻区块：后者上内边距清零 */
.section:not(.section-soft) + .section:not(.section-soft) { padding-top: var(--section-y-same); }
.section-soft + .section-soft { padding-top: var(--section-y-same); }

.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255, 255, 255, 0.82); }

/* Stats */
.stats { padding: 52px 0 36px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat { border-top: 2px solid var(--ink); padding-top: 18px; }
.stat strong { display: block; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.92rem; }
.stats-note { margin-top: 28px; font-size: 0.82rem; color: var(--muted); }

/* Entry cards (What we do) */
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; }
.entry img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.entry h3 { margin: 18px 0 8px; }
.entry p { color: var(--muted); font-size: 0.95rem; }
.entry .more { font-weight: 600; font-size: 0.95rem; }

/* Case block */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.case-grid img { width: 100%; display: block; }
.case-stats { display: flex; gap: 48px; margin: 26px 0; }
.case-stats strong { display: block; font-size: 1.9rem; font-weight: 600; }
.case-stats span { color: var(--muted); font-size: 0.9rem; }
.photo-note { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.section-dark .photo-note { color: rgba(255, 255, 255, 0.6); }

/* Client list */
.client-list { list-style: none; }
.client-list li {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.client-list li:last-child { border-bottom: 1px solid var(--line); }
.client-list.cols-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; border-bottom: 1px solid var(--line); }
.client-list.cols-2 li:last-child { border-bottom: none; }
.section-head { max-width: 760px; margin-bottom: var(--head-gap); }
.section-head h2 { margin-bottom: 12px; }
.client-list strong { font-weight: 500; }

/* Data table (MAP) */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 2px solid var(--ink);
}
.data-table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.data-table td:first-child { font-weight: 600; padding-right: 24px; }

/* Product cards */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; }
.products-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.product-card { background: #fff; border: 1px solid var(--line); }
.product-card .p-img {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}
.product-card .p-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-card .p-body { padding: 20px; }
.product-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.product-card .p-specs { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.product-card .p-ds { font-size: 0.88rem; font-weight: 600; }
.certs-line { margin-top: 28px; font-size: 0.88rem; color: var(--muted); }

/* Fact table (dark case) */
.facts { margin: 28px 0; }
.facts .fact {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.95rem;
}
.facts .fact:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.facts .fact span { color: rgba(255, 255, 255, 0.62); }
.section-soft .facts .fact { border-top-color: var(--line); }
.section-soft .facts .fact:last-child { border-bottom-color: var(--line); }
.section-soft .facts .fact span { color: var(--muted); }

/* Systems grid */
.systems-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 8px; }
.systems-grid .sys { border-top: 1px solid var(--line); padding: 20px 0; }
.systems-grid .sys:last-child { border-bottom: 1px solid var(--line); }
.systems-grid .sys:nth-last-child(2) { border-bottom: 1px solid var(--line); }
.systems-grid h3 { font-size: 1.05rem; margin-bottom: 6px; }
.systems-grid p { color: var(--muted); font-size: 0.93rem; margin-bottom: 0; }

/* News cards */
.news-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.news-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; margin-top: 32px; }
.news-grid .news-card { grid-column: span 2; }
.news-grid.center-last .news-card:nth-child(4) { grid-column: 2 / span 2; }
.news-card { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.news-card .n-cover {
  aspect-ratio: 16 / 9;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  font-weight: 600;
  font-size: 1.05rem;
  overflow: hidden;
}
.news-card .n-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .n-cover.has-img { padding: 0; align-items: stretch; }
.news-card .n-body { padding: 20px; }
.news-card .n-tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.news-card h3 { font-size: 1.05rem; margin: 8px 0 0; line-height: 1.4; }
.news-card h3 a { color: var(--ink); }
.news-card h3 a:hover { color: var(--green); text-decoration: none; }

/* Dual CTA */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.dual > div { border-top: 2px solid var(--ink); padding-top: 24px; }
.dual h2 { font-size: 1.5rem; }
.dual .row { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.dual .phone { font-weight: 700; font-size: 1.05rem; color: var(--ink); }

/* Note panel (green left border) */
.note-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 24px 28px;
  margin-top: 28px;
}
.note-panel h3 { font-size: 1.05rem; margin-bottom: 8px; }
.note-panel p { margin-bottom: 8px; font-size: 0.95rem; }
.note-panel p:last-child { margin-bottom: 0; }
.section-soft .note-panel { box-shadow: 0 2px 10px rgba(20, 40, 30, 0.05); }

/* People */
.person { display: grid; grid-template-columns: 240px 1fr; gap: 32px; margin-top: 28px; align-items: start; }
.person.no-photo { grid-template-columns: 1fr; max-width: 760px; }
.person img { width: 100%; display: block; }
.person .role { color: var(--green); font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.sh-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.sh-card { border: 1px solid var(--line); padding: 28px; background: #fff; }
.sh-card img { height: 48px; width: auto; display: block; margin-bottom: 16px; }

/* AMMON */
.ammon-logo { height: 140px; width: auto; display: block; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
}
.field input, .field select { height: 48px; }
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-actions { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.contact-lines { list-style: none; margin-top: 8px; }
.contact-lines li { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-lines li:last-child { border-bottom: 1px solid var(--line); }
.contact-lines strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }

/* Footer */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, 0.78); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 64px 0 48px;
}
.footer-brand img { height: 64px; width: auto; display: block; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; margin-bottom: 4px; }
.footer-brand .footer-co { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.footer-col h4 {
  color: #8FD6A8;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.78); font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.55); }

/* CTA band */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin-bottom: 0; }

/* Responsive */
@media (max-width: 960px) {
  .entries, .news-grid { grid-template-columns: 1fr; }
  .news-grid .news-card, .news-grid.center-last .news-card:nth-child(4) { grid-column: auto; }
  .client-list.cols-2 { grid-template-columns: 1fr; }
  .products-grid, .products-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .case-grid, .dual, .form-grid { grid-template-columns: 1fr; gap: 36px; }
  .person { grid-template-columns: 1fr; gap: 20px; }
  .person img { max-width: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sh-logos { grid-template-columns: 1fr; }
  .prose-2col { column-count: 1; }
  .media-row { flex-direction: column; gap: 24px; }
  .head-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .section-head { margin-bottom: 20px; }
  .page-banner img { height: auto; aspect-ratio: 4/3; }
  .main-nav a:not(.btn) { display: none; }
  .section { padding: 32px 0; }
  section:has(.head-grid) { padding-bottom: 24px; }
  .products-grid, .products-grid.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .client-list li { grid-template-columns: 1fr; gap: 4px; }
  .facts .fact { grid-template-columns: 1fr; gap: 4px; }
  .btn { width: 100%; text-align: center; }
  .main-nav .btn { width: auto; }
  /* Mobile hamburger menu */
  .nav-toggle { display: flex; }
  .mobile-nav.open { display: block; background: #fff; border-top: 1px solid var(--line); }
  .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
  }
}

/* 首尾元素外边距清零 */
.wrap > :first-child:not([hidden]) { margin-top: 0; }
.wrap > :last-child:not([hidden]) { margin-bottom: 0; }

/* 首页: entries 区块 → case-grid 区块过渡压缩到 var(--block-gap) */
.section:has(.entries) { padding-bottom: 24px; }
.section:has(.entries) + .section { padding-top: 24px; }

.note-panel { max-width: var(--measure); }

@media (min-width: 900px) {
  .prose p, .prose li, .prose-2col p, main p { font-size: 18px; }
  .lede { font-size: 22px; }
}

.fine-note { font-size: 14px; line-height: 1.6; color: #5D646A; max-width: var(--measure); margin-top: var(--head-gap); }

.photo-placeholder { background: #C9D3CE; display: flex; align-items: center; justify-content: center; }

.band-emphasis { background: var(--bg-soft); border-top: 4px solid var(--green); padding: var(--section-y) 0; }
.band-grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: var(--block-gap); align-items: center; }
.band-text { max-width: var(--measure); }
.band-emphasis h2 { font-size: clamp(28px,3vw,40px); margin: 0 0 var(--head-gap); }
.band-media { margin: 0; }
.band-media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
@media (max-width: 899px) { .band-grid { grid-template-columns: 1fr; } }

/* News网格补位规则：
   - 新闻条数是3的倍数时，"Press enquiries"联系框放在标题区右侧（默认）
   - 新闻条数不是3的倍数时，联系框移入网格最后一格，做成卡片（.news-card.contact-card）
   - 手机端单栏时，联系卡片始终放在新闻列表最后 */
.news-card.contact-card { background: var(--bg-soft); display: flex; align-items: center; }
.news-card.contact-card .n-body { padding: 28px; }
@media (max-width: 640px) {
  .news-grid .news-card.contact-card { order: 999; }
}
