/* アクセシビリティと SEO 強化スタイル */

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

/* フォーカススタイルの改善 */
a:focus,
button:focus,
[role="button"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .highlight-banner,
    .action-button,
    .floating-cta-button {
        border: 2px solid;
    }
}

/* モーション軽減対応 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 読み込みパフォーマンス向上のための重要CSS */
.hero-avatar img,
.avatar-container img {
    transform: translateZ(0);
    will-change: transform;
}

/* フォント読み込み最適化 */
@font-face {
    font-family: 'NotoSansJP';
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');
}

/* Schema.orgマイクロデータスタイル（非表示だが有効） */
[itemscope] {
    position: relative;
}

/* スキップリンクスタイル */
.visually-hidden:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #000;
    color: #fff;
    text-decoration: none;
    z-index: 9999;
}

/* 免責事項セクションのレスポンシブスタイル */
.legal-notice {
    line-height: 1.6;
}

.legal-notice h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.legal-notice ul {
    list-style-type: disc;
}

.legal-notice li {
    margin-bottom: 0.3rem;
}

/* 画像読み込み状態の改善 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 画像パフォーマンス最適化 */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Google Ads準拠のためのボタンとリンク改善 */
.action-button,
.floating-cta-button {
    position: relative;
    cursor: pointer;
}

.action-button::after,
.floating-cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* レスポンシブテキストサイズ調整 */
@media (max-width: 768px) {
    .legal-notice {
        font-size: 0.8rem;
        padding: 0.8rem;
        margin: 1rem 0.5rem;
    }
    
    .legal-notice h3 {
        font-size: 0.9rem;
    }
}

/* 印刷用スタイル */
@media print {
    .floating-cta-wrapper,
    .action-button {
        display: none;
    }
    
    .legal-notice {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Core Web Vitals最適化 */
.page-wrapper {
    contain: layout style paint;
}

/* 遅延読み込みプレースホルダー */
.image-load-target {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: loading-effect 1.4s ease-in-out infinite;
}

@keyframes loading-effect {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
}