/* ============================================================
   BeliPintar — 自定义样式(在 Tailwind 之上补充设计稿细节)
   ============================================================ */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 8px);
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-page, #F7F7F7);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--color-primary-red);
  color: #fff;
}

/* ---------- 容器 ---------- */
.container-bp {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .container-bp { padding-inline: 2rem; }
}

/* ============================================================
   顶部导航栏 Navbar — 滚动吸顶 + 毛玻璃
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--color-line);
  box-shadow: 0 4px 20px rgba(1, 10, 27, 0.06);
}

/* Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo-img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 480px) {
  .brand-logo-img { height: 34px; }
}

/* 导航链接 */
.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  transition: color .2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link.active { color: var(--color-black); }
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: var(--color-primary-red); }
.nav-link:hover::after { transform: scaleX(1); }


/* 汉堡按钮(移动端) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--color-black);
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle:hover span { background: var(--color-primary-red); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* 移动端抽屉菜单 */
.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  z-index: 45;
  background: #fff;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu .nav-link {
  font-size: 1.15rem;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

/* ============================================================
   Hero 首屏
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: #0B2A5B;
  /* 背景图为设计稿官方素材(assets/hero-bg.png) */
  background-image: url('../assets/hero-bg.png');
  background-size: cover;
  background-position: center;
  min-height: 600px;
  display: flex;
  align-items: flex-start;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(1, 10, 27, 0.18) 0%, rgba(1, 10, 27, 0.06) 45%, rgba(1, 10, 27, 0.02) 75%, rgba(1, 10, 27, 0.08) 100%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-block: 5rem 4.5rem;
}
@media (min-width: 1024px) {
  .hero-grid {
    padding-block: 6.5rem 6.5rem;
  }
}
.hero-grid > div { max-width: 46rem; }

/* 双拼徽章(设计稿:倾斜四边形白底蓝字 + 蓝底白字,无缝斜切拼接) */
.hero-badges {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.98rem;
  filter: drop-shadow(0 4px 14px rgba(1, 10, 27, 0.18));
  transform: translateZ(0);
}
.badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  white-space: nowrap;
  z-index: 1;
}
.badge::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: skewX(-14deg);
  z-index: -1;
}
.badge-left {
  color: #508FDC;
  padding-left: 28px;
  padding-right: 22px;
}
.badge-left::before {
  background: #fff;
  border-radius: 12px 0 0 12px;
}
.badge-right {
  color: #fff;
  padding-left: 22px;
  padding-right: 28px;
  margin-left: -2px; /* 消除亚像素接缝 */
}
.badge-right::before {
  background: #508FDC;
  border-radius: 0 12px 12px 0;
}
/* 移动端:徽章换行堆叠,取消倾斜以恢复圆角胶囊 */
@media (max-width: 640px) {
  .hero-badges { flex-wrap: wrap; gap: 8px; }
  .badge { white-space: normal; padding: 8px 18px; font-size: 0.86rem; }
  .badge::before { transform: none; border-radius: 9999px; }
  .badge-left { padding-left: 18px; padding-right: 18px; }
  .badge-right { padding-left: 18px; padding-right: 18px; margin-left: 0; }
}

.hero-title {
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #FFFFFF;
  text-shadow: 0 1px 12px rgba(1, 10, 27, 0.35);
  white-space: nowrap;
}
/* 移动端:允许换行,避免 nowrap 撑破视口被裁切 */
@media (max-width: 640px) {
  .hero-title { white-space: normal; font-size: clamp(2.1rem, 11vw, 2.75rem); }
}

.hero-desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.22rem;
  line-height: 1.5;
  max-width: 32rem;
  text-shadow: 0 1px 8px rgba(1, 10, 27, 0.3);
}

/* ============================================================
   区块通用
   ============================================================ */
.section { padding-block: 4.5rem; background-color: var(--color-bg-page, #F7F7F7); }
@media (min-width: 1024px) { .section { padding-block: 6rem; } }

.section-title {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-black);
}

/* ============================================================
   Keunggulan Produk — 6 功能卡片
   ============================================================ */
#keunggulan .grid {
  gap: 1.25rem; /* 与 index.html gap-5 一致,避免特异性死锁(ISSUE-03) */
}

.feature-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 16px 16px 28px;
  box-shadow: 0 4px 20px rgba(1, 10, 27, 0.04);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-red), var(--color-aux-orange));
  opacity: 0;
  transition: opacity .3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(1, 10, 27, 0.08);
  border-color: rgba(255, 30, 0, 0.2);
}
.feature-card:hover::after { opacity: 1; }

/* 卡片配图(设计稿:图片内嵌于 16px 留白内,圆角 12px,比例 422/321) */
.feature-media {
  width: 100%;
  aspect-ratio: 422 / 321;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-bg);
  display: grid;
  place-items: center;
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform .45s ease;
}
.feature-card:hover .feature-media img { transform: scale(1.03); }

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #010A1B;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
.feature-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #45494D;
  text-align: center;
}

/* ============================================================
   品牌介绍区 Tentang Kami
   ============================================================ */
#tentang {
  background: var(--color-bg-section, #F7F7F7);
}

.about-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1024px) {
  .about-panel {
    grid-template-columns: 517px 1fr; /* 设计稿:左图定宽 517px,右侧自适应 */
    gap: 50px;                        /* 设计稿标注:图文间距 50px */
  }
}

.about-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent; /* 裸图直出,无白底相框 */
  border-radius: 16px;
  box-shadow: none;
  padding: 0;
  max-width: 517px;
  width: 100%;
}
.about-product {
  width: 100%;
  max-width: 517px;
  height: auto;
  display: block;
  border-radius: 16px;
}

.about-copy {
  padding: 0;
  max-width: 600px;
}
.about-copy .about-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--color-black);
  margin-bottom: 20px; /* 设计稿:标题与正文间距 20px */
}
.about-copy p {
  color: var(--color-black-2, #45494D);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.about-copy p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-link);
  padding-top: 4rem;
}
.site-footer .f-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 640px)  { .site-footer .f-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer .f-grid { grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 3rem; } }

.f-brand .brand-logo { color: #fff; }
/* 品牌列:Logo 下方为法定注册地址(设计稿) */
.f-brand .f-address {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7); /* 设计稿:地址灰白 #B0B0B0 等效 */
  margin-top: 1.25rem;
  max-width: 24rem;
}

.f-col .f-heading {
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
.f-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.f-col a {
  color: var(--color-footer-link);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color .2s ease, padding-left .2s ease;
}
.f-col a:hover { color: var(--color-primary-red); padding-left: 4px; }
/* Footer CTA 按钮(button 语义化,与链接样式一致) */
.footer-cta-btn {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .25s ease, padding-left .25s ease;
}
.footer-cta-btn:hover { color: var(--color-primary-red); padding-left: 4px; }
.footer-cta-btn:focus-visible { outline: 2px solid var(--color-primary-red); outline-offset: 2px; }

.f-contact li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.6;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #2E2E2E;
  margin-bottom: 0.85rem;
}
.f-contact li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.f-contact .f-lbl { color: #FFFFFF; font-weight: 700; font-size: 0.92rem; }
.f-contact .f-value { display: flex; align-items: center; gap: 0.6rem; }
.f-contact .f-value .val { color: #FFFFFF; font-size: 0.95rem; font-weight: 400; }
.f-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; color: #fff; flex-shrink: 0; }

/* 底部监管栏(设计稿新增):左对齐,WhatsApp 紧跟贸易部全称 */
.f-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #2E2E2E;
}
.f-legal-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin: 0;
  max-width: 48rem;
}
.f-legal-wa {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.f-legal-wa:hover { color: var(--color-primary-red); }

/* ============================================================
   滚动淡入动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }

/* 无障碍:减少动效 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feature-card:hover { transform: none; }
  .feature-card:hover .feature-media img { transform: none; }
  .site-header, .modal-card, .mobile-menu { transition: none; }
}

/* ============================================================
   Hapus Akun 弹窗 v3(参考图对齐:标准 1040px / Notch 浮动标签 / 52px 胶囊按钮)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.25); /* 设计稿:25% 纯黑遮罩 */
  display: flex;                    /* 修复 ISSUE-02:小屏高度不足时可滚动,不截断 */
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 1.5rem;   /* 顶部预留外置关闭按钮空间 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;           /* 默认隐藏(问题1:打开页面时弹窗不应出现) */
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.is-open {
  opacity: 1;           /* 打开(问题2:JS add/remove is-open 才能正常关闭) */
  pointer-events: auto;
}
.modal-overlay .modal-card { margin: auto; } /* 可滚动容器中上下居中,同时允许溢出滚动 */
.modal-card {
  position: relative;
  width: 100%;
  max-width: 1040px;
  min-height: 550px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: visible; /* 外置关闭按钮悬浮 */
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 5, 71, 0.12);
}
.modal-close-round {
  position: absolute;
  top: -30px; /* 外置悬浮:与设计稿 Figma 坐标对齐 */
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: #31353B;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  outline: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.modal-close-round:focus,
.modal-close-round:focus-visible { outline: none !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important; }
.modal-close-round:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }
.modal-close-round img { width: 28px; height: 28px; display: block; border-radius: 50%; }
.modal-art-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-art-img {
  width: 360px;
  max-width: 100%; /* 修复:640-1023px 双栏窄列自适应,防溢出 */
  height: 330px;
  object-fit: contain;
  user-select: none;
}
.modal-body-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 45px 30px 20px;
}
.modal-body-col form { max-width: 451px; width: 100%; } /* 表单列 451px 对齐设计稿 */
.modal-title {
  font-size: 26px;
  font-weight: 700;
  color: #31353B;
  margin: 0 0 8px;
  line-height: 1.3;
}
.modal-hint {
  font-size: 14px;
  color: #565656;
  margin: 0 0 32px;
  line-height: 1.5;
}
.acct-num { font-weight: 700; color: #31353B; }

/* Outlined 输入框:Notch 浮动标签(固定切口,不随焦点/占位符移动) */
.form-outlined-group { position: relative; margin-bottom: 20px; }
.form-outlined-input {
  width: 100%;
  height: 51px;
  padding: 0 16px;
  font-size: 14.5px;
  color: #31353B;
  background: #FFFFFF;
  border: 1px solid rgba(76, 78, 100, 0.22);
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-outlined-input:focus {
  border-color: #FF1E00;
  box-shadow: 0 0 0 3px rgba(255, 30, 0, 0.12);
}
.form-outlined-label {
  position: absolute;
  top: 0;
  left: 14px;
  transform: translateY(-50%);
  background: #FFFFFF;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: #31353B;
  line-height: 1;
  pointer-events: none;
}
.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.btn-toggle-pwd img { width: 18px; height: 18px; }
.has-trailing-icon .form-outlined-input { padding-right: 42px; }

/* 表单错误 */
.form-error {
  display: none;
  font-size: 11px;
  color: #E01F1F;
  margin: 4px 0 0;
}
.form-error.show { display: block; }
.form-outlined-input[aria-invalid="true"] { border-color: #E01F1F; }

.btn-modal-confirm {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 28px;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: #FF383C;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.btn-modal-confirm:hover:not(:disabled) { background: #E01F1F; }
.btn-modal-confirm:active:not(:disabled) { transform: scale(0.98); }
.btn-modal-confirm:disabled {
  background: #D7D7D7;
  color: #FFFFFF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 状态切换 */
.modal-state { display: none; }
.modal-state.active { display: contents; }

/* 成功状态:采用与 stateForm/stateVerify 相同的左右双栏(插画 + 内容),无独立样式 */

/* 弹窗响应式 */
@media (max-width: 640px) {
  .modal-card { grid-template-columns: 1fr; min-height: auto; }
  .modal-art-col { display: none; }
  .modal-body-col { padding: 32px 20px; }
}


/* 状态 2:验证码行与获取验证码按钮(方案A:内嵌纯文本按钮,无粉底无描边) */
.form-outlined-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.form-outlined-row .flex-1 {
  flex: 1;
  min-width: 0;
}
.btn-get-code {
  height: 51px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #FF383C;
  background: transparent;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}
.btn-get-code:hover:not(:disabled) { color: #E01F1F; }
.btn-get-code:disabled { color: #A8A8A8; cursor: not-allowed; opacity: 1; }
