/* RISA Webstore Custom Styles
 * Extracted from sample.html
 * Tailwind CSSと併用するカスタムスタイル
 */

/* CSS Variables - コンテンツ幅統一用 */
:root {
    --content-max-width: 896px;  /* 試行後に調整可能: 896px, 1024px, 1152px, 1280px */
}

.content-container {
    max-width: var(--content-max-width);
}

/* Base Styles */
body {
    font-family: 'Noto Sans JP', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #111;
    background-color: #fff;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff7f7f;
}

/* Glassmorphism Header */
.glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* Hero Slideshow - Vegas.js style */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
}
.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

/* CSS fallback: show first slide blurred before JS initializes */
.hero-slide:first-child:not(.entering):not(.active):not(.leaving) {
    opacity: 1;
    filter: blur(30px);
}

/* Slide enter/leave animations (replaces transition-based blur) */
@keyframes slide-enter {
    0%   { filter: blur(30px); opacity: 0; }
    15%  { opacity: 1; }
    100% { filter: blur(0); opacity: 1; }
}
@keyframes slide-leave {
    0%   { filter: blur(0); opacity: 1; }
    85%  { opacity: 1; }
    100% { filter: blur(30px); opacity: 0; }
}
.hero-slide.entering {
    animation: slide-enter 2s ease forwards;
    z-index: 2;
}
.hero-slide.leaving {
    animation: slide-leave 2s ease forwards;
    z-index: 1;
}

/* Ken Burns Animations - Center zoom variations */
@keyframes kenburns-1 {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}
@keyframes kenburns-2 {
    0% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes kenburns-3 {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}
@keyframes kenburns-4 {
    0% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes kenburns-5 {
    0% { transform: scale(1); }
    100% { transform: scale(1.25); }
}
@keyframes kenburns-6 {
    0% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
@keyframes kenburns-7 {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}
@keyframes kenburns-8 {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform, filter;
    transform-origin: center center;
}

.hero-slide.entering img,
.hero-slide.active img {
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
.hero-slide.kenburns-1 img { animation-name: kenburns-1; }
.hero-slide.kenburns-2 img { animation-name: kenburns-2; }
.hero-slide.kenburns-3 img { animation-name: kenburns-3; }
.hero-slide.kenburns-4 img { animation-name: kenburns-4; }
.hero-slide.kenburns-5 img { animation-name: kenburns-5; }
.hero-slide.kenburns-6 img { animation-name: kenburns-6; }
.hero-slide.kenburns-7 img { animation-name: kenburns-7; }
.hero-slide.kenburns-8 img { animation-name: kenburns-8; }

/* Full Screen Menu */
.fullscreen-menu {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, visibility 0.5s;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}
.fullscreen-menu[aria-hidden="false"] {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* News Section - Horizontal Scroll */
.news-scroll-container {
    overflow: hidden;
    position: relative;
}
.news-scroll-wrapper {
    display: flex;
    flex-direction: row;
    /* Removed transition - using JavaScript requestAnimationFrame for smooth infinite scroll */
}
.news-item {
    flex-shrink: 0;
    padding: 0 24px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.news-item:last-child {
    border-right: none;
}
@keyframes newsScrollX {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.news-scroll-wrapper.scrolling {
    animation: newsScrollX 30s linear infinite;
}
.news-scroll-wrapper.paused {
    animation-play-state: paused;
}

/* Bounce animation for scroll indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-15px) translateX(-50%);
    }
    60% {
        transform: translateY(-8px) translateX(-50%);
    }
}
.scroll-indicator {
    animation: bounce 2s infinite;
}

/* Loading Screen */
.loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.loader[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #111;
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}
