/* 
 * 杉能舎 酒蔵ガルテン 特設ページ CSS (Redesign)
 * テーマ: エディトリアル（雑誌風）、和のモダニズム、深い静寂
 * フォント: Noto Serif JP (明朝体), Cormorant Garamond
 */

:root {
    /* Color Palette - Deeper, more sophisticated */
    --color-bg: #FAFAFA;
    --color-white: #FFFFFF;
    --color-text-main: #1A1A1A;
    --color-text-light: #4A4A4A;
    --color-green-darkest: #0B1710; /* Very dark forest green */
    --color-green-dark: #142E20;
    --color-gold-modest: #C5A880;
    --color-gold-dark: #A3865D;
    
    /* Layout */
    --max-width: 1200px;
    --spacing-xs: 1.5rem;
    --spacing-sm: 3rem;
    --spacing-md: 6rem;
    --spacing-lg: 10rem;
    --spacing-xl: 14rem;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Serif JP', serif;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 2.2; /* Looser line height for Mincho */
    letter-spacing: 0.08em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.eng-font {
    font-family: 'Cormorant Garamond', serif;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.4s ease;
}

a:hover {
    color: var(--color-gold-modest);
}

/* Typography Utils */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1.8;
    letter-spacing: 0.15em;
    color: var(--color-green-darkest);
}

h1, h2, h3 {
    font-weight: 400;
}

/* -------------------------------------
 * Mock Official Header & Footer
 * ------------------------------------- */
.official-header {
    background-color: var(--color-white);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.global-nav ul.chapter-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-gold-modest);
    border-radius: 50%;
    color: var(--color-green-darkest);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    transition: all 0.4s ease;
    background: transparent;
}

.nav-icon::after {
    content: attr(data-hover-text);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: var(--color-gold-modest);
    letter-spacing: 0.1em;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-icon:hover {
    background: var(--color-gold-modest);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.3);
}

.nav-icon:hover::after {
    opacity: 1;
    top: -18px;
}

.official-footer {
    background-color: var(--color-green-darkest);
    color: var(--color-white);
    padding: 6rem 2rem 4rem;
    margin-top: var(--spacing-xl);
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    margin: 0 auto;
    display: block;
    filter: brightness(0) invert(1);
}

.footer-address {
    font-size: 0.85rem;
    margin-bottom: 3rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.15em;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.1em;
}

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

.copyright {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

/* -------------------------------------
 * Hero Section
 * ------------------------------------- */
.hero {
    padding: var(--spacing-md) 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: block;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 2rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-gold-modest);
    letter-spacing: 0.25em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0;
}

.hero-title .main-title {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.3;
    color: var(--color-green-darkest);
    letter-spacing: 0.1em;
}

.hero-title .sub-title {
    font-size: 1.2rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

/* -------------------------------------
 * Intro Section
 * ------------------------------------- */
.intro {
    max-width: 800px;
    margin: var(--spacing-lg) auto;
    padding: 0 3rem;
    position: relative;
}

.intro::before {
    content: '';
    position: absolute;
    top: -4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background-color: var(--color-gold-modest);
}

.intro-image {
    margin-bottom: 4rem;
    width: 100%;
}

.intro-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.intro-text p {
    margin-bottom: 2rem;
}

/* -------------------------------------
 * Editorial Story Sections (Overlapping Layout)
 * ------------------------------------- */
.story-section {
    max-width: var(--max-width);
    margin: 0 auto var(--spacing-xl);
    padding: 0 3rem;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
}

.story-section.reverse .story-grid {
    grid-template-columns: 1fr 1fr;
}

.story-text-box {
    position: relative;
    z-index: 10;
    background: rgba(250, 250, 250, 0.95);
    padding: 4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.02);
    margin-right: -4rem; /* Create overlap */
    border: 1px solid rgba(197, 168, 128, 0.1);
}

.story-section.reverse .story-text-box {
    margin-right: 0;
    margin-left: -4rem;
    grid-column: 2;
    grid-row: 1;
}

.story-section.reverse .story-image-box {
    grid-column: 1;
    grid-row: 1;
}

.chapter-num {
    display: block;
    font-size: 4rem;
    color: rgba(197, 168, 128, 0.2);
    position: absolute;
    top: 1rem;
    left: 2rem;
    line-height: 1;
}

.heading-large {
    font-size: 2.2rem;
    margin-bottom: 0;
    float: right; /* Float vertical text to the right inside the box */
    margin-left: 3rem;
    height: 500px;
}

.story-paragraph {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 4rem;
    clear: both;
}

.story-paragraph p {
    margin-bottom: 1.8rem;
}

.conclusion {
    margin-top: 3rem;
    font-size: 1.1rem;
    color: var(--color-green-darkest) !important;
    font-weight: 500;
}

/* -------------------------------------
 * Image Placeholders & Asymmetry
 * ------------------------------------- */
.story-image-box {
    position: relative;
    z-index: 1;
}

.placeholder-wrapper {
    background: linear-gradient(135deg, rgba(20, 46, 32, 0.03) 0%, rgba(197, 168, 128, 0.08) 100%);
    border: 1px solid rgba(197, 168, 128, 0.2);
    aspect-ratio: var(--aspect-ratio, 16/9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.placeholder-box {
    text-align: center;
    color: var(--color-green-dark);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
    font-family: 'Cormorant Garamond', serif;
}

.placeholder-box br {
    display: block;
    margin-top: 0.5rem;
}

.story-img {
    width: 100%;
    height: auto;
    aspect-ratio: var(--aspect-ratio, 4/5);
    object-fit: cover;
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    display: block;
}

/* Specific Asymmetrical Offsets */
.offset-up {
    transform: translateY(-4rem);
}

.offset-down {
    transform: translateY(4rem);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--color-gray-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.double-images {
    position: relative;
    height: 100%;
    min-height: 600px;
}

.img-front {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    z-index: 2;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
}

.img-back {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    z-index: 1;
}

/* -------------------------------------
 * Final Section
 * ------------------------------------- */
.final-section {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.final-image {
    margin-bottom: 5rem;
}

.final-text-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-text-box .vertical-text {
    font-size: 2.2rem;
    height: 550px;
    margin-bottom: 4rem;
}

.final-text-box .story-paragraph {
    max-width: 700px;
    text-align: left;
    margin-top: 0;
}

/* -------------------------------------
 * Video Section
 * ------------------------------------- */
.video-section {
    padding: 6rem 3rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.video-header {
    margin-bottom: 3rem;
}

.video-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-gold-modest);
    letter-spacing: 0.1em;
}

.video-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray-dark);
    letter-spacing: 0.15em;
    line-height: 1.8;
}

.youtube-placeholder {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* -------------------------------------
 * Cinematic Animations
 * ------------------------------------- */
.cinematic-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s cubic-bezier(0.2, 0.6, 0.2, 1), 
                transform 1.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

.delay-1 { transition-delay: 0.3s; }
.delay-2 { transition-delay: 0.6s; }
.delay-3 { transition-delay: 0.9s; }

/* -------------------------------------
 * Responsive Adjustments
 * ------------------------------------- */
@media (max-width: 992px) {
    .story-grid, .story-section.reverse .story-grid {
        grid-template-columns: 1fr;
    }

    .story-text-box, .story-section.reverse .story-text-box {
        margin: 0;
        margin-top: -3rem; /* Still overlap vertically */
        grid-column: 1;
        grid-row: 2;
    }

    .story-image-box, .story-section.reverse .story-image-box {
        grid-column: 1;
        grid-row: 1;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text {
        align-items: center;
        text-align: center;
        padding-right: 0;
    }

    .hero-title {
        flex-direction: column;
        writing-mode: horizontal-tb;
    }

    .hero-subtitle {
        writing-mode: horizontal-tb;
        transform: none;
        margin-bottom: 1rem;
    }

    .heading-large {
        float: none;
        writing-mode: horizontal-tb;
        height: auto;
        margin-left: 0;
        margin-bottom: 2rem;
    }

    .final-text-box .vertical-text {
        writing-mode: horizontal-tb;
        height: auto;
    }

    .double-images {
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .img-front, .img-back {
        position: relative;
        width: 100%;
    }
}

/* -------------------------------------
 * Gallery Section (Infinite Marquee)
 * ------------------------------------- */
.gallery-section {
    padding: 6rem 0;
    overflow: hidden;
    width: 100%;
}

.gallery-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-gold-modest);
    letter-spacing: 0.2em;
    margin-bottom: 4rem;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
}

/* Gradient fade at edges */
.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-white), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-white), transparent);
}

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

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

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

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    height: 320px;
    width: auto;
    margin-right: 2rem;
    background: #ebebeb;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.marquee-item img {
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 50vh;
    z-index: 100;
    display: flex;
    align-items: center;
}

.sidebar-line {
    position: absolute;
    right: 3px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(10, 48, 25, 0.2);
    z-index: 1;
}

.sidebar-nav ul {
    position: relative;
    z-index: 2;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    gap: 15px;
    padding: 10px 0;
}

.sidebar-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: rgba(10, 48, 25, 0.5);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    text-align: right;
}

.sidebar-num {
    font-size: 0.85rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.1em;
}

.sidebar-title {
    font-size: 0.55rem;
    font-family: "Yu Mincho", "Noto Serif JP", serif;
    color: rgba(10, 48, 25, 0.3);
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.sidebar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-gold-modest);
    transition: all 0.3s ease;
}

.sidebar-link:hover .sidebar-text,
.sidebar-link.active .sidebar-text {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-link.active .sidebar-text {
    color: var(--color-green-darkest);
}

.sidebar-link.active .sidebar-num {
    font-weight: bold;
}

.sidebar-link.active .sidebar-title {
    color: rgba(10, 48, 25, 0.7);
}

.sidebar-link.active .sidebar-dot {
    transform: scale(1.5);
    background-color: var(--color-green-darkest);
}

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

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

/* -------------------------------------
 * Mobile Responsive Adjustments
 * ------------------------------------- */
@media (max-width: 768px) {
    :root {
        --spacing-md: 3rem;
        --spacing-lg: 4rem;
        --spacing-xl: 5rem;
    }

    body {
        font-size: 0.9rem;
        line-height: 1.9;
    }

    .header-inner {
        padding: 0.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo img {
        height: 30px; /* smaller logo */
    }

    .global-nav ul.chapter-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .nav-icon::after {
        display: none;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-title .main-title {
        font-size: 1.8rem;
    }
    
    .hero-title .sub-title {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .intro {
        padding: 0 1rem;
        margin: 3rem auto;
    }

    .story-section {
        padding: 0 1rem;
        margin-bottom: 4rem;
    }

    .story-text-box, .story-section.reverse .story-text-box {
        padding: 1.5rem 1rem;
        margin-top: -1rem; /* minimal overlap */
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }

    .chapter-num {
        font-size: 2rem;
        left: 0.5rem;
        top: 0;
    }

    .heading-large {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    .story-paragraph {
        margin-top: 1rem;
    }
    
    .story-paragraph p {
        margin-bottom: 1.2rem;
    }

    .sidebar-nav {
        display: none;
    }

    .final-section {
        padding: 0 1rem;
    }

    .final-text-box .vertical-text {
        font-size: 1.4rem;
    }

    .gallery-section {
        padding: 3rem 0;
    }

    .gallery-title {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .marquee-item {
        height: 150px;
        margin-right: 0.5rem;
    }
    
    .offset-up, .offset-down {
        transform: none;
    }
    
    .double-images {
        gap: 1rem;
    }
    
    .img-front {
        width: 100%;
        box-shadow: none;
    }
    
    .img-back {
        width: 100%;
        margin-top: 0;
    }
    
    .official-footer {
        padding: 3rem 1rem 2rem;
        margin-top: 4rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
}
