/* sowing_law.css */

/* --- Color Palette & Variables --- */
:root {
    --seed-primary: #8bc34a; /* 若草色 */
    --seed-secondary: #ff9800; /* 太陽のオレンジ */
    --flower-pink: #f48fb1; /* 優しいピンク */
    --flower-purple: #ce93d8; /* 癒しの紫 */
    --soil-brown: #8d6e63; /* 大地の色 */
    --sky-blue: #e1f5fe; /* 空の青 */
    --text-color: #5d4037; /* 濃い茶色のテキスト */
}

/* --- Base Layout Enhancements --- */
body {
    background-color: #fffbf0; /* 暖かいクリーム色 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(244, 143, 177, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 20%);
    background-attachment: fixed;
}

.intro-lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Section Styling --- */
.content-section {
    margin-bottom: 4rem;
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.content-section:hover {
    transform: translateY(-5px);
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--seed-primary), var(--flower-pink));
}

.section-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px dashed rgba(139, 195, 74, 0.3);
    padding-bottom: 10px;
}

.section-title i {
    color: var(--seed-primary);
    font-size: 1.5rem;
}

/* --- Specific Section Accents --- */
/* 過去の種 */
.section-past .section-title i { color: var(--soil-brown); }
.section-past::before { background: var(--soil-brown); }

/* 肥料 */
.section-fertilizer .section-title i { color: var(--seed-secondary); }
.section-fertilizer::before { background: var(--seed-secondary); }

/* 愛と感謝 */
.section-love .section-title i { color: var(--flower-pink); }
.section-love::before { background: var(--flower-pink); }

/* 未来 */
.section-future .section-title i { color: var(--flower-purple); }
.section-future::before { background: linear-gradient(to bottom, var(--flower-purple), var(--sky-blue)); }

/* サブセクション見出し (H3) */
.sub-section-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-left: 10px;
    border-left: 4px solid var(--flower-purple);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-section-title i {
    color: var(--flower-purple);
    font-size: 1.1rem;
}


/* --- Card/Box Styles --- */
.seed-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    border-left: 4px solid var(--seed-primary);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(243, 229, 245, 0.9));
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    font-weight: bold;
    color: #880e4f;
    margin: 2rem 0;
    border: 2px solid rgba(244, 143, 177, 0.5);
    box-shadow: 0 10px 25px rgba(244, 143, 177, 0.15);
}

.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    padding: 10px 15px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-list li i {
    color: var(--seed-secondary);
}

/* --- Flower Animation Elements --- */
.flower-icon {
    display: inline-block;
    animation: sway 3s ease-in-out infinite alternate;
}

@keyframes sway {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* --- Future Step Cards (Flip 3D) --- */
.future-step-card {
    background: transparent; /* コンテナは透明に */
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 2.5rem;
    perspective: 1000px; /* 3D空間の定義 */
    cursor: pointer;
}

.flip-inner {
    position: relative;
    width: 100%;
    /* Grid overlap trick for dynamic height */
    display: grid;
    grid-template-columns: 1fr;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1); /* なめらかな回転 */
    transform-style: preserve-3d;
}

.future-step-card:hover .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    grid-area: 1 / 1; /* 同じセルに配置して重ねる */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* 共通の影 */
    border: 2px solid rgba(206, 147, 216, 0.4);
}

/* 表面のデザイン (種) */
.flip-front {
    background: linear-gradient(135deg, #fff 0%, #fef7ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px; /* ある程度の高さを確保 */
    z-index: 2;
}

.flip-front i.front-icon {
    font-size: 4rem;
    color: var(--flower-purple);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(206, 147, 216, 0.3));
    transition: transform 0.3s ease;
}

.future-step-card:hover .flip-front i.front-icon {
    transform: scale(1.1);
}

.flip-front h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: 'Zen Kaku Gothic New', sans-serif;
}

.flip-front .tap-hint {
    font-size: 0.9rem;
    color: #90a4ae;
    margin-top: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 裏面のデザイン (花/メッセージ) */
.flip-back {
    background: #fff;
    transform: rotateY(180deg);
    display: flex; /* コンテンツが中央に来るのを防ぎ、上寄せにする */
    flex-direction: column;
    justify-content: flex-start; /* 上寄せ */
    text-align: left; /* 左揃え */
    z-index: 1;
}

/* 裏面内のスタイル調整 */
.flip-back .sub-section-title {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(206, 147, 216, 0.4);
    margin-bottom: 1.5rem;
}

/* --- Hero Area Enhancements (Immersive Effects) --- */

/* 1. Dawn/Sunrise Background Animation */
.page-hero {
    position: relative; /* For absolutely positioned particles */
    overflow: hidden;
    background: linear-gradient(135deg, #e1f5fe 0%, #fff 50%, #fff9c4 100%);
    background-size: 400% 400%;
    animation: sunrise 15s ease infinite alternate;
    z-index: 1;
}

@keyframes sunrise {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 2. Particles of Light */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Interact through particles */
    z-index: -1; /* Behind text */
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    animation: float-shine 10s ease-in-out infinite;
}

@keyframes float-shine {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50px) scale(1);
        opacity: 0.3;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
}

/* 3. Title Sprouting Animation */
/* JS will wrap letters in spans */
.sprout-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transform-origin: bottom center;
    animation: sprout 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes sprout {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* --- New Refactored Classes (Extracted from Inline) --- */

/* Intro Section */
.intro-quote-container {
    display: inline-block;
    text-align: center;
}

.quote-text {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.quote-author {
    text-align: right;
    font-weight: bold;
    margin-top: 0.5rem;
}

.buddy-comment {
    margin-top: 1.5rem;
    font-size: 1.0rem;
    color: #795548;
}

.buddy-message {
    display: inline-block;
    border-top: 1px dashed #d7ccc8;
    padding-top: 1rem;
}

/* Fertilizer Section */
.fertilizer-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.fertilizer-col {
    flex: 1;
    min-width: 250px;
}

.good-fertilizer {
    background: #f1f8e9;
    padding: 15px;
    border-radius: 10px;
}

.good-fertilizer h4 {
    color: #558b2f;
}

.bad-fertilizer {
    background: #eceff1;
    padding: 15px;
    border-radius: 10px;
}

.bad-fertilizer h4 {
    color: #455a64;
}

.bad-fertilizer-desc {
    font-size: 0.95rem;
}

/* Icons & Highlights */
.section-text-center {
    text-align: center;
    font-weight: bold;
    margin-top: 1.5rem;
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ff9800;
}

.highlight-box-orange {
    background: #fff;
    border: 2px solid #ff9800;
    color: #e65100;
    margin: 1.5rem 0;
}

.action-highlight-box {
    background: #e8f5e9;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Future/Lists */
.seed-box-future {
    border-left-color: #ce93d8;
}

.future-list-ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.future-check-icon {
    color: #ce93d8;
}

.future-simple-text {
    margin-top: 1rem;
}

/* Final Message */
.final-message-container {
    font-size: 1.1rem;
    line-height: 2;
    margin-top: 3rem;
}

.final-message-box {
    background: #fff;
    border: 4px double #8bc34a;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(139, 195, 74, 0.2);
}

.final-message-text {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 2;
    color: #2e7d32;
    margin: 0;
}

.final-sun-icon {
    color: #fdd835;

    font-size: 2.5rem;
    margin: 10px 0;
}

/* --- Interactive Features --- */

/* 1. Purify Bad Fertilizer */
.purify-trigger {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.purify-trigger:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.click-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #90a4ae;
    font-weight: bold;
    animation: pulse-gray 2s infinite;
}

@keyframes pulse-gray {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.purifying {
    animation: flash-purify 1s ease forwards;
}

@keyframes flash-purify {
    0% { background: #eceff1; transform: scale(1); }
    50% { background: #fff; transform: scale(1.05); filter: brightness(2); }
    100% { background: #fbe9e7; transform: scale(1); } /* End state slightly warm */
}

.purified-state {
    background: #fff3e0 !important; /* Gentle orange/white */
    border: 2px solid #ffcc80;
}

/* 2. Sow Seeds Celebration Button */
.btn-sow-seeds {
    background: linear-gradient(45deg, #8bc34a, #cddc39);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Zen Kaku Gothic New', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-sow-seeds:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.6);
}

.btn-sow-seeds:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-sow-seeds i {
    margin-right: 10px;
}

/* Fog & Message Overlay */
.seed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6); /* Mist-like white */
    backdrop-filter: blur(8px); /* The "Fog" effect */
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease; /* Slow fade */
    display: flex;
    justify-content: center;
    align-items: center;
}

.seed-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 1.5s ease;
}

.seed-overlay.active .overlay-content {
    transform: translateY(0);
}

.overlay-icon {
    font-size: 4rem;
    color: #8bc34a;
    margin-bottom: 2rem;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.overlay-message {
    font-size: 2rem;
    font-weight: bold;
    color: #558b2f;
    line-height: 1.8;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 10px rgba(255,255,255,0.8);
}
