/* =========================================================
   多多28中国区官网 — 全站共享样式 Site Kit
   设计主题：档案检索终端 / 复古未来主义
   文件位置：/assets/site.css
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* brand palette */
  --paper: #F5EFE0;
  --paper-deep: #EDE4D0;
  --ink: #0E1B2A;
  --orange: #E85D2F;
  --night: #1B3A5C;
  --glass: rgba(255, 255, 255, 0.75);
  --warm-line: #D8CFC0;
  --cream: #E9B44C;
  --brick: #B02E2E;
  --sea: #1F6E6E;
  --grid-line: rgba(14, 27, 42, 0.08);

  /* fonts */
  --font-heading: "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Consolas", "Courier New", monospace;

  /* layout */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: 24px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;

  /* effects */
  --shadow-card: 4px 4px 0 rgba(14, 27, 42, 0.12);
  --border-ink: 2px solid var(--ink);
  --border-warm: 1px solid var(--warm-line);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

p {
  margin-bottom: 1em;
}

/* ---------- Focus & Motion ---------- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-progress-bar] { display: none; }
}

/* ---------- Layer Stacking ---------- */
#main-content,
.site-skip,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Containers ---------- */
.page-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-lg) var(--gutter) var(--space-xl);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-lg) var(--gutter) var(--space-xl);
}

/* ---------- Skip Link ---------- */
.site-skip {
  position: fixed;
  top: 8px;
  left: -9999px;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--orange);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
}

.site-skip:focus {
  left: 8px;
  outline: none;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  z-index: 50;
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--orange) 0 16px,
    var(--night) 16px 32px,
    var(--cream) 32px 48px,
    var(--ink) 48px 64px
  );
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

/* brand */
.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--orange);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.brand-block:hover .brand-mark {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-sublink {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--night);
  transition: color 0.15s;
}

.brand-block:hover .brand-sublink {
  color: var(--orange);
}

/* header tools */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.quick-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  background: var(--orange);
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  box-shadow: 2px 2px 0 rgba(14, 27, 42, 0.18);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.quick-link:hover {
  background: var(--night);
  transform: translate(1px, 1px);
  box-shadow: none;
}

.quick-link-arrow {
  display: inline-block;
  transition: transform 0.15s;
}

.quick-link:hover .quick-link-arrow {
  transform: translateX(3px);
}

.header-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--night);
  background: var(--glass);
  border: 1px solid var(--warm-line);
  padding: 6px 10px;
}

.note-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sea);
  flex-shrink: 0;
}

/* navigation row */
.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--warm-line);
}

.main-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 0;
}

.nav-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 8px 14px;
  border: 1px solid transparent;
  color: var(--ink);
  background: transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.nav-link:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.nav-link[aria-current="page"] {
  background: var(--orange);
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
  border-color: var(--orange);
}

.nav-link[aria-current="page"]:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.nav-coordinate {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(14, 27, 42, 0.4);
  white-space: nowrap;
}

/* mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 8px 12px;
  transition: background 0.15s, color 0.15s;
}

.nav-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle-ic {
  font-size: 14px;
  line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--orange);
}

.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--cream) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.4;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-lg) var(--gutter) var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-lg);
}

.footer-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  border: 2px solid var(--orange);
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--paper);
  margin-top: 12px;
}

.footer-slogan {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(245, 239, 224, 0.6);
  margin-top: 2px;
}

.footer-trust {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 239, 224, 0.55);
  border-left: 3px solid var(--orange);
  padding-left: 12px;
  margin-top: 16px;
  max-width: 30em;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(245, 239, 224, 0.8);
  transition: color 0.15s, padding-left 0.15s;
}

.footer-links a:hover {
  color: var(--orange);
  padding-left: 4px;
}

.footer-meta {
  border-top: 1px solid rgba(245, 239, 224, 0.2);
  margin-top: var(--space-lg);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245, 239, 224, 0.55);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 24px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  text-align: center;
  transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  background: var(--night);
  border-color: var(--night);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(14, 27, 42, 0.25);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-dark:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ---------- Section Headings ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.section-title::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--orange);
  flex-shrink: 0;
}

.section-desc {
  color: rgba(14, 27, 42, 0.72);
  font-size: 15px;
  margin-bottom: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--night);
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--night);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.1s;
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--warm-line);
  padding: 24px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- Simple Grids ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- Status Chip ---------- */
.status-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border: 1px solid var(--ink);
}

.status-chip[data-status="archived"],
.status-chip[data-status="online"] {
  background: rgba(31, 110, 110, 0.1);
  border-color: var(--sea);
  color: var(--sea);
}

.status-chip[data-status="warning"] {
  background: rgba(176, 46, 46, 0.08);
  border-color: var(--brick);
  color: var(--brick);
}

.status-chip[data-status="new"] {
  background: var(--cream);
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Coordinate Label ---------- */
.coordinate-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night);
}

/* ---------- Glass Panel ---------- */
.glass-panel {
  background: var(--glass);
  border: 1px solid var(--warm-line);
  padding: 16px;
}

/* ---------- Image Shell ---------- */
.image-shell {
  position: relative;
  display: grid;
  place-items: center;
  background-color: var(--paper-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 2px solid var(--ink);
  min-height: 120px;
  overflow: hidden;
}

.image-shell::before {
  content: "IMG // PLACEHOLDER";
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(14, 27, 42, 0.35);
  z-index: 0;
}

.image-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.image-shell-4x3 { aspect-ratio: 4 / 3; }
.image-shell-16x9 { aspect-ratio: 16 / 9; }
.image-shell-1x1 { aspect-ratio: 1 / 1; }

/* ---------- Divider ---------- */
.divider-line {
  height: 2px;
  max-width: var(--container);
  margin: var(--space-lg) auto;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 10px,
    transparent 10px 20px
  );
}

/* ---------- Content Typography ---------- */
.page-container h2,
.container-narrow h2 {
  font-size: 28px;
  margin: 2em 0 0.8em;
}

.page-container h3,
.container-narrow h3 {
  font-size: 20px;
  margin: 1.8em 0 0.6em;
}

/* ---------- Progress Bar (JS-created) ---------- */
[data-progress-bar] {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--orange);
  z-index: 9999;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .card-grid,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .header-note { display: none; }

  .nav-toggle { display: inline-flex; }

  .header-nav-row {
    display: none;
  }

  .header-nav-row[data-open] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    box-shadow: 0 6px 12px rgba(14, 27, 42, 0.1);
  }

  .nav-coordinate { display: none; }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 6px 0 12px;
  }

  .nav-link {
    display: block;
    padding: 10px 8px;
    border-bottom: 1px solid var(--warm-line);
  }
}

@media (max-width: 600px) {
  .quick-link { display: none; }

  .brand-name { font-size: 16px; }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .header-top {
    padding: 10px 0;
  }

  .page-container,
  .container-narrow {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card-grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section-title { font-size: 24px; }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
