/* 
   Corporate Ehon - The Storybook
   Aesthetic: Warm, minimalist, elegant, lots of negative space (引き算のデザイン).
*/

:root {
    --ehon-bg: #FCFAF8; /* Warm paper-like white */
    --ehon-bg-alt: #F8F6F2; /* Slightly warmer for subtle sectioning */
    --ehon-text: #2A2624; /* Soft dark brown/charcoal */
    --ehon-accent: #B29B84; /* Muted earth tone */
    --ehon-accent-light: #EBE5DF;
    --font-serif: 'Noto Serif JP', serif;
}

body.theme-ehon-v2 {
    background-color: var(--ehon-bg);
    color: var(--ehon-text);
    font-family: var(--font-serif);
    font-weight: 400;
}

/* Force Navigation to be dark immediately because the background is light */
.theme-ehon-v2 .glass-nav {
    background: rgba(252, 250, 248, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 15px 0;
}
.theme-ehon-v2 .glass-nav .logo {
    color: var(--ehon-text);
    text-shadow: none;
}
.theme-ehon-v2 .glass-nav .nav-menu a {
    color: var(--ehon-text);
    text-shadow: none;
    font-weight: 500;
}
.theme-ehon-v2 .menu-toggle span {
    background-color: var(--ehon-text);
}

/* Storybook Hero */
.sb-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.sb-hero-content {
    position: relative;
    z-index: 2;
    margin-left: 10%;
    max-width: 800px;
}

.sb-hero-title {
    font-size: 4rem;
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    color: var(--ehon-text);
}

.sb-hero-lead {
    font-size: 1.2rem;
    line-height: 2.2;
    letter-spacing: 0.08em;
    color: #555;
}

.sb-hero-img {
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
    width: 60%;
    max-width: 900px;
    z-index: 1;
    opacity: 1;
    animation: slowFadeIn 2s ease both 0.5s;
}

.sb-hero-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    mix-blend-mode: multiply; /* Helps watercolor blend with paper bg */
}

/* Scroll indicator */
.sb-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.6;
    z-index: 3;
}
.sb-scroll-text {
    writing-mode: vertical-rl;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--ehon-text);
}
.sb-scroll-line {
    width: 1px;
    height: 80px;
    background-color: var(--ehon-accent);
    position: relative;
    overflow: hidden;
}
.sb-scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--ehon-text);
    animation: sbScrollLine 2s infinite ease-in-out;
}

@keyframes sbScrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes slowFadeIn {
    0% { opacity: 0; transform: translateY(-50%) translateX(20px); }
    100% { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes slowFadeInMobile {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sb-hero-img {
        animation: none !important;
        opacity: 1 !important;
        transform: translateY(-50%) !important;
    }
    .reveal {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Story Sections (Subtractive Design) */
.sb-section {
    padding: 150px 0;
    position: relative;
}

.sb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.sb-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}
.sb-grid.reverse {
    flex-direction: row-reverse;
}

.sb-text-block {
    flex: 1;
    max-width: 500px;
}

.sb-image-block {
    flex: 1.2;
    position: relative;
}

.sb-image-block img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(42, 38, 36, 0.08);
}

.sb-image-block.watercolor img {
    box-shadow: none;
    mix-blend-mode: multiply;
}

/* Faded Photo for Story */
.sb-image-block.sb-fade-photo {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--ehon-bg);
}

.sb-image-block.sb-fade-photo img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: none;
}

.sb-image-block.sb-fade-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(to right, var(--ehon-bg) 0%, rgba(252, 250, 248, 0.85) 8%, rgba(252, 250, 248, 0) 28%, rgba(252, 250, 248, 0) 85%, var(--ehon-bg) 100%),
      linear-gradient(to bottom, var(--ehon-bg) 0%, rgba(252, 250, 248, 0) 12%, rgba(252, 250, 248, 0) 88%, var(--ehon-bg) 100%);
}

.sb-section-title {
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    letter-spacing: 0.05em;
    color: var(--ehon-text);
}

.sb-text {
    font-size: 1.1rem;
    line-height: 2.2;
    letter-spacing: 0.05em;
    color: #5A5451;
    margin-bottom: 1.5rem;
    text-wrap: pretty;
}

.sb-accent-line {
    width: 40px;
    height: 1px;
    background-color: var(--ehon-accent);
    margin: 30px 0;
}

/* Quote/Poem Block */
.sb-poem {
    text-align: center;
    padding: 180px 0 160px;
}
.sb-poem-text {
    font-size: 1.8rem;
    line-height: 2.4;
    letter-spacing: 0.1em;
    color: var(--ehon-text);
    position: relative;
    display: inline-block;
}

/* Clean List */
.sb-list {
    margin-top: 30px;
    padding-left: 0;
}
.sb-list li {
    font-size: 1.05rem;
    line-height: 2;
    color: #5A5451;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}
.sb-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 15px;
    height: 1px;
    background-color: var(--ehon-accent);
}

/* Process List */
.sb-process-list {
    margin-top: 40px;
}
.sb-process-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 40px;
    border-left: 1px solid var(--ehon-accent);
}
.sb-process-item:last-child {
    border-left: 1px solid transparent;
    padding-bottom: 0;
}
.sb-process-num {
    position: absolute;
    left: -18px;
    top: -5px;
    width: 35px;
    height: 35px;
    background-color: var(--ehon-bg);
    border: 1px solid var(--ehon-accent);
    color: var(--ehon-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.sb-process-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--ehon-text);
}
.sb-process-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #5A5451;
}

/* Minimal CTA */
.sb-cta-section {
    padding: 150px 0;
    text-align: center;
    background-color: var(--ehon-accent-light);
    margin-top: 100px;
}

.sb-cta-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 400;
}

.sb-btn {
    display: inline-block;
    padding: 20px 50px;
    background-color: var(--ehon-text);
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.4s ease;
}
.sb-btn:hover {
    background-color: var(--ehon-accent);
    transform: translateY(-3px);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .sb-grid, .sb-grid.reverse {
        flex-direction: column;
        gap: 50px;
    }
}

@media (max-width: 748px) {
    .sb-hero {
        flex-direction: column;
        height: auto;
    }
    .sb-hero-title {
        font-size: 2.5rem;
        margin-top: 50px;
    }
    .sb-hero-img {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        margin-top: 0;
        opacity: 0;
        animation: slowFadeInMobile 2s ease both 0.5s;
    }
    .sb-hero-content {
        margin-left: 5%;
        margin-right: 5%;
        max-width: none;
    }
    .sb-scroll {
        display: none;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}
.m-b-40 {
    margin-bottom: 40px !important;
}
.m-b-80 {
    margin-bottom: 80px !important;
}

/* Intro / Why Ehon Section Additions */
.sb-intro-title {
    font-size: 2.4rem;
    margin-bottom: 4rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--ehon-text);
}
.sb-intro-lead {
    max-width: 820px;
    margin: 0 auto 5rem;
    text-align: center;
    border-bottom: 1px solid var(--ehon-accent-light);
    padding-bottom: 5rem;
}
.sb-intro-lead p {
    font-size: 1.15rem;
    line-height: 2.6;
    letter-spacing: 0.1em;
    color: #5A5451;
    margin-bottom: 2.2rem;
    text-wrap: balance;
}
.sb-intro-lead p:last-child {
    margin-bottom: 0;
}


/* Services Comparison Grid */
.services-comparison {
    align-items: flex-start;
    gap: 60px;
}
.service-col {
    flex: 1;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    border: 1px solid var(--ehon-accent-light);
    min-height: 480px;
    display: flex;
    flex-direction: column;
}
.service-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--ehon-text);
    border-bottom: 1px solid var(--ehon-accent-light);
    padding-bottom: 15px;
}
.service-usage {
    margin-top: 15px;
    font-size: 0.95rem;
    background: rgba(235, 229, 223, 0.4);
    padding: 10px 15px;
    border-radius: 2px;
}
.service-details-list {
    margin-top: 20px;
    padding-left: 0;
    list-style: none;
    flex-grow: 1;
}
.service-details-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #5A5451;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}
.service-details-list li::before {
    content: '・';
    position: absolute;
    left: 0;
    color: var(--ehon-accent);
}
.service-details-list li.note-item {
    font-size: 0.85rem;
    color: #8E8580;
    margin-top: 15px;
}
.service-details-list li.note-item::before {
    content: '';
}
.service-price {
    display: block;
    margin-top: 30px;
    font-size: 1.3rem;
    color: var(--ehon-text);
    font-weight: 500;
    border-top: 1px dashed var(--ehon-accent-light);
    padding-top: 20px;
}

@media (max-width: 900px) {
    .sb-poem {
        padding: 100px 0 90px;
    }
    .sb-intro-title {
        font-size: 1.8rem;
        letter-spacing: 0.08em;
        margin-bottom: 2.5rem;
    }
    .sb-intro-lead {
        margin-bottom: 3.5rem;
        padding-bottom: 3.5rem;
    }
    .sb-intro-lead p {
        font-size: 1rem;
        line-height: 2.25;
        letter-spacing: 0.06em;
        margin-bottom: 1.5rem;
    }
    .sb-why-ehon-subtitle-top {
        font-size: 1.8rem;
        margin-bottom: 40px;
        text-align: left;
        letter-spacing: 0.1em;
    }
    .sb-why-ehon-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-top: 0;
    }
    .sb-why-ehon-desc {
        margin-bottom: 25px;
        font-size: 1rem;
        line-height: 1.8;
    }
    .sb-illustration-frame {
        aspect-ratio: 1 / 1.05; /* スマホでも本が見えるように縦長に調整 */
        margin-bottom: 10px;
    }
    .sb-why-ehon-item {
        padding: 25px 0;
    }
    .sb-why-ehon-item:first-child {
        padding-top: 25px;
        border-top: 1px solid var(--ehon-accent-light);
    }
    .sb-why-ehon-num {
        font-size: 1.8rem;
        min-width: 35px;
    }
    .services-comparison {
        flex-direction: column !important;
        gap: 30px;
    }
    .service-col {
        width: 100%;
        min-height: auto;
        padding: 30px 20px;
    }
}

@media (min-width: 901px) {
    .sb-hero-img {
        right: 1.5%;
        width: 57%;
        max-width: 860px;
    }
}

/* Responsive typography utilities */
.pc-br {
    display: inline;
}
@media (max-width: 900px) {
    br.pc-br {
        display: none !important;
        content: "";
    }
}

/* ==========================================================================
   物語設計セクション (1カラム)
   ========================================================================== */
.sb-bg-gray {
    background-color: var(--ehon-bg-alt);
    padding-top: 80px;
    padding-bottom: 80px;
}

/* ==========================================================================
   Redesigned Sections (about-ehon, concept, usage)
   ========================================================================== */

/* Chapter 1: Intro */
.ce-intro-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}
.ce-intro-text {
    max-width: 680px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.1rem;
    line-height: 2.2;
    color: #5A5451;
}

/* Chapter 2: Concept (Asymmetric Layout) */
.ce-concept-section {
    background-color: var(--ehon-bg-alt);
    padding-top: 120px;
    padding-bottom: 120px;
}
.ce-concept-layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin: 60px auto 0;
    max-width: 760px;
}
.ce-concept-left {
    width: 100%;
}
.ce-concept-right {
    width: 100%;
}

.ce-scene-text {
    font-size: 1.15rem;
    line-height: 2.2;
    color: #4A4441;
    margin-bottom: 40px;
}


.ce-principle-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--ehon-accent-light);
}
.ce-principle-item {
    display: flex;
    align-items: flex-start;
    padding: 50px 0 50px 20%; /* ラインとのバランスを取るため左寄りを緩和 */
    border-bottom: 1px solid var(--ehon-accent-light);
    gap: 32px;
}
.ce-principle-num {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--ehon-accent);
    line-height: 1;
    opacity: 0.8;
    margin-top: 2px;
}
.ce-principle-text {
    font-size: 1.2rem;
    line-height: 2.0;
    color: #4A4441;
    margin: 0;
}

.ce-concept-conclusion {
    margin-top: 100px;
    text-align: center;
}
.ce-conclusion-lead {
    font-size: 1.8rem;
    line-height: 2.0;
    color: var(--ehon-text);
    font-weight: 400;
    margin-bottom: 30px;
}
.ce-conclusion-bridge {
    font-size: 1.1rem;
    line-height: 2.0;
    color: #6E6763;
}

/* Chapter 3: Usage */
.ce-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-top: 60px;
}
.ce-usage-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ce-usage-card:nth-child(2) {
    margin-top: 25px; /* 3枚を完全均等にしすぎないためのわずかなズレ */
}
.ce-usage-image-wrapper {
    width: 100%;
    /* 画像本来のフェードを活かすため、固定比率での切り抜きを解除 */
}
.ce-usage-img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply; /* 背景の生成りと馴染ませる */
}
.ce-usage-text {
    text-align: left;
}
.ce-usage-heading {
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--ehon-text);
    margin-bottom: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.ce-usage-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #5A5451;
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .ce-usage-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .ce-usage-card:nth-child(2) {
        margin-top: 0; /* モバイルではズレをリセット */
    }
    .ce-usage-image-wrapper {
        max-width: 100%;
        margin: 0;
    }
    .ce-usage-heading {
        font-size: 1.25rem;
    }
    .ce-conclusion-lead {
        font-size: 1.4rem;
    }
    .ce-principle-item {
        padding: 40px 5%; /* モバイルは適度な余白に */
        gap: 20px;
    }
    .ce-principle-num {
        font-size: 1.8rem;
    }
    .ce-principle-text {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Publication Bridge Section
   ========================================================================== */
.ehon-publication-bridge {
    padding: 96px 0;
    background-color: transparent;
}
.ehon-publication-layout {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}
.ehon-publication-photo {
    flex: 1;
    margin: 0;
}
.ehon-publication-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px; /* 極小の角丸 */
}
.ehon-publication-photo figcaption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #8E8580;
    line-height: 1.6;
}
.ehon-publication-text {
    flex: 1.1;
}
.ehon-publication-text h2 {
    font-size: 1.8rem;
    color: var(--ehon-text);
    margin-bottom: 25px;
    font-weight: 400;
}
.ehon-publication-text p {
    font-size: 1.05rem;
    line-height: 2.0;
    color: #5A5451;
    margin-bottom: 20px;
}
.ehon-publication-note {
    font-size: 0.95rem !important;
    color: #8E8580 !important;
    margin-top: 25px;
}
@media (max-width: 900px) {
    .ehon-publication-bridge {
        padding: 64px 0;
    }
    .ehon-publication-layout {
        flex-direction: column;
        gap: 40px;
    }
}

/* Responsive navigation override for mobile drawer */
@media (max-width: 1024px) {
    .theme-ehon-v2 .glass-nav .nav-menu a {
        color: #FAFAFA;
    }
}

