/* SEO and Accessibility Enhancements */

/* Screen reader only content */
.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;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
[role="button"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-badge,
    .cta-button,
    .floating-button {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Improve loading performance with critical CSS */
.hero-image img,
.profile-avatar img {
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize font loading */
@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 microdata styling (invisible but valid) */
[itemscope] {
    position: relative;
}

/* Skip link styling */
.sr-only: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;
}

/* Disclaimer section responsive styles */
.disclaimer {
    line-height: 1.6;
}

.disclaimer h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.disclaimer ul {
    list-style-type: disc;
}

.disclaimer li {
    margin-bottom: 0.3rem;
}

/* Improve image loading states */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Performance optimization for images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Button and link improvements for Google Ads compliance */
.cta-button,
.floating-button {
    position: relative;
    cursor: pointer;
}

.cta-button::after,
.floating-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Responsive text sizing */
@media (max-width: 768px) {
    .disclaimer {
        font-size: 0.8rem;
        padding: 0.8rem;
        margin: 1rem 0.5rem;
    }
    
    .disclaimer h3 {
        font-size: 0.9rem;
    }
}

/* Print styles for SEO */
@media print {
    .floating-button-container,
    .cta-button {
        display: none;
    }
    
    .disclaimer {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Core Web Vitals optimization */
.mobile-container {
    contain: layout style paint;
}

/* Lazy loading placeholder */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: loading 1.4s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
} 