/* ==========================================================================
   蔚蓝探索 —— 主题定制样式层
   --------------------------------------------------------------------------
   这个文件加载在所有 Tailwind 产物之后，用它覆盖 Earth 的默认灰蓝观感。
   优点：不动 92KB 的压缩产物 main-*.css，升级/回滚只需删掉这个文件。
   注意：Tailwind 的工具类需要转义，例如 .hover\:text-blue-600:hover
   ========================================================================== */

:root {
  /* 主色阶：与 logo 取样色 #3060A8 对齐（深海 -> 蔚蓝 -> 浅雾） */
  --wl-abyss: #071c30; /* 最深，用于页脚 */
  --wl-deep: #123a63; /* 深蓝，用于标题强调 */
  --wl-primary: #2f66ad; /* 主色：链接、悬停、强调（logo 蓝微调提亮） */
  --wl-bright: #6aa6dd; /* 亮蓝：选中、装饰线 */
  --wl-mist: #eaf1f9; /* 浅雾蓝：浅底块 */
  --wl-ink: #16202b; /* 正文墨色，比纯黑柔和 */

  /* 中文优先的字体栈：先用系统中文黑体，再退回西文无衬线 */
  --wl-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wl-font-title: "PingFang SC", "Songti SC", ui-serif, Georgia, serif;

  /* 圆角与阴影 */
  --wl-radius: 14px;
  --wl-shadow: 0 1px 2px rgba(6, 43, 62, 0.04), 0 4px 16px rgba(6, 43, 62, 0.06);
  --wl-shadow-hover: 0 2px 4px rgba(6, 43, 62, 0.06), 0 12px 32px rgba(6, 43, 62, 0.12);
}

/* ---------- 1. 全站强调色：一次覆盖 171 处 hover:text-blue-600 ---------- */
.hover\:text-blue-600:hover,
.text-blue-600 {
  color: var(--wl-primary) !important;
}

.hover\:text-blue-400:hover,
.text-blue-400 {
  color: var(--wl-bright) !important;
}

/* 选中文字时的底色也统一 */
::selection {
  background: var(--wl-bright);
  color: #fff;
}

/* ---------- 2. 排版：中文阅读节奏 ---------- */
body {
  font-family: var(--wl-font);
  color: var(--wl-ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
  letter-spacing: -0.01em;
}

/* 正文行高放松一点，中文长文更好读 */
article p,
.markdown-body p {
  line-height: 1.85;
}

/* ---------- 3. 顶栏：半透明毛玻璃 + 细分割线 ---------- */
header.sticky {
  background-color: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid rgba(6, 43, 62, 0.07);
  box-shadow: none !important;
}

.dark header.sticky {
  /* 深色导航用深海实色，Tailwind 默认的 slate-900 半透明压在亮背景上会发灰 */
  background-color: #0a2234 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---------- 4. Hero 首屏：蔚蓝渐变遮罩，保证任何背景图上文字都可读 ---------- */
.wl-hero {
  position: relative;
  isolation: isolate;
}

.wl-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    165deg,
    rgba(6, 43, 62, 0.62) 0%,
    rgba(11, 74, 102, 0.42) 48%,
    rgba(23, 112, 143, 0.28) 100%
  );
  pointer-events: none;
}

/* 遮罩之上的内容需要抬起来一层 */
.wl-hero > * {
  position: relative;
  z-index: 1;
}

/* 首屏站点标题 */
.wl-hero .text-5xl {
  font-family: var(--wl-font-title);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 24px rgba(6, 43, 62, 0.35);
}

.wl-hero .text-sm.font-light {
  letter-spacing: 0.18em;
  opacity: 0.92;
}

/* ---------- 5. 卡片：圆角、阴影、悬停微抬升 ---------- */
main .rounded-xl,
section .rounded-xl {
  border-radius: var(--wl-radius);
  box-shadow: var(--wl-shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

main .rounded-xl:hover,
section .rounded-xl:hover {
  transform: translateY(-2px);
  box-shadow: var(--wl-shadow-hover);
}

/* ---------- 6. 页脚：深海收尾 ---------- */
footer {
  background: linear-gradient(180deg, var(--wl-deep) 0%, var(--wl-abyss) 100%) !important;
  color: rgba(255, 255, 255, 0.82) !important;
  border-top: none;
}

footer a,
footer span,
footer div {
  color: rgba(255, 255, 255, 0.82) !important;
}

footer a:hover {
  color: #fff !important;
}

/* ---------- 7. 细节：分割线、标签、滚动条 ---------- */
hr,
.border-t,
.border-b {
  border-color: rgba(6, 43, 62, 0.08);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 43, 62, 0.18);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 43, 62, 0.32);
  background-clip: content-box;
}

/* 尊重系统的减弱动效设置 */
@media (prefers-reduced-motion: reduce) {
  main .rounded-xl:hover,
  section .rounded-xl:hover {
    transform: none;
  }
}

/* ==========================================================================
   品牌标识：logo 图片替换原来的文字站点名
   --------------------------------------------------------------------------
   图片是透明 PNG，深色模式下用 filter 一键转白，不需要维护两套文件。
   顶部高度锁定 40px，与 h-16 导航的内内容区对齐。
   ========================================================================== */

.wl-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wl-brand__img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 60vw;
  /* 保证缩放时保持清晰，避免抖动 */
  transform: translateZ(0);
}

/* 深色模式：整张 logo 转纯白（保留 alpha 边缘） */
.dark .wl-brand__img {
  filter: brightness(0) invert(1);
}

/* 页脚：深色底上使用白色版 logo */
.wl-footer-logo {
  display: block;
  height: 38px;
  width: auto;
  opacity: 0.94;
  filter: none !important;
}

.wl-footer-logo:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .wl-brand__img {
    height: 34px;
  }

  .wl-footer-logo {
    height: 32px;
  }
}

/* Tailwind 产物里没有打包 sr-only，这里补一个（logo 的隐藏文字备用） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   索引页（分类 / 归档）：Apple 式条目列表
   --------------------------------------------------------------------------
   结构：kicker + 大标题 + 说明 + 计数 → 条目行（编号 / 标题+摘要 / 箭头）
   ========================================================================== */
.wl-index {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) 24px clamp(80px, 10vw, 130px);
}

.wl-index__kicker {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wl-primary);
  font-weight: 500;
}

.wl-index__title {
  margin: 0;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #061520;
}

.wl-index__desc {
  margin: 26px 0 0;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.85;
  color: #5b717e;
  text-wrap: pretty;
}

.wl-index__count {
  margin: 30px 0 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.wl-index__count b {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #061520;
  font-variant-numeric: tabular-nums;
}

.wl-index__count span {
  font-size: 13px;
  color: #87919a;
}

.wl-index__group {
  margin-top: 18px;
}

.wl-index__year {
  margin: 56px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #87919a;
}

.wl-index__list {
  margin-top: 10px;
}

/* ---------- 条目行 ---------- */
.wl-row {
  display: grid;
  grid-template-columns: 64px 1fr 26px;
  gap: 24px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid rgba(6, 43, 62, 0.12);
  text-decoration: none;
  color: inherit;
}

.wl-index__list .wl-row:last-child {
  border-bottom: 1px solid rgba(6, 43, 62, 0.12);
}

.wl-row__num {
  font-size: 13px;
  line-height: 1.9;
  color: #96a3ad;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.wl-row__body {
  display: block;
  min-width: 0;
}

.wl-row__title {
  display: block;
  font-size: clamp(18px, 2.1vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: #061520;
  transition: color 0.3s ease;
}

.wl-row__excerpt {
  display: block;
  margin-top: 9px;
  max-width: 40em;
  font-size: 14px;
  line-height: 1.8;
  color: #6b7883;
  text-wrap: pretty;
}

.wl-row__arrow {
  font-size: 17px;
  line-height: 1.6;
  color: #b4bfc7;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.wl-row:hover .wl-row__title {
  color: var(--wl-primary);
}

.wl-row:hover .wl-row__num {
  color: var(--wl-primary);
}

.wl-row:hover .wl-row__arrow {
  color: var(--wl-primary);
  transform: translateX(7px);
}

.wl-index__empty {
  margin: 60px 0;
  font-size: 14px;
  color: #87919a;
}

/* ---------- 深色模式 ---------- */
.dark .wl-index__title,
.dark .wl-index__count b,
.dark .wl-row__title {
  color: #f2f6f9;
}

.dark .wl-index__desc,
.dark .wl-row__excerpt {
  color: #93aab6;
}

.dark .wl-row,
.dark .wl-index__list .wl-row:last-child {
  border-color: rgba(255, 255, 255, 0.14);
}

.dark .wl-row__arrow {
  color: #55636d;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .wl-row {
    grid-template-columns: 44px 1fr 20px;
    gap: 12px;
    padding: 22px 0;
  }

  .wl-row__excerpt {
    font-size: 13px;
    line-height: 1.75;
  }
}

/* ==========================================================================
   图文组件（.wx-*）：在 720px 正文里插入整幅照片、并置图、卡片与证书墙
   --------------------------------------------------------------------------
   规则：文字仍守 720，图片可以撑到 1180，形成「呼吸感」的宽窄对比。
   ========================================================================== */

/* ---------- 通用宽容器 ---------- */
.wx-figure,
.wx-duo,
.wx-cards,
.wx-certs,
.wx-split,
.wx-panorama {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* ---------- 单幅照片 ---------- */
/* 注意：.markdown-body figure 设了 40px 左右外边距，特异性高于单类，必须显式压过 */
figure.wx-figure,
.wx-figure {
  margin-top: clamp(56px, 7vw, 84px);
  margin-left: auto !important;
  margin-right: auto !important;
}

.wx-figure--blend img {
  mix-blend-mode: multiply;
}

.wx-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.wx-figure--edge img {
  width: 100%;
}

.wx-figure--shadow img {
  box-shadow: 0 24px 60px -30px rgba(6, 32, 48, 0.35);
}

.wx-figure figcaption {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.75;
  color: #87919a;
  letter-spacing: 0.01em;
}

.wx-figure--narrow {
  max-width: 780px;
}

/* 满幅通栏照片：负边距突破容器 */
.wx-panorama {
  max-width: none;
  padding: 0;
  margin-top: clamp(64px, 8vw, 96px);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.wx-panorama img {
  display: block;
  width: 100%;
  height: clamp(300px, 46vw, 560px);
  object-fit: cover;
}

/* ---------- 双图并置 ---------- */
.wx-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  margin-top: clamp(56px, 7vw, 84px);
}

.wx-duo figure {
  margin: 0 !important;
}

.wx-duo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.wx-duo figcaption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #87919a;
}

.wx-duo figcaption b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #061520;
  letter-spacing: -0.005em;
}

/* ---------- 卡片网格（产品） ---------- */
.wx-cards {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 72px);
}

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

.wx-card__img {
  background: #eef3f6;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wx-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wx-card:hover .wx-card__img img {
  transform: scale(1.03);
}

.wx-card__tag {
  margin: 20px 0 0 !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color: var(--wl-primary) !important;
  font-weight: 500 !important;
}

.wx-card h3 {
  margin: 10px 0 0 !important;
  font-size: clamp(17px, 1.7vw, 20px) !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  color: #061520 !important;
  padding: 0 !important;
  border: 0 !important;
}

.wx-card__meta {
  margin: 8px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  color: #7c8892 !important;
  letter-spacing: 0.01em !important;
}

.wx-card__spec {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(6, 43, 62, 0.1);
  display: grid;
  gap: 7px;
}

.wx-card__spec div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.wx-card__spec dt {
  color: #87919a;
}

.wx-card__spec dd {
  margin: 0;
  color: #22323d;
  font-variant-numeric: tabular-nums;
}

/* ---------- 图文左右并置（形态） ---------- */
.wx-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  margin-top: clamp(56px, 7vw, 88px);
}

.wx-split__media img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: #eef3f6;
}

.wx-split--reverse .wx-split__media {
  order: 2;
}

.wx-split__body h3 {
  margin: 12px 0 0 !important;
  font-size: clamp(24px, 2.9vw, 34px) !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em !important;
  color: #061520 !important;
  padding: 0 !important;
  border: 0 !important;
}

.wx-split__body p {
  margin: 18px 0 0 !important;
  font-size: 16px !important;
  line-height: 1.88 !important;
  color: #43525c !important;
}

.wx-split__spec {
  margin: 26px 0 0;
  display: grid;
  gap: 10px;
}

.wx-split__spec div {
  display: flex;
  gap: 14px;
  align-items: baseline;
  border-top: 1px solid rgba(6, 43, 62, 0.1);
  padding-top: 10px;
  font-size: 13px;
}

.wx-split__spec dt {
  min-width: 5.5em;
  color: #87919a;
}

.wx-split__spec dd {
  margin: 0;
  color: #22323d;
}

/* ---------- 证书墙 ---------- */
.wx-certs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: clamp(20px, 2.6vw, 34px);
  margin-top: clamp(44px, 5.5vw, 64px);
  align-items: start;
}

.wx-cert img {
  display: block;
  width: 100%;
  height: 188px;
  object-fit: contain;
  object-position: center top;
  background: transparent;
  filter: drop-shadow(0 10px 22px rgba(6, 32, 48, 0.16));
}

.wx-cert b {
  display: block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #061520;
}

.wx-cert span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #87919a;
}

/* ---------- 产地矩阵 ---------- */
.wx-table {
  max-width: 768px;
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding: 0 24px;
  box-sizing: border-box;
  border-top: 1px solid rgba(6, 43, 62, 0.14);
}

.wx-table__row {
  display: grid;
  grid-template-columns: 112px 168px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid rgba(6, 43, 62, 0.09);
}

.wx-table__row--head {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #87919a;
  padding: 14px 0;
}

.wx-table__place {
  font-size: 15px;
  font-weight: 600;
  color: #061520;
  letter-spacing: -0.005em;
}

.wx-table__coord {
  font-size: 12px;
  line-height: 1.6;
  color: #87919a;
  font-variant-numeric: tabular-nums;
}

.wx-table ul.wx-table__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.wx-table__list li {
  font-size: 13px;
  line-height: 1.6;
  color: #22323d;
  background: #eef3f6;
  padding: 2px 10px;
}

/* ---------- 品牌墙 ---------- */
.wx-brands img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
}

/* ==========================================================================
   图文组件的深色模式
   ========================================================================== */
.dark .wx-duo figcaption,
.dark .wx-figure figcaption,
.dark .wx-cert span,
.dark .wx-card__meta,
.dark .wx-table__coord {
  color: #8a97a2 !important;
}

.dark .wx-card h3,
.dark .wx-split__body h3,
.dark .wx-cert b,
.dark .wx-duo figcaption b,
.dark .wx-table__place {
  color: #f2f6f9 !important;
}

.dark .wx-split__body p {
  color: #aab6c0 !important;
}

.dark .wx-card__spec dd,
.dark .wx-split__spec dd,
.dark .wx-table__list li {
  color: #cfdae2 !important;
}

.dark .wx-card__spec,
.dark .wx-split__spec div,
.dark .wx-table,
.dark .wx-table__row {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.dark .wx-card__img,
.dark .wx-split__media img,
.dark .wx-table__list li {
  background: #10222f !important;
}

/* ==========================================================================
   响应式
   ========================================================================== */
/* 证书是七张，宽屏正好排成一行 */
@media (min-width: 1080px) {
  .wx-certs {
    grid-template-columns: repeat(7, 1fr);
    gap: 0 26px;
  }
}

@media (max-width: 900px) {
  .wx-cards--3,
  .wx-cards--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .wx-split--reverse .wx-split__media {
    order: 0;
  }

  .wx-table__row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
  }

  .wx-table__list {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .wx-cards--3,
  .wx-cards--4,
  .wx-duo {
    grid-template-columns: 1fr;
  }

  .wx-duo {
    gap: 32px;
  }

  .wx-cert img {
    height: 168px;
  }

  .wx-table__row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   白底素材在深色模式下的处理
   --------------------------------------------------------------------------
   multiply / screen 在深底上会把整张图糊成一块亮板，改为「一张浅色纸」：
   保留白底，作为图版嵌在深色页面里，反而更像被装裱过的资料。
   ========================================================================== */
.dark .wx-figure--blend img,
.dark .wx-brands img {
  mix-blend-mode: normal;
  background: #fff;
}

.dark .wx-figure--blend img {
  padding: 0;
}

/* ==========================================================================
   原料图录：二十一件实拍，手机上排两列
   --------------------------------------------------------------------------
   通用 .wx-cards--3 在 620px 以下会掉成一列，配方卡片只有三张，一列没问题；
   原料图录有二十一张，一列要拉出近万像素，改成两列、字号同步收一档。
   ========================================================================== */
@media (max-width: 620px) {
  .wx-cards--catalog {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 14px;
  }

  .wx-cards--catalog .wx-card__tag {
    margin: 12px 0 0 !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
  }

  .wx-cards--catalog .wx-card h3 {
    margin: 5px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.42 !important;
  }

  .wx-cards--catalog .wx-card__meta {
    margin: 5px 0 0 !important;
    font-size: 11.5px !important;
    line-height: 1.62 !important;
  }

  /* 长指令性的规格串（白虾仁那一条）在窄卡里会顶出边界，允许折行 */
  .wx-cards--catalog .wx-card__meta {
    word-break: break-word;
  }
}

/* ==========================================================================
   页头：横排菜单到 1024 才展开，640–1023 交给右上角的汉堡抽屉
   --------------------------------------------------------------------------
   主菜单排到第 8 项（首页 · 产品 · 产品目录 · 海洋原料 · 原料供应 ·
   工艺与链路 · 文章 · 关于）之后，Tailwind 的 sm（640）断点已经装不下：
   640–900 之间每项被挤成一列竖排的字，直接顶破 64px 高的页头。
   这里把横排推到 lg（1024），窄屏统一走原有的抽屉。
   ========================================================================== */
@media (max-width: 1023.98px) {
  #header-menu ul.sm\:flex {
    display: none !important;
  }

  #header-menu li.sm\:hidden {
    display: block !important;
  }
}
