/* thesecond.day — Scandinavian Functional */

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #FAFAF7;
    color: #2C2C2C;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   SHARED UTILITIES
   ======================================== */
.section-title {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

.linen {
    background: #F5F2EB;
}

.section-rule {
    border: none;
    border-top: 1px solid #E8E4DD;
    margin: 0 auto;
    max-width: 200px;
}

.divider {
    border: none;
    border-top: 1px solid #E8E4DD;
    margin: 48px auto;
    max-width: 200px;
}

/* ========================================
   FADE-IN ANIMATIONS
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered children within visible sections */
.fade-in.visible .feature-block:nth-child(1) { transition-delay: 0s; }
.fade-in.visible .feature-block:nth-child(2) { transition-delay: 0.1s; }
.fade-in.visible .feature-block:nth-child(3) { transition-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .fade-in.visible .feature-block {
        transition-delay: 0s;
    }
    .carousel-track {
        transition: none;
    }
}

/* ========================================
   HERO ZONE
   ======================================== */
.hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.hero-inner {}

.hero-title {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 2.25rem;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.hero-sub {
    font-size: 1.05rem;
    color: #6B6B6B;
    max-width: 480px;
    margin: 0 auto;
}

.concepts {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
}

.concept {
    text-align: center;
    transition: transform 0.3s ease;
}

.concept:hover {
    transform: translateY(-2px);
}

.concept-icon {
    display: block;
    margin: 0 auto 0.5rem;
}

.concept-label {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #D4A574;
    letter-spacing: 0.02em;
}

/* ========================================
   PHILOSOPHY — FEATURE BLOCKS
   ======================================== */
.philosophy {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.philosophy-inner {}

.feature-block {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible .feature-block {
    opacity: 1;
    transform: translateY(0);
}

.feature-dot {
    width: 6px;
    height: 6px;
    background: #8BA888;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.65rem;
}

.feature-text {}

.feature-title {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    color: #2C2C2C;
    margin-bottom: 0.35rem;
}

.feature-desc {
    font-size: 0.95rem;
    color: #6B6B6B;
    line-height: 1.7;
}

/* ========================================
   PRACTICE — DAILY REFLECTION PROMPT
   ======================================== */
.practice {
    padding: 4rem 2rem;
}

.practice-inner {
    max-width: 720px;
    margin: 0 auto;
}

.prompt-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.prompt-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.prompt-label {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #D4A574;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 1rem;
}

.prompt-question {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: #2C2C2C;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prompt-date {
    font-size: 0.8rem;
    color: #6B6B6B;
}

/* ========================================
   JOURNAL — PROGRESS JOURNAL INTERFACE
   ======================================== */
.journal {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.journal-inner {}

.journal-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Calendar Widget */
.journal-calendar {
    flex-shrink: 0;
    width: 240px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 1.25rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cal-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cal-nav:hover {
    background: #F5F2EB;
}

.cal-month {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #2C2C2C;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    text-align: center;
    margin-bottom: 0.25rem;
}

.calendar-weekdays span {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    color: #6B6B6B;
    padding: 4px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    text-align: center;
}

.cal-day {
    font-size: 0.8rem;
    color: #2C2C2C;
    padding: 6px 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.cal-day:hover {
    background: #F5F2EB;
}

.cal-day.today {
    background: #D4A574;
    color: #FFFFFF;
}

.cal-day.has-entry {
    position: relative;
}

.cal-day.has-entry::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8BA888;
}

.cal-day.empty {
    visibility: hidden;
}

/* Journal Entry Form */
.journal-entry {
    flex: 1;
}

.journal-label {
    display: block;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: #6B6B6B;
    margin-bottom: 0.5rem;
}

.journal-input {
    display: block;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #2C2C2C;
    background: #FFFFFF;
    border: 1px solid #E8E4DD;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.journal-input:focus {
    border-color: #D4A574;
}

.journal-input::placeholder {
    color: #C5C0B8;
}

.journal-textarea {
    display: block;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #2C2C2C;
    background: #FFFFFF;
    border: 1px solid #E8E4DD;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.3s ease;
}

.journal-textarea:focus {
    border-color: #D4A574;
}

.journal-textarea::placeholder {
    color: #C5C0B8;
}

.journal-save {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #FFFFFF;
    background: #D4A574;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.75rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.15s ease;
}

.journal-save:hover {
    background: #C49464;
}

.journal-save:active {
    transform: scale(0.98);
}

.journal-save.saved {
    background: #8BA888;
}

/* ========================================
   COMMUNITY STORIES — CAROUSEL
   ======================================== */
.stories {
    padding: 4rem 2rem;
}

.stories-inner {
    max-width: 720px;
    margin: 0 auto;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-btn {
    background: #FFFFFF;
    border: 1px solid #E8E4DD;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.carousel-btn:hover {
    background: #F5F2EB;
    border-color: #D4A574;
}

.carousel-track-container {
    overflow: hidden;
    flex: 1;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    transition: transform 0.5s ease;
}

.story-card {
    flex: 0 0 calc(33.333% - 0.833rem);
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.story-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.story-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F5F2EB;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-name {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.story-excerpt {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #6B6B6B;
    line-height: 1.6;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.25rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E8E4DD;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #D4A574;
}

/* ========================================
   CLOSING QUOTE
   ======================================== */
.closing {
    padding: 5rem 2rem;
    text-align: center;
    background-color: #FAFAF7;
    transition: background-color 0.5s;
}

.closing-inner {
    max-width: 720px;
    margin: 0 auto;
}

.closing-quote {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: #2C2C2C;
    line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid #E8E4DD;
}

.footer-inner {}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    margin-bottom: 1rem;
}

.flink {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: #D4A574;
    text-decoration: none;
    transition: color 0.2s;
}

.flink:hover {
    color: #C49464;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.2s;
}

.social-icon:hover {
    background: #F5F2EB;
}

.footer-copy {
    font-size: 0.75rem;
    color: #6B6B6B;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .concepts {
        gap: 2rem;
    }

    .philosophy {
        padding: 0 1.5rem 3rem;
    }

    .journal-layout {
        flex-direction: column;
    }

    .journal-calendar {
        width: 100%;
    }

    .story-card {
        flex: 0 0 calc(100% - 0rem);
    }

    .carousel-btn {
        display: none;
    }

    .carousel-track-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .carousel-track {
        transition: none;
    }

    .carousel-track .story-card {
        scroll-snap-align: start;
        flex: 0 0 85%;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .closing-quote {
        font-size: 1.25rem;
    }
}
