/* ============================================================
   JOYIN Home Template — Complete Stylesheet
   设计稿规格：主色 #FF7D00 / #FF8A00，字体 Inter，响应式 3 断点
   ============================================================ */

/* ─── 字体加载 ─────────────────────────────────────────── */
@font-face {
    font-family: 'Fira Sans';
    src: url('../fonts/Fira sans/FiraSans-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Fira Sans';
    src: url('../fonts/Fira sans/FiraSans-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('../fonts/be_vietnam_pro/ttf/BeVietnamPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Be Vietnam Pro';
    src: url('../fonts/be_vietnam_pro/ttf/BeVietnamPro-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Dozed';
    src: url('../fonts/dozed/DozedDemoRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* ───────────────────────────────────────────────────────────
   A. 原有 Banner 样式（完全保留不动）
   ─────────────────────────────────────────────────────────── */
.banner-section {
    margin: 0 40px 40px 40px;
    border-radius: 16px;
    overflow: hidden;
}
.banner-carousel {
    overflow: visible;
    position: relative;
    width: 100%;
    padding: 0;
    transition: opacity 0.4s ease;
}
.banner-carousel.banner-loading {
    opacity: 0;
    visibility: hidden;
}
.banner-carousel.banner-loading .swiper-wrapper {
    display: none;
}
.banner-carousel .swiper {
    width: 100%;
    height: 500px;
}
.banner-carousel .swiper-slide {
    height: 500px !important;
    overflow: hidden;
    border-radius: 6px;
    transition: all 0.5s ease;
}
.banner-carousel .swiper-slide img {
    width: 100%;
    height: 500px !important;
    object-fit: cover;
}
.banner-carousel .swiper-wrapper:hover .swiper-slide:hover {
    width: 40% !important;
}
.banner-carousel .swiper-wrapper:hover .swiper-slide:not(:hover) {
    width: 20% !important;
}
.banner-carousel .swiper-button-prev,
.banner-carousel .swiper-button-next {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    color: #fff;
}
.banner-carousel:hover .swiper-button-prev,
.banner-carousel:hover .swiper-button-next {
    opacity: 1;
    visibility: visible;
}

/* 覆盖 Swiper 默认 SVG 图标，统一用 ::after 显示箭头 */
.banner-carousel .swiper-button-prev:after,
.banner-carousel .swiper-button-next:after {
    all: unset;
    font-size: 40px;
    font-weight: 100;
    line-height: 1;
}


.slide-media-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.slide-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.4s ease;
}
.slide-video {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.swiper-slide:hover .slide-video {
    opacity: 1;
}
.slide-overlay-gradient {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 211, 43, 0) 54%, rgba(255, 211, 43, 0.36) 78%, rgba(255, 116, 33, 0.9) 100%);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.swiper-slide:hover .slide-overlay-gradient {
    opacity: 1;
}
.slide-bottom-text {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 100%;
    transition: opacity 0.4s ease;
}
.slide-arrow {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.4s ease;
}
.swiper-slide:hover .slide-overlay-gradient + .slide-bottom-text .slide-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ───────────────────────────────────────────────────────────
   B. 品牌理念 Slogan 横幅（设计稿左文右图，橙色渐变）
   ─────────────────────────────────────────────────────────── */
.mission-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}
.mission-bg-layer {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,160L48,165.3C96,171,192,181,288,186.7C384,192,480,192,576,170.7C672,149,768,107,864,101.3C960,96,1056,128,1152,149.3C1248,171,1344,181,1392,186.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    pointer-events: none;
}
.mission-container {
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 80px;
    position: relative;
    z-index: 2;
    padding: 40px 40px 40px 120px;
    will-change: transform;
}
.mission-left {
    flex: 0.9;

}
.mission-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}
.mission-right .mission-copy{
    font-size: 24px;
    font-family: 'Roboto';
    color: #fff;
}
.mission-title {
    font-size: 80px;
    font-family: 'Fira sans';
    font-weight: 600;
    color: #FFD32B;
    line-height: 1.1;
    margin: 0 0 24px;
    /* 文字动画专用：保持换行 */
    word-break: keep-all !important;
    white-space: pre-wrap !important;
    overflow-wrap: normal !important;
}
.mission-title .char {
    opacity: 0;
}
.mission-copy {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
    line-height: 1.7;
    margin: 0 0 32px;
}
.mission-btn-wrap {
    display: flex;
}
.btn-mission {
    display: inline-block;
    padding: 6px 20px;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-mission:hover {
    background: #FF7D00;
    border: 1px solid #FF7D00;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.mission-decoration {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mission-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mission 文字动画专用 */
.mission-section .text-reveal {
    opacity: 1 !important;
    visibility: visible !important;
}
.mission-section .text-reveal .char {
    opacity: 0;
}
.mission-section .text-fade {
    opacity: 0;
    transform: translateY(12px);
}
.text-fade {
    transform: translateY(12px);
}
.text-reveal .char {
    display: inline !important;
    position: relative !important;
}
.typed-cursor {
    color: #ff7a00;
    font-weight: normal;
}

/* ───────────────────────────────────────────────────────────
   C. 数据统计区（5列水平均分，计数动画）
   ─────────────────────────────────────────────────────────── */
.stats-section {
    padding: 60px 0;
    background: #ffffff;
}
.stats-title {
    text-align: center;
    margin-bottom: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
   
    margin: 0 auto;
    padding: 0 20px;
}
.stat-item {
    text-align: center;
    padding: 20px 12px;
    border-right: 1px solid #eee;
}
.stat-item:last-child {
    border-right: none;
}
.stat-number {
    font-size: 80px;
    font-family: 'Dozed';
    color: #333;
    line-height: 1;
    margin-bottom: 10px;
}
.stat-label {
    font-size: 18px;
    font-family: "Be Vietnam Pro";
    font-weight: 400;
    color: #93989d;
}


/* ───────────────────────────────────────────────────────────
   D. 品牌矩阵（左图右文/左文右图交替，Z-pattern）
   ─────────────────────────────────────────────────────────── */
.brands-section {
    position: relative;
    margin-bottom: 8%;
    overflow: visible;
}

.brand-row {
    position: sticky;
    top: clamp(96px, 16vh, 180px);
    z-index: 1;
    background: #fff;
    transform-origin: center top;
    will-change: transform;
}
.brand-row:nth-of-type(1) { z-index: 1; }
.brand-row:nth-of-type(2) { z-index: 2; }
.brand-row:nth-of-type(3) { z-index: 3; }
.brand-row:nth-of-type(4) { z-index: 4; }
.brands-intro {
    text-align: center;
    display: block;
    padding: 40px 60px;
    margin: 0 auto 64px;
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    color: #333;
    line-height: 1.7;
}
/* 让 .char 在 GSAP 动画时能响应 color 属性 */
.brands-intro .char,
.brands-intro .word {
    display: inline !important;
    color: #333;
}
.brand-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;

    margin: 0 auto 10px;
    padding: 5px 40px;
}

.brand-scene {
    display: flex;
    align-items: stretch;
}
.brand-scene img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}
.brand-info {
    background: #F8F8F8;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5px 40px;
    border-radius: 10px;
    gap: 0;
}
.brand-info .brand-title {
    border: 1px solid #27313C;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 140%;
    color: #27313C;
    padding: 4px 12px;
    margin-bottom: 16px;
    margin-top: 7%;
}
.brand-logo {
    margin: 6% 0;
    height: 100px;
}
.brand-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}
.brand-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 24px;
}
.btn-brand {
    display: inline-block;
    padding: 6px 20px;
    background: #ffffff;
    color: #FF7D00;
    border: 1px solid #FF7D00;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    margin-bottom: 10%;
}
.btn-brand:hover {
    background: #FF7D00;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,125,0,0.3);
}

/* ───────────────────────────────────────────────────────────
   E. 招聘模块（通栏背景图 + 居中内容）
   ─────────────────────────────────────────────────────────── */
.careers-section {
    padding: 120px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.careers-container {
    position: relative;
    z-index: 2;
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.careers-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.careers-title {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 80px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}
.careers-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    margin: 0 0 5% 0;
    line-height: 1.6;
    max-width: 560px;
}
.btn-careers {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 20px;
    border:1px solid #FF7D00;
    color: #FF7D00;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-careers:hover {
    background: #e66e00;
    color: #fff;
    transform: translateY(-2px);
}

/* ───────────────────────────────────────────────────────────
   F. 通用基础
   ─────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
}
.container {
    width: min(1400px, calc(100% - 64px));
    margin: 0 auto;
}
.btn {
    display: inline-block;
    padding: 6px 20px;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}
.btn-light {
    background: #fff;
    color: #333;
    border: 1px solid #eee;
}
.btn-primary {
    background: #ff7a00;
    color: #fff;
    border: none;
}

/* ───────────────────────────────────────────────────────────
   G. 响应式（设计稿 3 断点）
   ─────────────────────────────────────────────────────────── */

/* 移动端 ≤767px */
@media (max-width: 767px) {
    .container {
        width: calc(100% - 40px);
    }

    /* Banner */
    .banner-section {
        width: calc(100% - 40px);
        margin: 0 auto 14px;
        border-radius: 0;
        overflow: visible;
    }
    .banner-carousel,
    .banner-carousel .swiper {
        height: auto !important;
        overflow: visible;
    }
    .banner-carousel .swiper-wrapper {
        height: auto !important;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        transform: none !important;
    }
    .banner-carousel .swiper-slide-duplicate {
        display: none !important;
    }
    .banner-carousel .swiper-slide,
    .banner-carousel .swiper-slide img {
        height: clamp(160px, 45.25vw, 220px) !important;
    }
    .banner-carousel .swiper-slide {
        width: 100% !important;
        border-radius: 6px;
    }
    .banner-carousel .swiper-wrapper:hover .swiper-slide:hover,
    .banner-carousel .swiper-wrapper:hover .swiper-slide:not(:hover) {
        width: 100% !important;
    }
    .slide-media-wrap {
        height: clamp(160px, 45.25vw, 220px);
        border-radius: 6px;
    }
    .slide-img,
    .slide-video {
        height: 100% !important;
    }
    .slide-overlay-gradient {
        opacity: 1;
        background: linear-gradient(180deg, rgba(39, 49, 60, 0) 35%, rgba(39, 49, 60, 0.22) 62%, rgba(39, 49, 60, 0.58) 100%);
    }
    .slide-bottom-text {
        max-width: calc(100% - 32px);
        font-size: clamp(20px, 5.43vw, 28px);
        left: 12px;
        bottom: 10px;
        gap: 6px;
    }
    .slide-arrow {
        display: none;
    }
    .banner-carousel .swiper-button-prev,
    .banner-carousel .swiper-button-next {
        display: none;
    }

    /* Mission */
    .mission-section {
        min-height: 260px;
        padding: 40px;
        background-position: right bottom !important;
        background-size: auto 100% !important;
    }
    .mission-container {
        width: 100%;
        min-height: 218px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 22% 0 0;
    }
    .mission-left,
    .mission-right {
        width: 100%;
    }
    .mission-right {
        justify-content: flex-start;
    }
    .mission-section .text-fade{
        margin: 7% 0 2% 0;
    }
    .mission-title {
        max-width: 300px;
        margin: 0 0 8px;
        font-size: clamp(38px, 10.86vw, 54px);
        line-height: 0.96;
    }
    .mission-right .mission-copy,
    .mission-copy {
        margin: 0 0 12px;
        font-size: clamp(12px, 3.17vw, 16px);
        line-height: 1.45;
    }
    .mission-decoration {
        width: 140px;
        height: 140px;
    }
    .btn-mission {
        padding: 4px 14px;
        font-size: clamp(12px, 3.17vw, 16px);
        line-height: 1.1;
        box-shadow: none;
    }

    /* Stats */
    .stats-section {
        padding: 0;
    }
    .stats-title {
        font-size: 12px;
        margin-bottom: 32px;
    }
    .stats-grid {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 12% 3%;
    }
    .stat-item:nth-child(1) { order: 1; }
    .stat-item:nth-child(2) { order: 4; }
    .stat-item:nth-child(3) { order: 3; }
    .stat-item:nth-child(4) { order: 5; }
    .stat-item:nth-child(5) { order: 2; }
    .stat-item:nth-child(odd),
    .stat-item:last-child,
    .stat-item:nth-last-child(2):nth-child(odd) {
        border-right: none;
    }
    .stat-item:last-child{
        border-bottom: none;
    }
    .stat-number {
        font-size: clamp(64px, 18.1vw, 88px);
        font-family: 'Dozed', sans-serif;
        margin-bottom: 6px;
    }
    .stat-label {
        font-size: clamp(14px, 4.07vw, 20px);
        font-family: "Be Vietnam Pro";
        line-height: 1.15;
    }

    /* Brands */
    .brands-section {
        padding: 22px 0 26px;
        margin-bottom: 0;
    }
    .brands-intro {
        max-width: 320px;
        font-size: clamp(15px, 4.07vw, 18px);
        line-height: 1.5;
        margin: 0 auto 10%;
        padding: 0;
    }
    .brand-row {
        position: relative;
        top: auto;
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 0 auto 12px;
        padding: 0;
        background: transparent;
    }
    .brand-row-reverse {
        direction: ltr;
    }
    .brand-row .brand-scene {
        order: 1;
    }
    .brand-row .brand-info {
        order: 2;
    }
    .brand-scene img {
        width: 100%;
        aspect-ratio: 1.48 / 1;
        border-radius: 10px;
        object-fit: cover;
    }
    .brand-info {
        padding: 14px 14px 12px;
        border-radius: 6px;
        background: #f8f8f8;
    }
    .brand-info .brand-title {
        margin: 0 0 14px;
        padding: 3px 9px;
        font-size: clamp(12px, 3.17vw, 16px);
        line-height: 1.1;
    }
    .brand-logo {
        width: 55%;
        height: auto;
        margin: 36px 0 ;
    }
    .brand-desc {
        margin: 0 0 14px;
        font-size: clamp(12px, 3.17vw, 16px);
        line-height: 1.42;
    }
 
    .btn-brand {
        width: 100%;
        margin: 0;
        padding: 6px 18px;
        background: #f37022;
        color: #ffffff;
        border-color: #f37022;
        font-size: clamp(15px, 4.07vw, 18px);
        line-height: 1.1;
        text-align: center;
        margin: 6% 0 4% 0;
    }

    /* Careers */
    .careers-section {
        min-height: 210px;
        padding: 17% 0;
    }
    .careers-container {
        padding: 0;
    }
    .careers-title {
        font-size: clamp(38px, 10.86vw, 54px);
        line-height: 0.98;
    }
    .careers-text {
        margin-bottom: 8px;
        font-size: clamp(15px, 4.07vw, 18px);
        line-height: 1.35;
    }
    .btn-careers {
        padding: 6px 18px;
        background: #f37022;
        color: #ffffff;
        font-size: clamp(15px, 4.07vw, 18px);
        line-height: 1.1;
         margin-top: 6%;
    }
}

/* 平板 768px–1199px */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Banner */
    .banner-section {
        margin: 0 24px 32px;
    }
    .banner-carousel .swiper {
        height: 360px;
    }
    .banner-carousel .swiper-slide {
        height: 360px !important;
    }
    .banner-carousel .swiper-slide img {
        height: 360px !important;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stat-item:nth-child(3) {
        border-right: none;
    }
    .stat-item:nth-child(4),
    .stat-item:nth-child(5) {
        border-top: 1px solid #eee;
    }
    .stat-item:nth-child(4) {
        border-right: 1px solid #eee;
    }

    /* Mission */
    .mission-title {
        font-size: 36px;
    }

    /* Brands */
    .brand-row {
        gap: 24px;
        margin-bottom: 48px;
        padding: 5px 24px;
    }

    /* Careers */
    .careers-title {
        font-size: 36px;
    }
}

/* 桌面端 ≥1200px — 完整宽度（默认样式）*/
@media (min-width: 1200px) {
    .banner-section {
        margin: 0 60px 48px;
        border-radius: 20px;
    }
    .banner-carousel .swiper {
        height: 540px;
    }
    .banner-carousel .swiper-slide {
        height: 540px !important;
    }
    .banner-carousel .swiper-slide img {
        height: 540px !important;
    }
}
