/* ========================================
   Scroll & Interaction Animations
   Wood Grain Theme
   ======================================== */

/* ========================================
   Text Split Animation
   ======================================== */
.text-split-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60%) rotateX(-30deg);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-split-char.is-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* ========================================
   Parallax Elements
   ======================================== */
.parallax-element {
    will-change: transform;
}

/* ========================================
   Stagger Children
   ======================================== */
.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.is-visible>*:nth-child(1) {
    opacity: 1;
    transform: none;
    transition-delay: 0.05s;
}

.stagger-children.is-visible>*:nth-child(2) {
    opacity: 1;
    transform: none;
    transition-delay: 0.15s;
}

.stagger-children.is-visible>*:nth-child(3) {
    opacity: 1;
    transform: none;
    transition-delay: 0.25s;
}

.stagger-children.is-visible>*:nth-child(4) {
    opacity: 1;
    transform: none;
    transition-delay: 0.35s;
}

.stagger-children.is-visible>*:nth-child(5) {
    opacity: 1;
    transform: none;
    transition-delay: 0.45s;
}

.stagger-children.is-visible>*:nth-child(6) {
    opacity: 1;
    transform: none;
    transition-delay: 0.55s;
}

.stagger-children.is-visible>*:nth-child(n+7) {
    opacity: 1;
    transform: none;
    transition-delay: 0.65s;
}

/* ========================================
   Gold Line Draw
   ======================================== */
.line-draw {
    position: relative;
    overflow: hidden;
}

.line-draw::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.line-draw.is-visible::after {
    width: 100%;
}

/* ========================================
   Counter Animation
   ======================================== */
.counter-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--gold-mid);
    display: inline-block;
}

/* ========================================
   Horizontal Scroll Section
   ======================================== */
.h-scroll-section {
    overflow: hidden;
    position: relative;
}

.h-scroll-track {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.h-scroll-track::-webkit-scrollbar {
    display: none;
}

.h-scroll-track:active {
    cursor: grabbing;
}

.h-scroll-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* ========================================
   Reveal Overlay
   ======================================== */
.reveal-overlay {
    position: relative;
    overflow: hidden;
}

.reveal-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--wood-dark);
    z-index: 1;
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-overlay.is-visible::before {
    transform: scaleX(0);
}

/* ========================================
   Floating Elements
   ======================================== */
@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-12px) rotate(1deg);
    }

    66% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

@keyframes float-medium {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.float-medium {
    animation: float-medium 5s ease-in-out infinite;
}

/* ========================================
   Gold Shimmer Text
   ======================================== */
.shimmer-text {
    background: linear-gradient(90deg,
            var(--gold-deep) 0%,
            var(--gold-bright) 30%,
            var(--gold-light) 50%,
            var(--gold-bright) 70%,
            var(--gold-deep) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ========================================
   Grain Overlay (ノイズテクスチャ)
   ======================================== */
.grain-overlay {
    position: relative;
}

.grain-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

/* ========================================
   Scroll Snap Sections
   ======================================== */
.snap-container {
    scroll-snap-type: y proximity;
}

.snap-section {
    scroll-snap-align: start;
}

/* ========================================
   Music / Video Cards
   ======================================== */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.music-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.music-card:hover {
    border-color: var(--color-border-bright);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.music-cover {
    aspect-ratio: 1;
    overflow: hidden;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.music-card:hover .music-cover img {
    transform: scale(1.05);
}

.music-info {
    padding: var(--space-sm);
}

.music-title {
    font-family: var(--font-jp);
    font-size: 1rem;
    color: var(--cream-light);
    margin-bottom: 4px;
}

.music-meta {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    align-items: center;
}

.music-date {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--gold-mid);
    letter-spacing: 0.1em;
}

.music-type {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
}

.music-description {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xs);
}

.music-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.music-link-btn {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border: 1px solid var(--color-border-bright);
    border-radius: 2px;
    color: var(--gold-mid);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.music-link-btn:hover {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold-bright);
}

/* ========================================
   Video Grid
   ======================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.video-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.video-card:hover {
    border-color: var(--color-border-bright);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 15, 8, 0.4);
    transition: background var(--transition-normal);
    color: var(--cream-white);
}

.video-card:hover .video-play-icon {
    background: rgba(201, 162, 39, 0.2);
    color: var(--gold-bright);
}

.video-info {
    padding: var(--space-sm);
}

.video-title {
    font-family: var(--font-jp);
    font-size: 1rem;
    color: var(--cream-light);
    margin-bottom: var(--space-xs);
}

.video-description {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

/* ========================================
   Gallery Page
   ======================================== */
.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px;
}

.gallery-page-item {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-page-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(201, 162, 39, 0.15);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-page-item:hover::after {
    opacity: 1;
}

.gallery-page-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-page-item:hover img {
    transform: scale(1.08);
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
    max-width: 680px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-mid);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(45, 26, 14, 0.6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--cream-light);
    font-family: var(--font-jp);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--gold-mid);
    background: rgba(61, 35, 20, 0.7);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 160px;
}

.form-select {
    appearance: none;
    cursor: pointer;
}

/* ========================================
   Profile Page
   ======================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

.profile-image-wrap {
    position: sticky;
    top: 100px;
}

.profile-image-wrap img,
.profile-image img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.profile-image {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--cream-white);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.profile-role {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold-mid);
    margin-bottom: var(--space-md);
}

.profile-section {
    margin-bottom: var(--space-lg);
}

.profile-section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--cream-white);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.profile-timeline {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.profile-timeline li {
    display: flex;
    gap: var(--space-md);
    align-items: baseline;
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--gold-mid);
    min-width: 60px;
}

.timeline-content {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--cream-dark);
    line-height: 1.7;
}

/* ========================================
   News Page
   ======================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.news-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: block;
}

.news-card:hover {
    border-color: var(--color-border-bright);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: var(--space-md);
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.news-card-date {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--gold-mid);
}

.news-card-title {
    font-family: var(--font-jp);
    font-size: 1rem;
    color: var(--cream-light);
    line-height: 1.6;
    margin-bottom: var(--space-xs);
}

.news-card-excerpt {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ========================================
   Live Page
   ======================================== */
.live-section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--cream-white);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

/* ========================================
   Table
   ======================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table th {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-mid);
    padding: 14px 16px;
    text-align: left;
    background: rgba(26, 15, 8, 0.5);
    border-bottom: 1px solid var(--color-border);
}

.table td {
    padding: 14px 16px;
    color: var(--cream-dark);
    border-bottom: 1px solid rgba(201, 162, 39, 0.05);
    font-family: var(--font-jp);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(201, 162, 39, 0.03);
}

/* ========================================
   Responsive Animations
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    [data-scroll],
    .text-split-char,
    .stagger-children>*,
    .reveal-overlay::before {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-image-wrap {
        position: static;
        max-width: 280px;
        margin: 0 auto;
    }

    .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .gallery-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}