/* --- [01. 基礎設定] --- */
:root {
    /* ハニカムの線：背景のグラデーションに美しく溶け込むよう、程よい不透明度に調整 */
    --line-color-honeycomb: rgba(94, 78, 54, 0.35);
}

body {
    margin: 0; padding: 0; 
    background-color: #f6f5ed; 
    color: #2d2d2d;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    position: relative; 
    overflow-x: hidden; 
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* コンテンツ全体の重なり順を制御 */
main { position: relative; z-index: 2; }

section {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 35px;
    position: relative;
    z-index: 10;
}

/* --- [ふわっと表示のアニメーション設定] --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
                filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* --- [セクション1: TOPビジュアル] --- */
.top-visual-section {
    width: 100%;
    height: 100vh;
    position: relative;
    background-color: #ccb89b;
    margin-bottom: -1px;
    padding-bottom: 1px;
}

.top-visual-area {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; 
    object-position: center;
    vertical-align: bottom;
    position: relative;
    z-index: 1;
}

/* 冒頭のロゴアニメーション */
@keyframes softSlideIn {
    0% { opacity: 0; transform: translateX(-20px); filter: blur(4px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes lineFlowRight {
    0% { transform: scaleX(0); transform-origin: left; opacity: 0; }
    100% { transform: scaleX(1); transform-origin: left; opacity: 0.6; }
}

.megapollen-brand-box {
    position: absolute;
    right: 25px;
    bottom: 95px;
    text-align: right;
    z-index: 10;
}

.megapollen-logo-en { width: 180px; max-width: 60vw; height: auto; display: block; margin: 0 0 0 auto; opacity: 0; animation: softSlideIn 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: 0.4s; }
.megapollen-line { width: 180px; height: 1px; background-color: #ffffff; margin: 15px 0 15px auto; opacity: 0; transform: scaleX(0); animation: lineFlowRight 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: 0.8s; }
.megapollen-logo-jp { width: 90px; max-width: 30vw; height: auto; display: block; margin: 0 0 0 auto; opacity: 0; animation: softSlideIn 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: 1.2s; }

/* --- [セクション2: メッセージ＆蜂くんエリア（統合グラデーション）] --- */
.message-and-honey-zone {
    /* 修正：TOP画像の直下から蜂くんの画像の底までを美しい1本のグラデーションで繋ぎ、境界線をなくす */
    background: linear-gradient(to bottom, #ccb89b 0%, #ccb89b 20%, rgba(204, 184, 155, 0.6) 60%, rgba(246, 245, 237, 0.9) 90%, #f6f5ed 100%);
    margin-top: -1px;
    padding-top: 50px;
    position: relative;
    z-index: 2;
}

.dark-bg {
    /* 修正：パキッと分断していた単色背景を透明にし、上の共通グラデーションをそのまま透過させる */
    background-color: transparent;
    color: #ffffff;
    position: relative;
    z-index: 3;
}

@keyframes messageFlow {
    0% { opacity: 0; transform: translateX(-30px); filter: blur(3px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

.megapollen-message-area {
    text-align: left;
    font-family: 'Noto Serif JP', serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 2;
    letter-spacing: 0.13em;
    padding: 15px 0 40px;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.megapollen-message-area span {
    display: block;
    opacity: 0;
    animation: messageFlow 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.megapollen-message-area span:nth-child(1) { animation-delay: 1.8s; }
.megapollen-message-area span:nth-child(2) { animation-delay: 2.1s; }
.megapollen-message-area span:nth-child(3) { animation-delay: 2.4s; }

.megapollen-image-box {
    width: 100%;
    display: flex;
    justify-content: center;
    /* 修正：不自然な白濁グラデーションを廃止し、親要素の美しい繋がりにシームレスに合わせる */
    background: transparent;
    padding-top: 20px;
    padding-bottom: 30px;
    position: relative;
}

.megapollen-image-box img {
    width: 60%;
    max-width: 600px;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* --- [セクション3以降: 本文・コンテンツエリア] --- */
.light-yellow-section {
    background-color: rgba(246, 245, 237, 0.85);
    color: #5d4c3a;
    padding-bottom: 135px;
    margin-top: -1px; 
    padding-top: 1px;
    position: relative;
}

.yellow-section {
    /* 前セクションとの繋ぎ目の演出（クリーム→濃いオレンジ）は上端の140pxだけで完了させ、
       本文が始まる位置（padding 80px + text-unit padding 50px 以降）では必ず濃いオレンジになるようにする。
       ％指定だと本文の長さ次第で境界がズレ、白文字が薄い背景に重なって読めなくなっていたため。 */
    background: linear-gradient(to bottom, rgba(246, 245, 237, 0.8) 0px, rgba(204, 184, 155, 0.9) 40px, #b46b1f 140px, #b46b1f 100%);
    color: #ffffff;
    padding: 80px 0;
    margin-top: -1px;
    position: relative;
    z-index: 2;
}

.oke-image {
    width: 50%;
    max-width: 500px;
    display: block;
    position: absolute;
    right: -5%;
    top: 96%;
    z-index: -1;
    opacity: 0.7;
}

.text-unit { padding: 50px 0; position: relative; z-index: 10; }
.text-unit h2 { font-size: 32px; font-weight: 600; margin: 0 0 30px 0; letter-spacing: 0.1em; line-height: 1.6; }
.noto-serif { font-family: 'Noto Serif JP', serif; font-weight: 300; }
.text-unit p { font-size: 1rem; font-weight: 500; margin: 0; opacity: 0.9; max-width: 700px; line-height: 2.2; text-align: justify; }
.text-unit .paragraph-spacing { margin-bottom: 30px; }

.conversion-area { display: flex; flex-direction: column; gap: 20px; align-items: center; padding: 80px 0 100px; position: relative; z-index: 10; }
.btn-purchase {
    display: flex; align-items: end; justify-content: center; width: 100%; max-width: 400px; padding: 22px 20px;
    border-radius: 2px; text-decoration: none; font-family: 'Noto Serif JP', serif; font-size: 18px;
    letter-spacing: 0.15em; transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1); position: relative; overflow: hidden; box-sizing: border-box;
}
.btn-purchase.primary { background-color: #b46b1f; color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.btn-purchase.subscription { background-color: #ffffff; color: #b46b1f; border: 1px solid #b46b1f; }

.totop-button {
    position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; background-color: #bda16b; color: #ffffff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 10px; font-weight: 200;
    z-index: 9999; box-shadow: 0 2px 10px rgba(0,0,0,0.2); transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer; opacity: 0; visibility: hidden; text-align: center;
}
.totop-button.is-show { opacity: 1; visibility: visible; }

@media screen and (max-width: 768px) {
    .text-unit h2 { font-size: 28px; }
    .btn-purchase { font-size: 16px; max-width: 90%; }
}
@media screen and (max-width: 378px) {
    .text-unit h2 { font-size: 26px; }
    .btn-purchase {
        font-size: 15px;
    }
}


/* =============================================
   タブレット / PC レスポンシブ (768px以上)
   ============================================= */
@media (min-width: 768px) {
    .main-content {
        max-width: 960px;
        padding: 90px 55px 0;
    }

    .megapollen-brand-box {
        right: 50px;
        bottom: 130px;
    }
    .megapollen-logo-en { width: 240px; }
    .megapollen-line    { width: 240px; }
    .megapollen-logo-jp { width: 120px; }

    .megapollen-message-area { font-size: 26px; }

    .text-unit h2 {
        font-size: 32px;
        text-align: center;
        margin-bottom: 35px;
    }
    .text-unit .sub-title,
    .text-unit .inner-sub-title { font-size: 20px !important; }
    .text-unit .paragraph-spacing {
        margin-bottom: 50px;
    }
    .conversion-area {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        gap: 30px;
        padding: 80px 0 120px;
    }

    .light-yellow-section {
        padding-bottom: 225px;
    }
    .oke-image {
        max-width: 250px;
        top: 95%;
        right: -3%;
    }
    
    .btn-purchase { width: 280px; }

    .footer-kinchan-clip {
        top: -25px !important;
    }
    .footer-kinchan-left img {
        width: 80% !important;
    }
}

/* =============================================
   PC レスポンシブ (1024px以上)
   ============================================= */
@media (min-width: 1024px) {
    .main-content {
        max-width: 960px;
        padding: 120px 65px 0;
    }

    /* PC版TOPビジュアル: x_pro_pl.png(750x470)の実比率に合わせて高さを自動算出し、クロップなしで全体を表示 */
    .top-visual-section {
        height: auto;
        aspect-ratio: 750 / 470;
        max-height: 100vh;
    }
    .top-visual-area {
        height: 100%;
        object-fit: contain;
    }

    /* 桶の理論の画像: PC版はwidth:50%が効きすぎて大きく見えるため、上限を少し絞る */
    .oke-image {
        max-width: 380px;
    }

    .megapollen-brand-box {
        right: 70px;
        bottom: 160px;
    }
    .megapollen-logo-en { width: 300px; }
    .megapollen-line    { width: 300px; }
    .megapollen-logo-jp { width: 150px; }

    .megapollen-message-area { font-size: 28px; }

    .text-unit {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .text-unit h2 { font-size: 40px; }
    .text-unit .sub-title,
    .text-unit .inner-sub-title { font-size: 22px !important; }
    .text-unit p {
        max-width: 850px;
    }
    .text-unit .paragraph-spacing {
        margin-bottom: 75px;
    }
    .btn-purchase {
        width: 320px;
        font-size: 20px;
        padding: 24px 20px;
    }
}

/* --- [ハニカムアニメーション用SVG配置設定] --- */
.honeycomb-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* グラデーション背景の裏側、または透過した隙間から上品にのぞく位置に固定 */
    pointer-events: none;
}

/* 線のスタイル設定 */
.drawing-line {
    fill: none;
    stroke: var(--line-color-honeycomb);
    stroke-width: 1.1; 
    stroke-linecap: round;
    stroke-linejoin: round;
    
    /* 一筆書きアニメーションの線の長さを定義 */
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    
    /* アニメーション：描画して、維持して、消えるサイクル */
    animation: draw-and-fade 15s ease-in-out infinite;
}

.line-delay-1 { animation-delay: 0s; }
.line-delay-2 { animation-delay: -5s; }
.line-delay-3 { animation-delay: -10s; }

@keyframes draw-and-fade {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}