/* ==========================================================================
   FloraLink Global — B2B 工业建筑感视觉系统与自定义样式
   设计主调：深林绿 (#0F2E22)、生机翠绿 (#1E6B4B)、荒漠暖沙 (#D9C5A0)、极地冰岩 (#334E58)
   ========================================================================== */

:root {
  --fl-forest: #0F2E22;
  --fl-forest-deep: #091E16;
  --fl-emerald: #1E6B4B;
  --fl-emerald-light: #28855E;
  --fl-sand: #D9C5A0;
  --fl-sand-soft: #EFE7D6;
  --fl-glacial: #334E58;
  --fl-surface: #F8F7F4;
  --fl-white: #FFFFFF;
  --fl-text: #111827;
  --fl-muted: #4B5563;
  --fl-border: rgba(15, 46, 34, 0.12);
}

/* 基础平滑滚动与字体栈 */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--fl-text);
  background-color: var(--fl-surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* 阿拉伯语 RTL 模式字体与排版适配 */
html[dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] .font-display {
  font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0;
}

/* 阿拉伯语下翻转方向性图标（如右箭头） */
html[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* 建筑网格细纹背景（工业工程质感） */
.bg-arch-grid {
  background-image:
    linear-gradient(to right, rgba(15, 46, 34, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 46, 34, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-arch-grid-dark {
  background-image:
    linear-gradient(to right, rgba(217, 197, 160, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 197, 160, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* 顶部导航毛玻璃与滚动加深状态 */
.site-header {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background-color: rgba(248, 247, 244, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgba(15, 46, 34, 0.14);
  border-bottom-color: rgba(15, 46, 34, 0.12);
}

/* 卡片微抬升交互 */
.card-elevate {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.28s ease;
}

.card-elevate:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px -18px rgba(15, 46, 34, 0.18);
  border-color: rgba(30, 107, 75, 0.35);
}

/* 解决方案图片微缩放 */
.solution-card .solution-img {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.solution-card:hover .solution-img {
  transform: scale(1.06);
}

/* 侧边滑出 RFQ 询盘抽屉（同时兼容 LTR 右滑与 RTL 左滑） */
.rfq-drawer-panel {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

html[dir="ltr"] .rfq-drawer-panel.closed,
html:not([dir="rtl"]) .rfq-drawer-panel.closed {
  transform: translateX(100%);
}

html[dir="rtl"] .rfq-drawer-panel.closed {
  transform: translateX(-100%);
}

.rfq-drawer-panel.open {
  transform: translateX(0);
}

/* 筛选按钮激活态 */
.filter-pill {
  transition: all 0.2s ease;
}

.filter-pill.active {
  background-color: var(--fl-forest);
  color: #FFFFFF;
  border-color: var(--fl-forest);
  box-shadow: 0 6px 16px -6px rgba(15, 46, 34, 0.45);
}

/* 表单角色切换 Tab 激活态 */
.role-tab {
  transition: all 0.22s ease;
}

.role-tab.active {
  background-color: var(--fl-forest);
  color: #FFFFFF;
  border-color: var(--fl-forest);
  box-shadow: 0 8px 20px -10px rgba(15, 46, 34, 0.55);
}

.role-tab.active .role-tab-sub {
  color: var(--fl-sand);
}

/* 时间轴进度渐变线 */
.timeline-rail {
  background: linear-gradient(90deg, #1E6B4B 0%, #D9C5A0 100%);
}

html[dir="rtl"] .timeline-rail {
  background: linear-gradient(270deg, #1E6B4B 0%, #D9C5A0 100%);
}

/* 输入框聚焦统一高亮 */
.fl-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.fl-input:focus {
  outline: none;
  border-color: var(--fl-emerald);
  box-shadow: 0 0 0 3px rgba(30, 107, 75, 0.14);
  background-color: #FFFFFF;
}

.fl-input.input-error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Toast 提示淡入动画 */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-enter {
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 细滚动条优化（用于抽屉内部） */
.thin-scroll::-webkit-scrollbar {
  width: 6px;
}

.thin-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.thin-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(15, 46, 34, 0.2);
  border-radius: 9999px;
}

/* 防止锚点滚动被固定导航栏遮挡 */
section[id] {
  scroll-margin-top: 84px;
}

/* 图片加载兜底渐变底色 */
.img-frame {
  background: linear-gradient(135deg, #143A2B 0%, #24474F 100%);
}

/* 首屏动态轮播背景：平滑淡入淡出 + 电影级缓慢推进缩放 (Ken Burns) */
.hero-slide {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
              transform 7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* 轮播进度条动画 */
.hero-dot-bar {
  position: relative;
  overflow: hidden;
}

.hero-dot-bar .hero-dot-fill {
  position: absolute;
  inset: 0;
  background-color: #D9C5A0;
  transform-origin: left center;
  transform: scaleX(0);
}

html[dir="rtl"] .hero-dot-bar .hero-dot-fill {
  transform-origin: right center;
}

@keyframes heroProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hero-dot-bar.is-active .hero-dot-fill {
  animation: heroProgress 6s linear forwards;
}

.hero-paused .hero-dot-bar.is-active .hero-dot-fill {
  animation-play-state: paused;
}

