:root {
    /* Colors */
    --color-text: #333333;
    --color-bg: #f9f9f9;
    --color-primary: #2d4f4e;
    /* Deep blue-green for Shakudani */
    --color-accent: #8c8c8c;
    --color-white: #ffffff;

    /* Fonts */
    --font-serif: "Noto Serif JP", serif;
    --font-sans: "Noto Sans JP", sans-serif;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 400;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scroll Animation Wrapper */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Character Animation */
.char-animate {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.start-animation .char-animate {
    animation: charFadeIn 2.0s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.line-animate {
    display: block;
    opacity: 0;
    transform: translateY(20px);
}

.start-animation .line-animate {
    animation: charFadeIn 2.0s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

@keyframes charFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    z-index: 100;
    /* Ensure header is above everything */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-white);
    /* mix-blend-mode can cause issues with fixed overlays, handling color manually or via bg */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}


.logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-primary);
    /* Fallback */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    z-index: 1;
    background-image: url('../img/footer_bg.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 3s ease-out;
}

.hero-overlay-img.visible {
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-family: var(--font-serif);
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Vertical Text Utility */
.tategaki {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
    line-height: 2;
}

/* Section Common */
section {
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    padding-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--color-text);
}

/* Concept Section */
.concept-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.concept-visual {
    flex: 1;
    height: 600px;
    background-color: #ddd;
    /* Placeholder */
    position: relative;
    overflow: hidden;
}

.concept-bg-placeholder {
    width: 100%;
    height: 100%;
    background-image: url('../img/footer_bg.png');
    background-size: cover;
    background-position: center;
}

.concept-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.concept-lead {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    line-height: 2.5;
}

.concept-text p,
.profile-text p {
    font-family: var(--font-serif);
}

/* Products Section Refined */
#products {
    position: relative;
    padding-bottom: var(--spacing-xl);
    /* Add space at bottom */
    /* Ensure content stays on top */
    z-index: 0;
}

#products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/itadaki-art.webp');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    z-index: -1;

    /* Composite mask: Linear to fade top/bottom + Radial to fade sides */
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%), radial-gradient(circle, black 40%, transparent 80%);
    mask-composite: intersect;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%), radial-gradient(circle, black 40%, transparent 80%);
    -webkit-mask-composite: source-in;
    /* Combine masks */
    opacity: 0.8;
    /* Slight transparency to blend better with white bg if needed */
}

.collection-layout {
    display: flex;
    align-items: flex-start;
    /* Align to top so we can push down with margin */
    justify-content: center;
    gap: var(--spacing-lg);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 800px;
    padding-top: 300px;
    /* Push product down significantly to show mountain top */
}

/* Old .collection-art styles removed */

.collection-product {
    /* Centered automatically by flex parent */
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-card {
    background-color: transparent;
    /* Transparent background */
    transition: transform 0.3s ease;
    cursor: pointer;
    box-shadow: none;
    /* Remove shadow */
    width: 100%;
    max-width: 450px;
    /* Larger product display */
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    aspect-ratio: 1;
    background-color: transparent;
    /* Transparent image bg */
    margin-bottom: var(--spacing-sm);
    /* Actual product image */
    background-size: contain;
    /* Ensure whole product is seen, use contain for transparent cutout feeling */
    background-repeat: no-repeat;
    background-position: center;
}

.product-itadaki {
    background-image: url('../img/itadaki-front.webp');
}

.product-coaster {
    background-image: url('../img/coaster-set.webp');
}

.product-info {
    padding: var(--spacing-sm);
    text-align: center;
}

.product-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 0.8rem;
    color: var(--color-accent);
}

/* Profile Section */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background-color: white;
    padding: var(--spacing-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.profile-image {
    flex: 1.2;
    max-width: 640px;
    width: 100%;
}

.profile-text {
    flex: 1;
}

/* Story Section */
.story-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.story-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.story-item-reverse {
    flex-direction: row-reverse;
}

.story-image {
    flex: 1;
    min-height: 300px;
}

.story-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-family: var(--font-sans);
}

.story-text {
    flex: 1;
}

.story-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* Mobile Styles Update */
@media (max-width: 768px) {
    section {
        padding: var(--spacing-lg) 1.5rem;
        /* Reduced padding for mobile */
    }

    .story-item,
    .story-item-reverse {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .story-title {
        font-size: 1.1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    header {
        padding: 20px;
    }

    .hamburger {
        display: flex;
    }

    nav {
        display: block;
        /* Override none */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(43, 75, 120, 0.95);
        /* Medium Strong Blue */
        z-index: 900;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    nav.active {
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    nav a {
        font-size: 1.5rem;
        color: var(--color-white);
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .concept-container {
        flex-direction: column-reverse;
        /* Visual on top */
    }

    .collection-layout {
        flex-direction: column;
        justify-content: center;
        min-height: 500px;
        /* Smaller height on mobile */
        background-size: contain;
		padding-top: 50px;
    }

    .collection-product {
        width: 90%;
        margin: 0 auto;
    }

    .mobile-hidden {
        display: none;
    }

    .concept-visual {
        width: 100%;
        height: 300px;
    }

    .tategaki {
        writing-mode: horizontal-tb;
        /* Reset for mobile readable */
    }

    .profile-container {
        flex-direction: column;
        padding: var(--spacing-md);
    }

    .profile-image {
        max-width: 80%;
        width: 100%;
        margin: 0 auto;
    }
}

/* Dual Slider Section */
#dual-slider {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
}

.dual-slider-container {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping for mobile */
    min-height: 500px;
    background-color: transparent;
    box-shadow: none;
    max-width: 1200px;
    /* Constrain width */
    margin: 0 auto;
}

/* Image Slider (Left) */
.slider-image-container {
    flex: 1;
    min-width: 300px;
    /* Adjust as needed */
    position: relative;
    overflow: hidden;
    min-height: 400px;
    /* Ensure height if empty */
}

.slider-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slider-image-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Text Slider (Right) */
.slider-text-container {
    flex: 1;
    min-width: 300px;
    position: relative;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: transparent;
}

.slider-text-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    /* Fixed height for text area */
}

.slider-text-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    /* Prevent clicking hidden elements */
}

.slider-text-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    z-index: 1;
}

.slider-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-family: var(--font-serif);
}

/* Indicators */
.slider-indicators {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    /* Center indicators */
}

.indicator {
    width: 40px;
    height: 4px;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dual-slider-container {
        flex-direction: column;
    }

    .slider-image-container {
        width: 100%;
        height: 300px;
        /* Fixed height for image area on mobile */
        min-height: 300px;
        flex: none;
        display: block;
    }

    .slider-text-container {
        padding: var(--spacing-md);
    }

    .slider-text-wrapper {
        height: auto;
        min-height: 200px;
    }

    .slider-text-slide {
        position: relative;
        /* Stack normally if absolute causes issues, but absolute is better for fade. Keeping absolute for fade effect. */
        display: none;
        /* Hide non-active in mobile or manage height? */
    }

    .slider-text-slide.active {
        display: block;
        position: relative;
        /* Relative on mobile to adjust height dynamically? No, height jumping is bad. */
    }

    /* Actually better to keep absolute for transition but ensure wrapper has height. */
    .slider-text-slide {
        position: absolute;
        display: block;
    }
}

/* Supervision Section */
#supervision {
    padding: var(--spacing-lg) 0;
    position: relative;
    /* Allow height to be determined by content */
    overflow-x: auto;
    /* Allow horizontal scrolling if content is too wide */
}

.supervision-content {
    display: flex;
    flex-direction: row-reverse;
    /* Tategaki standard: right to left */
    gap: 3rem;
    padding: 0 2rem;
    overflow-x: auto;
    width: 100%;
    /* Ensure content is centered if it doesn't overflow, or scrollable if it does */
    justify-content: center;
    align-items: flex-start;
    /* Align top */
    height: 600px;
    /* Fixed height for vertical text area */
}

.supervision-content p {
    writing-mode: vertical-rl;
    text-orientation: upright;
    line-height: 2.2;
    letter-spacing: 0.1em;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    text-align: justify;
    height: 100%;
    /* Fill the container height */
    margin: 0;
}

/* Responsive adjustment for supervision */
@media (max-width: 768px) {
    .supervision-content {
        height: auto;
        min-height: auto;
        /* Reset fixed height */
        flex-direction: column;
        /* Stack vertically for horizontal text */
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0 1.5rem;
        /* Standard padding */
        gap: 2rem;
        overflow-x: visible;
        /* No scroll needed for horizontal text */
    }

    .supervision-content p {
        writing-mode: horizontal-tb;
        /* Switch to horizontal */
        text-orientation: mixed;
        /* Reset orientation */
        font-size: 0.95rem;
        line-height: 1.8;
        height: auto;
        /* Allow height to fit content */
        width: 100%;
        /* Full width */
        margin-bottom: 0;
    }
}

/* Product Details Button */
.view-details-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid var(--color-text);
    padding: 0.8rem 2.5rem;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    background-color: #fff;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.view-details-btn:hover {
    background-color: #7d9cb8;
    /* Pale blue */
    border-color: #7d9cb8;
    color: #fff;
    cursor: pointer;
}

/* CTA Section */
.cta-container {
    text-align: center;
    padding: 4rem 0 6rem 0;
    /* Spacing above footer */
}

.cta-btn {
    font-size: 1.1rem;
    /* Slightly larger */
    padding: 1rem 3.5rem;
    /* Larger touch target */
}