/* hero.css: ヒーローエリア専用スタイル */

.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-text-box {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2.5rem 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 800px;
    width: 80%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    margin-left: 5vw;
    margin-bottom: 8vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: clip-path 1.0s cubic-bezier(0.8, 0, 0.2, 1);
    clip-path: inset(0 0 0 0 round 24px); /* round 24px を追加して角を丸める */
    will-change: clip-path;
    z-index: 10;
}

.hero-text-box.box-hidden {
    clip-path: inset(0 100% 0 0 round 24px); /* アニメーション中も角を丸く維持 */
}

.message-container {
    height: auto;
    min-height: 9rem;
    position: relative;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-main {
    font-family: var(--font-jp);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 3.6rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 0.5rem;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.hero-main.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-sub {
    font-family: var(--font-jp);
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    letter-spacing: 0.1em;
    min-height: 3.2em;
    border-right: 2px solid transparent;
    display: inline-block;
    align-self: flex-start;
    line-height: 1.6;
    word-break: break-all;
}

.hero-sub.typing::after {
    content: '';
    display: inline-block;
    vertical-align: -0.2em;
    width: 2px;
    height: 1em;
    background-color: #333;
    margin-left: 4px;
    animation: blink-caret-opacity 0.75s step-end infinite;
}

@keyframes blink-caret-opacity {
    from, to { opacity: 0 }
    50% { opacity: 1 }
}

@media (max-width: 768px) {
    .hero { padding: 2rem; }
    .hero-text-box { width: 90%; margin-left: 0; padding: 1.5rem; }
    .hero-main { font-size: 1.8rem; }
    .hero-sub { font-size: 1rem; }
}
