/* style.css - 修正反映版 */

/* --- 变量定义 (暖色系/像素风配色) --- */
:root {
    --primary-color: #B92B27;    /* Logo红 */
    --secondary-color: #10316B;  /* Logo蓝 */
    --bg-color: #F2F0E9;         /* 米色背景 */
    --card-bg: #FFFFFF;          /* 卡片白 */
    --text-color: #333333;
    --light-text: #ffffff;
    --max-width: 1200px;
    --header-height: 70px;
    --font-main: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* --- 基础重置 --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 按钮样式 --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #d13b37;
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--card-bg);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--secondary-color);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 44px;
    width: auto;
}

/* PC Menu */
.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 10px;
    color: var(--secondary-color);
}

.nav-menu a:hover { color: var(--primary-color); }

/* Mobile Menu Logic */
#nav-toggle, .nav-burger { display: none; }

@media (max-width: 768px) {
    /* 修正1: モバイル版でヘッダーが重ならないよう余白を調整 */
    .hero {
        padding-top: 110px !important; 
        height: auto !important;
        min-height: 450px !important;
    }

    /* 修正2: ヒーローエリアのテキスト改行を無効化 */
    .hero-content p br {
        display: none;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
        line-height: 1.4 !important;
    }

    .hero-content p {
        font-size: 0.95rem !important;
        max-width: 100% !important;
        padding: 0 10px;
        text-align: justify;
    }

    .nav-burger {
        display: block;
        cursor: pointer;
        padding: 10px;
        z-index: 1100;
    }
    .nav-burger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--secondary-color);
        margin: 5px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--card-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1050;
        border-left: 4px solid var(--primary-color);
    }

    #nav-toggle:checked ~ .nav-menu { right: 0; }
    
    #nav-toggle:checked ~ .header-inner .nav-burger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
        background-color: var(--primary-color);
    }
    #nav-toggle:checked ~ .header-inner .nav-burger span:nth-child(2) {
        opacity: 0;
    }
    #nav-toggle:checked ~ .header-inner .nav-burger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
        background-color: var(--primary-color);
    }

    #nav-toggle:checked ~ .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(16, 49, 107, 0.4);
        z-index: 1000;
    }
}

/* --- Hero Section --- */
.hero {
    height: 80vh;
    min-height: 500px;
    background: linear-gradient(135deg, var(--bg-color) 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}
.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
}
.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #555;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- Sections Common --- */
section { padding: 80px 0; }
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
    color: var(--secondary-color);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

/* --- Reasons (Home) --- */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.reason-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: 0.3s;
}
.reason-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(16, 49, 107, 0.1);
}
.reason-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
    background: #FFF0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}
.reason-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* --- Pricing (Home) --- */
.pricing-box {
    background: var(--card-bg);
    border: 3px solid var(--secondary-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}
.pricing-box::before {
    content: 'INDIE PLAN';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 5px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 20px;
}
.price-highlight {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
}
.price-detail {
    background: #F4F6F9;
    padding: 15px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 20px;
    font-weight: bold;
    color: var(--secondary-color);
}
.price-notes {
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: #666;
}
.price-notes li {
    margin-bottom: 8px;
    padding-left: 1.5em;
    position: relative;
}
.price-notes li::before {
    content: '※';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* --- Flow (Home) --- */
.flow-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.step-card {
    background: var(--card-bg);
    padding: 20px;
    width: 200px;
    text-align: center;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--secondary-color);
}
.step-num {
    background: var(--secondary-color);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
}
@media (min-width: 769px) {
    .step-card:not(:last-child)::after {
        content: '▶';
        position: absolute;
        right: -25px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-color);
        font-size: 1.2rem;
    }
}
@media (max-width: 768px) {
    .step-card:not(:last-child)::after {
        content: '▼';
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        color: var(--primary-color);
    }
}

/* --- Portfolio (Home) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.portfolio-item {
    background: #E0E4E8;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-weight: bold;
    border: 2px solid transparent;
    transition: 0.3s;
}
.portfolio-item:hover { border-color: var(--primary-color); }

/* --- Footer --- */
footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
    opacity: 0.8;
}
.copyright {
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
}

/* --- Sub Pages Header --- */
.page-header {
    background-color: #fff;
    padding: 120px 0 40px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.page-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
}
.page-header p {
    color: #888;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* --- Text/Article Styles (About, Privacy) --- */
.text-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}
.text-section { margin-bottom: 60px; }
.text-section h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    line-height: 1.4;
}
.text-section h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 30px 0 15px;
    font-weight: bold;
}
.text-section p { margin-bottom: 1.5em; text-align: justify; }

/* Profile Block (About) */
.profile-block {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}
.profile-img {
    width: 200px;
    height: 200px;
    background-color: #ddd;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
@media (max-width: 600px) {
    .profile-block { flex-direction: column; align-items: center; }
}

/* Table (Tokushoho) */
.common-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}
.common-table th, .common-table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
}
.common-table th {
    background-color: #F4F6F9;
    color: var(--secondary-color);
    width: 30%;
    font-weight: bold;
}
@media (max-width: 600px) {
    .common-table th, .common-table td { display: block; width: 100%; }
    .common-table th { border-bottom: none; }
}

/* --- FAQ Accordion --- */
details { transition: all 0.3s ease; }
details > .accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}
details[open] > .accordion-content { grid-template-rows: 1fr; }
.accordion-inner { overflow: hidden; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

.faq-category {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid #eee;
}
.faq-category-summary {
    padding: 20px 25px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 6px solid var(--secondary-color);
}
.faq-category-summary:hover { background-color: #f9f9f9; }
.faq-category-summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--secondary-color);
    border-right: 2px solid var(--secondary-color);
    transform: rotate(135deg);
    transition: transform 0.3s;
    margin-left: 15px;
}
details[open] > .faq-category-summary::after { transform: rotate(-45deg); }

.faq-list { padding: 0 20px 20px; }
.faq-item { border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    padding: 18px 10px 18px 40px;
    position: relative;
    font-weight: 500;
    transition: 0.3s;
}
.faq-question:hover { color: var(--primary-color); }
.faq-question::before {
    content: 'Q';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #ccc;
    font-weight: 300;
    transition: transform 0.3s;
    line-height: 1;
}
details[open] > .faq-question::after { transform: rotate(45deg); }
.faq-answer {
    padding: 0 20px 20px 40px;
    color: #666;
    font-size: 0.95rem;
}
.faq-answer::before {
    content: 'A.';
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 8px;
}

/* --- Contact Form --- */
.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}
.form-group { margin-bottom: 25px; position: relative; }
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 0.95rem;
}
.required-mark {
    color: var(--primary-color);
    margin-left: 5px;
    font-size: 0.8rem;
    vertical-align: super;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    transition: 0.3s;
    font-family: var(--font-main);
    color: var(--text-color);
}
.form-textarea { height: 150px; resize: vertical; }
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(16, 49, 107, 0.1);
}
/* 错误提示样式 */
.form-input.error, .form-textarea.error {
    border-color: var(--primary-color);
    background-color: #fff0f0;
}
.error-message {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* 默认隐藏 */
    font-weight: bold;
}
.form-input.error + .error-message,
.form-textarea.error + .error-message {
    display: block;
}
/* 成功消息样式 */
#success-message {
    display: none; /* 默认隐藏 */
    text-align: center;
    padding: 40px 20px;
    background-color: #e8f5e9;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    max-width: 600px;
    margin: 0 auto;
}
#success-message h3 { margin-bottom: 15px; font-size: 1.5rem; }
.form-submit { text-align: center; margin-top: 30px; }

@media (max-width: 600px) {
    .form-wrapper { padding: 25px 20px; }
}