/* ========================================
   GreenNext-style hero — reference colours and layout
   ======================================== */
:root {
    --hero-bg: #FFFFFF;
    --hero-charcoal: #2C2C2C;
    --hero-text-light: #6B6B6B;
    --hero-green: #2D7A4A;
    --hero-grid: rgba(0, 0, 0, 0.2);
    --hero-grid-size: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: white;
}

/* Sticky nav — appears after scrolling past hero */
.scroll-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 20px rgba(44, 44, 44, 0.08);
    transform: translateY(-100%);
    transition: transform 0.35s ease-out;
}

.scroll-nav.is-visible {
    transform: translateY(0);
}

.scroll-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.scroll-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--hero-charcoal);
}

.scroll-nav-logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.scroll-nav-logo-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.scroll-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.scroll-nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--hero-charcoal);
    text-decoration: none;
    transition: color 0.2s;
}

.scroll-nav-link:hover {
    color: var(--hero-green);
}

.scroll-nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--hero-charcoal);
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.scroll-nav-cta:hover {
    opacity: 0.9;
}

/* Scroll nav: hamburger hidden on desktop */
.scroll-nav-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--hero-charcoal);
    cursor: pointer;
    border-radius: 8px;
}
.scroll-nav-menu-btn .hero-ref-menu-icon {
    position: relative;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.scroll-nav-menu-btn .hero-ref-menu-icon::before,
.scroll-nav-menu-btn .hero-ref-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.scroll-nav-menu-btn .hero-ref-menu-icon::before {
    top: -7px;
}
.scroll-nav-menu-btn .hero-ref-menu-icon::after {
    top: 7px;
}
.scroll-nav-menu-btn[aria-expanded="true"] .hero-ref-menu-icon {
    background: transparent;
}
.scroll-nav-menu-btn[aria-expanded="true"] .hero-ref-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}
.scroll-nav-menu-btn[aria-expanded="true"] .hero-ref-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .scroll-nav-links {
        display: none;
    }
    /* After hero on mobile: show hamburger, hide Get Started */
    .scroll-nav-cta {
        display: none;
    }
    .scroll-nav-menu-btn {
        display: flex;
    }
}

.hero-ref-wrapper {
    position: relative;
}

.hero-ref {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* ----- Top white area with grid ----- */
.hero-ref-top {
    position: relative;
    z-index: 1;
    flex: 1;
    background: var(--hero-bg);
    padding: 2rem 2.5rem 3rem;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
}

/* Grid: transparent at edges, a bit darker toward the center */
.hero-ref-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px),
        linear-gradient(to right, var(--hero-grid) 1px, transparent 1px);
    background-size: var(--hero-grid-size) var(--hero-grid-size);
    background-position: center;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, black 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, black 0%, transparent 72%);
}

.hero-ref-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.hero-ref-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.hero-ref-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.hero-ref-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hero-charcoal);
}

.hero-ref-cta-top {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--hero-charcoal);
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s;
}

.hero-ref-cta-top:hover {
    opacity: 0.9;
}

/* Hamburger: hidden on desktop */
.hero-ref-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--hero-charcoal);
}

.hero-ref-menu-icon {
    position: relative;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.hero-ref-menu-icon::before,
.hero-ref-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.hero-ref-menu-icon::before {
    top: -7px;
}

.hero-ref-menu-icon::after {
    top: 7px;
}

.hero-ref-menu-btn[aria-expanded="true"] .hero-ref-menu-icon {
    background: transparent;
}

.hero-ref-menu-btn[aria-expanded="true"] .hero-ref-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.hero-ref-menu-btn[aria-expanded="true"] .hero-ref-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile menu: hidden by default */
.hero-ref-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hero-ref-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.hero-ref-mobile-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--hero-charcoal);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.hero-ref-mobile-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.hero-ref-mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-ref-mobile-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--hero-charcoal);
    text-decoration: none;
}

.hero-ref-mobile-link:hover {
    opacity: 0.8;
}

.hero-ref-mobile-cta {
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--hero-charcoal);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
}

.hero-ref-mobile-cta:hover {
    opacity: 0.9;
}

/* ----- Main content: nav left, headline + copy right ----- */
.hero-ref-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 4rem;
    width: 100%;
    flex: 1;
    align-items: center;
}

.hero-ref-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-ref-nav-link {
    font-size: 0.95rem;
    color: var(--hero-charcoal);
    text-decoration: none;
    font-weight: 400;
}

.hero-ref-nav-link.active {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero-ref-nav-link:hover {
    opacity: 0.8;
}

.hero-ref-nav-sub {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--hero-text-light);
    line-height: 1.5;
    max-width: 160px;
}

.hero-ref-main {
    padding-right: 0;
    text-align: right;
}

.hero-ref-headline {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--hero-charcoal);
    line-height: 1.15;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-ref-headline-accent {
    color: transparent;
    background: linear-gradient(
        90deg,
        #42931a,
        #72c117,
        #71fc20,
        #8df840,
        #266208,
        #42931a
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: hero-growth-gradient 8s linear infinite;
}

@keyframes hero-growth-gradient {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-ref-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem 3rem;
    margin-bottom: 1.75rem;
    margin-left: auto;
    max-width: 360px;
}

.hero-ref-copy p {
    font-size: 0.95rem;
    color: var(--hero-text-light);
    line-height: 1.6;
    text-align: right;
}

.hero-ref-cta-main {
    display: inline-block;
    padding: 0;
    background: none;
    color: var(--hero-charcoal);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.hero-ref-cta-main:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ----- Full-width nature image ----- */
.hero-ref-image-wrap {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-height: 0;
    height: 30vh;
}

/* Gradient: white (hero) to transparent over image */
.hero-ref-image-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5vh;
    background: linear-gradient(to bottom, var(--hero-bg) 0%, transparent 100%);
    pointer-events: none;
}

/* Gradient: transparent to white at bottom of hero (image blends into next section) */
.hero-ref-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5vh;
    background: linear-gradient(to bottom, transparent 0%, var(--hero-bg) 100%);
    pointer-events: none;
}

/* Image layer: separate from hero, full height so full image is visible, not clipped by 100vh */
.hero-ref-bg {
    position: absolute;
    top: 70vh;
    left: 0;
    right: 0;
    height: 130vh;
    z-index: 0;
    background: var(--hero-charcoal) url('images/edited.png') top center no-repeat;
    background-size: 100% auto;
    will-change: transform;
}

.hero-ref-spacer {
    position: relative;
    z-index: 2;
    min-height: 120vh;
    background: var(--hero-bg);
}

/* Main content (merged from wild-rocket) sits above parallax image */
.hero-ref-wrapper .main {
    position: relative;
    z-index: 2;
}

/* About timeline: subtle grid to echo hero (same visual language) */
.about-timeline .about-timeline-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
        linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    background-size: var(--hero-grid-size) var(--hero-grid-size);
    background-position: center;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 0%, transparent 70%);
}

/* Gradient: transparent to white at top of next section (blend over image) */
.hero-ref-spacer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5vh;
    background: linear-gradient(to bottom, transparent 0%, var(--hero-bg) 100%);
    pointer-events: none;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .hero-ref-top {
        padding: 1.5rem 1.5rem 2rem;
    }

    .hero-ref-cta-top {
        display: none;
    }

    .hero-ref-menu-btn {
        display: flex;
    }

    .hero-ref-nav {
        display: none;
    }

    .hero-ref-mobile-menu {
        display: block;
    }

    .hero-ref-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-ref-nav-sub {
        max-width: none;
    }

    .hero-ref-copy {
        grid-template-columns: 1fr;
    }

    /* Hero image: height fits the gap exactly (30vh = image zone), width auto */
    .hero-ref-bg {
        position: absolute;
        top: 70vh;
        left: 0;
        right: 0;
        width: 100%;
        height: 30vh;
        will-change: auto;
        background-size: auto 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }

}
