/* ============================================================
   DCX — Blog index EN page — page-specific styles
   Common: tokens, reset, header, footer → css/common.css
   ============================================================ */

/* EN font + layout overrides */
:root { --font-body: "Inter", sans-serif; }
body { line-height: 1.75; }
html { scroll-padding-top: 120px; }
ul { list-style: none; }
.container { width: min(1140px, 92%); margin-inline: auto; }

/* Outline button (not in common) */
.btn.outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; }
.btn.outline:hover { background: var(--navy); color: #fff; }
.btn.outline .arr { color: var(--green); }

/* Dark footer (EN pages) */
footer { background: var(--navy-deep); color: #fff; text-align: center; padding: 36px 0 44px; border-top: 3px solid var(--ink); box-shadow: 0 -3px 0 var(--green); }
footer .footer-links { font-size: 13px; }
footer a { color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 1px; }
footer img { width: 190px; margin: 20px auto 14px; filter: brightness(0) invert(1); }
footer small { color: rgba(255,255,255,.5); display: block; margin-top: 6px; }
@media (max-width: 600px) { footer { padding: 28px 0 36px; } footer img { width: 150px; } }

/* ---- hero ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: clamp(60px, 9vw, 110px) 0 clamp(50px, 7vw, 90px);
  color: #fff; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.hero .eyebrow { color: #c9d0f2; }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 56px); font-weight: 900;
  letter-spacing: -.02em; line-height: 1.2;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero-lead {
  max-width: 34em; margin: 0 auto;
  font-size: clamp(15px, 1.4vw, 17px); color: #dde0f0; line-height: 1.85;
}
.article-count {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 28px; padding: 8px 20px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px; font-family: var(--font-mono); font-size: 13px; color: #c9d0f2;
}
.article-count strong { color: #fff; font-size: 20px; }

/* ---- filter bar ---- */
.filter-bar { background: #fff; border-bottom: 1px solid var(--rail); position: sticky; top: 65px; z-index: 90; }
.filter-in { display: flex; align-items: center; gap: 10px; padding: 14px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-in::-webkit-scrollbar { display: none; }
.filter-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.filter-pill {
  flex-shrink: 0; padding: 7px 18px; border-radius: 999px;
  border: 2px solid var(--rail); font-size: 13px; font-weight: 700;
  color: var(--muted); background: #fff; cursor: pointer;
  transition: all .2s; white-space: nowrap; min-height: 36px;
  font-family: var(--font-body);
}
.filter-pill:hover { border-color: var(--navy); color: var(--navy); }
.filter-pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-pill .count { font-family: var(--font-mono); font-size: 10px; opacity: .7; margin-left: 4px; }

/* ---- main content ---- */
.blog-main { padding: clamp(48px, 7vw, 96px) 0; }

/* ---- featured ---- */
.featured {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px); align-items: center;
  margin-bottom: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--rail);
}
.featured-thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; position: relative; box-shadow: var(--shadow-md); }
.featured-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.new-badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--green); color: #162100;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.featured-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.featured-section-header {
  margin: 0 0 20px; font-size: 13px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px;
}
.featured-section-header::after { content: ""; flex: 1; height: 1px; background: var(--rail); }
.featured-body h3 {
  margin: 0 0 16px;
  font-size: clamp(19px, 2.2vw, 27px); font-weight: 900;
  color: var(--navy); line-height: 1.45; text-wrap: balance;
}
.featured-body p { margin: 0 0 24px; font-size: 15px; color: var(--text); line-height: 1.85; }
@media (max-width: 760px) { .featured { grid-template-columns: 1fr; } }

/* ---- tag pills ---- */
.tag-pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 11px; font-family: var(--font-mono); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.tag-blog       { background: var(--tint); color: var(--accent); border: 1px solid var(--rail); }
.tag-shopify    { background: rgba(150,191,72,.12); color: #4d6a0a; border: 1px solid rgba(150,191,72,.35); }
.tag-wms        { background: rgba(54,63,117,.08); color: var(--navy); border: 1px solid rgba(54,63,117,.2); }
.tag-fulfillment{ background: rgba(90,100,173,.1); color: var(--accent); border: 1px solid rgba(90,100,173,.25); }
.tag-overseas   { background: rgba(142,195,0,.1); color: #4a6b00; border: 1px solid rgba(142,195,0,.3); }
.date-str { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .08em; }

/* ---- article grid ---- */
.articles-section-header {
  margin: 0 0 28px; font-size: 13px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px;
}
.articles-section-header::after { content: ""; flex: 1; height: 1px; background: var(--rail); }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--rail);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-thumb { aspect-ratio: 16/9; position: relative; overflow: hidden; background: var(--tint); }
.article-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 18px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.article-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.article-body h3 {
  margin: 0 0 auto; padding-bottom: 14px;
  font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.65; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-body h3::after { display: none; }
.article-read {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--accent);
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rail);
}
.article-read::after { content: "→"; color: var(--green); }
.article-card.hidden { display: none; }

@media (max-width: 900px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .articles-grid { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 14px; padding-bottom: 16px; scrollbar-width: none; }
  .articles-grid::-webkit-scrollbar { display: none; }
  .article-card { flex: 0 0 82%; scroll-snap-align: start; scroll-snap-stop: always; }
  .article-card.hidden { display: flex; }
  .article-card[style*="display: none"] { display: none !important; }
  .load-more-wrap { display: none; }
}

/* ---- load more ---- */
.load-more-wrap { text-align: center; margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--rail); }
.load-more-wrap p { font-size: 13px; color: var(--muted); margin-bottom: 20px; font-family: var(--font-mono); letter-spacing: .08em; }

/* ---- CTA strip ---- */
.cta-strip { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); padding: clamp(48px, 7vw, 80px) 0; text-align: center; color: #fff; margin-top: clamp(60px, 8vw, 100px); }
.cta-strip h2 { margin: 0 0 14px; color: #fff; font-size: clamp(20px, 3vw, 32px); font-weight: 900; }
.cta-strip p { margin: 0 0 32px; color: #dde0f0; font-size: 16px; }
.cta-strip .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-strip .btn.outline { border-color: rgba(255,255,255,.5); color: #fff; }
.cta-strip .btn.outline:hover { background: rgba(255,255,255,.15); }

/* ---- reveal motion (JS-gated, EN pattern) ---- */
@keyframes revealFade { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; }
.js [data-reveal].in-view { animation: revealFade .65s ease forwards; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], .js [data-reveal] { opacity: 1; }
  .js [data-reveal].in-view { animation: none; }
  .article-card, .btn { transition: none; }
}
