/* ===== 365Lab简历 · 首页样式 (Home) ===== */

/* Aurora background */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 12% -5%, #ede9fe 0%, transparent 55%),
    radial-gradient(900px 520px at 95% 8%, #cffafe 0%, transparent 52%),
    radial-gradient(1000px 700px at 55% 110%, #fce7f3 0%, transparent 55%),
    var(--bg);
}
[data-theme="dark"] .aurora {
  background:
    radial-gradient(1100px 600px at 12% -5%, #2e1065 0%, transparent 55%),
    radial-gradient(900px 520px at 95% 8%, #083344 0%, transparent 52%),
    radial-gradient(1000px 700px at 55% 110%, #4a044e 0%, transparent 55%),
    var(--bg);
}
.aurora .blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  mix-blend-mode: normal; animation: float 18s ease-in-out infinite;
}
[data-theme="dark"] .aurora .blob { opacity: .4; }
.aurora .b1 { width: 460px; height: 460px; background: #a78bfa; top: -120px; left: -80px; }
.aurora .b2 { width: 380px; height: 380px; background: #22d3ee; top: 10%; right: -100px; animation-delay: -6s; }
.aurora .b3 { width: 420px; height: 420px; background: #f472b6; bottom: -140px; left: 30%; animation-delay: -11s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,30px) scale(1.08); }
  66% { transform: translate(-30px,20px) scale(.95); }
}

/* Hero */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 850; letter-spacing: -.03em; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: var(--text-soft); max-width: 540px; }
.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero preview card */
.hero-preview { position: relative; }
.preview-card {
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); padding: 26px 28px; transform: rotate(1.5deg);
  transition: transform .4s ease;
}
.preview-card:hover { transform: rotate(0deg) translateY(-4px); }
.pc-head { display: flex; align-items: center; gap: 14px; }
.pc-avatar { width: 58px; height: 58px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; }
.pc-name { font-size: 20px; font-weight: 800; }
.pc-title { font-size: 13.5px; color: var(--primary); font-weight: 700; }
.pc-sec { margin-top: 18px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pc-line { height: 8px; border-radius: 5px; background: var(--border); margin-top: 9px; }
.pc-line.w1 { width: 92%; } .pc-line.w2 { width: 78%; } .pc-line.w3 { width: 86%; }
.pc-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.pc-tags span { font-size: 11.5px; font-weight: 700; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); padding: 4px 11px; border-radius: 999px; }
.float-badge {
  position: absolute; background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-sm); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.float-badge .ic { width: 22px; height: 22px; border-radius: 7px; background: var(--grad-soft); display: grid; place-items: center; color: #fff; font-size: 13px; }
.fb-1 { top: -22px; left: -24px; animation: bob 5s ease-in-out infinite; }
.fb-2 { bottom: -18px; right: -18px; animation: bob 6s ease-in-out infinite .8s; }
[data-theme="dark"] .float-badge { color: var(--text); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Sections shared */
.section { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.section-head .kicker { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 850; margin-top: 10px; }
.section-head p { margin-top: 14px; color: var(--text-soft); font-size: 16px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 26px;
  position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .25s; }
.feature:hover::before { opacity: 1; }
.feature .ficon { width: 50px; height: 50px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.feature h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.feature p { color: var(--text-soft); font-size: 14.5px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 28px 24px; position: relative; }
.step .num { counter-increment: step; width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 850; font-size: 18px; margin-bottom: 16px; }
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 14.5px; }

/* Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tpl-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.tpl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tpl-thumb { height: 150px; padding: 16px; background: var(--bg-2); position: relative; }
.tpl-doc { height: 100%; background: #fff; border-radius: 5px; padding: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
[data-theme="dark"] .tpl-doc { background: #f7f8fc; }
.tpl-doc .td-bar { height: 6px; border-radius: 4px; background: #d7dbe8; margin-bottom: 6px; }
.tpl-doc .td-bar.acc { background: var(--primary); width: 55%; }
.tpl-doc .td-line { height: 4px; border-radius: 3px; background: #e6e9f2; margin-bottom: 4px; }
.tpl-doc .td-line.short { width: 70%; }
.tpl-doc .td-tag { display: inline-block; font-size: 5px; font-weight: 700; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, #fff); padding: 2px 5px; border-radius: 4px; margin: 2px 2px 0 0; }
.tpl-doc .td-card { border: 1px solid #e6e9f2; border-radius: 4px; padding: 5px; margin-bottom: 5px; }
.tpl-info { padding: 14px 16px; }
.tpl-info h3 { font-size: 15.5px; font-weight: 800; }
.tpl-info p { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* CTA */
.cta-band { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 70px; }
.cta-inner {
  background: var(--grad); border-radius: 26px; padding: 54px 40px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-inner::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.16); top: -120px; right: -80px; }
.cta-inner::before { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); bottom: -100px; left: -60px; }
.cta-inner h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 850; position: relative; }
.cta-inner p { margin: 14px auto 28px; max-width: 520px; opacity: .92; position: relative; }
.cta-inner .cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-inner .btn-outline { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.cta-inner .btn-outline:hover { background: rgba(255,255,255,.28); }
.cta-inner .btn-white { background: #fff; color: var(--primary-2); }

/* Responsive home */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-preview { max-width: 460px; margin: 0 auto; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding-top: 40px; }
  .features, .steps, .tpl-grid { grid-template-columns: 1fr; }
  .preview-card { transform: none; }
  .float-badge { display: none; }
}
/* ===== Round 27: Home page beautification ===== */

/* Template card: hover arrow */
.tpl-card { position: relative; }
.tpl-card .tpl-info::after {
  content: '→'; position: absolute; right: 16px; bottom: 14px;
  font-size: 18px; font-weight: 700; color: var(--primary);
  opacity: 0; transform: translateX(-6px); transition: all .28s ease;
}
.tpl-card:hover .tpl-info::after { opacity: 1; transform: translateX(0); }
.tpl-card .tpl-info { padding-right: 36px; }

/* Template thumb: subtle gradient overlay on hover */
.tpl-thumb::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.06), rgba(6,182,212,.06));
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.tpl-card:hover .tpl-thumb::before { opacity: 1; }

/* Feature icon: bounce on hover */
.feature .ficon { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.feature:hover .ficon { transform: scale(1.12) rotate(-6deg); }

/* Hero stats: gentle pulse on numbers */
/* Section head: decorative underline */
.section-head h2 { position: relative; display: inline-block; }
.section-head h2::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 3px; border-radius: 2px;
  background: var(--grad);
}

/* CTA band: shimmer effect */
@keyframes ctaShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.cta-inner {
  background-image: linear-gradient(120deg, #7c3aed 0%, #4f46e5 38%, #06b6d4 100%, #7c3aed 100%);
  background-size: 200% 100%;
  animation: ctaShimmer 8s linear infinite;
}
.cta-inner .btn-white { position: relative; z-index: 1; }
.cta-inner .btn-outline { position: relative; z-index: 1; }

/* Footer brand: hover lift */
.site-footer .brand:hover { transform: translateX(2px); }
.site-footer .brand { transition: transform .2s ease; display: flex; align-items: center; gap: 10px; }

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .preview-card { padding: 20px 22px; }
}
/* ===== Round 30: Template cards deep beautification ===== */

/* Template card: bigger thumbnail with subtle gradient overlay */
.tpl-card { 
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; 
  overflow: hidden; transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s, border-color .28s;
  position: relative; box-shadow: 0 1px 3px rgba(20,24,50,.04);
}
.tpl-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 16px 40px rgba(20,24,50,.16), 0 4px 12px rgba(20,24,50,.08); border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.tpl-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 0%, transparent), color-mix(in srgb, var(--primary) 6%, transparent) 50%, transparent);
  opacity: 0; transition: opacity .28s;
}
.tpl-card:hover::before { opacity: 1; }

.tpl-thumb { height: 210px; padding: 16px 24px; background: linear-gradient(135deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 80%, var(--primary) 6%)); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tpl-svg { width: 100%; height: 100%; display: block; overflow: visible; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.tpl-card:hover .tpl-svg { transform: scale(1.05) translateY(-4px); }
.tpl-info { padding: 16px 18px; position: relative; }
.tpl-info h3 { font-size: 15.5px; font-weight: 800; }
.tpl-info p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Feature card: more refined */
.feature { 
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 26px; 
  position: relative; overflow: hidden; transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s, border-color .28s;
  box-shadow: 0 1px 3px rgba(20,24,50,.04);
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(20,24,50,.12), 0 4px 10px rgba(20,24,50,.06); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .3s; }
.feature:hover::before { opacity: 1; }

/* Responsive: 3 cols -> 2 cols at tablet -> 1 col at mobile */
@media (max-width: 980px) {
  .features { grid-template-columns: 1fr 1fr !important; }
  .tpl-grid { grid-template-columns: 1fr 1fr 1fr !important; }
  .style-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr !important; }
  .tpl-grid { grid-template-columns: 1fr 1fr !important; }
  .style-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== Round 33: 深度视觉增强 ===== */

/* Feature cards: shimmer + icon bounce on hover */
.feature { transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease, border-color .3s; }
.feature:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(20,24,50,.14), 0 6px 16px rgba(99,102,241,.12), 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.feature:hover .ficon {
  animation: iconBounce .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes iconBounce {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.2) rotate(-10deg); }
  70% { transform: scale(1.08) rotate(4deg); }
  100% { transform: scale(1.12) rotate(-6deg); }
}

/* Template cards: overlay + depth */
.tpl-card { transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease, border-color .3s; }
.tpl-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 22px 55px rgba(20,24,50,.18), 0 8px 20px rgba(99,102,241,.15), 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.tpl-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, color-mix(in srgb, var(--primary) 8%, transparent) 100%);
  opacity: 0; transition: opacity .35s; pointer-events: none;
}
.tpl-card:hover::after { opacity: 1; }

/* Style presets grid (8 preset resume thumbnails) */
.style-grid { grid-template-columns: repeat(4, 1fr); }
.style-grid .tpl-thumb {
  display: flex; align-items: center; justify-content: center;
  height: 210px;
  background: linear-gradient(135deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 80%, var(--primary) 6%));
}

/* Section headers: decorative gradient underline */
.section-title {
  position: relative;
}
.section-title::after {
  content: "";
  display: block; width: 48px; height: 3px; margin-top: 10px;
  background: var(--grad); border-radius: 2px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* CTA button: glow pulse */
.btn-primary {
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: -2px;
  background: conic-gradient(from 180deg, transparent, color-mix(in srgb, var(--primary) 60%, white), transparent 40%);
  border-radius: inherit; z-index: -1;
  opacity: 0; transition: opacity .4s;
  animation: ctaGlow 3s linear infinite paused;
}
.btn-primary:hover::before { opacity: 1; animation-play-state: running; }
@keyframes ctaGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Reveal animation enhancement */
.reveal.in {
  animation: revealIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes revealIn {
  from { opacity: .85; transform: translateY(22px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== R581-C 兼容性：为不支持 color-mix() 的旧引擎提供实色回退 =====
   仅恢复「可见强调色」(眉标/标签底色、特性卡 hover 描边)，其余装饰渐变缺失不影响可读性。 */
@supports not (color: color-mix(in srgb, red 50%, white)) {
  .eyebrow { background: rgba(109, 92, 246, .12); }
  .eyebrow .dot { box-shadow: 0 0 0 4px rgba(109, 92, 246, .25); }
  .pc-tags span { background: rgba(109, 92, 246, .12); }
  .tpl-doc .td-tag { background: rgba(109, 92, 246, .14); color: #6d5cf6; }
  .feature:hover { border-color: rgba(109, 92, 246, .45); box-shadow: 0 12px 32px rgba(20,24,50,.12), 0 4px 10px rgba(20,24,50,.06), 0 0 0 1px rgba(109,92,246,.3); }
  .tpl-card:hover { border-color: rgba(109, 92, 246, .45); box-shadow: 0 16px 40px rgba(20,24,50,.16), 0 4px 12px rgba(20,24,50,.08), 0 0 0 1px rgba(109,92,246,.35); }
  .section-title::after { box-shadow: 0 2px 8px rgba(109, 92, 246, .35); }
  .btn-primary:hover::before { opacity: 1; }
}

/* ===== R582 首页视觉精修：补齐 step 卡片 hover 一致性 + hero 质感 ===== */

/* 步骤卡片：与特性/模板卡片一致的 hover 上浮与渐变顶条（此前仅有基础样式，交互一致性缺口） */
.step {
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease, border-color .3s;
  box-shadow: 0 1px 3px rgba(20,24,50,.04);
}
.step::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad); border-radius: 18px 18px 0 0;
  opacity: 0; transition: opacity .3s;
}
.step:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(20,24,50,.14), 0 6px 16px rgba(99,102,241,.12), 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.step:hover::before { opacity: 1; }
.step:hover .num { transform: scale(1.1) rotate(-6deg); }
.step .num { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }

/* Hero 辅助按钮（查看示例/更多工具）：浅色渐变背景上的毛玻璃质感 */
.hero .btn-soft {
  background: color-mix(in srgb, var(--panel-solid) 74%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 2px 10px rgba(20,24,50,.06);
}
.hero .btn-soft:hover {
  background: color-mix(in srgb, var(--panel-solid) 92%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* 特性图标容器：细渐变描边 + 内阴影，精致感提升 */
.feature .ficon {
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 26%, transparent), inset 0 0 0 1px rgba(255,255,255,.28);
}

/* 首页 hero 标题的渐变文字在浅色背景上加深一档，提升对比度（仅亮色） */
[data-theme="light"] .hero h1 .grad {
  background: linear-gradient(100deg, #7c3aed 0%, #4f46e5 55%, #0891b2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
