/**
 * 蟹总兼职定制 主题 - 前端自定义样式
 * 用于覆盖或扩展主题的默认样式
 * 可在"主题设置 → 自定义CSS"中在线修改，也可直接编辑此文件
 */

/* ============================================
   font-display:swap 覆盖 - 避免 FOIT
   (entry.css 中 rubik 字体缺少 font-display)
   ============================================ */
@font-face{font-family:rubik;font-style:normal;font-weight:400;font-display:swap;src:url('../static/font/rubik.oVmqXNMN.woff2') format('woff2')}
@font-face{font-family:rubik-bold;font-style:normal;font-weight:400;font-display:swap;src:url('../static/font/rubik-bold.DH7HY-Jx.woff2') format('woff2')}
@font-face{font-family:rubik-medium;font-style:normal;font-weight:400;font-display:swap;src:url('../static/font/rubik-medium.DF6TUXqM.woff2') format('woff2')}
@font-face{font-family:rubik-semibold;font-style:normal;font-weight:400;font-display:swap;src:url('../static/font/rubik-bold.DH7HY-Jx.woff2') format('woff2')}

/* ============================================
   字体美化 - 使用自托管 DM Sans 作为主体字体
   (去除 Google Fonts Inter 外部依赖)
   ============================================ */
body,
html {
    font-family: 'DM Sans', rubik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 标题使用更粗的字重 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', rubik-bold, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* 段落文字优化行高和间距 */
p {
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* 导航栏字体优化 */
nav,
nav a,
nav button,
header {
    font-family: 'DM Sans', rubik-medium, sans-serif;
    letter-spacing: 0.01em;
}

/* 按钮字体优化 */
button,
.btn,
a.btn {
    font-family: 'DM Sans', rubik-medium, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 大标题（hero区域）特殊处理 */
[class*="text-[50px]"],
[class*="text-[36px]"],
[class*="text-[30px]"],
.font-rubikBold,
.font-rubikSemibold {
    font-family: 'DM Serif Display', rubik-bold, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.03em;
}

/* 中等粗体文字 */
.font-rubikMedium {
    font-family: 'DM Sans', rubik-medium, sans-serif !important;
    font-weight: 500;
}

/* 小字体优化可读性 */
.text-sm,
.text-\[12px\],
.text-\[14px\],
small {
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

/* ============================================
   自定义滚动条
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: rgba(116, 56, 38, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(116, 56, 38, 0.5);
}

/* ============================================
   Mobile menu transition utilities
   (ensure hamburger toggle works even if
   the UnoCSS build didn't generate them)
   ============================================ */
.max-h-0      { max-height: 0 !important; }
.max-h-screen { max-height: 100vh !important; }
.scale-y-0    { transform: scaleY(0); }
.scale-y-100  { transform: scaleY(1); }
.origin-top   { transform-origin: top; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ============================================
   Accessibility: Touch target minimum sizes
   (Lighthouse requires min 48x48px touch area)
   ============================================ */
@media (max-width: 1023px) {
    header button[aria-label] {
        min-width: 48px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    button[data-action="apply"] {
        min-height: 48px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    footer a,
    nav a {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }
    details > summary {
        min-height: 48px;
    }
}

/* ============================================
   Accessibility: Color contrast fixes (WCAG AA)
   Universal – attribute selectors catch all
   responsive variants (sm:text-#xxx, etc.)
   ============================================ */
/* Gray text: #9ca3af (3.5:1) → #6b7280 (~4.9:1) */
[class*="text-#9ca3af"] {
    color: #6b7280 !important;
}
/* Orange accent: #BF6D3A (3.85:1) → #995A2E (~5.4:1) */
[class*="text-#BF6D3A"] {
    color: #995A2E !important;
}
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }

/* FAQ expand / collapse animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
details.group[open] .group-open\:opacity-0   { opacity: 0; }
details.group[open] .group-open\:opacity-100 { opacity: 1; }
details.group[open] .group-open\:animate-fadeIn { animation: fadeIn .3s ease-out; }

/* ============================================
   Trust Bar (Google Ads landing page compliance)
   ============================================ */
.trust-bar {
    border-bottom: 1px solid #e2e8f0;
}
.trust-bar span {
    white-space: nowrap;
}
.text-green-600 {
    color: #16a34a !important;
}

/* ============================================
   Disclaimer Box (prominent compliance notice)
   ============================================ */
.disclaimer-box {
    border-left: 3px solid #BF6D3A;
}
.disclaimer-box p {
    line-height: 1.6;
}

/* ============================================
   Blog / Articles Section
   ============================================ */
#blog article {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
#blog article:hover {
    transform: translateY(-2px);
}
#blog article a {
    text-decoration: none;
}
#blog article a:hover {
    text-decoration: underline;
}

/* ============================================
   Company Info Section
   ============================================ */
#company-info {
    border-top: 1px solid #ebeef5;
    border-bottom: 1px solid #ebeef5;
}

/* ============================================
   Footer Legal
   ============================================ */
footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
footer a:hover {
    color: #BF6D3A;
    text-decoration: underline;
}

/* ============================================
   Prose styling for legal / single pages
   ============================================ */
.prose {
    color: #374151;
}
.prose h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
    color: #151A43;
}
.prose h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #151A43;
}
.prose p {
    margin-bottom: 1em;
}
.prose ul, .prose ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}
.prose ul {
    list-style-type: disc;
}
.prose ol {
    list-style-type: decimal;
}
.prose li {
    margin-bottom: 0.5em;
}
.prose a {
    color: #BF6D3A;
    text-decoration: underline;
}
.prose strong {
    font-weight: 700;
    color: #151A43;
}

/* ============================================
   CTA Section polish
   ============================================ */
section.bg-\#BF6D3A button:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* ============================================
   Global button hover states
   ============================================ */
button[data-action="apply"] {
    transition: background-color 0.2s ease, transform 0.15s ease;
}
button[data-action="apply"]:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
button[data-action="apply"]:active {
    transform: translateY(0);
}

/* ============================================
   Print styles (for legal pages)
   ============================================ */
@media print {
    header.fixed { position: relative !important; }
    .trust-bar { display: none; }
    #cc { display: none !important; }
    footer { page-break-before: always; }
}
