:root {
    --deep-blue: #0277bd;
    --light-blue: #e0f7fa;
    --emerald: #00acc1;
    --white: #ffffff;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: var(--light-blue);
    color: var(--deep-blue);
    overflow-x: hidden;
}

/* ===== GLOBAL NAV ===== */
#global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
    pointer-events: none;
}

#global-nav.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#global-nav.scrolled {
    background: rgba(1, 42, 92, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    transition: color 0.3s;
}

.nav-links a:hover { color: white; }

.nav-links .nav-cta {
    background: var(--emerald);
    color: white;
    padding: 8px 22px;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s, transform 0.3s;
}

.nav-links .nav-cta:hover {
    background: #00bcd4;
    transform: translateY(-2px);
}

/* ハンバーガー */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* モバイル */
@media (max-width: 768px) {
    .nav-hamburger { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(1, 42, 92, 0.96);
        backdrop-filter: blur(12px);
        padding: 16px 0;
    }

    .nav-links li { width: 100%; text-align: center; }

    .nav-links a {
        display: block;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .nav-links .nav-cta {
        margin: 8px auto;
        display: inline-block;
        width: auto;
    }

    #global-nav.open .nav-links { display: flex; }
}

/* ===== BACKGROUND CANVAS ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#content {
    position: relative;
    z-index: 1;
}

/* ===== HERO ===== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #012a5c;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 5;
}

.hero-content h1 {
    font-size: 5rem;
    margin: 0;
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* 文字アニメーション用 */
.char {
    display: inline-block;
}

#en-title {
    font-size: 1rem;
    letter-spacing: 0.45em;
    margin: 6px 0 0;
    opacity: 0.6;
    font-weight: 300;
    text-transform: uppercase;
}

#sub-title {
    opacity: 0;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-top: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ===== LIGHT RAYS ===== */
.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.light-ray {
    position: absolute;
    top: -10%;
    height: 130%;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 75%);
    transform-origin: top center;
    border-radius: 0 0 60% 60%;
    animation: raySwing 10s ease-in-out infinite;
}

@keyframes raySwing {
    0%, 100% { transform: rotate(-12deg); opacity: 0.15; }
    50%       { transform: rotate(12deg);  opacity: 0.45; }
}

/* ===== BUBBLES CANVAS ===== */
#bubbles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ===== FISH ===== */
@keyframes swimFish {
    0%   { transform: translateX(calc(100vw + 150px)); opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { transform: translateX(-150px); opacity: 0; }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    margin-top: 48px;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 26px;
    height: 26px;
    border-right: 2px solid rgba(255,255,255,0.7);
    border-bottom: 2px solid rgba(255,255,255,0.7);
    transform: rotate(45deg);
    margin: 0 auto;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0);    opacity: 1;   }
    50%       { transform: translateY(12px); opacity: 0.5; }
}

/* ===== OCEAN WAVE (BOTTOM) ===== */
.ocean-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 200%;
    z-index: 3;
    line-height: 0;
}

.ocean-wave svg {
    display: block;
    width: 100%;
    animation: waveSweep 12s linear infinite;
}

@keyframes coralSway {
    0%, 100% { transform: rotate(-4deg); }
    50%       { transform: rotate(4deg); }
}

@keyframes waveSweep {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 20px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.container {
    max-width: 1000px;
    width: 100%;
}

.reveal-text {
    font-size: 1.5rem;
    line-height: 2;
}

/* ===== SWIPER ===== */
.swiper {
    width: 100%;
    padding: 50px 0;
}

.swiper-slide {
    background: white;
    height: 300px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-inner {
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== BUTTON ===== */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--deep-blue);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.4);
}

.btn:hover {
    background: var(--emerald);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 172, 193, 0.4);
}

.support-btn-wrapper {
    margin-top: 40px;
}

/* ===== PARALLAX ===== */
.parallax-box {
    overflow: hidden;
    padding: 50px 0;
}

#parallax-text {
    font-size: 8rem;
    white-space: nowrap;
    font-weight: 900;
    color: var(--deep-blue);
    opacity: 0.1;
}

/* ===== FOOTER ===== */
footer {
    padding: 50px;
    text-align: center;
    background: white;
}

/* ===== RESPONSIVE (スマホ対応) ===== */
@media (max-width: 768px) {
    /* Hero */
    .hero-content h1 {
        font-size: 3.5rem;
    }

    #sub-title {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    /* Sections */
    .section {
        padding: 70px 20px;
        min-height: auto;
    }

    .reveal-text {
        font-size: 1.1rem;
        line-height: 1.9;
    }

    /* Parallax text: 崩れを防ぐためフォントサイズを縮小し折り返しを許可 */
    #parallax-text {
        font-size: clamp(2rem, 8vw, 5rem);
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
    }

    .parallax-box {
        padding: 30px 16px;
    }

    /* Swiper */
    .swiper-slide {
        height: 200px;
    }

    /* Button */
    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    /* Footer */
    footer {
        padding: 30px 20px;
    }
}

/* ===== WHAT IS SANBANZE ===== */
.section-sub-en {
    color: #aaa;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
}

.whatis-mascot-wrap {
    display: flex;
    justify-content: center;
    margin: 24px 0 36px;
}

.whatis-mascot {
    width: 110px;
    animation: mascotFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(2,119,189,0.2));
}

@media (max-width: 768px) {
    .whatis-mascot { width: 80px; }
}

.whatis-img-wrap {
    margin: 0 auto 48px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(2,119,189,0.2);
}

.whatis-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .whatis-img { height: 220px; }
}

.whatis-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    font-size: 0.95rem;
    color: #555;
}

.whatis-meta span {
    background: var(--light-blue);
    padding: 8px 20px;
    border-radius: 50px;
}

.whatis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    text-align: left;
}

.whatis-card {
    background: var(--light-blue);
    border-radius: 20px;
    padding: 32px 28px;
    border-top: 4px solid var(--deep-blue);
}

.whatis-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.whatis-card h3 {
    font-size: 1.1rem;
    color: var(--deep-blue);
    margin: 0 0 12px;
}

.whatis-card p,
.whatis-card li {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #555;
    margin: 0;
}

.whatis-list {
    padding-left: 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whatis-tags {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.whatis-tag {
    background: white;
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 0.82rem;
    color: var(--deep-blue);
}

/* ===== MASCOT ===== */
#mascot {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 200;
    width: 160px;
    animation: mascotFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 6px 16px rgba(2,119,189,0.35));
    cursor: pointer;
}

#mascot img {
    width: 100%;
    border-radius: 50%;
    display: block;
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

@media (max-width: 768px) {
    #mascot {
        width: 110px;
        bottom: 20px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    #parallax-text {
        font-size: clamp(1.6rem, 7vw, 3rem);
    }

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