/* style.css */

/* --- 基本設定 --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f0f0f0;
    overflow-x: hidden;
}

/* --- 全体を囲むラッパー（ボックスレイアウト化） --- */
.site-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: #000000;
    font-family: 'Noto Sans JP', sans-serif;
}

a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #555555;
    text-decoration: none;
}

.button {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 1px solid #000000;
}

.button:hover {
    background-color: #333333;
    border-color: #333333;
    transform: translateY(-3px);
    text-decoration: none;
    color: #ffffff;
}

/* --- ヘッダー --- */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo img:hover {
    transform: rotate(5deg);
}

.logo img.muted {
    filter: grayscale(100%) opacity(0.7);
}


.logo h1 {
    margin: 0;
    font-size: 24px;
    color: #000000;
    transition: color 0.3s ease;
}

.logo h1:hover {
    color: #555555;
}

/* --- メニューボタン (ハンバーガーアイコン) --- */
.menu-toggle {
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #000000;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- メインナビゲーション (メニュー画面) --- */
.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    min-height: -webkit-fill-available;
    min-height: fill-available;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right 0.5s ease-in-out;
    z-index: 999;
}

.main-nav.open {
    right: 0;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.main-nav ul li {
    margin: 20px 0;
    transition: transform 0.3s ease;
}

.main-nav ul li:hover {
    transform: translateX(-10px);
}

.main-nav ul li a {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #bbbbbb;
    text-decoration: none;
}

/* --- ヒーローセクション --- */
.hero-section {
    display: grid;
    place-items: center;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.hero-video {
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: cover;
}

.hero-image {
    display: none;
}

.hero-overlay {
    grid-area: 1 / 1;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    padding: 40px;
}

.text-wrapper {
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.hero-overlay h2 {
    font-size: 48px;
    line-height: 1.4;
    word-break: keep-all;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
    width: auto;
    max-width: 100%;
    transform: translateY(100%);
    opacity: 0;
    animation: revealText 1.5s ease-out forwards;
    animation-delay: 0.5s;
    /* ▼▼▼【修正】モバイルでの表示不具合の原因と考えられるマスクをコメントアウト ▼▼▼ */
    /* -webkit-mask-image: linear-gradient(to bottom, transparent, black 50%, black 100%); */
    /* mask-image: linear-gradient(to bottom, transparent, black 50%, black 100%); */
}

.hero-overlay p {
    font-size: 20px;
    line-height: 1.6;
    word-break: keep-all;
    margin-top: 0;
    max-width: 800px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    text-align: center;
    width: auto;
    max-width: 100%;
    transform: translateY(100%);
    opacity: 0;
    animation: revealText 1.5s ease-out forwards;
    animation-delay: 1.0s;
    /* ▼▼▼【修正】モバイルでの表示不具合の原因と考えられるマスクをコメントアウト ▼▼▼ */
    /* -webkit-mask-image: linear-gradient(to bottom, transparent, black 50%, black 100%); */
    /* mask-image: linear-gradient(to bottom, transparent, black 50%, black 100%); */
}

@keyframes revealText {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}


/* --- 各コンテンツセクション --- */
.section {
    padding: 80px 0;
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    min-height: 400px;
}

.section:last-of-type {
    border-bottom: none;
}


.section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #000000;
    margin: 10px auto 0;
    transition: width 0.3s ease;
}

.section h2:hover::after {
    width: 100px;
}

/* --- サービスグリッド --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    color: #000000;
    font-size: 24px;
    margin-bottom: 15px;
}

/* --- 採用情報 --- */
.recruit-info {
    text-align: center;
    margin-top: 40px;
}

.recruit-info ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.recruit-info ul li {
    font-size: 18px;
    margin-bottom: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}
.recruit-info ul li:hover {
    color: #555555;
    transform: translateX(5px);
}

/* --- お知らせリスト --- */
.news-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.news-list li {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    font-size: 17px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li:hover {
    background-color: #f5f5f5;
    transform: translateX(5px);
}

.news-list li time {
    color: #888;
    margin-right: 20px;
    flex-shrink: 0;
}

/* --- お問い合わせフォーム --- */
.contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #000000;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-form button[type="submit"]:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

/* --- フッター --- */
.footer {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer .container {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 800px;
    text-align: left;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-info, .footer-links {
    flex: 1;
    min-width: 250px;
}

.footer-info h3 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-info p {
    color: #cccccc;
    margin: 5px 0;
    font-size: 15px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.copyright {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    width: 100%;
    max-width: 800px;
    text-align: center;
    font-size: 14px;
    color: #aaaaaa;
}

.footer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background-image: url('assets/hpup_logo_color.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
    filter: brightness(1.5);
    z-index: 0;
}


/* --- bodyのno-scroll (メニュー開閉時に背景スクロールを止める) --- */
body.no-scroll {
    overflow: hidden;
}

/* --- レトロゲーム風ローディングオーバーレイ --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #ffffff;
    font-family: 'DotGothic16', monospace;
    font-size: 24px;
    flex-direction: column;
}

#console-text {
    white-space: pre-wrap;
    overflow: hidden;
    border-right: .15em solid #ffffff;
    animation: blink-caret .75s step-end infinite;
    max-width: 90%;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #ffffff; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.fade-out {
    animation: fadeOut 1s forwards;
}

#skip-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #333333;
    color: #fff;
    border: 1px solid #555555;
    border-radius: 5px;
    font-family: 'DotGothic16', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 2s;
}

#skip-button:hover {
    background-color: #1a1a1a;
    border-color: #333333;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* --- レスポンシブデザイン --- */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .menu-toggle {
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .hero-overlay {
        padding: 20px;
        width: 95%;
        max-width: 95%;
    }

    .hero-overlay h2 {
        font-size: 36px;
    }

    .hero-overlay p {
        font-size: 18px;
    }

    .main-nav ul li a {
        font-size: 24px;
    }

    .section {
        padding: 60px 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-info, .footer-links {
        text-align: center;
        width: 100%; 
    }

    .footer-links a:hover {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .hero-overlay {
        padding: 15px;
        width: 95%;
        max-width: 95%;
    }
    
    .hero-overlay h2 {
        font-size: 24px;
    }

    .hero-overlay p {
        font-size: 15px;
    }

    .main-nav ul li a {
        font-size: 20px;
    }
    #console-text {
        font-size: 18px;
    }
    #skip-button {
        font-size: 16px;
        padding: 8px 12px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 380px) {
    .hero-overlay h2 {
        font-size: 21px;
    }

    .hero-overlay p {
        font-size: 14px;
    }
}


/* --- ロゴ透かしデザインの追加 --- */
#philosophy-intro,
#message-intro,
#philosophy-detail,
#message-detail
{
    position: relative; 
    overflow: hidden;
}

#philosophy-intro::before,
#message-intro::before,
#philosophy-detail::before,
#message-detail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; 
    height: 400px;
    background-image: url('assets/hpup_logo_gray.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 0.08; 
    z-index: 0;
}

#philosophy-intro .container,
#message-intro .container,
#philosophy-detail .container,
#message-detail .container {
    position: relative;
    z-index: 1;
}

/* --- 代表メッセージページ --- */
.message-content {
    margin-top: 40px;
}
/* clearfixでfloatをクリア */
.message-content::after {
    content: "";
    display: table;
    clear: both;
}

.message-text {
    min-width: 300px;
}

.message-profile {
    float: right;
    margin-left: 40px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 250px; /* 画像の最大幅と合わせる */
    text-align: center;
}

.message-profile img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.message-signature {
    clear: both; /* floatの回り込みを解除 */
    margin-top: 30px;
    text-align: right;
    font-size: 18px;
    line-height: 1.5;
}

.message-signature p {
    margin: 0;
}

@media (max-width: 768px) {
    .message-content {
        display: flex; /* スマホではflexboxに戻す */
        /* ▼▼▼【ここを修正】column-reverseからcolumnへ変更し、画像の表示順を先頭に ▼▼▼ */
        flex-direction: column; /* 画像が上、テキストが下 */
        align-items: center;
        gap: 30px;
    }
    .message-content::after {
        display: none; /* clearfixは不要に */
    }
    .message-profile {
        float: none; /* floatを解除 */
        margin-left: 0;
        margin-bottom: 0;
        max-width: 250px;
    }
    .message-text {
        margin-top: 0;
    }
    .message-signature {
        text-align: center;
        margin-top: 40px;
    }
}

/* --- メッセージのキーワードをハイライトするスタイル --- */
.text-highlight-fire {
    color: #e54747; /* 炎をイメージした赤色 */
}