/* Main CSS */

/* CSS Scroll Snap for smooth navigation */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    /* Prevent horizontal scroll */
    overflow-x: hidden;
    max-width: 100%;
}

/* Momentum scrolling for mobile devices */
body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", 
                 "Hiragino Kaku Gothic ProN", "Noto Sans JP", 
                 Meiryo, sans-serif;
    word-break: keep-all;
    overflow-wrap: break-word;
    /* Prevent text size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    /* Prevent tap highlight on iOS */
    -webkit-tap-highlight-color: transparent;
    /* Prevent horizontal scroll */
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

/* Accessibility - Focus styles */
*:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    .nav-link,
    .cta-button,
    .submit-button,
    .social-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .cta-button:hover,
    .submit-button:hover,
    .innovation-card:hover,
    .package-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add active states for better feedback */
    .cta-button:active,
    .submit-button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Improve form inputs for touch */
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Variables */
:root {
    --primary-color: #FFFFFF;
    --secondary-color: #000000;
    --accent-primary: #E6C547;
    --accent-secondary: #D4AF37;
    --accent-tertiary: #B8860B;
    --accent-warm: #F0D875;
    --accent-color: #D4AF37;
    --sub-color: #F5F5F5;
    --hover-color: #B8860B;
    --container-max-width: 1400px;
    --section-padding: 120px;
    --transition: 0.3s ease-out;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: transparent;
    transition: background-color var(--transition);
    z-index: 1000;
}

.header.scrolled {
    background-color: var(--primary-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    height: 70px;
    width: 70px;
}

.logo-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--secondary-color);
    transition: color var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    transition: width var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu toggle - hidden by default */
.mobile-menu-toggle {
    display: none;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Responsive object-position adjustments */
@media (max-width: 1024px) {
    .hero-img {
        object-position: center top;
    }
}

@media (max-width: 768px) {
    .hero-img {
        object-position: center 30%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.05) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
}

.hero-content {
    text-align: center;
    z-index: 3;
    position: relative;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.7) 100%);
    width: 100%;
    padding: 60px 20px 80px;
    margin-bottom: 0;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warm) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--primary-color);
    font-weight: 300;
    letter-spacing: 0.1em;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-primary);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* Sections with scroll snap */
section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Hero section specific */
.hero {
    scroll-snap-align: start;
}

/* Introduction Section */
.intro {
    padding: var(--section-padding) 0;
    background-color: var(--primary-color);
    scroll-snap-align: start;
}

.intro-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-text {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.8;
    color: var(--secondary-color);
    font-weight: 300;
}

/* Products Section */
.products {
    padding: var(--section-padding) 0;
    background-color: var(--sub-color);
}

.products-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 8vw, 80px);
    align-items: center;
}

.products-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.section-title-en {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 100;
    color: var(--secondary-color);
    margin-bottom: 20px;
    letter-spacing: 0.1em;
}

.product-name {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

.product-features {
    margin-bottom: 40px;
}

.feature {
    margin-bottom: 30px;
}

.feature h4 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.feature p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
}

.product-price {
    margin-bottom: 40px;
}

.price {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.price-unit {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-left: 10px;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
    color: var(--primary-color);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 10px 30px rgba(230, 197, 71, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(230, 197, 71, 0.5);
}

/* Product Actions Container */
.product-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* Crowdfunding Button */
.cta-button-crowdfunding {
    background: linear-gradient(135deg, #E85D75 0%, #E74C3C 50%, #C0392B 100%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.cta-button-crowdfunding:hover {
    box-shadow: 0 15px 40px rgba(232, 93, 117, 0.5);
}

.button-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* Innovation Section */
.innovation {
    padding: var(--section-padding) 0;
    background-color: var(--primary-color);
    text-align: center;
}

.innovation .section-title-en {
    margin-bottom: 80px;
}

.innovation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(30px, 6vw, 60px);
}

.innovation-card {
    padding: 40px 30px;
    background-color: var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}

.innovation-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.innovation-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
}

.innovation-icon svg {
    width: 100%;
    height: 100%;
}

.innovation-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.innovation-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
}

/* Performance Section */
.performance {
    padding: var(--section-padding) 0;
    background-image: url('../images/performance-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.performance-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    padding: var(--section-padding) 0;
}

.performance .section-title-en {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 80px;
}

.performance-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}

.package-card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.package-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.package-price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 30px;
}

.package-features {
    text-align: left;
}

.package-features li {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.package-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
    font-weight: 600;
}

.performer-profile {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.profile-image img {
    width: 100%;
    border-radius: 50%;
}

.profile-info h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.profile-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
}

/* Lessons Section */
.lessons {
    padding: var(--section-padding) 0;
    background-color: var(--primary-color);
}

.lessons-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 8vw, 80px);
    align-items: center;
}

.lessons .section-title-en {
    margin-bottom: 30px;
}

.lessons-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

.lesson-types {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.lesson-tag {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 100%);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.lesson-pricing h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.pricing-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--sub-color);
    font-size: 1rem;
}

.pricing-table td:first-child {
    color: var(--secondary-color);
}

.pricing-table td:last-child {
    color: var(--accent-secondary);
    font-weight: 600;
    text-align: right;
}

.lessons-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Message Section */
.message {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warm) 30%, var(--accent-secondary) 70%, var(--accent-tertiary) 100%);
}

.message .section-title-en {
    color: var(--primary-color);
    margin-bottom: 60px;
    text-align: center;
}

.message-item {
    margin-bottom: 80px;
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.message-reverse .message-content {
    grid-template-columns: 1fr 1fr;
}

.message-reverse .message-image {
    order: 2;
}

.message-reverse .message-text {
    order: 1;
}

.message-image {
    width: 100%;
}

.message-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.message-text {
    color: var(--primary-color);
}


.message-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-weight: 300;
}

.message-body strong {
    font-weight: 600;
    font-size: 1.2em;
    color: var(--accent-warm);
}

.message-signature {
    text-align: right;
}

.message-signature p {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 5px;
}

.signature-name {
    font-size: 1.3rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: var(--section-padding) 0;
    background-color: var(--sub-color);
    text-align: center;
    min-height: calc(100vh - 200px);
}

.contact .section-title-en {
    margin-bottom: 60px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.submit-button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
    color: var(--primary-color);
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 10px 30px rgba(230, 197, 71, 0.4);
    margin-top: 20px;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(230, 197, 71, 0.5);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    padding: 60px 0 30px;
    scroll-snap-align: start;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    height: 50px;
    width: 50px;
}

.footer-logo img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.footer-links a {
    color: var(--primary-color);
    font-size: 1rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.social-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: color var(--transition);
}

.social-link:hover {
    color: var(--accent-secondary);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Performance Optimizations for GPU Acceleration */
.hero-img,
.story-img,
.gallery-img,
.products-image img,
.lessons-image img,
.message-image img {
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Optimize animations for better performance */
.cta-button,
.submit-button,
.innovation-card,
.package-card {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Scroll-triggered animations */
.hero-content,
.intro-content,
.products-content,
.innovation-card,
.lessons-content {
    contain: layout style paint;
}

/* Reduce paint operations */
.nav-link::after {
    contain: layout style;
}

.scroll-arrow {
    contain: layout style;
    transform: translate3d(0, 0, 0) rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0) rotate(45deg);
    }
    40% {
        transform: translate3d(0, -10px, 0) rotate(45deg);
    }
    60% {
        transform: translate3d(0, -5px, 0) rotate(45deg);
    }
}