/* ==========================================================================
   China Tech Factory Tours — minimal B2B design system
   ========================================================================== */

:root {
  --ink: #10151b;
  --ink-2: #3d4653;
  --muted: #6b7684;
  --line: #e3e7ec;
  --line-strong: #cfd6de;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-dark: #131a23;
  --accent: #1a56db;
  --accent-dark: #12397f;
  --accent-soft: #eef3fe;
  --warn: #b45309;
  --warn-soft: #fdf6e7;
  --ok: #0f7a52;
  --radius: 4px;
  --radius-lg: 8px;
  --max: 1200px;
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: 34px; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; }
.section-dark .section-head p { color: #a8b3c1; }
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 26px; }
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: none;
  font-family: inherit;
  line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn .icon { width: 18px; height: 18px; }

.text-link {
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.text-link .icon { width: 16px; height: 16px; transition: transform 0.15s; }
.text-link:hover .icon { transform: translateX(3px); }
.text-link:hover { text-decoration: underline; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.logo-mark {
  width: 30px; height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-text strong { font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a { font-size: 15px; color: var(--ink-2); position: relative; padding: 4px 0; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.is-active { color: var(--accent); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}
.lang-switch a { padding: 5px 10px; color: var(--muted); }
.lang-switch a.on { background: var(--ink); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink); }

/* Squeeze the header as the window narrows, and only fall back to the burger
   menu once the 7 items genuinely stop fitting. */
@media (max-width: 1180px) {
  .header-inner { gap: 20px; }
  .header-actions { gap: 8px; }
  .logo-text strong { font-size: 14px; }
  .main-nav { gap: 12px; }
  .main-nav a { font-size: 13.5px; }
}
@media (max-width: 1040px) {
  .header-inner { gap: 12px; justify-content: space-between; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 24px 20px; gap: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .header-actions .btn { display: none; }
}
@media (max-width: 700px) {
  /* let the wordmark shrink instead of pushing the actions off-screen */
  .logo { flex-shrink: 1; }
  .logo-text span { display: none; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 46px; letter-spacing: -0.025em; margin-bottom: 20px; }
.hero-lead { font-size: 19px; color: var(--ink-2); max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon { width: 15px; height: 15px; color: var(--ok); }
.hero-art { justify-self: center; width: 100%; }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { display: none; }
  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 32px; }
  .hero-lead { font-size: 17px; }
}

/* data strip */
.data-strip { border-bottom: 1px solid var(--line); background: #fff; }
.data-strip-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.data-item { padding: 28px 0; border-right: 1px solid var(--line); padding-right: 24px; }
.data-item:last-child { border-right: 0; }
.data-item strong { display: block; font-size: 32px; letter-spacing: -0.03em; font-weight: 600; }
.data-item span { font-size: 14px; color: var(--muted); }
.data-item:not(:first-child) { padding-left: 32px; }
@media (max-width: 720px) {
  .data-strip-inner { grid-template-columns: 1fr; }
  .data-item { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .data-item:not(:first-child) { padding-left: 0; }
  .data-item:last-child { border-bottom: 0; }
  .data-item strong { font-size: 26px; }
}

/* ---------------- generic grids ---------------- */

.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cell { background: #fff; padding: 28px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card-icon { color: var(--accent); margin-bottom: 16px; }
.card-icon .icon { width: 24px; height: 24px; }
.cell h3 { font-size: 17px; margin-bottom: 8px; }
.cell p { font-size: 14.5px; color: var(--muted); }
.cell p:not(:last-child) { margin-bottom: 10px; }

.scope-list li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.scope-list .icon { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }

/* client types */
.client-item { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.client-item:last-child { border-bottom: 1px solid var(--line); }
.client-item h3 { font-size: 16px; }
.client-item p { font-size: 15px; color: var(--muted); }
@media (max-width: 720px) { .client-item { grid-template-columns: 1fr; gap: 6px; } }

/* comparison table */
.compare { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.compare-row:last-child { border-bottom: 0; }
.compare-row > div { padding: 20px 24px; font-size: 15px; }
.compare-row > div:first-child { color: var(--muted); border-right: 1px solid var(--line); background: var(--bg-alt); }
.compare-row > div:last-child { color: var(--ink); }
.compare-head { background: var(--ink) !important; color: #fff !important; font-weight: 600; border-right-color: #2c333d !important; }
.compare-head:last-child { background: var(--accent) !important; }
@media (max-width: 720px) { .compare-row { grid-template-columns: 1fr; } .compare-row > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); } }

/* testimonials */
.quote-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: #fff; display: flex; flex-direction: column; }
.quote-card p { font-size: 16px; color: var(--ink-2); flex: 1; }
.quote-meta { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.quote-meta strong { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.quotes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 800px) { .quotes-grid { grid-template-columns: 1fr; } }

/* industry chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 16px; font-size: 14px; color: var(--ink-2); background: #fff;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- company cards ---------------- */

.company-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .company-grid { grid-template-columns: 1fr; } }

.company-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; padding: 24px; display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.company-card:hover { border-color: var(--line-strong); }
.company-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.company-logo {
  width: 46px; height: 46px; flex-shrink: 0; border: 1px solid var(--line);
  border-radius: var(--radius); display: grid; place-items: center; background: var(--bg-alt);
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--muted);
}
.company-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.company-card h3 { font-size: 17px; margin-bottom: 4px; }
.company-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.company-summary { font-size: 14.5px; color: var(--ink-2); margin-bottom: 16px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.badge {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.badge .icon { width: 12px; height: 12px; }
.badge-verified { border-color: #bcd3b0; background: #f1f8ee; color: #2f6b1f; }
.badge-listed { border-color: #cbd8ef; background: #eff3fb; color: #24457f; }
.badge-audited { border-color: #e3d5bd; background: #fdf7ee; color: #8a5a12; }
.badge-demo { border-color: #e6c9c9; background: #fdf1f1; color: #a03030; }

.spec-block { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.spec-label { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.spec-text { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }

.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 4px; }
.term { background: #fff; padding: 10px 12px; font-size: 12.5px; }
.term-k { color: var(--muted); display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.term-v { display: inline-flex; align-items: center; gap: 4px; }
.term-v .icon { width: 13px; height: 13px; }
.term-v.no { color: #b03030; }
.term-v.yes { color: var(--ok); }

.card-foot { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------- case studies ---------------- */

.case-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
.case-body { padding: 26px; }
.case-body h3 { font-size: 19px; margin-bottom: 12px; }
.case-body h3 a:hover { color: var(--accent); }
.case-summary { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.case-facts div { background: #fff; padding: 10px 12px; font-size: 13px; }
.case-facts span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.case-quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; font-size: 15px; color: var(--ink-2); font-style: italic; }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .case-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* faq accordion */
.faq-group { margin-bottom: 40px; }
.faq-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: #fff; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-size: 16px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--muted); line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-answer { padding: 18px 20px; font-size: 15px; color: var(--ink-2); background: #fff; }

/* ---------------- forms ---------------- */

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
.field label .req { color: #c0392b; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select[multiple] { min-height: 120px; }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.checkbox-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.checkbox-item input { width: 15px; height: 15px; accent-color: var(--accent); }

.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.form-success { border: 1px solid #bcd3b0; background: #f3f9f0; border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: var(--ink-2); margin-bottom: 16px; }
.form-error { border: 1px solid #e6b9b9; background: #fdf1f1; color: #8f2b2b; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }

/* contact layout */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 32px; } }
.info-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--bg-alt); }
.info-panel h3 { font-size: 16px; margin-bottom: 16px; }
.info-line { display: flex; gap: 12px; font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
.info-line .icon { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.steps li { display: flex; gap: 14px; margin-bottom: 20px; }
.step-n {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.steps h4 { font-size: 15px; margin-bottom: 2px; }
.steps p { font-size: 14px; color: var(--muted); }

.calendly-box { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; background: #fff; margin-top: 20px; }
.calendly-box iframe { width: 100%; min-height: 620px; border: 0; }

/* ---------------- footer ---------------- */

.site-footer { background: var(--bg-dark); color: #aab4c0; padding: 64px 0 28px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #232c37; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; font-weight: 600; }
.site-footer a { color: #aab4c0; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 8px; }
.footer-brand .logo-mark { border-color: #fff; color: #fff; }
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text span { color: #7f8b99; }
.footer-brand p { margin-top: 14px; max-width: 340px; }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #7f8b99; }
.footer-social { display: flex; gap: 14px; }
.footer-social a:hover { color: #fff; }

/* partners strip */
.partner-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.partner-item {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px;
  font-size: 13.5px; color: var(--ink-2); background: #fff; min-height: 44px;
  display: inline-flex; align-items: center; gap: 10px;
}
.partner-item img { max-height: 28px; width: auto; object-fit: contain; }

/* page hero (inner pages) */
.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero h1 { font-size: 40px; letter-spacing: -0.02em; margin-bottom: 14px; }
.page-hero p { font-size: 18px; color: var(--muted); max-width: 720px; }
@media (max-width: 720px) { .page-hero { padding: 40px 0 32px; } .page-hero h1 { font-size: 28px; } .page-hero p { font-size: 16px; } }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--accent); }

/* service block */
.service-block { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; background: #fff; margin-bottom: 20px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
@media (max-width: 860px) { .service-block { grid-template-columns: 1fr; gap: 20px; padding: 24px; } }
.service-block h2 { font-size: 24px; margin-bottom: 6px; }
.service-tagline { color: var(--accent); font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.service-summary { color: var(--ink-2); font-size: 15.5px; margin-bottom: 20px; }
.service-side { border-left: 1px solid var(--line); padding-left: 28px; }
@media (max-width: 860px) { .service-side { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; } }
.service-side dl { margin: 0; }
.service-side dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.service-side dd { margin: 0 0 18px; font-size: 14.5px; }
.deliver-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); margin-bottom: 8px; }
.deliver-list .icon { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; margin-top: 5px; }

.how-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.how-step { background: #fff; padding: 22px; }
.how-step .n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 8px; display: block; }
.how-step h4 { font-size: 15px; margin-bottom: 6px; }
.how-step p { font-size: 13.5px; color: var(--muted); }
@media (max-width: 980px) { .how-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .how-flow { grid-template-columns: 1fr; } }

/* about */
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .about-layout { grid-template-columns: 1fr; gap: 24px; } }
.about-layout h2 { font-size: 28px; margin-bottom: 16px; }
.point-list li { display: flex; gap: 12px; margin-bottom: 14px; font-size: 15.5px; color: var(--ink-2); }
.point-list .icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }

/* cta band */
.cta-band { background: var(--bg-dark); color: #fff; padding: 72px 0; }
.cta-band h2 { font-size: 34px; margin-bottom: 14px; }
.cta-band p { color: #a8b3c1; font-size: 17px; max-width: 640px; }
.cta-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
@media (max-width: 720px) { .cta-band h2 { font-size: 26px; } }

/* utility */
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; z-index: 100; border: 1px solid var(--line-strong); }

/* ==========================================================================
   Admin panel
   ========================================================================== */

.admin-body { background: var(--bg-alt); }
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg-dark); color: #aab4c0; padding: 20px 0; min-width: 0; }
.admin-brand { padding: 0 20px 20px; border-bottom: 1px solid #232c37; margin-bottom: 16px; }
.admin-brand strong { color: #fff; display: block; font-size: 14px; }
.admin-brand span { font-size: 12px; }
.admin-nav li a {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  font-size: 14px; color: #aab4c0;
}
.admin-nav li a:hover { background: #1b232d; color: #fff; }
.admin-nav li a.on { background: #1b232d; color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.admin-nav .sec { padding: 16px 20px 6px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #6b7684; }
.admin-nav .icon { width: 16px; height: 16px; }
.admin-main { min-width: 0; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: 0 28px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.admin-topbar h1 { font-size: 17px; }
.admin-content { padding: 28px; max-width: 1200px; }
/* Narrow screens: the sidebar becomes a horizontally scrollable tab bar
   (hiding it outright would leave the admin panel unnavigable on a phone). */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { padding: 0; }
  .admin-brand { display: none; }
  .admin-nav {
    display: flex; gap: 6px; padding: 10px 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    min-width: 0;
  }
  .admin-nav .sec { display: none; }
  .admin-nav li { flex: 0 0 auto; }
  .admin-nav li a {
    padding: 8px 12px; border-radius: var(--radius);
    background: #1b232d; white-space: nowrap;
  }
  .admin-nav li a.on { background: #26313f; }
  .admin-content { padding: 18px; }
  .admin-topbar { padding: 0 16px; }
}
@media (max-width: 640px) {
  .admin-topbar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .admin-topbar h1 { font-size: 15px; }
}
@media (max-width: 520px) {
  .admin-topbar .text-link { display: none; }
}

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.stat-box strong { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.stat-box span { font-size: 13px; color: var(--muted); }
.stat-box.is-new strong { color: var(--accent); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 20px; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 20px; overflow-x: auto; }
.panel-body.flush { padding: 0; }

/* Wide admin tables scroll inside their panel instead of breaking the page */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.data th {
  text-align: left; padding: 10px 16px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg-alt);
  font-weight: 600;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fafbfc; }
.cell-actions { display: flex; gap: 8px; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-danger { color: #b03030; }

.pill { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.pill-new { border-color: #cbd8ef; background: #eff3fb; color: var(--accent-dark); }
.pill-ok { border-color: #bcd3b0; background: #f1f8ee; color: #2f6b1f; }
.pill-warn { border-color: #e3d5bd; background: #fdf7ee; color: #8a5a12; }
.pill-off { border-color: var(--line-strong); background: var(--bg-alt); color: var(--muted); }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 800px) { .editor-grid { grid-template-columns: 1fr; } }
.lang-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fcfcfd; }
.lang-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }

.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.admin-login-card h1 { font-size: 20px; margin-bottom: 6px; }
.admin-login-card p { font-size: 14px; color: var(--muted); margin-bottom: 22px; }

.alert { padding: 11px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }
.alert-error { border: 1px solid #e6b9b9; background: #fdf1f1; color: #8f2b2b; }
.alert-ok { border: 1px solid #bcd3b0; background: #f3f9f0; color: #2f6b1f; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-item dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 3px; }
.detail-item dd { margin: 0; font-size: 15px; }
.detail-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg-alt); font-size: 15px; white-space: pre-wrap; }

/* --------------------------------------------------------------------------
   Case photo gallery + lightbox (public site)
   -------------------------------------------------------------------------- */

.case-cover { margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-alt); }
.case-cover img { width: 100%; height: auto; }

.gallery-title { font-size: 20px; margin: 40px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.gallery-title span { font-size: 13px; font-weight: 400; color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gallery-item {
  position: relative; padding: 0; margin: 0; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-alt);
  cursor: zoom-in; display: block; line-height: 0;
}
.gallery-item:hover { border-color: var(--line-strong); }
.gallery-item img { width: 100%; height: 190px; object-fit: cover; transition: transform 0.25s; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; line-height: 1.4;
  font-size: 12.5px; color: #fff; padding: 18px 10px 8px;
  background: linear-gradient(to top, rgba(16, 21, 27, 0.78), rgba(16, 21, 27, 0));
}
.gallery-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery-item img { height: 140px; } }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12, 16, 21, 0.94); display: none; }
.lightbox.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; color: #fff; font-size: 13px; }
.lightbox-count { color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.lightbox-btn { background: none; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox-stage { display: grid; place-items: center; padding: 0 20px; overflow: auto; }
.lightbox-stage img { max-width: 100%; max-height: 74vh; object-fit: contain; background: #fff; }
.lightbox-foot { padding: 14px 24px 24px; text-align: center; color: rgba(255, 255, 255, 0.86); font-size: 14px; min-height: 24px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (max-width: 700px) { .lightbox-nav { width: 36px; height: 36px; font-size: 18px; } }

/* photo strip on the case index */
.case-photos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.case-photos img { width: 76px; height: 54px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.case-photos-more {
  width: 76px; height: 54px; display: grid; place-items: center; font-size: 13px;
  color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.case-photos-count { font-size: 12.5px; color: var(--muted); margin-left: 6px; }

/* --------------------------------------------------------------------------
   Admin: gallery manager
   -------------------------------------------------------------------------- */

.field-note { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; background: #fcfcfd; }
.field-note strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.field-note span { font-size: 12.5px; color: var(--muted); }

.gm-sep { border: 0; border-top: 1px solid var(--line); margin: 26px 0 20px; }
.gallery-manager h3 { font-size: 14px; margin-bottom: 6px; }
.gm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gm-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: #fcfcfd; }
.gm-item img { width: 100%; height: 110px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; margin-bottom: 8px; background: #fff; }
.gm-item input[type="text"] { width: 100%; margin-bottom: 6px; }
.gm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-sort { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0; }
.gm-sort input { width: 62px; }
.gm-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.gm-upload .field-hint { margin-top: 0; }

/* --------------------------------------------------------------------------
   Small-screen refinements (phones and small tablets)
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
  .page-hero { padding: 32px 0 26px; }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 28px; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .cell { padding: 20px; }
  .service-block { padding: 20px; }
  .info-panel { padding: 20px; }
  .calendly-box { padding: 18px; }
  .quote-card { padding: 20px; }
  .case-body { padding: 20px; }
  .company-card { padding: 18px; }
  .form-card { padding: 20px; }
  .faq-item summary { padding: 14px 16px; font-size: 15px; }
  .faq-answer { padding: 16px; }

  /* spec grids that only had a desktop column count */
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-grid { grid-template-columns: 1fr; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-box { padding: 16px; }
  .stat-box strong { font-size: 26px; }
  .data-item strong { font-size: 24px; }

  .admin-content { padding: 14px; }
  .panel-body { padding: 16px; }
  .panel-head { padding: 14px 16px; }
  .lightbox-foot { padding: 10px 16px 18px; font-size: 13px; }
}

@media (max-width: 400px) {
  .container { padding: 0 14px; }
  .stat-grid { grid-template-columns: 1fr; }
  .terms { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: 1fr; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .hero h1 { font-size: 25px; }
  .section-head h2, .cta-band h2 { font-size: 23px; }
  .case-photos img, .case-photos-more { width: 62px; height: 44px; }
}

/* two-column route / outcome block on the case index */
.case-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 16px; }
@media (max-width: 720px) { .case-cols { grid-template-columns: 1fr; gap: 14px; } }

.company-title { font-size: 34px; }
@media (max-width: 720px) { .company-title { font-size: 24px; } }
.case-title { font-size: 36px; }
@media (max-width: 720px) { .case-title { font-size: 25px; } }
