/* ヒーロー */
.hero {
    background: linear-gradient(135deg, #005a9e 0%, #003e5e 100%);
    color: #fff;
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0 0 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
    opacity: 0.95;
    font-weight: 400;
}

/* フォーム */
.form-wrapper {
    max-width: 700px;
    margin: 80px auto;
    padding: 0 20px;
}

.form-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #005a9e, #0083ff);
    border-radius: 16px 16px 0 0;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #003e5e;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

input, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #0083ff;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 131, 255, 0.1);
    transform: translateY(-1px);
}

input:hover, textarea:hover {
    border-color: #c3d3e2;
    background-color: #ffffff;
}

input[aria-invalid="true"], textarea[aria-invalid="true"] {
    border-color: #e60039;
    background-color: #fef7f7;
}

input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
    border-color: #e60039;
    box-shadow: 0 0 0 3px rgba(230, 0, 57, 0.1);
}

.req {
    color: #e60039;
    font-weight: 700;
    font-size: 1.1em;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

button#submitBtn {
    background: linear-gradient(135deg, #0083ff 0%, #005a9e 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 16px 48px;
    border-radius: 50px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 131, 255, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

button#submitBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button#submitBtn:hover {
    background: linear-gradient(135deg, #00a0ff 0%, #0083ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 131, 255, 0.4);
}

button#submitBtn:hover::before {
    left: 100%;
}

button#submitBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 131, 255, 0.3);
}

button#submitBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 131, 255, 0.3), 0 4px 15px rgba(0, 131, 255, 0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

button:disabled:hover {
    transform: none;
    background: linear-gradient(135deg, #0083ff 0%, #005a9e 100%);
}

/* エラーメッセージ */
.error-message {
    color: #e60039;
    font-size: 0.875rem;
    margin-top: 6px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-height: 0;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
    min-height: 20px;
}

.error-message::before {
    content: '⚠ ';
    margin-right: 4px;
}

/* フォームメッセージ */
#formMessage {
    margin-top: 30px;
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

#formMessage.success {
    background-color: #f0f9f4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

#formMessage.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.hidden {
    display: none;
}

/* スクリーンリーダー専用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .form-wrapper {
        margin: 60px auto;
        padding: 0 16px;
    }
    
    .form-container {
        padding: 30px 24px;
        border-radius: 12px;
    }
    
    button#submitBtn {
        padding: 14px 36px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 16px 50px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .form-container {
        padding: 24px 20px;
    }
    
    input, textarea {
        padding: 12px 14px;
        font-size: 16px; /* iOS zoom prevention */
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .form-container {
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    label {
        color: #e1e8ed;
    }
    
    input, textarea {
        background-color: #2a2a2a;
        border-color: #404040;
        color: #ffffff;
    }
    
    input:focus, textarea:focus {
        background-color: #333333;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    input, textarea {
        border-width: 3px;
    }
    
    button#submitBtn {
        border: 2px solid #ffffff;
    }
}

/* アニメーション無効化対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-content {
        animation: none;
    }
    
    .form-container {
        animation: none;
    }
}

