/* sora.garden — Digital Garden for Personal Knowledge */
/* Palette: #FAF8F4 Garden Cream, #F0EBE0 Warm Soil, #3D3D3D Root Dark,
   #6B6B6B Bark Gray, #4A8C6A Leaf Green, #8BC48A Sprout Light,
   #6BAA6B Budding Green, #D4C5A9 Sand Path, #FFFFFF Clean White, #2D6B4A Deep Evergreen */

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    background: #FAF8F4;
    color: #6B6B6B;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
.section-heading {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.25;
    color: #3D3D3D;
    text-align: center;
    margin-bottom: 2rem;
}

/* ── Leaf Icon ── */
.leaf-icon {
    width: 12px;
    height: 12px;
    background: #4A8C6A;
    border-radius: 0 50% 50% 50%;
    transform: rotate(-45deg);
    display: inline-block;
    flex-shrink: 0;
}

/* ── Hero / The Gate ── */
.hero {
    max-width: 640px;
    margin: 0 auto;
    padding: 5rem 2rem 2.5rem;
}

.hero-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 2.6rem);
    line-height: 1.25;
    color: #3D3D3D;
    margin-bottom: 0.75rem;
}

.hero-tagline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.75rem;
}

.tagline-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #6B6B6B;
}

/* ── Search ── */
.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    max-width: 400px;
    background: #FFFFFF;
    border: 1px solid #D4C5A9;
    border-radius: 6px;
    padding: 0.65rem 1rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    color: #3D3D3D;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input::placeholder {
    color: #D4C5A9;
}

.search-input:focus {
    border-color: #4A8C6A;
    box-shadow: 0 0 0 3px rgba(74, 140, 106, 0.08);
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-width: 400px;
    background: #FFFFFF;
    border: 1px solid #D4C5A9;
    border-radius: 6px;
    display: none;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(61, 61, 61, 0.08);
    z-index: 10;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.6rem 1rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    color: #3D3D3D;
    cursor: pointer;
    border-bottom: 1px solid #F0EBE0;
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #F0EBE0;
}

.search-result-item .result-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    margin-left: 0.5rem;
}

/* ── Recently Planted / The Beds ── */
.recent {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
}

.note-list {
    display: flex;
    flex-direction: column;
}

.note-entry {
    border-bottom: 1px solid #D4C5A9;
    padding: 1rem 0;
    transition: background 0.2s ease;
    cursor: pointer;
}

.note-entry:hover {
    background: rgba(240, 235, 224, 0.4);
}

.note-entry:last-child {
    border-bottom: none;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.note-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.25;
    color: #3D3D3D;
    transition: color 0.2s ease;
}

.note-entry:hover .note-title {
    color: #4A8C6A;
}

/* ── Growth Stage Badges ── */
.badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.badge-icon {
    width: 6px;
    height: 6px;
    border-radius: 0 50% 50% 50%;
    transform: rotate(-45deg);
    display: inline-block;
}

.badge-seedling {
    background: rgba(139, 196, 138, 0.15);
    color: #8BC48A;
}

.badge-icon-seedling {
    background: #8BC48A;
}

.badge-budding {
    background: rgba(107, 170, 107, 0.15);
    color: #6BAA6B;
}

.badge-icon-budding {
    background: #6BAA6B;
}

.badge-evergreen {
    background: rgba(74, 140, 106, 0.15);
    color: #2D6B4A;
}

.badge-icon-evergreen {
    background: #2D6B4A;
}

/* ── Note Meta ── */
.note-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.note-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: #6B6B6B;
}

.note-links {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: #4A8C6A;
}

/* ── Garden Map / The Map ── */
.garden-map {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.cluster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cluster-card {
    background: #F0EBE0;
    border: 1px solid #D4C5A9;
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

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

.cluster-name {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.25;
    color: #3D3D3D;
    margin-bottom: 0.25rem;
}

.cluster-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: #6B6B6B;
    display: block;
    margin-bottom: 0.5rem;
}

.cluster-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 40px;
}

.cluster-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4A8C6A;
    display: inline-block;
    margin: 1px;
    transition: transform 0.2s ease;
}

.cluster-card:hover .cluster-dot {
    transform: scale(1.3);
}

/* ── Featured Evergreen ── */
.featured {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.featured-card {
    background: #F0EBE0;
    border: 1px solid #D4C5A9;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.featured-card:hover {
    box-shadow: 0 6px 20px rgba(61, 61, 61, 0.06);
}

.featured-badge {
    margin-bottom: 0.75rem;
}

.featured-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.25;
    color: #3D3D3D;
    margin-bottom: 0.75rem;
}

.featured-preview {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.7;
    color: #6B6B6B;
    margin-bottom: 1.25rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.featured-link {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #4A8C6A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-link:hover {
    color: #2D6B4A;
}

/* ── Footer / The Path ── */
.footer {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #D4C5A9;
}

.footer-leaf {
    display: block;
    margin: 0 auto 0.75rem;
}

.footer-tagline {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #6B6B6B;
    margin-bottom: 0.75rem;
}

.footer-rss {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #6B6B6B;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.footer-rss:hover {
    color: #4A8C6A;
}

/* ── RSS Icon ── */
.rss-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    position: relative;
}

.rss-icon::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #6B6B6B;
    transition: background 0.2s ease;
}

.rss-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border: 2px solid #6B6B6B;
    border-radius: 0 0 0 50%;
    border-top: none;
    border-right: none;
    transition: border-color 0.2s ease;
}

.footer-rss:hover .rss-icon::before {
    background: #4A8C6A;
}

.footer-rss:hover .rss-icon::after {
    border-color: #4A8C6A;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero {
        padding: 3.5rem 1.5rem 2rem;
    }

    .recent,
    .garden-map,
    .featured,
    .footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .cluster-grid {
        grid-template-columns: 1fr;
    }

    .search-input {
        max-width: 100%;
    }

    .search-results {
        max-width: 100%;
    }
}

/* ── Fade In Animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Note Entry Stagger ── */
.note-entry {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s ease;
}

.note-entry.note-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Cluster Card Stagger ── */
.cluster-card {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease 0s, box-shadow 0.2s ease;
}

.cluster-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

.cluster-card.card-visible:hover {
    transform: translateY(-2px);
}
