/*
 * BFEN 本分文化官网 — 最终交付样式
 * 本文件位于基础样式 style.css 之后，用于统一最终视觉尺度。
 */
:root{
  --brand-blue:#0864ff;
  --brand-blue-soft:#79b0ff;
  --home-section-space:96px;
  --home-title-size:42px;
  --home-body-size:15px;
}

/* Brand sizing */
.brand img{width:148px!important;max-height:44px;object-fit:contain}
.footer-brand img{width:126px!important;max-height:40px;object-fit:contain}

/* Homepage rhythm and typography */
body[data-page="home"] .hero{
  min-height:720px;
  padding:150px 0 78px;
  background:
    radial-gradient(circle at 82% 18%,rgba(8,100,255,.13),transparent 25%),
    radial-gradient(circle at 16% 16%,rgba(121,176,255,.09),transparent 24%),
    linear-gradient(180deg,#091020 0%,#0b1426 54%,#091020 100%);
}
body[data-page="home"] .hero-content{max-width:900px;margin-inline:auto;text-align:center}
body[data-page="home"] .hero h1{font-size:clamp(44px,5.2vw,68px);line-height:1.12;margin-bottom:18px}
body[data-page="home"] .hero p{max-width:760px;margin-inline:auto;font-size:16px;line-height:1.85;color:#aab7cc}
body[data-page="home"] .hero-actions{margin-top:30px;gap:12px;justify-content:center}
body[data-page="home"] .hero-stats{max-width:840px;margin:52px auto 0;gap:14px}
body[data-page="home"] .stat{padding:17px 14px;border:1px solid rgba(8,100,255,.18);border-radius:15px;background:rgba(8,100,255,.045)}
body[data-page="home"] .stat strong{font-size:28px;color:var(--brand-blue)}
body[data-page="home"] .stat span{font-size:13px;color:#8d99ad}
body[data-page="home"] .section{padding:var(--home-section-space) 0}
body[data-page="home"] .section-head{margin-bottom:46px}
body[data-page="home"] .section-title{font-size:clamp(32px,3.6vw,var(--home-title-size));line-height:1.2}
body[data-page="home"] .section-desc{font-size:var(--home-body-size);line-height:1.8;margin-top:13px}
body[data-page="home"] .eyebrow{margin-bottom:10px;font-size:12px}
body[data-page="home"] .grid-3{gap:22px}
body[data-page="home"] .adv-card{padding:32px;min-height:260px}
body[data-page="home"] .adv-card h3{font-size:20px;margin:20px 0 10px}
body[data-page="home"] .adv-card p{font-size:14px;line-height:1.8}
body[data-page="home"] .split{gap:64px}
body[data-page="home"] .split-copy h2{font-size:clamp(32px,3.7vw,45px);margin-bottom:18px}
body[data-page="home"] .split-copy p{font-size:15px;line-height:1.85;margin-bottom:14px}
body[data-page="home"] .split-media img{height:440px}
body[data-page="home"] .grid-4{gap:20px}
body[data-page="home"] .service-card{min-height:326px;padding:28px}
body[data-page="home"] .service-card h3{font-size:21px;margin:18px 0 10px}
body[data-page="home"] .service-card p{font-size:14px;line-height:1.75}
body[data-page="home"] .metrics{padding:58px 0}
body[data-page="home"] .metric strong{font-size:40px;color:var(--brand-blue);background:none;-webkit-background-clip:initial;background-clip:initial}
body[data-page="home"] .metric span{font-size:13px;color:#8d99ad}
body[data-page="home"] .case-grid{gap:20px}
body[data-page="home"] .case-card{aspect-ratio:4/5}
body[data-page="home"] .case-card-info{padding:22px 20px}
body[data-page="home"] .case-card h3{font-size:18px}
body[data-page="home"] .case-card h3 span{font-size:13px;line-height:1.45;margin-top:5px}

/* Real cases page */
body[data-page="cases"] main>.section:first-child{padding-top:132px}
body[data-page="cases"] .cases-section .section-head{margin-bottom:34px}
body[data-page="cases"] .section-title{font-size:clamp(34px,3.8vw,46px)}
body[data-page="cases"] .section-desc{font-size:15px;line-height:1.85;max-width:860px}
body[data-page="cases"] .tabs{margin-bottom:38px}
body[data-page="cases"] .tab-btn{font-size:14px;font-weight:650;padding:10px 22px}
body[data-page="cases"] .cases-full{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
body[data-page="cases"] .cases-full .case-card{aspect-ratio:16/10}
body[data-page="cases"] .case-card h3{font-size:21px}
body[data-page="cases"] .case-card h3 span{display:block;font-size:14px;color:#d0d9e8;margin-top:5px;line-height:1.5}
body[data-page="cases"] .case-card-info{padding:24px}
.modal-img{background:#070b16}
.modal-project-theme{font-size:16px;color:#a7b5ca!important;line-height:1.75}

/* Partner logo scale */
.partner-item{width:180px;height:100px;padding:10px;background:#fff;overflow:hidden}
.partner-item img{width:auto;max-width:94%;height:auto;max-height:72px;object-fit:contain;filter:none!important;opacity:1!important}

/* Footer spacing */
.site-footer{padding-top:58px}
.footer-grid{padding-bottom:38px}

@media(max-width:1024px){
  :root{--home-section-space:82px}
  body[data-page="home"] .split{gap:44px}
  body[data-page="home"] .case-grid{grid-template-columns:repeat(2,1fr)}
  body[data-page="cases"] .cases-full{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .brand img{width:136px!important}
  .footer-brand img{width:120px!important}
  body[data-page="home"] .hero{min-height:auto;padding:128px 0 68px}
  body[data-page="home"] .hero-stats{grid-template-columns:repeat(2,1fr);max-width:560px;margin-top:42px}
  body[data-page="home"] .split-media img{height:380px}
  body[data-page="cases"] .cases-full{grid-template-columns:1fr}
  body[data-page="cases"] main>.section:first-child{padding-top:110px}
}
@media(max-width:580px){
  :root{--home-section-space:64px}
  .brand img{width:124px!important}
  .footer-brand img{width:112px!important}
  body[data-page="home"] .hero{padding:112px 0 56px}
  body[data-page="home"] .hero h1{font-size:38px}
  body[data-page="home"] .hero p{font-size:14px}
  body[data-page="home"] .hero-stats{gap:10px}
  body[data-page="home"] .stat{padding:14px 9px}
  body[data-page="home"] .stat strong{font-size:23px}
  body[data-page="home"] .section-head{margin-bottom:36px}
  body[data-page="home"] .split-media img{height:290px}
  body[data-page="home"] .service-card{min-height:auto}
}


/* Chinese / English language switch */
.lang-toggle{
  flex:0 0 auto;
  min-width:52px;
  height:36px;
  padding:0 13px;
  margin-left:14px;
  border:1px solid rgba(121,176,255,.34);
  border-radius:999px;
  background:rgba(8,100,255,.08);
  color:#dce8fb;
  font-size:12px;
  font-weight:750;
  letter-spacing:.04em;
  cursor:pointer;
  transition:.25s ease;
}
.lang-toggle:hover,.lang-toggle:focus-visible{
  border-color:var(--brand-blue);
  background:rgba(8,100,255,.18);
  color:#fff;
  outline:none;
  transform:translateY(-1px);
}
.lang-toggle-standalone{position:fixed;z-index:10;right:24px;top:24px}
html[data-language="en"] body{letter-spacing:0}
html[data-language="en"] .nav-menu{gap:25px}
html[data-language="en"] .nav-link{font-size:14px}
html[data-language="en"] .section-desc,
html[data-language="en"] .split-copy p,
html[data-language="en"] .service-card p,
html[data-language="en"] .detail-copy>p,
html[data-language="en"] .value-card p,
html[data-language="en"] .principle-card p{line-height:1.72}
html[data-language="en"] body[data-page="home"] .hero h1{max-width:880px;margin-inline:auto}
html[data-language="en"] body[data-page="home"] .service-card{min-height:350px}
html[data-language="en"] body[data-page="cases"] .case-card h3 span{font-size:13px}
@media(max-width:1024px){
  .lang-toggle{margin-left:auto;margin-right:12px}
}
@media(max-width:820px){
  .brand{order:1}
  .lang-toggle{order:2;margin-left:auto;margin-right:10px;min-width:48px;height:34px;padding-inline:11px}
  .menu-toggle{order:3}
  .nav-menu{order:4}
  html[data-language="en"] .nav-menu{gap:0}
}
@media(max-width:580px){
  .lang-toggle{min-width:44px;padding-inline:9px;font-size:11px}
  .lang-toggle-standalone{right:15px;top:15px}
  html[data-language="en"] body[data-page="home"] .hero h1{font-size:35px}
}


/* v1.3 — Marketing-led case studies and final typography audit */
body:not([data-page="home"]) main>.section:first-child{padding-top:128px}
body:not([data-page="home"]) .section{padding:96px 0}
body:not([data-page="home"]) .section-head{max-width:820px;margin-bottom:44px}
body:not([data-page="home"]) .section-title{font-size:clamp(32px,3.6vw,44px);line-height:1.2}
body:not([data-page="home"]) .section-desc{font-size:15px;line-height:1.82;margin-top:14px}
body[data-page="about"] .values-grid,
body[data-page="service"] .grid-4{gap:22px}
body[data-page="service"] .service-detail{padding:68px 0;gap:58px}
body[data-page="contact"] .contact-cards{gap:18px}

body[data-page="cases"] main>.section:first-child{padding-top:126px}
body[data-page="cases"] .cases-section{padding-bottom:104px}
body[data-page="cases"] .cases-section .section-head{margin-bottom:34px}
body[data-page="cases"] .tabs{margin-bottom:38px}
body[data-page="cases"] .cases-full{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
body[data-page="cases"] .cases-full .case-card{aspect-ratio:4/3;min-height:294px}
body[data-page="cases"] .case-card:after{background:linear-gradient(to top,rgba(3,7,15,.98) 0%,rgba(3,7,15,.86) 38%,rgba(3,7,15,.10) 78%)}
body[data-page="cases"] .case-card-info{padding:22px 22px 20px}
body[data-page="cases"] .case-card h3{font-size:20px;line-height:1.25;margin:0;color:#fff}
body[data-page="cases"] .case-marketing{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#fff;font-size:16px;font-weight:750;line-height:1.42;margin-top:6px}
body[data-page="cases"] .case-highlight{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#b9c6da;font-size:12.5px;line-height:1.55;margin-top:7px}
body[data-page="cases"] .case-tag{margin-bottom:9px}

.modal-box{width:min(1040px,100%)}
.modal-img{height:min(56vh,560px);object-fit:contain;background:#050914}
.modal-body{padding:30px 34px 34px}
.modal-body h2{font-size:28px;margin:8px 0 4px}
.modal-marketing-title{font-size:23px;line-height:1.4;margin:4px 0 10px;color:#fff}
.modal-project-name{display:inline-flex!important;color:#79b0ff!important;font-size:14px!important;line-height:1.6!important;margin:0 0 12px!important}
.modal-project-highlight{color:#aab8cd!important;font-size:15px!important;line-height:1.78!important;margin:0!important;max-width:850px}

html[data-language="en"] body[data-page="cases"] .case-marketing{font-size:15px;line-height:1.38}
html[data-language="en"] body[data-page="cases"] .case-highlight{font-size:12px;line-height:1.5}
html[data-language="en"] .modal-marketing-title{font-size:22px}

@media(max-width:1024px){
  body:not([data-page="home"]) .section{padding:82px 0}
  body[data-page="cases"] .cases-full{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-page="service"] .service-detail{gap:42px}
}
@media(max-width:820px){
  body:not([data-page="home"]) main>.section:first-child{padding-top:108px}
  body[data-page="cases"] .cases-section{padding-bottom:82px}
  body[data-page="cases"] .cases-full .case-card{min-height:285px}
  .modal-img{height:430px}
}
@media(max-width:580px){
  body:not([data-page="home"]) .section{padding:64px 0}
  body[data-page="cases"] .cases-full{grid-template-columns:1fr;gap:18px}
  body[data-page="cases"] .cases-full .case-card{min-height:280px}
  body[data-page="cases"] .case-card-info{padding:20px}
  body[data-page="cases"] .case-marketing{font-size:15px}
  .modal-img{height:270px}
  .modal-body{padding:24px 22px 28px}
  .modal-marketing-title{font-size:20px}
}


@media(max-width:580px){
}

/* v1.6 compact case viewer */
.modal-box{width:min(920px,100%)}
.modal-gallery{position:relative;height:430px;overflow:hidden;background:#050914}
.modal-img{width:100%;height:100%!important;object-fit:contain!important;display:block;background:#050914}
.modal-close{z-index:6;font-size:18px;font-weight:800}
@media(max-width:820px){.modal-gallery{height:360px}}
@media(max-width:580px){.modal-gallery{height:240px}}
