/* ================================================
   CareerRoost — common.css
   设计token + 导航 + 四屏视觉 + 页脚 + 语言切换 + 弹窗
   ================================================ */

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

:root {
  --primary:        #01c29c;
  --primary-dark:   #00a186;
  --primary-light:  #e3faf5;
  --text:           #111827;
  --text-inverse:   #f5fdfb;
  --muted:          #5b6b76;
  --muted-inverse:  #b9d9d2;
  --border:         #e2ece9;
  --bg:             #ffffff;
  --bg-dark:        #071512;
  --radius:         16px;
  --radius-pill:    999px;
  --max-width:      1180px;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

/* 阿拉伯语等RTL语言：显式声明direction属性，不完全依赖浏览器对dir属性的隐式处理，
   确保flex布局顺序、文字对齐这些效果一定会跟着正确镜像，不会出现
   "文字方向对了，但导航栏/两栏布局这些结构性排列没有跟着镜像"的情况 */
html[dir="rtl"] {
  direction: rtl;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding-top: 68px;
}

h1, h2, h3, .display {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 48px;
}

/* ── NAV ── */
nav.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-inline: 48px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--primary-dark);
}
.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  flex: 1;
}
.nav-links button, .nav-links a {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.nav-links button:hover, .nav-links a:hover { background: var(--primary-light); color: var(--primary-dark); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  margin-inline-start: auto;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: absolute;
  inset-inline-start: 10px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger span:nth-child(1) { top: 14px; }
.nav-hamburger span:nth-child(2) { top: 19px; }
.nav-hamburger span:nth-child(3) { top: 24px; }

/* ── 抽屉遮罩层 ── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 18, 15, 0.5);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer-overlay.open {
  display: block;
  opacity: 1;
}

/* ── 侧边滑入抽屉 ── */
.nav-mobile-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  height: 100%;
  width: min(78vw, 320px);
  background: #ffffff;
  z-index: 160;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
html[dir="rtl"] .nav-mobile-drawer { transform: translateX(-100%); }
.nav-mobile-drawer.open { transform: translateX(0); }
/* 上面这条.open规则的优先级(0,2,0)其实低于上一条RTL规则的优先级(0,2,1)，
   会被RTL那条覆盖掉，导致阿拉伯语下抽屉永远停在屏幕外、只看得到蒙层。
   这里单独给RTL的打开态补一条同等优先级的规则来纠正 */
html[dir="rtl"] .nav-mobile-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-header .logo { font-size: 16px; }
.drawer-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.drawer-close svg { width: 18px; height: 18px; }

.drawer-list {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  overflow-y: auto;
}
.nav-mobile-drawer button.drawer-item,
.nav-mobile-drawer a.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  text-align: start;
  padding: 16px 12px;
  font-size: 15.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-mobile-drawer button.drawer-item:hover,
.nav-mobile-drawer button.drawer-item:active,
.nav-mobile-drawer a.drawer-item:hover,
.nav-mobile-drawer a.drawer-item:active { background: var(--primary-light); color: var(--primary-dark); }
.drawer-item .drawer-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-item .drawer-icon svg { width: 18px; height: 18px; }

/* body 锁定滚动 */
body.drawer-open { overflow: hidden; }

/* ── SECTIONS (shared) ── */
.screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  overflow: hidden;
  padding-block: 96px;
}

.screen-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
}
.screen-inner.reverse { flex-direction: row-reverse; }

.screen-text { flex: 1 1 480px; min-width: 0; }
.screen-visual {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.screen-dark .eyebrow { color: var(--primary); }

.screen-text h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  margin-bottom: 18px;
}
.screen-text p.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 28px;
}
.screen-dark .screen-text p.lead { color: var(--muted-inverse); }

.bullet-list { list-style: none; margin-bottom: 32px; }
.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--text);
}
.screen-dark .bullet-list li { color: var(--text-inverse); }
.bullet-list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding-inline: 30px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding-inline: 22px;
  border: 1.5px solid var(--muted-inverse);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-inverse);
}
.badge-soon .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Blob backgrounds ── */
.blob-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

/* Screen 1: light bg, blobs bottom-end */
.screen-light-blobs { background: var(--bg); }
.screen-light-blobs .blob-1 { width: 420px; height: 420px; background: #6fe3c9; inset-inline-end: -80px; bottom: -140px; }
.screen-light-blobs .blob-2 { width: 320px; height: 320px; background: #b39ce8; inset-inline-end: 180px; bottom: -60px; }
.screen-light-blobs .blob-3 { width: 260px; height: 260px; background: #f6a5c0; inset-inline-start: 40%; bottom: -180px; opacity: 0.4; }

/* Screen 2: dark bg, glowing light effect */
.screen-dark {
  background: #071512;
  color: var(--text-inverse);
}
.screen-dark .blob-1 { width: 460px; height: 460px; background: var(--primary); inset-inline-start: -120px; top: -100px; opacity: 0.35; }
.screen-dark .blob-2 { width: 380px; height: 380px; background: #2fd6ff; inset-inline-end: -100px; top: 20%; opacity: 0.28; }
.screen-dark .blob-3 { width: 300px; height: 300px; background: #f5c542; inset-inline-start: 30%; bottom: -160px; opacity: 0.18; }

/* Screen 3: light bg, blobs start-bottom corner */
.screen-light-corner { background: var(--bg); }
.screen-light-corner .blob-1 { width: 480px; height: 480px; background: #ffcf8a; inset-inline-start: -160px; bottom: -180px; opacity: 0.45; }
.screen-light-corner .blob-2 { width: 340px; height: 340px; background: #ff9fb0; inset-inline-start: 60px; bottom: -60px; opacity: 0.35; }
.screen-light-corner .blob-3 { width: 300px; height: 300px; background: #7fd9ff; inset-inline-start: 260px; bottom: 60px; opacity: 0.3; }

/* Screen 4: dark diagonal gradient, no text/CTA except title/desc/badge */
.screen-dark-gradient {
  background: linear-gradient(135deg, #04120f 0%, #06342b 45%, #0a5c4c 75%, #01c29c 130%);
  color: var(--text-inverse);
  justify-content: center;
  text-align: center;
}
.screen-dark-gradient .screen-inner {
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.screen-dark-gradient .screen-text {
  flex: none;
  max-width: 620px;
  text-align: center;
}
.screen-dark-gradient p.lead { margin-inline: auto; }

/* ── FOOTER ── */
footer.site-footer {
  background: #06120f;
  color: var(--text-inverse);
  padding-block: 56px 28px;
}
.footer-cols {
  display: flex;
  gap: 64px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-inverse);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-inverse);
  text-decoration: none;
  opacity: 0.85;
}
.footer-col a:hover { opacity: 1; color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-size: 12.5px;
  color: var(--muted-inverse);
}

/* ── Language switcher (footer-anchored dropdown) ── */
.lang-switcher { position: relative; }
.lang-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-inverse);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.lang-pill:hover { border-color: var(--primary); }
.lang-pill svg { width: 15px; height: 15px; }

.lang-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  inset-inline-start: 0;
  background: #0d211c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 8px;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  z-index: 50;

  /* 自定义滚动条：只显示滑块，不要轨道白色背景 */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.lang-dropdown.open { display: block; }
.lang-dropdown::-webkit-scrollbar { width: 6px; }
.lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}
.lang-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
.lang-dropdown button, .lang-dropdown a {
  display: block;
  width: 100%;
  text-align: start;
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
}
.lang-dropdown button:hover, .lang-dropdown a:hover { background: rgba(1,194,156,0.15); }
.lang-dropdown button.active, .lang-dropdown a.active { color: var(--primary); font-weight: 700; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 18, 15, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}
.modal-icon svg { width: 26px; height: 26px; color: var(--primary-dark); }
.modal-box h3 { font-size: 19px; margin-bottom: 8px; }
.modal-box p { font-size: 14.5px; color: var(--muted); margin-bottom: 22px; }
.modal-box button {
  height: 46px;
  padding-inline: 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.modal-box button:hover { background: var(--primary-dark); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-soon .dot { animation: none; }
}

/* ── Responsive: tablet ── */
@media (max-width: 900px) {
  /* 切成纵向堆叠布局时，align-items必须跟着从center改成stretch，
     不然.screen-visual不会撑满屏幕宽度，而是按内容大小收缩、居中摆放——
     里面的卡片/网格又是相对父容器宽度算的"100%"，父容器一收缩，
     卡片、图标网格全部跟着被压缩变形（瘦长条/间距异常就是这么来的） */
  .screen-inner, .screen-inner.reverse { flex-direction: column; align-items: stretch; gap: 40px; }
  .screen-visual { order: -1; width: 100%; }
  /* .screen-text/.screen-visual的flex-basis(480px/440px)是给桌面端横向布局
     设计的"理想宽度"。纵向堆叠后主轴变成了高度，同一个数值会被重新解释成
     "最小高度"，且flex-grow:1还会继续长高去吃掉.screen-inner里的剩余空间——
     简历/求职信卡片本身接近这个高度所以看不太出来，但第三屏图标网格自然高度
     只有~220px，被强行撑到440px+后，两行图标之间的空间被居中撑开，
     看起来就是间距异常大。这里重置成flex:none，让每块按自身内容高度显示 */
  .screen-text, .screen-visual { flex: none; }
}

@media (max-width: 768px) {
  .wrap { padding-inline: 24px; }
  nav.topnav { padding-inline: 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .screen { padding-block: 72px; }
  .screen-text h2 { font-size: clamp(24px, 7vw, 32px); }
  .footer-cols { gap: 32px; }
  .wrap.screen-inner { padding-inline: 24px; }
}

@media (max-width: 480px) {
  .btn-primary { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
