/* =========================================================
   VIIcode Hong Kong Homepage
   Single responsive slider stylesheet
   Desktop > 1200 / 769-1200 / Mobile <= 768
   ========================================================= */

:root {
    --vii-home-slider-height: 100vh;
    --vii-home-header-safe: 0px;
}

/* ---------- reset scoped to homepage ---------- */
.vii-home,
.vii-home * {
    box-sizing: border-box;
}

.vii-home {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    color: #fff;
}

.vii-home a,
.vii-home a:hover,
.vii-home a:focus {
    color: inherit;
    text-decoration: none;
}

.vii-home-hero {
    position: relative;
    width: 100%;
    height: var(--vii-home-slider-height);
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

/* ---------- native slider ---------- */
.vii-home-slider {
    position: relative;
    width: 100%;
    height: var(--vii-home-slider-height);
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background: #000;
}

.vii-home-slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vii-home-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .55s ease, visibility .55s ease;
}

.vii-home-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ---------- desktop background images ---------- */
.vii-home-slide--swords { background-image: url("../image/home/232.jpg"); }
.vii-home-slide--mist { background-image: url("../image/home/4.jpg"); }
.vii-home-slide--shop { background-image: url("../image/home/1.jpg"); }
.vii-home-slide--mask { background-image: url("../image/home/2.jpg"); }
.vii-home-slide--cream-t2 { background-image: url("../image/home/3.jpg"); }
.vii-home-slide--cream-classic { background-image: url("../image/home/5.jpg"); }

/* ---------- shared text ---------- */
.vii-home-copy,
.vii-home-split-copy,
.vii-home-benefits {
    position: absolute;
    z-index: 5;
    margin: 0;
    padding: 0;
    color: #fff;
    font-weight: 300;
}

.vii-home-copy h1,
.vii-home-copy h2,
.vii-home-copy h3,
.vii-home-split-copy h2,
.vii-home-split-copy h3,
.vii-home-benefits h2,
.vii-home-copy p,
.vii-home-benefits p {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
}

.vii-home-copy h2,
.vii-home-split-copy h2,
.vii-home-benefits h2 {
    margin: 0 0 10px;
    font-family: "Times New Roman", "Microsoft JhengHei", serif;
    font-size: clamp(25px, 2vw, 38px);
    font-weight: 300;
    line-height: 1.2;
}

.vii-home-copy h3,
.vii-home-split-copy h3 {
    margin: 0 0 10px;
    font-family: "Times New Roman", "Microsoft JhengHei", serif;
    font-size: clamp(30px, 2.7vw, 48px);
    font-weight: 300;
    line-height: 1.15;
}

.vii-home-copy p,
.vii-home-benefits p {
    margin: 8px 0;
    font-family: "Times New Roman", "Microsoft JhengHei", serif;
    font-size: clamp(15px, 1.1vw, 20px);
    font-weight: 300;
    line-height: 1.55;
}

.vii-home-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    min-height: 50px;
    margin-top: 22px;
    padding: 11px 28px;
    border: 1px solid #fff;
    background: #fff;
    color: #555 !important;
    font-size: 15px;
    line-height: 1;
    text-align: center;
    transition: background .2s ease, color .2s ease;
}

.vii-home-cta:hover,
.vii-home-cta:focus {
    background: rgba(255,255,255,.88);
    color: #222 !important;
}

/* ---------- desktop composition (>1200) ---------- */
.vii-home-copy--left {
    top: 34%;
    left: 6%;
    width: 34%;
    text-align: center;
}

.vii-home-copy--right {
    top: 34%;
    right: 6%;
    width: 34%;
    text-align: center;
}

/* slide 1 */
.vii-home-slide-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
}

.vii-home-copy--swords {
    top: 25%;
    right: 0;
    left: 0;
    width: 100%;
    text-align: center;
}

.vii-home-copy--swords h1 {
    margin: 0;
    font-family: monospace;
    font-size: clamp(48px, 4.6vw, 82px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: .09em;
}

.vii-home-copy--swords p {
    margin: 10px 0 0;
    font-size: clamp(18px, 1.45vw, 27px);
    line-height: 1.2;
    letter-spacing: .28em;
}

.vii-home-swords-image {
    display: none !important;
}

/* slide 5 T2 — matches original desktop composition */
.vii-home-slide--cream-t2 .vii-home-split-copy {
    left: 5%;
    bottom: 8.5%;
    width: 34%;
    text-align: left;
}

.vii-home-slide--cream-t2 .vii-home-split-copy h2,
.vii-home-slide--cream-t2 .vii-home-split-copy h3 {
    text-align: left;
}

.vii-home-slide--cream-t2 .vii-home-split-copy h2 {
    margin-bottom: 3px;
    font-size: clamp(27px, 2vw, 35px);
    font-weight: 400;
}

.vii-home-slide--cream-t2 .vii-home-split-copy h3 {
    margin: 0;
    font-size: clamp(28px, 2.25vw, 39px);
    line-height: 1.14;
}

.vii-home-slide--cream-t2 .vii-home-benefits {
    right: 5.5%;
    bottom: 5.5%;
    width: 22%;
    max-width: 360px;
    text-align: left;
}

.vii-home-slide--cream-t2 .vii-home-benefits h2 {
    margin-bottom: 14px;
    font-size: clamp(23px, 1.65vw, 30px);
    text-align: left;
}

.vii-home-slide--cream-t2 .vii-home-benefits p {
    margin: 0;
    font-size: clamp(15px, 1.05vw, 19px);
    line-height: 1.5;
    text-align: left;
}

/* ---------- arrows ---------- */
.vii-home-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0,0,0,.10);
    color: #fff;
    opacity: .85;
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .2s ease, background .2s ease;
}

.vii-home-arrow:hover,
.vii-home-arrow:focus {
    background: rgba(0,0,0,.28);
    opacity: 1;
    outline: none;
}

.vii-home-prev { left: 16px; }
.vii-home-next { right: 16px; }

.vii-home-arrow span {
    display: block;
    width: 18px;
    height: 18px;
    border-top: 5px solid currentColor;
    border-right: 5px solid currentColor;
}

.vii-home-prev span { transform: rotate(-135deg); }
.vii-home-next span { transform: rotate(45deg); }

/* ---------- paginator ---------- */
.vii-home-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
}

.vii-home-dots button {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.vii-home-dots button.is-active,
.vii-home-dots button:hover,
.vii-home-dots button:focus {
    background: rgba(255,255,255,.82);
    outline: none;
}

/* ---------- progress ---------- */
.vii-home-progress {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 21;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
}

.vii-home-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(255,255,255,.55);
}

.vii-home-slider.is-playing .vii-home-progress span {
    animation: vii-home-progress 6s linear forwards;
}

@keyframes vii-home-progress {
    from { width: 0; }
    to { width: 100%; }
}

/* =========================================================
   769px - 1200px
   Keep desktop composition; scale only
   ========================================================= */
@media (min-width: 769px) and (max-width: 1200px) {
    .vii-home-copy--left {
        top: 31%;
        left: 4%;
        width: 39%;
    }

    .vii-home-copy--right {
        top: 31%;
        right: 4%;
        width: 39%;
    }

    .vii-home-copy h2,
    .vii-home-split-copy h2,
    .vii-home-benefits h2 {
        font-size: clamp(21px, 2.7vw, 30px);
    }

    .vii-home-copy h3,
    .vii-home-split-copy h3 {
        font-size: clamp(25px, 3.4vw, 36px);
    }

    .vii-home-copy p,
    .vii-home-benefits p {
        font-size: clamp(13px, 1.75vw, 17px);
    }

    .vii-home-cta {
        min-width: 142px;
        min-height: 44px;
        margin-top: 17px;
        padding: 9px 21px;
        font-size: 14px;
    }

    .vii-home-copy--swords {
        top: 25%;
    }

    .vii-home-copy--swords h1 {
        font-size: clamp(34px, 5vw, 55px);
    }

    .vii-home-copy--swords p {
        font-size: clamp(15px, 2vw, 22px);
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy {
        left: 4%;
        bottom: 7%;
        width: 42%;
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy h2 {
        font-size: clamp(22px, 2.6vw, 28px);
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy h3 {
        font-size: clamp(24px, 3vw, 31px);
    }

    .vii-home-slide--cream-t2 .vii-home-benefits {
        right: 4%;
        bottom: 5.5%;
        width: 28%;
        max-width: none;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits h2 {
        margin-bottom: 9px;
        font-size: clamp(19px, 2.2vw, 24px);
    }

    .vii-home-slide--cream-t2 .vii-home-benefits p {
        font-size: clamp(12px, 1.55vw, 15px);
    }

    .vii-home-prev { left: 9px; }
    .vii-home-next { right: 9px; }
    .vii-home-dots { bottom: 14px; }
}

/* =========================================================
   Mobile <= 768px
   Same HTML, mobile backgrounds + per-slide anchors
   ========================================================= */
@media (max-width: 768px) {
    .vii-home-slide {
        background-size: cover;
    }
    .vii-home {
        position: relative;
        margin-top: 100px !important;
    }
    .vii-home-slider {
        width: 100%;

        height: auto;

        aspect-ratio: 750 / 1180;

        overflow: hidden;
    }


    .vii-home-slide {
        width: 100%;
        height: 100%;

        background-size: 100% auto !important;

        background-position: center center !important;

        background-repeat: no-repeat !important;
    }

    .vii-home-slide--swords {
        background-image: url("../image/home/mobile/mcn.png");
        background-position: center center;
    }

    .vii-home-slide--mist {
        background-image: url("../image/home/mobile/4.jpg");
        background-position: center center;
    }

    .vii-home-slide--shop {
        background-image: url("../image/home/mobile/1.jpg");
        background-position: center 58%;
    }

    .vii-home-slide--mask {
        background-image: url("../image/home/mobile/2.jpg");
        background-position: center 57%;
    }

    .vii-home-slide--cream-t2 {
        background-image: url("../image/home/mobile/3.jpg");
        background-position: center 54%;
    }

    .vii-home-slide--cream-classic {
        background-image: url("../image/home/mobile/5.jpg");
        background-position: center center;
    }

    /* shared mobile typography */
    .vii-home-copy h2,
    .vii-home-split-copy h2,
    .vii-home-benefits h2 {
        font-size: clamp(18px, 5vw, 24px);
        line-height: 1.15;
    }

    .vii-home-copy h3,
    .vii-home-split-copy h3 {
        font-size: clamp(23px, 6.7vw, 32px);
        line-height: 1.12;
    }

    .vii-home-copy p,
    .vii-home-benefits p {
        font-size: clamp(12px, 3.6vw, 16px);
        line-height: 1.4;
    }

    .vii-home-cta {
        min-width: 136px;
        min-height: 44px;
        margin-top: 15px;
        padding: 9px 20px;
        font-size: 13px;
    }

    /* 01 swords */
    .vii-home-copy--swords {
        top: 8.5%;
        right: 3%;
        left: 3%;
        width: 94%;
        text-align: center;
    }

    .vii-home-copy--swords h1 {
        margin: 0;
        color: #e5002b;
        font-size: clamp(28px, 8.3vw, 42px);
        line-height: 1.05;
        letter-spacing: .035em;
    }

    .vii-home-copy--swords p {
        margin: 8px 0 0;
        font-size: clamp(15px, 4.4vw, 21px);
        line-height: 1.15;
        letter-spacing: .24em;
    }

    .vii-home-swords-image {
        position: absolute;
        right: 2%;
        bottom: 2.4%;
        left: 2%;
        display: block !important;
        width: 96%;
        height: auto;
        max-width: none;
        max-height: 43%;
        margin: 0 auto;
        object-fit: contain;
        object-position: center bottom;
    }

    /* 02 mist */
    .vii-home-slide--mist .vii-home-copy--right {
        top: 3.5%;
        right: 5%;
        left: 5%;
        width: 90%;
        text-align: center;
    }

    /* 03 shop */
    .vii-home-slide--shop .vii-home-copy--right {
        top: 4%;
        right: 5%;
        left: 5%;
        width: 90%;
        text-align: center;
    }

    /* 04 mask */
    .vii-home-slide--mask .vii-home-copy--left {
        top: 3.5%;
        right: 5%;
        left: 5%;
        width: 90%;
        text-align: center;
    }

    /* 05 T2 */
    .vii-home-slide--cream-t2 .vii-home-split-copy {
        top: 3.5%;
        right: 5%;
        bottom: auto;
        left: 5%;
        width: 90%;
        text-align: center;
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy h2,
    .vii-home-slide--cream-t2 .vii-home-split-copy h3 {
        text-align: center;
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy h2 {
        font-size: clamp(18px, 5vw, 23px);
    }

    .vii-home-slide--cream-t2 .vii-home-split-copy h3 {
        font-size: clamp(21px, 5.8vw, 28px);
    }

    .vii-home-slide--cream-t2 .vii-home-benefits {
        right: 5%;
        bottom: 4%;
        left: 5%;
        width: 90%;
        max-width: none;
        text-align: left;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits h2 {
        margin-bottom: 6px;
        font-size: clamp(17px, 4.5vw, 21px);
        text-align: left;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits p {
        margin: 0;
        font-size: clamp(11px, 3vw, 14px);
        line-height: 1.4;
        text-align: left;
    }

    /* 06 classic cream */
    .vii-home-slide--cream-classic .vii-home-copy--right {
        top: 3.5%;
        right: 5%;
        left: 5%;
        width: 90%;
        text-align: center;
    }

    /* controls */
    .vii-home-arrow {
        width: 38px;
        height: 38px;
        background: rgba(0,0,0,.08);
    }

    .vii-home-prev { left: 4px; }
    .vii-home-next { right: 4px; }

    .vii-home-arrow span {
        width: 15px;
        height: 15px;
        border-top-width: 4px;
        border-right-width: 4px;
    }

    .vii-home-dots {
        bottom: 12px;
        gap: 6px;
    }

    .vii-home-dots button {
        width: 9px;
        height: 9px;
    }
}

/* ---------- narrow phones: only compress, never re-anchor ---------- */
@media (max-width: 508px) {
    .vii-home-copy--swords {
        top: 5.6%;
    }

    .vii-home-copy--swords h1 {
        font-size: clamp(25px, 7.8vw, 36px);
    }

    .vii-home-copy--swords p {
        font-size: clamp(13px, 4vw, 18px);
        letter-spacing: .2em;
    }

    .vii-home-slide--mist .vii-home-copy--right,
    .vii-home-slide--shop .vii-home-copy--right,
    .vii-home-slide--mask .vii-home-copy--left,
    .vii-home-slide--cream-classic .vii-home-copy--right,
    .vii-home-slide--cream-t2 .vii-home-split-copy {
        right: 4%;
        left: 4%;
        width: 92%;
    }

    .vii-home-copy h2,
    .vii-home-split-copy h2 {
        font-size: clamp(17px, 4.8vw, 21px);
    }

    .vii-home-copy h3,
    .vii-home-split-copy h3 {
        font-size: clamp(21px, 6.2vw, 27px);
    }

    .vii-home-copy p {
        font-size: clamp(12px, 3.4vw, 14px);
    }

    .vii-home-cta {
        min-width: 128px;
        min-height: 42px;
        margin-top: 12px;
        padding: 8px 18px;
        font-size: 12px;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits {
        right: 4%;
        bottom: 3.5%;
        left: 4%;
        width: 92%;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits p {
        font-size: clamp(10.5px, 2.75vw, 12px);
    }
}

@media (max-width: 375px), (max-width: 768px) and (max-height: 700px) {
    .vii-home-copy--swords {
        top: 8%;
    }

    .vii-home-copy--swords h1 {
        font-size: clamp(23px, 7.2vw, 31px);
    }

    .vii-home-copy--swords p {
        margin-top: 5px;
        font-size: clamp(12px, 3.8vw, 16px);
    }

    .vii-home-slide--mist .vii-home-copy--right,
    .vii-home-slide--shop .vii-home-copy--right,
    .vii-home-slide--mask .vii-home-copy--left,
    .vii-home-slide--cream-classic .vii-home-copy--right,
    .vii-home-slide--cream-t2 .vii-home-split-copy {
        top: 2.5%;
    }

    .vii-home-copy h3,
    .vii-home-split-copy h3 {
        font-size: clamp(19px, 5.8vw, 24px);
    }

    .vii-home-copy p {
        margin: 5px 0;
        font-size: clamp(11px, 3.2vw, 13px);
    }

    .vii-home-cta {
        min-height: 38px;
        margin-top: 9px;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits h2 {
        margin-bottom: 4px;
        font-size: 16px;
    }

    .vii-home-slide--cream-t2 .vii-home-benefits p {
        font-size: 10.5px;
        line-height: 1.32;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vii-home-slide,
    .vii-home-arrow,
    .vii-home-dots button {
        transition: none;
    }

    .vii-home-progress {
        display: none;
    }
}
