/* ================================================================
   China Marketing Ops — Design System
   Brand color: #d71e2c (Red)
   Font: Inter (Google Fonts)
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --color-primary: #d71e2c;
  --color-teal-hover: #607775;
  --color-green-accent: #bfddb8;
  --color-universe-block: #3e4d4c;
  --color-dark-menu-a: #28312f;
  --color-dark-menu-b: #242d2d;
  --color-muted-label: rgba(62, 77, 76, 0.5);
  --color-border-light: #ebefef;
  --color-border-mint: #e7eeec;
  --color-bg-light: #f9f9f9;
  --color-cta-gradient: linear-gradient(
    -135deg,
    #926c6c, #7a9098, #659a8b, #926c6c
  );
  --max-width: 115rem;
  --font-stack: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (min-width: 1920px) {
  html { font-size: 1.058vw; }
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  color: var(--color-black);
  font-family: var(--font-stack);
  background: var(--color-white);
  overflow-x: clip;
  line-height: 1.6;
}

img, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-stack);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 4rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.75rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.875rem); line-height: 1.2; }
h4 { font-size: clamp(1.0625rem, 1vw + 0.5rem, 1.375rem); line-height: 1.3; }

p {
  color: var(--color-black);
  font-family: var(--font-stack);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}
@media (min-width: 1280px) { p { font-size: 1.1875rem; } }
@media (min-width: 1700px) { p { font-size: 1.25rem; } }

.subtitle {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.031rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

small, .small { font-size: 0.875rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0 3.5rem;
  width: 100%;
}
@media (max-width: 1279px) { .container { padding: 0 2.5rem; } }
@media (max-width: 767px)  { .container { padding: 0 1.5rem; } }
@media (max-width: 480px)  { .container { padding: 0 1rem; } }

.section {
  padding: 6.5rem 0;
}
@media (max-width: 767px) { .section { padding: 3.5rem 0; } }

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-30-70 {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 2.5rem;
}
@media (max-width: 991px) {
  .grid-2, .grid-3, .grid-30-70 { grid-template-columns: 1fr; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  align-items: center;
  background: var(--color-primary);
  border: 0.063rem solid var(--color-primary);
  border-radius: 1.75rem;
  display: inline-flex;
  font-size: 1.0625rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.5rem;
  min-height: 44px;
  min-width: 10.75rem;
  padding: 0.875rem 2rem;
  text-decoration: none;
  transition: all 0.35s ease-in-out;
  color: var(--color-white);
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--color-teal-hover);
  border-color: var(--color-teal-hover);
}

.btn-outline {
  align-items: center;
  background: rgba(255,255,255,0.15);
  border: 0.125rem solid var(--color-white);
  border-radius: 1.75rem;
  display: inline-flex;
  font-size: 1.0625rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.5rem;
  min-height: 44px;
  padding: 0.875rem 2rem;
  text-decoration: none;
  transition: all 0.35s ease-in-out;
  color: var(--color-white);
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-dark {
  align-items: center;
  background: var(--color-universe-block);
  border: 0.063rem solid var(--color-universe-block);
  border-radius: 1.75rem;
  display: inline-flex;
  font-size: 1.0625rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.5rem;
  min-height: 44px;
  padding: 1rem 2rem;
  text-decoration: none;
  transition: background 0.55s ease-in-out;
  color: var(--color-white);
  cursor: pointer;
  font-family: inherit;
}
.btn-dark:hover {
  background: var(--color-teal-hover);
  border-color: var(--color-teal-hover);
}

/* ── Header / Navigation ────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.35s ease, padding 0.35s ease;
}
.site-header.scrolled {
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  padding: 0.75rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
}
.header-logo img {
  height: 40px;
  width: auto;
}
.header-logo .logo-text {
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-left: 0.75rem;
}

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
  transition: color 0.3s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-white);
  transition: width 0.3s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { font-weight: 600; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Light header variant (non-home pages) */
.site-header.light {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}
.site-header.light .header-logo .logo-text,
.site-header.light .main-nav a { color: var(--color-black); }
.site-header.light .main-nav a::after { background: var(--color-black); }
.site-header.light .mobile-menu-btn span { background: var(--color-black); }

/* ── Page Header (for non-home pages) ───────────────────────── */
.page-header {
  padding: 8rem 0 4rem;
  background: var(--color-bg-light);
}
.page-header .breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--color-muted-label);
}
.page-header .breadcrumb a { color: var(--color-muted-label); transition: color 0.2s; }
.page-header .breadcrumb a:hover { color: var(--color-primary); }
.page-header .breadcrumb .current { color: var(--color-black); font-weight: 500; }

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-black);
}
.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.4) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 5rem;
  width: 100%;
}
.hero-content .container {
  max-width: 72rem;
}
.hero-content .brand {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(2.5rem, 5vw + 1rem, 5.5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  max-width: 56rem;
}
.hero-content .hero-desc {
  color: rgba(255,255,255,0.8);
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.375rem);
  line-height: 1.5;
  max-width: 42rem;
  margin-bottom: 2rem;
}

/* ── Service Cards ──────────────────────────────────────────── */
.service-card {
  background: var(--color-white);
  border: 0.063rem solid var(--color-border-light);
  border-radius: 0;
  padding: 2.5rem;
  transition: box-shadow 0.35s ease;
}
.service-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.08); }
.service-card .card-number {
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-border-mint);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.service-card h3 { margin-bottom: 0.75rem; }
.service-card .card-subtitle {
  color: var(--color-muted-label);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}
.service-card .card-desc { font-size: 1rem; }

/* ── Case Cards ─────────────────────────────────────────────── */
.case-card {
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}
.case-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.case-card-body {
  padding: 1.5rem;
  background: var(--color-white);
}
.case-card-body h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.case-card-body p { font-size: 0.9375rem; color: var(--color-muted-label); }

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
  background: var(--color-cta-gradient);
  color: var(--color-white);
  overflow: hidden;
  position: relative;
  padding: 8rem 0;
  text-align: center;
}
.cta-section .eyebrow { color: var(--color-white); opacity: 0.8; }
.cta-section h2 { color: var(--color-white); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 36rem; margin: 0 auto 2rem; }

/* ── Contact Section ────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
@media (max-width: 991px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-black);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: var(--font-stack);
  transition: border-color 0.25s ease;
  background: var(--color-white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.form-checkbox input { margin-top: 0.2rem; }
.form-checkbox a { color: var(--color-primary); text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer .footer-copy {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}
.site-footer .footer-links { display: flex; gap: 2rem; }
.site-footer .footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color 0.3s;
}
.site-footer .footer-links a:hover { color: var(--color-white); }
.site-footer .footer-back-top {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1.25rem;
}
.site-footer .footer-back-top:hover { background: var(--color-teal-hover); }

/* ── Utility ────────────────────────────────────────────────── */
.bg-black { background: var(--color-black); color: var(--color-white); }
.bg-light { background: var(--color-bg-light); }
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-primary { color: var(--color-primary); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ── Responsive Nav ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .mobile-menu-btn { display: block; }
  .main-nav {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0,0,0,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.5rem; }
  .btn-primary, .btn-outline, .btn-dark {
    min-width: min(100%, 10.75rem);
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
  p { font-size: 0.9375rem; }
  .subtitle { font-size: 0.9375rem; }
  .service-card { padding: 1.5rem; }
}

/* ── Animations ─────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Privacy Policy ─────────────────────────────────────────── */
.privacy-content { max-width: 48rem; }
.privacy-content h3 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.privacy-content p, .privacy-content li { color: #333; }
.privacy-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.privacy-content ul li { margin-bottom: 0.4rem; font-size: 1.0625rem; }

/* ── Tabs / Accordion ───────────────────────────────────────── */
.accordion-item {
  border-bottom: 1px solid var(--color-border-light);
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s;
}
.accordion-header:hover { color: var(--color-primary); }
.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}
.accordion-item.open .accordion-header::after {
  content: '−';
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.accordion-item.open .accordion-body {
  max-height: 2000px;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--color-white);
  border-radius: 1rem;
  padding: 2.5rem;
  max-width: 28rem;
  width: 90%;
  text-align: center;
}
.modal-box h3 { margin-bottom: 0.75rem; }
.modal-box p { font-size: 0.9375rem; color: #555; margin-bottom: 1.5rem; }
.modal-box .btn-row { display: flex; gap: 1rem; justify-content: center; }
