html,
body {
    position: relative;
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

/* 一行就有平滑滚动 */
body {
    font-family: "Montserrat", "思源黑体", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #000;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Cinzel", "思源黑体", serif;
}

.theater-banner,
.theater-banner p,
.theater-banner h1,
.theater-banner h2 {
    font-family: "Times New Roman", "思源黑体", serif !important;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    /* Center slide text vertically */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* 导航高亮用品牌色 */
nav button.active {
    color: var(--brand);
    border-bottom: 2px solid var(--brand);
}

/* 头部在首屏透明，其他屏半透明深色 */
.site-header {
    transition: background-color .3s ease, backdrop-filter .3s ease;
}

.header--transparent {
    background-color: transparent;
    backdrop-filter: none;
}

.header--solid {
    background-color: rgba(10, 15, 28, .8);
    backdrop-filter: saturate(120%) blur(6px);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

:root {
    /* 导航高度（JS 会在运行时根据真实高度覆盖这个变量） */
    --header-h: 72px;
    --brand: #EF7D00;
}

/* === GLOBAL GUARDS: mobile drawer is fully hidden by default === */
#mobile-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-100%) !important;
}

#mobile-nav.open {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* 品牌橙工具类（若你在 output.css 里已有可忽略） */
.text-brand {
    color: var(--brand) !important;
}

.bg-brand {
    background-color: var(--brand) !important;
}

/* 自适应安全视口高度：移动端浏览器地址栏伸缩也能占满 */
.vh-safe {
    min-height: 100svh;
}

.vh-safe-body {
    min-height: calc(100svh - var(--header-h));
}

/* 非首屏给固定导航让位，避免被遮挡 */
.with-header-offset {
    padding-top: calc(var(--header-h) + 12px);
}

/* 小屏按钮 100% 宽（仅在需要时） */
@media (max-width: 767.98px) {
    .btn-block-sm {
        width: 100%;
    }
}

/* 视频背景通用 */
.video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* === Global Text Overflow (ellipsis) === */
.truncate-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 让第4屏(施工案例)按内容自适应高度，避免被 flex 居中影响只显示一行 */

#s4 .max-w-7xl {
    overflow: visible !important;
}

/* ===== Utility: normalize card footers on third screen ===== */
.card-footer {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 767.98px) {
    .card-footer {
        min-height: 56px;
    }
}

/* Ensure footer text never wraps so the gray bar looks consistent */
.card-footer p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* ==== S4: Cases carousel (centered template, enlarged & better-centered) ==== */
/* ==== S4 Responsive Vars (title top / cards height / gaps computed by JS) ==== */
#s4 {
    /* defaults; JS will overwrite on load & resize */
    --s4-title-top: clamp(28px, 6svh, 96px);
    --s4-cases-gap: clamp(12px, 4svh, 36px);
    --s4-btn-mt: clamp(12px, 5svh, 20px);
    --s4-card-h: clamp(320px, 48svh, 640px);
}

#s4 .cases-swiper {
    margin-top: var(--s4-cases-gap) !important;
}

#s4 .s4-btn {
    margin-top: var(--s4-btn-mt) !important;
}

.cases-swiper {
    overflow: visible;
    padding-bottom: 32px;
    /* tighter spacing on desktop */
    width: min(96vw, 1800px);
    /* fill wide screens while keeping margins */
    max-width: none;
    margin-inline: auto;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
}

.cases-swiper .swiper-slide {
    height: auto;
}

.cases-card {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.cases-card img {
    width: 100%;
    height: auto;
    max-height: var(--s4-card-h);
    aspect-ratio: 4 / 3;
    /* keep 4:3 proportion so height grows with width */
    display: block;
    object-fit: cover;
}

.cases-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.6rem;
    width: 100%;

}

.cases-footer .title {
    font-weight: bold;
    font-size: 1rem;
}

.cases-footer .sub {
    font-size: 0.7rem;
    border-left: 4px solid #fff;
    text-align: left;
    padding-left: 5px;
    margin-top: 10px;
}

/* Focus active slide visually */
.cases-swiper .swiper-slide-active .cases-card {
    transform: scale(1.03);
}

@media (max-width: 1279.98px) {
    .cases-swiper {
        max-width: 1000px;
    }
}

@media (max-width: 1023.98px) {
    .cases-swiper {
        max-width: 880px;
    }
}

@media (max-width: 767.98px) {
    .cases-swiper {
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 20px;
        max-width: 100%;
    }

    .cases-card img {
        height: 340px;
    }

    .cases-footer {
        padding: 1.4rem 1.2rem;
        width: 100%;
    }

    .cases-footer .title {
        font-size: 1rem;
        margin-top: .15rem;
    }

    .cases-footer .sub {
        font-size: .9rem;
    }
}

/* ==== S2: Dynamic sizing by viewport height (title/paragraph/button gaps & image height) ==== */
#s2 {
    /* Defaults — JS will recompute on load & resize */
    --s2-title-mb: clamp(10px, 3svh, 28px);
    --s2-para-mb: clamp(12px, 3.5svh, 32px);
    --s2-btn-mt: clamp(12px, 4svh, 40px);
    --s2-img-h: clamp(260px, 46svh, 560px);
}

#s2 .s2-head h2 {
    margin-bottom: var(--s2-title-mb) !important;
}

#s2 .s2-head p {
    margin-bottom: var(--s2-para-mb) !important;
}

#s2 .s2-btn {
    margin-top: var(--s2-btn-mt) !important;
}

/* 右侧产品图高度上限，自动随屏高变化，等比缩放不变形 */
#s2 .s2-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 767.98px) {

    /* 短屏手机下稍微降低目标高度，避免挤压文字/按钮 */
    #s2 {
        --s2-img-h: clamp(220px, 42svh, 480px);
    }
}

.swiper-pagination {
    position: absolute;
    /* 或者其他定位方式 */
    text-align: center;
    /* 确保分页器居中 */
    transition: 300ms opacity;
    /* 平滑过渡效果 */
    transform: translate3d(0, 0, 0);
    /* 避免闪烁 */
    z-index: 10;
    /* 确保分页器在顶部 */
    width: 100%;
    /* 使分页器宽度为100% */
    bottom: 0;
    /* 或者 top: 0; 根据需要放置 */
}

.swiper-pagination-bullet {
    width: 40px;
    height: 8px;
    border-radius: 10px;
    background-color: #fff;
}

.swiper-horizontal>.swiper-bullets {
    bottom: 40px;
}

.swiper-pagination-bullet-active {
    width: 80px;
    height: 8px;
    border-radius: 10px;
    background: #EF7D00;
}

/* ===== Inner (third screen) brand slider's long-bar pagination ===== */
.three-pagination {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 30;
    pointer-events: auto;
}

.two-pagination {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 30;
    pointer-events: auto;
}

/* Override global bullets for this pagination only */
.three-pagination .swiper-pagination-bullet {
    width: 66px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .2);
    opacity: 1;
    margin: 0 !important;
    transition: all .25s ease;
}

.three-pagination .swiper-pagination-bullet-active {
    width: 92px;
    height: 8px;
    border-radius: 999px;
    background: #EF7D00;
    /* brand orange */
}

/* Override global bullets for this pagination only */
.two-pagination .swiper-pagination-bullet {
    width: 66px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .1);
    opacity: 1;
    margin: 0 !important;
    transition: all .25s ease;
}

.two-pagination .swiper-pagination-bullet-active {
    width: 92px;
    height: 8px;
    border-radius: 999px;
    background: #EF7D00;
    /* brand orange */
}

@media (max-width: 767.98px) {
    .three-pagination {
        bottom: 18px;
        gap: 10px;
    }

    .three-pagination .swiper-pagination-bullet {
        width: 42px;
        height: 6px;
    }

    .three-pagination .swiper-pagination-bullet-active {
        width: 64px;
        height: 6px;
    }

    .two-pagination {
        bottom: 18px;
        gap: 10px;
    }

    .two-pagination .swiper-pagination-bullet {
        width: 42px;
        height: 6px;
    }

    .two-pagination .swiper-pagination-bullet-active {
        width: 64px;
        height: 6px;
    }
}

/* ===== Terminal-style opening animation ===== */
.no-scroll {
    overflow: hidden;
}

#ti-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0f1c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 28px;
    transition: opacity .5s ease;
}

#ti-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

#ti-loader .ti-logo {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 800;
    letter-spacing: .2em;
    font-size: clamp(28px, 5vw, 56px);
    display: flex;
    gap: .2em;
}

#ti-loader .ti-logo span {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: ti-letter .6s cubic-bezier(.2, .7, .2, 1) forwards;
}

#ti-loader .ti-bar {
    width: min(240px, 40vw);
    height: 3px;
    background: rgba(255, 255, 255, .2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

#ti-loader .ti-bar-fill {
    width: 0%;
    height: 100%;
    background: #f26522;
    transition: width .3s ease;
}

#ti-enter {
    cursor: pointer;
}

#ti-enter:active {
    transform: translateY(1px);
}

/* Progress bar fill handled by .ti-bar-fill, no ::before */

#ti-loader .ti-wipe {
    position: fixed;
    inset: 0;
    background: #0a0f1c;
    transform: translateY(100%);
    animation: ti-wipe .7s cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: 1.25s;
}

/* keyframes */
@keyframes ti-letter {
    to {
        opacity: 1;
        transform: none
    }
}

/* @keyframes ti-bar removed */

@keyframes ti-wipe {
    0% {
        transform: translateY(100%)
    }

    100% {
        transform: translateY(-100%)
    }
}

/* 动效无障碍 */
@media (prefers-reduced-motion: reduce) {
    #ti-loader .ti-logo span {
        animation: none;
        opacity: 1;
        transform: none
    }

    #ti-loader .ti-bar::before {
        animation: none;
        width: 100%
    }

    #ti-loader .ti-wipe {
        animation: none;
        transform: translateY(-100%)
    }
}

.home-container .section6 {
    height: auto !important;
}

/* ===== Right-side numeric pagination (ATC China style) ===== */
.side-numpage {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.side-numpage li {
    list-style: none;
}

.side-numpage button {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-numpage .num {
    font-size: 14px;
    font-weight: 500;
    color: #F6C200;
    min-width: 28px;
    text-align: right;
    letter-spacing: .05em;
}

.side-numpage li.is-active .num {
    color: #d9261c;
    font-weight: 700;
    border-bottom: 1px solid #d9261c;

}

.side-numpage button:hover .num {
    color: #d9261c;
}

@media (max-width: 767.98px) {
    .side-numpage {
        display: none;
    }
}


/* === Loader: percentage-based progress (controlled by JS) === */
/* Progress bar styles removed */

/* === Mobile hero tap-to-play mask (transparent, no-UI) === */
#hero-tapmask {
    display: none;
}

@media (max-width: 767.98px) {
    #hero-tapmask {
        position: absolute;
        inset: 0;
        z-index: 40;
        /* above video & text */
        display: block;
        cursor: pointer;
        background: transparent;
        -webkit-tap-highlight-color: transparent;
        transition: opacity .2s ease;
    }

    #hero-tapmask.hidden {
        opacity: 0;
        pointer-events: none;
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 创建三列，每列宽度相等 */
    gap: 10px;
    /* 可选，添加一些间距 */
}

@media (max-width: 767.98px) {
    .second-button{
        width: 120px;
        height: 30px;
        font-size: 13px;
    }
    .brandList {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .second-button{
        width: 130px;
        height: 40px;
        font-size: 13px;
    }
    .pr-5 {
        padding-right: 5rem;
    }

    .brandList {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 40px;
    }

    .brandList img {
        width: 180px;
        height: 60px;
    }

    .w-rem {
        width: 64rem;
    }

    .mw-64 {
        max-width: 64rem;
    }
}

@media (min-width: 1560px) {
    .second-button{
        width: 150px;
        height: 40px;
        font-size: 15px;
    }

    .mw-64 {
        max-width: 100%;
    }

    .pr-5 {
        padding-right: 10rem;
    }

    .brandList {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 40px;
    }

    .brandList img {
        width: 200px;
        height: 70px;
    }

    /* .cases-card{
        width: 22rem;
        height: 17rem;
    } */

    .w-rem {
        width: 75rem;
    }

    #footer a {
        font-size: 1rem;
    }

    .side-numpage .num {
        font-size: 20px;
    }

    .text-sm {
        font-size: 1rem;
    }

    .text-xs {
        font-size: 1rem;
        line-height: 1.3;
    }

    .logo-1920 {
        width: 16.82rem;
        height: 3.1rem;
        margin-bottom: 4rem;
    }

    .h2-1920 {
        margin-bottom: 4rem;
    }

    .footer-h4-1920 {
        font-size: 1.5rem;
    }

    .fs-1920 {
        font-size: 3.5rem;
    }

    .mb-1920 {
        margin-bottom: 6rem;
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    .w-46 {
        width: 43rem;
    }

    .max-w-7xl {
        width: 90rem;
    }
}