/* ==========================================================================
   Dinghaocheng Electronics — Static Site Stylesheet
   Flat professional B2B design. No frameworks, no external fonts.
   Colours: deep navy / slate / white. Mobile-first responsive.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy:        #0b2545;
  --navy-2:      #133a63;
  --blue:        #1b6ca8;
  --blue-dark:   #145785;
  --ink:         #1f2d3d;
  --muted:       #5b6b7b;
  --line:        #dce4ec;
  --line-soft:   #eaf0f5;
  --bg:          #ffffff;
  --bg-alt:      #f4f7fa;
  --bg-navy:     #0b2545;
  --white:       #ffffff;
  --success:     #1b7a4b;
  --radius:      6px;
  --radius-sm:   4px;
  --shadow:      0 2px 10px rgba(11, 37, 69, .07);
  --maxw:        1180px;
  --header-h:    72px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--bg-navy); color: #dce7f2; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a { color: #9ccbef; }
.section-head { margin-bottom: 36px; max-width: 760px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-navy .section-head p { color: #b9cde0; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 10px;
}
.section-navy .eyebrow { color: #7fb8e4; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prose { max-width: 820px; }
.prose p, .prose li { color: #34465a; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.lead { font-size: 1.15rem; color: #34465a; }

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.1); height: var(--header-h);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 3px; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: #fff; font-size: .98rem; }
.brand-text span { color: #9fb8d0; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: var(--radius-sm); padding: 8px 11px; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; position: relative; }
.main-nav a {
  color: #dbe7f2; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: .92rem; display: inline-block;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.main-nav .nav-cta a {
  background: var(--blue); color: #fff; font-weight: 600; padding: 9px 16px; margin-left: 8px;
}
.main-nav .nav-cta a:hover { background: var(--blue-dark); }
/* dropdown for Applications */
.main-nav .has-drop > a::after { content: " ▾"; font-size: .75em; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 8px; z-index: 110;
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown { display: block; }
.dropdown a { color: var(--ink); display: block; padding: 6px 10px; font-size: .88rem; }
.dropdown a:hover { background: var(--bg-alt); color: var(--blue); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: .96rem; border: 1px solid transparent; cursor: pointer;
  text-align: center; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--bg-alt); color: var(--blue-dark); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link { font-weight: 600; }

/* ---------- 6. Hero ---------- */
.hero {
  background: var(--navy); color: #e6eef6; padding: 72px 0 64px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border: 1px solid rgba(255,255,255,.06); border-radius: 50%; pointer-events: none;
}
.hero h1 { color: #fff; max-width: 820px; }
.hero .lead { color: #c4d6e6; max-width: 720px; font-size: 1.15rem; }
.hero .btn-row { margin-top: 26px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 28px; font-size: .9rem; color: #a9c1d8; }
.hero-notes span::before { content: "✓ "; color: #7fd0a4; font-weight: 700; }
.hero-image { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.14); }

/* ---------- 7. Trust / stat bar ---------- */
.trust-bar { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0; }
.trust-bar .grid { gap: 10px; }
.stat { text-align: center; padding: 6px 12px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: 0; }
.stat .num { display: block; font-size: 1.55rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.stat .label { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ---------- 8. Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); height: 100%;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.card p + p { margin-top: 10px; }
.card ul { color: var(--muted); font-size: .92rem; margin-bottom: 0; padding-left: 1.1em; }
.card-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); background: #eaf2f9;
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; margin-bottom: 16px;
}
.card-image { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.card-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-footer { margin-top: 18px; font-size: .9rem; font-weight: 600; }
.card-link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: .92rem; }

/* application tile */
.app-tile {
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .15s, transform .15s;
}
.app-tile:hover { border-color: var(--blue); transform: translateY(-2px); text-decoration: none; }
.app-tile h3 { font-size: 1.05rem; margin-bottom: 6px; }
.app-tile p { color: var(--muted); font-size: .9rem; margin: 0; }
.app-tile .arrow { color: var(--blue); font-weight: 700; margin-top: 14px; font-size: .9rem; }

/* numbered process steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 58px; margin-bottom: 24px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 42px; height: 42px;
  background: var(--navy); color: #fff; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); margin-bottom: 0; font-size: .94rem; }

/* ---------- 9. CTA band ---------- */
.cta-band { background: var(--navy-2); color: #fff; padding: 44px 0; }
.cta-band .cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.55rem; }
.cta-band p { color: #c2d5e6; margin: 0; font-size: .95rem; }
.cta-band .btn-row { margin: 0; }

/* ---------- 10. Breadcrumb ---------- */
.breadcrumb { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 14px 0; font-size: .85rem; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #a8b6c4; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- 11. Page intro ---------- */
.page-intro { padding: 56px 0 20px; }
.page-intro .lead { max-width: 800px; }
.page-intro-navy { background: var(--navy); color: #dce7f2; padding: 60px 0; }
.page-intro-navy h1 { color: #fff; }
.page-intro-navy .lead { color: #bdd2e5; }

/* ---------- 12. Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font-size: 1.1rem; font-weight: 700; color: var(--navy); padding: 0 0 10px; border-bottom: 1px solid var(--line-soft); width: 100%; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.field label .req { color: #b3261e; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="file"], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c8d3de; border-radius: var(--radius-sm);
  font: inherit; font-size: .94rem; color: var(--ink); background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid rgba(27,108,168,.2); }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; }
.checkbox-field { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.checkbox-field input { margin-top: 4px; flex-shrink: 0; }
.form-note { background: #eef5fa; border-left: 4px solid var(--blue); padding: 14px 16px; font-size: .9rem; color: #34465a; margin-bottom: 22px; }
.form-note strong { color: var(--navy); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-submit-row { border-top: 1px solid var(--line-soft); padding-top: 22px; }

/* ---------- 13. FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { color: var(--muted); margin: 0; font-size: .95rem; }
.faq-group-title { margin-top: 40px; color: var(--blue); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* ---------- 14. Case cards ---------- */
.case-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.case-card .case-tag { display: inline-block; background: #eaf2f9; color: var(--blue); font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-bottom: 12px; }
.case-card dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; margin: 0; font-size: .9rem; }
.case-card dt { color: var(--muted); font-weight: 600; }
.case-card dd { margin: 0; color: var(--ink); }

/* ---------- 15. Footer ---------- */
.site-footer { background: #081d36; color: #9fb4c9; padding: 52px 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; padding-bottom: 40px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; display: block; margin-bottom: 8px; }
.footer-brand p { max-width: 300px; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #9fb4c9; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
.footer-bottom a { color: #9fb4c9; }

/* ---------- 16. Utilities ---------- */
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.placeholder-note { font-size: .8rem; color: #8a97a5; font-style: italic; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 14px; font-size: .82rem; color: var(--navy); background: #fff;
}
.badge::before { content: "✓"; color: var(--success); font-weight: 800; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 18px rgba(0,0,0,.2); padding: 10px 20px 18px;
  }
  .main-nav.is-open > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav.is-open a { display: block; padding: 10px 12px; }
  .main-nav.is-open .nav-cta a { margin: 8px 0 0; text-align: center; }
  .main-nav.is-open .dropdown { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 10px; background: transparent; }
  .main-nav.is-open .dropdown a { color: #bcd0e2; }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 680px) {
  section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .trust-bar .grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 12px 6px; }
  .cta-band .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 52px 0 46px; }
  .form-card { padding: 20px; }
  .case-card dl { grid-template-columns: 1fr; gap: 2px; }
  .case-card dd { margin-bottom: 8px; }
}
