/* ========================================
   HERO SECTION CSS
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background-color: #081424;
}

/* --- Hero Slideshow（4枚 / 2秒ごと切り替え） --- */
.hero__slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    animation: heroSlideFade 10s infinite;
    will-change: opacity;
}

.hero__slide:nth-child(1) { animation-delay: 0s; }
.hero__slide:nth-child(2) { animation-delay: 2s; }
.hero__slide:nth-child(3) { animation-delay: 4s; }
.hero__slide:nth-child(4) { animation-delay: 6s; }
.hero__slide:nth-child(5) { animation-delay: 8s; }

@keyframes heroSlideFade {
    0%   { opacity: 0; }
    2%   { opacity: 1; }
    20%  { opacity: 1; }
    22%  { opacity: 0; }
    100% { opacity: 0; }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 20, 36, 0.82) 0%, rgba(8, 20, 36, 0.64) 42%, rgba(8, 20, 36, 0.18) 100%),
        linear-gradient(180deg, rgba(8, 20, 36, 0.2) 0%, rgba(8, 20, 36, 0.62) 100%);
    z-index: 1;
}

.hero__bg-deco {
    display: none;
}

/* Keep keyframes for reference or future use, but unused now */
@keyframes hero-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* Content */
.hero__content {
    position: relative;
    z-index: 2;
    text-align: left;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    padding: calc(var(--header-height) + var(--space-xl)) var(--padding-x) var(--space-xl);
    max-width: min(880px, 100%);
    margin-left: max(var(--padding-x), calc((100vw - var(--max-width)) / 2));
    box-sizing: border-box;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading-en);
    font-size: 0.78rem;
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.78);
}

.hero__eyebrow::before {
    content: '';
    width: 42px;
    height: 2px;
    background: var(--color-primary-light);
}

.hero__catch {
    font-family: var(--font-heading-jp);
    font-size: var(--fs-hero);
    font-weight: var(--fw-bold);
    color: var(--text-white);
    line-height: 1.45;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-md);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.42);
}

.hero .btn--outline {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.78);
    color: var(--text-white);
    font-weight: var(--fw-bold);
}

.hero .btn--outline:hover {
    background: var(--text-white);
    color: var(--color-navy);
}

.hero__catch-accent {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.hero__catch-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--color-primary);
    opacity: 0.2;
    border-radius: 4px;
}

.hero__sub {
    font-family: var(--font-body);
    font-size: var(--fs-hero-sub);
    font-weight: var(--fw-medium);
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    max-width: 720px;
}

.hero__cta-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero__proofs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: 760px;
    margin-top: var(--space-lg);
}

.hero__proofs span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.83rem;
    font-weight: var(--fw-semibold);
    backdrop-filter: blur(8px);
}

.hero__side-label {
    position: absolute;
    z-index: 2;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    color: rgba(255, 255, 255, 0.58);
    font-family: var(--font-heading-en);
    font-size: 0.72rem;
    font-weight: var(--fw-bold);
}

/* ============================================
   水と資源を感じさせる 波アニメーション（ヒーロー下端）
   4レイヤーがそれぞれ違う速度で横に流れ、奥行きのある水面を表現
   ============================================ */
.hero__waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    z-index: 2;
    line-height: 0;
    pointer-events: none;
}

.hero__waves-svg {
    display: block;
    width: 100%;
    height: 14vh;
    min-height: 90px;
    max-height: 160px;
}

/* 各レイヤーをゆっくり横に流す（速度を変えて奥行きを出す） */
.hero__waves-parallax > use {
    animation: hero-wave-move 18s linear infinite;
    will-change: transform;
}

.hero__waves-parallax > use:nth-child(1) { animation-duration: 22s; animation-delay: -3s;  }
.hero__waves-parallax > use:nth-child(2) { animation-duration: 16s; animation-delay: -5s;  }
.hero__waves-parallax > use:nth-child(3) { animation-duration: 26s; animation-delay: -2s;  }
.hero__waves-parallax > use:nth-child(4) { animation-duration: 30s; animation-delay: -7s;  }

/* -90px → 85px = 波1周期(約176px)ぶんの移動。
   パスは画面より十分広く描いてあるので、この範囲なら常に画面全体を覆い、
   かつ周期ぶん動くので継ぎ目なくループする（右端に隙間が出ない） */
@keyframes hero-wave-move {
    0%   { transform: translateX(-90px); }
    100% { transform: translateX(85px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__waves-parallax > use {
        animation: none;
    }
}

@media (max-width: 768px) {
    .hero__waves-svg {
        height: 9vh;
        min-height: 64px;
    }
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: calc(14vh + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero__scroll-text {
    font-family: var(--font-heading-en);
    font-size: 0.7rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.82);
    writing-mode: vertical-rl;
}

.hero__scroll-line {
    width: 1px;
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.48);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

/* Leaf decoration SVG */
.hero__leaf {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.hero__leaf--1 {
    top: 15%;
    left: 5%;
    width: 80px;
    animation: leaf-sway 6s ease-in-out infinite;
}

.hero__leaf--2 {
    bottom: 20%;
    right: 8%;
    width: 60px;
    animation: leaf-sway 8s ease-in-out infinite reverse;
}

@keyframes leaf-sway {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    50% {
        transform: rotate(8deg) translateY(-10px);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
        padding-top: var(--header-height);
        background-position: 62% center;
    }

    .hero__content {
        padding: var(--space-lg) var(--padding-x);
        margin-left: 0;
        max-width: 390px;
        width: 100%;
    }

    .hero__catch {
        font-size: 2.28rem;
        line-height: 1.45;
        letter-spacing: 0.03em;
    }

    .hero__sub {
        font-size: 0.92rem;
        line-height: 1.75;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    .hero__cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__cta-group .btn {
        width: 100%;
        max-width: 340px;
    }

    .hero__proofs {
        gap: 0.45rem;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero__proofs span {
        min-width: 0;
        width: 100%;
        min-height: 34px;
        font-size: 0.76rem;
        padding: 0.38rem 0.64rem;
        white-space: normal;
        text-align: center;
        justify-content: center;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    .hero__side-label {
        display: none;
    }

    .hero__scroll {
        bottom: calc(9vh + 0.75rem);
    }
}

/* ============================================
   ヒーロー 初期アピアランス（ページロード時に順次浮かび上がる）
   ============================================ */

@keyframes heroEnter {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__eyebrow,
.hero__catch,
.hero__sub,
.hero__cta-group,
.hero__proofs {
    opacity: 0;
    animation: heroEnter 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    will-change: opacity, transform;
}

.hero__eyebrow   { animation-delay: 0.4s; }
.hero__catch     { animation-delay: 0.7s; }
.hero__sub       { animation-delay: 1.15s; }
.hero__cta-group { animation-delay: 1.55s; }
.hero__proofs    { animation-delay: 1.95s; }

/* SCROLLインジケーター・サイドラベルも遅れて登場 */
.hero__scroll,
.hero__side-label {
    opacity: 0;
    animation: heroEnter 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) 2.4s forwards;
}

/* hero__catch の中央の単語にうっすらグロー（行間で目立たせる） */
.hero__catch-accent {
    background-image: linear-gradient(120deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.0) 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: catchShimmer 6s ease-in-out 2s infinite;
}

@keyframes catchShimmer {
    0%   { background-position: -100% 0; }
    50%  { background-position: 200% 0; }
    100% { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__eyebrow,
    .hero__catch,
    .hero__sub,
    .hero__cta-group,
    .hero__proofs,
    .hero__scroll,
    .hero__side-label,
    .hero__catch-accent {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
