/* Washi Texture Background */
body {
    background-color: #FDFCF8;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    color: #1A1A1A;
}

/* Hide Scrollbar */
.works-scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.works-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Hero Video Background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -10;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 30, 30, 0.5);
    /* Cinematic Dark Overlay */
    z-index: -5;
    display: block;
}

/* Ken Burns Effect for Hero Background */
@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.animate-kenburns {
    animation: kenburns 20s ease-out infinite alternate;
}

.hero-section {
    background-color: transparent;
}

/* Sticky Container Shadow for PC */
#app-container {
    background-color: transparent;
    /* Debug Mode: Transparent */
}

/* Work Cards (Vertical Layout) */
.work-card-vertical {
    border-radius: 0.75rem;
    overflow: hidden;
}

.video-container {
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-bg-video-vertical {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Typography for Vertical Layout */
.client-name-serif {
    font-family: 'Zen Old Mincho', serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1A1A1A;
    /* Dark Text */
}

.work-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333333;
    /* Dark Gray */
    text-align: justify;
}

.highlight {
    color: #D4AF37;
    font-weight: 700;
}

/* Hero Catchphrase Mobile Adjustment */
.hero-catchphrase {
    /* Use clamp for responsive font sizing that prevents line breaks on all mobile devices */
    font-size: clamp(1.5rem, 4.5vw, 3rem);
    /* 24px (375px screen) -> 48px (larger screens) */
}

/* Additional fine-tuning for very small screens */
@media (max-width: 375px) {
    .hero-catchphrase {
        font-size: 1.4rem;
        /* 22.4px - ensures no line break even on iPhone SE */
    }
}

/* ========================================
   Legal Pages Styles
   ======================================== */

/* Legal Page Container */
.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
}

/* Legal Header */
.legal-header {
    background-color: #FDFCF8;
    border-bottom: 1px solid #E5E5E5;
}

/* Legal Content */
.legal-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Legal Table Container */
.legal-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Legal Table */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 0.5rem;
    overflow: hidden;
}

.legal-table th,
.legal-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #E5E5E5;
}

.legal-table th {
    background-color: #F9F9F9;
    font-family: 'Zen Old Mincho', serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1A1A1A;
    width: 35%;
    vertical-align: top;
}

.legal-table td {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333333;
}

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

/* Mobile Responsive */
@media (max-width: 640px) {

    .legal-table th,
    .legal-table td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .legal-table th {
        width: 40%;
    }
}

/* Very Small Screens */
@media (max-width: 375px) {
    .legal-table {
        font-size: 0.8rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.6rem 0.8rem;
    }
}

/* ========================================
   Client Logo Marquee (Strict Size Balancing)
   ======================================== */

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    user-select: none;
    background-color: #ffffff;
}

.marquee-track {
    display: flex;
    width: max-content;
    align-items: center;
}

.logo-box {
    width: 160px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding: 0 15px;
}

.logo-box .logo-img {
    max-height: 65%;
    max-width: 90%;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Specific Logo Balance Adjustments */

/* Torriden: Expand to fill frame (text is small) */
.logo-box .logo-torriden {
    max-height: 90% !important;
    max-width: 95% !important;
}

/* SBC: Shrink slightly (square shape feels bulky) */
.logo-box .logo-sbc {
    max-height: 45% !important;
}

/* MOUSSY: Shrink aggressively (bold text looks huge) & Invert to black */
.logo-box .logo-moussy {
    mix-blend-mode: normal !important;
    filter: invert(1) brightness(0) !important;
    max-height: 30% !important;
    opacity: 0.6;
}

/* RISM: Shrink to 40% (bold text) */
.logo-box .logo-rism {
    max-height: 40% !important;
}

/* Kindai University: Shrink to 45% (emblem adds weight) */
.logo-box .logo-kinki {
    max-height: 45% !important;
}

.logo-box .logo-img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.logo-box .logo-moussy:hover {
    filter: invert(1) brightness(0) grayscale(0%) !important;
    opacity: 1;
}

.marquee-left {
    animation: marquee-left 25s linear infinite;
}

.marquee-right {
    animation: marquee-right 25s linear infinite;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%);
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-box {
        width: 130px;
        height: 50px;
        padding: 0 10px;
    }

    .marquee-left,
    .marquee-right {
        animation-duration: 20s;
    }
}

/* ========================================
   Contact Form Design Upgrade
   ======================================== */

.contact-form-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    padding: 60px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.form-group {
    margin-bottom: 35px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.form-input,
.form-textarea {
    width: 100%;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 1rem;
    color: #1a1a1a;
    transition: all 0.3s ease;
    outline: none;
}

.form-input {
    height: 54px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #999999;
}

.form-input:focus,
.form-textarea:focus {
    background-color: #ffffff;
    border-color: #c5a47e;
    box-shadow: 0 0 0 4px rgba(197, 164, 126, 0.1);
}

.form-submit {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 18px 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(184, 134, 11, 0.2);
    letter-spacing: 0.1em;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(184, 134, 11, 0.3);
    background: linear-gradient(135deg, #e5c04d 0%, #cca01d 100%);
}

.form-submit:active {
    transform: translateY(0);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .contact-form-card {
        padding: 40px 30px;
    }

    .form-group {
        margin-bottom: 25px;
    }

    .form-submit {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .contact-form-card {
        padding: 30px 20px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .form-input,
    .form-textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}