/* ============================================
   rinji.org - Editorial Botanical Metropolis
   Hexagonal Honeycomb Layout
   ============================================ */

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

:root {
    --sage-cream: #F0F5E8;
    --forest-deep: #1A3A2A;
    --olive-dark: #3A5A3A;
    --emerald: #2ECC71;
    --teal: #1ABC9C;
    --mint-light: #E8F8F0;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--olive-dark);
    background-color: var(--sage-cream);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--forest-deep);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--emerald);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--teal);
}

/* --- Skeleton Loading Overlay --- */
.skeleton-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--sage-cream);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.skeleton-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skeleton-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 320px;
}

.skeleton-hex {
    width: 80px;
    height: 92px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(
        110deg,
        var(--mint-light) 30%,
        var(--sage-cream) 50%,
        var(--mint-light) 70%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-hex:nth-child(2) { animation-delay: 0.1s; }
.skeleton-hex:nth-child(3) { animation-delay: 0.2s; }
.skeleton-hex:nth-child(4) { animation-delay: 0.3s; }
.skeleton-hex:nth-child(5) { animation-delay: 0.4s; }
.skeleton-hex:nth-child(6) { animation-delay: 0.5s; }
.skeleton-hex:nth-child(7) { animation-delay: 0.6s; }
.skeleton-hex:nth-child(8) { animation-delay: 0.7s; }
.skeleton-hex:nth-child(9) { animation-delay: 0.8s; }

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Header --- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(240, 245, 232, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(58, 90, 58, 0.1);
    transition: box-shadow 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 2px 20px rgba(26, 58, 42, 0.1);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-hex {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 36px;
    height: 32px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--forest-deep);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--olive-dark);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--emerald);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--emerald);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 8px,
            rgba(26, 58, 42, 0.03) 8px,
            rgba(26, 58, 42, 0.03) 9px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(26, 58, 42, 0.03) 8px,
            rgba(26, 58, 42, 0.03) 9px
        ),
        var(--sage-cream);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--forest-deep);
}

.accent-text {
    color: var(--emerald);
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--olive-dark);
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    background: var(--emerald);
    color: var(--sage-cream);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-cta:hover {
    background: var(--teal);
    color: var(--sage-cream);
    transform: translateY(-2px);
}

/* --- Botanical Decorations --- */
.hero-botanical-left,
.hero-botanical-right {
    position: absolute;
    bottom: 0;
    z-index: 1;
}

.hero-botanical-left {
    left: 5%;
}

.hero-botanical-right {
    right: 5%;
}

.botanical-stem {
    width: 3px;
    height: 180px;
    background: var(--olive-dark);
    margin: 0 auto;
    border-radius: 2px;
    opacity: 0.4;
}

.botanical-leaf {
    width: 40px;
    height: 20px;
    background: var(--emerald);
    border-radius: 50% 0 50% 0;
    position: absolute;
    opacity: 0.5;
    transform-origin: left center;
}

.hero-botanical-left .leaf-1 {
    top: 40px;
    left: 50%;
    transform: rotate(-30deg);
}

.hero-botanical-left .leaf-2 {
    top: 80px;
    right: 50%;
    transform: rotate(210deg);
}

.hero-botanical-left .leaf-3 {
    top: 120px;
    left: 50%;
    transform: rotate(-20deg);
}

.hero-botanical-right .leaf-1 {
    top: 60px;
    right: 50%;
    transform: rotate(200deg);
}

.hero-botanical-right .leaf-2 {
    top: 110px;
    left: 50%;
    transform: rotate(-40deg);
}

/* Botanical Flower (CSS-drawn) */
.botanical-flower,
.card-flower,
.deco-flower {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.petal {
    position: absolute;
    width: 22px;
    height: 40px;
    background: var(--emerald);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform-origin: center bottom;
    opacity: 0.6;
}

.petal.p1 { transform: translate(-50%, -100%) rotate(0deg); }
.petal.p2 { transform: translate(-50%, -100%) rotate(72deg); }
.petal.p3 { transform: translate(-50%, -100%) rotate(144deg); }
.petal.p4 { transform: translate(-50%, -100%) rotate(216deg); }
.petal.p5 { transform: translate(-50%, -100%) rotate(288deg); }

.flower-center {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--teal);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.flower-alt .petal {
    background: var(--teal);
}

.flower-alt .flower-center {
    background: var(--emerald);
}

.flower-teal .petal {
    background: var(--olive-dark);
    opacity: 0.4;
}

.flower-teal .flower-center {
    background: var(--teal);
}

.large-flower {
    width: 100px;
    height: 100px;
}

.large-flower .petal {
    width: 36px;
    height: 66px;
}

.large-flower .flower-center {
    width: 26px;
    height: 26px;
}

/* --- Section Shared Styles --- */
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--forest-deep);
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--olive-dark);
    font-size: 1.05rem;
}

/* --- Honeycomb Grid Section --- */
.honeycomb-section {
    padding: 5rem 2rem;
    background: var(--sage-cream);
}

.honeycomb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.honeycomb-grid .hex-cell:nth-child(n+5) {
    grid-column: span 1;
}

/* Stagger odd rows */
.honeycomb-grid .hex-cell:nth-child(5),
.honeycomb-grid .hex-cell:nth-child(6),
.honeycomb-grid .hex-cell:nth-child(7) {
    transform: translateX(calc(50% / 4));
}

.hex-cell {
    aspect-ratio: 1 / 1.15;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.4s ease;
}

.hex-cell:hover {
    transform: scale(1.05);
}

.honeycomb-grid .hex-cell:nth-child(5):hover,
.honeycomb-grid .hex-cell:nth-child(6):hover,
.honeycomb-grid .hex-cell:nth-child(7):hover {
    transform: translateX(calc(50% / 4)) scale(1.05);
}

.hex-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.city-bg {
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.06) 8px,
            rgba(0, 0, 0, 0.06) 9px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.06) 8px,
            rgba(0, 0, 0, 0.06) 9px
        ),
        var(--mint-light);
}

.hex-content {
    position: relative;
    z-index: 2;
}

.hex-icon {
    margin-bottom: 0.75rem;
}

.hex-content h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--forest-deep);
    margin-bottom: 0.4rem;
}

.hex-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--olive-dark);
}

/* Reveal animation for hex cells */
.hex-cell--reveal {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hex-cell--reveal.visible {
    opacity: 1;
    transform: scale(1);
}

.honeycomb-grid .hex-cell:nth-child(5).visible,
.honeycomb-grid .hex-cell:nth-child(6).visible,
.honeycomb-grid .hex-cell:nth-child(7).visible {
    transform: translateX(calc(50% / 4)) scale(1);
}

/* --- Resources Section --- */
.resources-section {
    padding: 5rem 2rem;
    background: var(--mint-light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.resource-card {
    background: var(--sage-cream);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 58, 42, 0.12);
}

.resource-card-botanical {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.03) 8px,
            rgba(0, 0, 0, 0.03) 9px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(0, 0, 0, 0.03) 8px,
            rgba(0, 0, 0, 0.03) 9px
        ),
        linear-gradient(135deg, var(--mint-light), var(--sage-cream));
    min-height: 160px;
}

.resource-card-content {
    padding: 1.5rem 2rem 2rem;
    flex: 1;
}

.resource-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--emerald);
    color: var(--sage-cream);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resource-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: var(--forest-deep);
}

.resource-card-content p {
    font-size: 0.95rem;
    color: var(--olive-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.resource-link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--teal);
    transition: color 0.3s ease;
}

.resource-card:hover .resource-link {
    color: var(--emerald);
}

/* Reveal animation for resource cards */
.resource-card--reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Community Section --- */
.community-section {
    padding: 5rem 2rem;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 8px,
            rgba(26, 58, 42, 0.02) 8px,
            rgba(26, 58, 42, 0.02) 9px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 8px,
            rgba(26, 58, 42, 0.02) 8px,
            rgba(26, 58, 42, 0.02) 9px
        ),
        var(--sage-cream);
}

.community-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.community-text .section-title {
    text-align: left;
}

.community-desc {
    font-size: 1.05rem;
    color: var(--olive-dark);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.community-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--emerald);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--olive-dark);
    margin-top: 0.2rem;
}

.community-cta {
    margin-top: 0;
}

/* Mini honeycomb decoration */
.community-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-honeycomb {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 8px;
    justify-items: center;
}

.mini-hex {
    width: 100px;
    height: 115px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.4s ease;
}

.mini-hex:hover {
    transform: scale(1.1);
}

.mh1 {
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    opacity: 0.8;
}

.mh2 {
    background: var(--mint-light);
    border: 2px solid var(--emerald);
}

.mh3 {
    background: linear-gradient(135deg, var(--teal), var(--emerald));
    opacity: 0.6;
}

.mh4 {
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 6px,
            rgba(0,0,0,0.08) 6px,
            rgba(0,0,0,0.08) 7px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 6px,
            rgba(0,0,0,0.08) 6px,
            rgba(0,0,0,0.08) 7px
        ),
        var(--mint-light);
    grid-column: 1 / 2;
    transform: translateX(50%);
}

.mh5 {
    background: var(--emerald);
    opacity: 0.5;
    transform: translateX(50%);
}

.mh6 {
    background: linear-gradient(135deg, var(--mint-light), var(--teal));
    opacity: 0.7;
    transform: translateX(50%);
}

.mh7 {
    background: var(--forest-deep);
    opacity: 0.3;
    grid-column: 2 / 3;
}

.mh4:hover { transform: translateX(50%) scale(1.1); }
.mh5:hover { transform: translateX(50%) scale(1.1); }
.mh6:hover { transform: translateX(50%) scale(1.1); }

/* --- About Section --- */
.about-section {
    padding: 5rem 2rem;
    background: var(--mint-light);
}

.about-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--olive-dark);
    margin-bottom: 1.2rem;
}

.about-botanical-decoration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.deco-leaf {
    position: absolute;
    width: 50px;
    height: 24px;
    background: var(--emerald);
    border-radius: 50% 0 50% 0;
    opacity: 0.5;
}

.dl1 {
    top: 20%;
    left: 10%;
    transform: rotate(-30deg);
}

.dl2 {
    bottom: 20%;
    right: 10%;
    transform: rotate(150deg);
}

.dl3 {
    top: 50%;
    right: 5%;
    transform: rotate(-60deg);
}

/* --- Footer --- */
.site-footer {
    background: var(--forest-deep);
    padding: 3rem 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand .logo-text {
    color: var(--sage-cream);
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--teal);
    margin-top: 0.2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--mint-light);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--emerald);
}

.footer-copy p {
    font-size: 0.8rem;
    color: rgba(240, 245, 232, 0.6);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .honeycomb-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem 0.5rem;
    }

    .honeycomb-grid .hex-cell:nth-child(5),
    .honeycomb-grid .hex-cell:nth-child(6),
    .honeycomb-grid .hex-cell:nth-child(7) {
        transform: none;
    }

    .honeycomb-grid .hex-cell:nth-child(5):hover,
    .honeycomb-grid .hex-cell:nth-child(6):hover,
    .honeycomb-grid .hex-cell:nth-child(7):hover {
        transform: scale(1.05);
    }

    .honeycomb-grid .hex-cell:nth-child(5).visible,
    .honeycomb-grid .hex-cell:nth-child(6).visible,
    .honeycomb-grid .hex-cell:nth-child(7).visible {
        transform: none;
    }

    .community-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .community-text .section-title {
        text-align: center;
    }

    .community-stats {
        justify-content: center;
    }

    .community-text {
        text-align: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-botanical-decoration {
        display: none;
    }
}

@media (max-width: 640px) {
    .main-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .honeycomb-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .community-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-botanical-left,
    .hero-botanical-right {
        display: none;
    }

    .mini-honeycomb {
        grid-template-columns: repeat(3, 70px);
    }

    .mini-hex {
        width: 70px;
        height: 80px;
    }
}
