/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Zen+Old+Mincho:wght@400;700;900&family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root {
    /* Color Palette: Seasons of Growth */
    --color-bg-paper: #F9F8F4; /* Washi paper off-white */
    --color-text-primary: #4A4036; /* Warm deep brown */
    --color-text-light: #7D7268;
    
    --color-accent-growth: #6B8E23; /* Olive Drab / Sprout Green */
    --color-accent-sun: #E6A23C; /* Warm Sun Orange */
    --color-accent-spring: #FFB7C5; /* Cherry Blossom Pink (Subtle) */
    
    --font-heading: 'Zen Old Mincho', serif;
    --font-body: 'Zen Maru Gothic', sans-serif;
    
    --spacing-section: 6rem;
}

body {
    background-color: var(--color-bg-paper);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.8;
}

/* Page Header - Hero Section */
.page-header {
    margin-bottom: 4rem;
    text-align: center;
    padding: 6rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(249,248,244,0.1) 100%),
                url('https://images.unsplash.com/photo-1518531933037-9a82bf552d6a?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 50% 50% / 4%;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(249, 248, 244, 0.85);
    z-index: 0;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
    background: linear-gradient(to right, #4A4036, #6B8E23);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-accent-growth);
    font-weight: 700;
    margin-top: 0.5rem;
    display: block;
    letter-spacing: 0.1em;
}

/* Floating Particles (New) */
.particles-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(230,162,60,0.3) 100%);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatUp 15s infinite linear;
}

.particle:nth-child(1) { width: 10px; height: 10px; left: 10%; bottom: -10px; animation-duration: 20s; animation-delay: 0s; }
.particle:nth-child(2) { width: 15px; height: 15px; left: 30%; bottom: -15px; animation-duration: 25s; animation-delay: 2s; }
.particle:nth-child(3) { width: 8px; height: 8px; left: 60%; bottom: -8px; animation-duration: 18s; animation-delay: 5s; }
.particle:nth-child(4) { width: 20px; height: 20px; left: 80%; bottom: -20px; animation-duration: 22s; animation-delay: 1s; }
.particle:nth-child(5) { width: 12px; height: 12px; left: 45%; bottom: -12px; animation-duration: 28s; animation-delay: 8s; }

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-300px) rotate(360deg); opacity: 0; }
}

/* Main Content Styling */
.content-block {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Intro Lead */
.intro-lead {
    font-size: 1.35rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 3rem; /* Reduced for wave */
    padding: 2rem;
    border-left: 4px solid var(--color-accent-growth);
    border-right: 4px solid var(--color-accent-growth);
    background: #fff;
    box-shadow: 0 10px 30px rgba(107, 142, 35, 0.1);
    border-radius: 8px;
    line-height: 2;
}

.author-name {
    display: inline-block;
    white-space: nowrap;
    font-weight: 700;
    color: var(--color-accent-growth);
}

/* Wave Divider (New) */
.wave-divider {
    overflow: hidden;
    line-height: 0;
    margin-bottom: 3rem;
    opacity: 0.6;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}

.wave-divider .shape-fill {
    fill: var(--color-accent-growth);
    fill-opacity: 0.2;
}

/* Headings */
h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent-growth);
    margin-top: var(--spacing-section);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '✵';
    display: block;
    font-size: 1.5rem;
    color: var(--color-accent-sun);
    margin-top: 0.5rem;
    line-height: 1;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--color-accent-sun);
    padding-left: 1rem;
}

/* Paragraphs */
p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    text-justify: inter-ideograph;
}

/* --- Interactive Elements: Wisdom Flip Cards --- */
.quotes-section {
    margin: 5rem 0;
    text-align: center;
}

.quotes-section h2 {
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}
.quotes-section h2::after { content: none; }

.instruction-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    opacity: 0.8;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 250px; /* Card height */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 16px;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flip-card-front {
    background: linear-gradient(135deg, #fff 0%, #F0F4E8 100%);
    color: var(--color-text-primary);
    border: 2px solid rgba(107, 142, 35, 0.1);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.flip-card-front span {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-accent-growth);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--color-accent-growth) 0%, #556B2F 100%); /* Green gradient */
    color: white;
    transform: rotateY(180deg);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.flip-card-back p {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* Closing Message (Resonant Design) */
.closing-message {
    margin-top: 8rem;
    margin-bottom: 6rem;
    padding: 4rem 2rem;
    background: linear-gradient(145deg, #fff, #FDFCF5);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(107, 142, 35, 0.15);
    text-align: center;
    position: relative;
    border: 1px solid rgba(230, 162, 60, 0.2);
    overflow: hidden;
}

/* Spotlight effect */
.closing-message::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(230, 162, 60, 0.05) 0%, transparent 70%);
    animation: rotateSpotlight 20s linear infinite;
    pointer-events: none;
}

.closing-message p {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 2.2;
    color: var(--color-text-primary);
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Heartbeat Resonance */
.closing-message p strong, 
.closing-message .author-name {
    color: var(--color-accent-growth);
}

.closing-message:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 70px rgba(107, 142, 35, 0.25);
    transition: all 0.5s ease;
}

@keyframes rotateSpotlight {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Navigation Buttons */
.page-nav-3btn {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.nav-btn.list {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--color-text-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-btn.list:hover {
    background-color: var(--color-accent-growth);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 142, 35, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-block > *, 
.page-header,
.quotes-section,
.closing-message {
    animation: fadeInUp 1s ease-out forwards;
}

.page-header { animation-delay: 0.1s; }
.intro-lead { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
h2 { animation-delay: 0.5s; opacity: 0; animation-fill-mode: forwards; }

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.2rem;
    }
    .intro-lead {
        font-size: 1.1rem;
        padding: 1.5rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    /* Mobile card adjustments */
    .quotes-section h2 {
        font-size: 1.8rem;
    }
    .flip-card {
        height: 200px;
    }
    .flip-card-back p {
        font-size: 1.2rem;
    }
}

/* Sidebar Fortune Reveal */
.sidebar-advice.fortune-mode {
    background: #fff;
    border: 2px dashed var(--color-accent-growth);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fortune-trigger {
    background: var(--color-accent-sun);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 700;
    transition: transform 0.2s;
    animation: pulse 2s infinite;
}

.fortune-trigger:hover {
    transform: scale(1.05);
}

.fortune-content {
    background: #F0F4E8;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fortune-close {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
    cursor: pointer;
    text-decoration: underline;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Footer Styling (Added) */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(107, 142, 35, 0.1);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.site-footer p {
    text-align: center;
}
