/* ==============================================
   paragram.dev — Cottagecore Neon Garden
   Colors: #FFF8F0, #FDF6EC, #2A2018, #5A4838,
           #F080A0, #A0F080, #80A0F0, #8A7A60
   Fonts: Poiret One (display), Nunito (body)
   Layout: Z-pattern
   ============================================== */

/* ---- CSS Custom Properties for border-animate ---- */
@property --border-hue {
    syntax: '<number>';
    initial-value: 0;
    inherits: false;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FDF6EC;
    color: #5A4838;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* ---- Typography ---- */
.display-heading {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    color: #2A2018;
    line-height: 1.15;
    letter-spacing: 0.04em;
}

.garden-label {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    color: #F080A0;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    color: #5A4838;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
}

/* ---- Floral SVG Frames (garden-gate ironwork) ---- */
.floral-frame {
    position: fixed;
    width: 180px;
    height: 180px;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.floral-frame.visible {
    opacity: 0.1;
}

.floral-frame--top-left {
    top: 0;
    left: 0;
}

.floral-frame--top-right {
    top: 0;
    right: 0;
}

.floral-frame--bottom-left {
    bottom: 0;
    left: 0;
}

.floral-frame--bottom-right {
    bottom: 0;
    right: 0;
}

.floral-frame svg {
    width: 100%;
    height: 100%;
}

/* ---- Z-Pattern Layout ---- */
.z-section {
    min-height: 100vh;
    padding: 60px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.z-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 30px;
    max-width: 1100px;
    width: 100%;
}

/* Z-pattern node positions */
.z-node--top-left {
    grid-column: 1;
    grid-row: 1;
}

.z-node--top-right {
    grid-column: 2;
    grid-row: 1;
}

.z-node--center {
    grid-column: 1 / -1;
    grid-row: 2;
}

.z-node--bottom-left {
    grid-column: 1;
    grid-row: 3;
}

.z-node--bottom-right {
    grid-column: 2;
    grid-row: 3;
}

/* ---- Garden Cards (border-animate living edges) ---- */
.garden-card {
    background: #FFF8F0;
    border: 2px solid #F080A0;
    border-radius: 6px;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    animation: borderCycle 6s linear infinite;
}

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

@keyframes borderCycle {
    0%    { border-color: #F080A0; }
    33%   { border-color: #A0F080; }
    66%   { border-color: #80A0F0; }
    100%  { border-color: #F080A0; }
}

.garden-card__inner {
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

.garden-card--transition {
    background: transparent;
    border: none;
    animation: none;
    text-align: center;
}

.garden-card--transition .garden-card__inner {
    padding: 20px 36px;
}

/* ---- Neon Glow ---- */
.garden-card:not(.garden-card--transition) {
    box-shadow:
        0 0 20px rgba(240, 128, 160, 0.12),
        0 0 40px rgba(240, 128, 160, 0.06);
}

.garden-card:not(.garden-card--transition):hover {
    box-shadow:
        0 0 25px rgba(240, 128, 160, 0.2),
        0 0 50px rgba(240, 128, 160, 0.1);
}

/* ---- Hero specifics ---- */
.z-hero {
    padding-top: 80px;
}

#node-hero {
    grid-column: 1 / -1;
    text-align: center;
}

#node-hero .garden-card__inner {
    padding: 60px 40px 50px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6rem);
    text-shadow:
        0 0 30px rgba(240, 128, 160, 0.25),
        0 0 60px rgba(240, 128, 160, 0.1);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.neon-bloom {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 128, 160, 0.12) 0%, rgba(240, 128, 160, 0) 70%);
    z-index: 1;
    pointer-events: none;
    animation: bloomPulse 4s ease-in-out infinite;
}

@keyframes bloomPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* ---- Vine Dividers ---- */
.vine-divider {
    width: 300px;
    max-width: 80%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.vine-svg {
    width: 100%;
    height: auto;
}

.vine-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: vineGrow 3s ease forwards;
}

@keyframes vineGrow {
    to {
        stroke-dashoffset: 0;
    }
}

.vine-flower {
    opacity: 0;
    animation: flowerBloom 0.6s ease forwards;
}

.vine-flower:nth-child(2) { animation-delay: 1.5s; }
.vine-flower:nth-child(3) { animation-delay: 2s; }
.vine-flower:nth-child(4) { animation-delay: 2.5s; }

@keyframes flowerBloom {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Diagonal Vine (center transition) ---- */
.diagonal-vine {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 10px;
}

.diagonal-vine-svg {
    width: 100%;
    height: auto;
}

.transition-label {
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.2em;
}

/* ---- Neon Dots (decorative accents) ---- */
.neon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    bottom: 20px;
    right: 24px;
}

.neon-dot--rose {
    background: #F080A0;
    box-shadow: 0 0 12px rgba(240, 128, 160, 0.5), 0 0 24px rgba(240, 128, 160, 0.25);
}

.neon-dot--leaf {
    background: #A0F080;
    box-shadow: 0 0 12px rgba(160, 240, 128, 0.5), 0 0 24px rgba(160, 240, 128, 0.25);
}

.neon-dot--cornflower {
    background: #80A0F0;
    box-shadow: 0 0 12px rgba(128, 160, 240, 0.5), 0 0 24px rgba(128, 160, 240, 0.25);
}

.neon-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid;
    border-color: inherit;
    opacity: 0.3;
    animation: neonRing 2s ease-in-out infinite;
}

@keyframes neonRing {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.6); opacity: 0; }
}

/* ---- Second Section (Deeper Garden) ---- */
.z-deeper {
    background: linear-gradient(180deg, #FDF6EC 0%, #FFF8F0 50%, #FDF6EC 100%);
}

.z-deeper .garden-card:not(.garden-card--transition) {
    box-shadow:
        0 0 20px rgba(160, 240, 128, 0.1),
        0 0 40px rgba(160, 240, 128, 0.05);
}

.z-deeper .garden-card:not(.garden-card--transition):hover {
    box-shadow:
        0 0 25px rgba(160, 240, 128, 0.18),
        0 0 50px rgba(160, 240, 128, 0.09);
}

/* ---- Garden Floor (Final Section) ---- */
.z-floor {
    min-height: 50vh;
    background: #FDF6EC;
    text-align: center;
    flex-direction: column;
}

.garden-floor__content {
    max-width: 700px;
    width: 100%;
}

.floor-vine {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
}

.floor-vine-svg {
    width: 100%;
    height: auto;
}

.floor-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 16px;
    text-shadow:
        0 0 20px rgba(240, 128, 160, 0.15),
        0 0 40px rgba(240, 128, 160, 0.07);
}

.floor-text {
    max-width: 480px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.floor-neon-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.floor-neon {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.floor-neon--rose {
    background: #F080A0;
    box-shadow: 0 0 10px rgba(240, 128, 160, 0.5);
}

.floor-neon--leaf {
    background: #A0F080;
    box-shadow: 0 0 10px rgba(160, 240, 128, 0.5);
}

.floor-neon--cornflower {
    background: #80A0F0;
    box-shadow: 0 0 10px rgba(128, 160, 240, 0.5);
}

/* ---- Scroll-triggered fade-in for all cards ---- */
.garden-card {
    transition-delay: 0s;
}

.z-node--top-left.garden-card.visible {
    transition-delay: 0s;
}

.z-node--top-right.garden-card.visible {
    transition-delay: 0.15s;
}

.z-node--center.garden-card.visible {
    transition-delay: 0.3s;
}

.z-node--bottom-left.garden-card.visible {
    transition-delay: 0.4s;
}

.z-node--bottom-right.garden-card.visible {
    transition-delay: 0.55s;
}

/* ---- Floor section fade ---- */
.garden-floor__content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.garden-floor__content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .z-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }

    .z-node--top-left,
    .z-node--top-right,
    .z-node--center,
    .z-node--bottom-left,
    .z-node--bottom-right {
        grid-column: 1;
        grid-row: auto;
    }

    #node-hero .garden-card__inner {
        padding: 40px 24px 36px;
    }

    .garden-card__inner {
        padding: 30px 24px;
    }

    .z-section {
        padding: 40px 16px;
    }

    .floral-frame {
        width: 100px;
        height: 100px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }
}
