/* =============================================
   sora.garden - Styles
   Botanical garden aesthetic
   ============================================= */

/* --- CSS Variables --- */
:root {
    --ivory-linen: #F5F0E8;
    --parchment-wash: #EDE7D9;
    --loam-dark: #2C3028;
    --bark-gray: #5E6358;
    --moss-deep: #4A6741;
    --sage-smoke: #8B9E7E;
    --petal-blush: #C9A87C;
    --twilight-bower: #1E2A1C;

    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Lora', 'Georgia', serif;
    --font-accent: 'Jost', 'Helvetica Neue', sans-serif;

    --col-gap: clamp(2rem, 4vw, 5rem);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--ivory-linen);
    color: var(--loam-dark);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
}

/* --- Leaf Background Pattern --- */
#leaf-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg opacity='0.025' fill='%234A6741'%3E%3Cpath d='M50,80 Q70,40 90,80 Q70,120 50,80Z' transform='rotate(15,70,80)'/%3E%3Cpath d='M200,50 Q215,20 230,50 Q215,80 200,50Z' transform='rotate(-20,215,50)'/%3E%3Cpath d='M320,120 Q340,90 360,120 Q340,150 320,120Z' transform='rotate(30,340,120)'/%3E%3Cpath d='M80,250 Q100,220 120,250 Q100,280 80,250Z' transform='rotate(-10,100,250)'/%3E%3Cpath d='M250,200 C260,170 290,160 300,190 C310,220 280,240 260,220Z' transform='rotate(45,280,200)'/%3E%3Cpath d='M150,320 Q170,290 190,320 Q170,350 150,320Z' transform='rotate(25,170,320)'/%3E%3Cpath d='M350,300 Q365,275 380,300 Q365,325 350,300Z' transform='rotate(-15,365,300)'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: leafDrift 60s linear infinite;
}

@keyframes leafDrift {
    0% { background-position: 0 0; }
    100% { background-position: -20px 0; }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: 0.03em;
}

.gate-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--loam-dark);
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    color: var(--loam-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.section-subtitle {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    color: var(--bark-gray);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    color: var(--loam-dark);
    margin-bottom: 1.5rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* --- Accent / Labels --- */
.label-text,
.label-date {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bark-gray);
}

.specimen-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--sage-smoke);
}

.light-label .label-text,
.light-label .label-date {
    color: var(--sage-smoke);
}

.light-label {
    border-bottom-color: rgba(139, 158, 126, 0.3);
}

/* --- Navigation: Top Bar --- */
#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, rgba(245, 240, 232, 0.95), rgba(245, 240, 232, 0));
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#top-nav.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.nav-stem {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    position: relative;
}

.nav-stem::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--sage-smoke);
    opacity: 0.4;
    z-index: -1;
}

.nav-leaf {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--bark-gray);
    font-family: var(--font-accent);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease;
    background: var(--ivory-linen);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.nav-leaf:hover {
    color: var(--moss-deep);
    transform: translateY(-2px);
}

.leaf-icon {
    width: 14px;
    height: 14px;
    color: var(--sage-smoke);
    transition: color 0.3s ease;
}

.nav-leaf:hover .leaf-icon {
    color: var(--moss-deep);
}

/* --- Floating Dandelion Nav --- */
#floating-nav {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#floating-nav.visible {
    opacity: 1;
    pointer-events: all;
}

#dandelion-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--sage-smoke);
    border-radius: 50%;
    background: rgba(245, 240, 232, 0.9);
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#dandelion-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(30, 42, 28, 0.1);
}

.dandelion-icon {
    width: 32px;
    height: 32px;
}

#radial-menu {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#floating-nav.menu-open #radial-menu {
    pointer-events: all;
    opacity: 1;
}

.radial-item {
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--loam-dark);
    background: rgba(245, 240, 232, 0.95);
    border: 1px solid var(--sage-smoke);
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    white-space: nowrap;
    transform: translate(
        calc(cos(var(--angle)) * 80px),
        calc(sin(var(--angle)) * -80px)
    );
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#floating-nav.menu-open .radial-item {
    opacity: 1;
}

.radial-item:hover {
    color: var(--moss-deep);
    transform: translate(
        calc(cos(var(--angle)) * 85px),
        calc(sin(var(--angle)) * -85px)
    );
}

/* --- Section Layout --- */
.section-full {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-intimate {
    position: relative;
    z-index: 1;
    padding: clamp(4rem, 8vw, 10rem) clamp(1rem, 3vw, 3rem);
}

/* --- Three Column Grid --- */
.three-col-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.2fr;
    gap: var(--col-gap);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
    width: 100%;
}

.garden-border {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4rem;
}

.main-content-col {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* --- Specimen Cards --- */
.specimen-card {
    background: var(--parchment-wash);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    border-radius: 12px;
    border: 1px solid var(--sage-smoke);
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 8px rgba(44, 48, 40, 0.06);
    position: relative;
}

/* Dew drop effect */
.specimen-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 14px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* --- Glass Cards (Greenhouse) --- */
.glass-card {
    background: rgba(30, 42, 28, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(139, 158, 126, 0.3);
    padding: 2rem 2.5rem;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 14px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.light-text {
    color: var(--ivory-linen);
}

.light-text.section-subtitle {
    color: var(--sage-smoke);
}

/* --- The Gate (Hero) --- */
#gate {
    background: var(--ivory-linen);
    flex-direction: column;
}

.gate-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(237, 231, 217, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.gate-botanical {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.gate-leaves {
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.gate-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 100vh;
    padding-bottom: 8vh;
}

.gate-epigraph {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--bark-gray);
    margin-top: 1.5rem;
    font-style: italic;
    line-height: 1.6;
    max-width: 500px;
}

.gate-scroll-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3rem;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--sage-smoke);
}

.scroll-leaf-icon {
    width: 16px;
    height: 20px;
    margin-top: 8px;
    animation: leafPulse 3s ease-in-out infinite;
}

@keyframes leafPulse {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* --- The Greenhouse (Dark Section) --- */
.dark-section {
    background: var(--twilight-bower);
    padding: clamp(4rem, 8vw, 10rem) 0;
}

.greenhouse-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(139, 158, 126, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Botanical illustrations glow animation */
.glow-stroke {
    animation: strokeGlow 8s ease-in-out infinite;
}

@keyframes strokeGlow {
    0%, 100% { stroke-opacity: 0.4; }
    50% { stroke-opacity: 0.7; }
}

/* --- The Clearing --- */
#clearing {
    background: var(--ivory-linen);
    flex-direction: column;
    padding: clamp(6rem, 12vw, 14rem) clamp(2rem, 6vw, 8rem);
}

.clearing-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg opacity='0.04' fill='%234A6741'%3E%3Cpath d='M50,80 Q70,40 90,80 Q70,120 50,80Z' transform='rotate(15,70,80)'/%3E%3Cpath d='M200,50 Q215,20 230,50 Q215,80 200,50Z' transform='rotate(-20,215,50)'/%3E%3Cpath d='M320,120 Q340,90 360,120 Q340,150 320,120Z' transform='rotate(30,340,120)'/%3E%3Cpath d='M80,250 Q100,220 120,250 Q100,280 80,250Z' transform='rotate(-10,100,250)'/%3E%3Cpath d='M250,200 C260,170 290,160 300,190 C310,220 280,240 260,220Z' transform='rotate(45,280,200)'/%3E%3Cpath d='M150,320 Q170,290 190,320 Q170,350 150,320Z' transform='rotate(25,170,320)'/%3E%3Cpath d='M350,300 Q365,275 380,300 Q365,325 350,300Z' transform='rotate(-15,365,300)'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.clearing-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.clearing-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--loam-dark);
    line-height: 1.3;
    letter-spacing: 0.03em;
    margin-bottom: 2.5rem;
}

.clearing-subtitle {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--bark-gray);
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
}

.clearing-text {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.2vw, 1.2rem);
    line-height: 2;
    color: var(--bark-gray);
    margin-bottom: 2rem;
}

.clearing-spacer {
    height: clamp(4rem, 8vw, 8rem);
}

/* --- The Potting Shed (Footer) --- */
.shed-section {
    background: var(--parchment-wash);
    padding-top: clamp(4rem, 8vw, 8rem);
    padding-bottom: 2rem;
}

.shed-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 3vw, 3rem);
}

.shed-intro {
    max-width: 600px;
    margin-bottom: 3rem;
}

.seed-packets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.seed-packet {
    background: var(--ivory-linen);
    border: 1px solid var(--sage-smoke);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: default;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.seed-packet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 70%);
    border-radius: 50%;
}

.seed-packet:hover {
    transform: translateY(-2px) rotate(0deg) !important;
    box-shadow: 0 6px 20px rgba(44, 48, 40, 0.1);
}

.packet-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.packet-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
}

.packet-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--loam-dark);
    letter-spacing: 0.03em;
}

.packet-detail {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--bark-gray);
    letter-spacing: 0.04em;
}

/* --- Footer --- */
.garden-footer {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.footer-text {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--bark-gray);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --- Botanical Illustrations --- */
.botanical-illustration {
    width: 60px;
    height: auto;
    opacity: 0.6;
}

.glow-illustration {
    opacity: 0.5;
}

/* Path drawing animation */
.botanical-illustration .draw-path path,
.botanical-illustration .draw-path line,
.botanical-illustration .draw-path circle {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2.5s ease-out;
}

.botanical-illustration.drawn .draw-path path,
.botanical-illustration.drawn .draw-path line,
.botanical-illustration.drawn .draw-path circle {
    stroke-dashoffset: 0;
}

/* --- Garden Path Dividers --- */
.garden-path-divider {
    position: relative;
    z-index: 1;
    height: 60px;
    overflow: hidden;
}

.path-svg {
    width: 100%;
    height: 100%;
}

/* --- Botanical Separators --- */
.botanical-separator {
    position: relative;
    z-index: 1;
    height: 80px;
    overflow: hidden;
}

.separator-svg {
    width: 100%;
    height: 100%;
}

/* --- Fade Reveal Animation --- */
.fade-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hover States --- */
a:not(.nav-leaf):not(.radial-item) {
    color: var(--bark-gray);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:not(.nav-leaf):not(.radial-item):hover {
    color: var(--moss-deep);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .three-col-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .garden-border {
        display: none;
    }

    .nav-stem {
        gap: 1rem;
    }

    .nav-leaf span {
        display: none;
    }

    .nav-leaf {
        padding: 0.3rem;
    }

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

    .radial-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .gate-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .seed-packets {
        grid-template-columns: 1fr;
    }

    #top-nav {
        padding: 0.5rem 1rem;
    }

    .nav-stem::before {
        display: none;
    }
}
