/* Hero slider (index). Slides share one grid cell so the section takes
   the tallest slide's height and slides cross-fade in place. Without JS
   (no .is-ready) both slides simply stack and stay visible. */
.hero.hero-slider {
    position: relative;
    padding: 0;
    background: #07182B;
    overflow: hidden;
}

.hero-slider__track {
    display: grid;
}

.hero-slide {
    padding: 150px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide--tech {
    background-image: linear-gradient(rgba(4, 14, 26, 0.35), rgba(4, 14, 26, 0.35)), url('../images/hero-tech.svg');
}

.hero-slide--nature {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.png');
}

.hero-slider.is-ready .hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}

.hero-slider.is-ready .hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0s;
}

.hero-slide--tech .hero-content h2 {
    letter-spacing: 0.08em;
}

/* 創新 | 融合 | 體驗: thin, lighter separators with even spacing */
.hero-sep {
    display: inline-block;
    margin: 0 0.9em;
    font-weight: 300;
    opacity: 0.7;
    letter-spacing: 0;
}

/* never split a word (體 / 驗) across lines */
.hero-word {
    white-space: nowrap;
}

/* subtitle: break only between its two phrases */
.hero-phrase {
    display: inline-block;
}

@media (max-width: 576px) {
    .hero-sep {
        margin: 0 0.6em;
    }
}

@media (max-width: 359px) {
    .hero-slide--tech .hero-content h2 {
        font-size: 1.6rem;
    }
}

/* controls: arrows + dots + pause, bottom centre */
.hero-slider__controls {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.hero-slider__controls[hidden] {
    display: none;
}

.hero-slider__arrow {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    color: #ffffff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease;
}

.hero-slider__arrow svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-slider__pause .icon-play {
    fill: currentColor;
    stroke: none;
    display: none;
}

.hero-slider__pause[aria-pressed="true"] .icon-play {
    display: block;
}

.hero-slider__pause[aria-pressed="true"] .icon-pause {
    display: none;
}

.hero-slider__dots {
    display: flex;
}

/* 44px tap target around a small visible dot */
.hero-slider__dot {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hero-slider__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: transparent;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
}

.hero-slider__dot[aria-current="true"]::after {
    width: 26px;
    border-radius: 6px;
    background: #ffffff;
}

.hero-slider__arrow:focus-visible,
.hero-slider__dot:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

@media (hover: hover) {
    .hero-slider__arrow:hover {
        background: rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 768px) {
    .hero-slide {
        padding: 100px 0 110px;
    }

    .hero-slider__controls {
        bottom: 12px;
    }
}

/* first frame after JS takes over: no fade */
.hero-slider.is-init .hero-slide,
.hero-slider.is-init .hero-slider__dot::after {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider.is-ready .hero-slide,
    .hero-slider.is-ready .hero-slide.is-active,
    .hero-slider__dot::after {
        transition: none;
    }
}
