/* ==================================================================
   Green Up Labs: homepage theme (neutral, editorial umbrella brand)
   Scoped under .theme-main. Loaded right after styles.css.
   Type sizes come from the shared .t-* classes in styles.css.
   ================================================================== */

.theme-main {
    --gm-forest: #0F3D2E;
    --gm-forest-deep: #0A2C21;
    --gm-ink: #0F3D2E;
    --gm-muted: #3E5C50;
    --gm-line: rgba(15, 61, 46, 0.12);
    --gm-paper: #FFFFFF;
    --gm-off: #F4F7F4;
    --gm-radius: 1.25rem;
    --gm-shadow: 0 1px 2px rgba(15, 61, 46, 0.06), 0 10px 30px -12px rgba(15, 61, 46, 0.18);
    --gm-shadow-hover: 0 2px 4px rgba(15, 61, 46, 0.06), 0 20px 40px -16px rgba(15, 61, 46, 0.28);

    background: var(--gm-off);
    color: var(--gm-ink);
}

/* Pillar accents: the colour is used only for dots, icons, borders and tints.
   --accent-ink is a darker shade that is readable as text on white. */
.theme-main .pillar-tech  { --accent: #EF4444; --accent-ink: #B91C1C; --accent-tint: rgba(239, 68, 68, 0.08); --accent-line: rgba(239, 68, 68, 0.28); }
.theme-main .pillar-trip  { --accent: #F97316; --accent-ink: #C2410C; --accent-tint: rgba(249, 115, 22, 0.09); --accent-line: rgba(249, 115, 22, 0.30); }
.theme-main .pillar-youth { --accent: #3F7A55; --accent-ink: #3F7A55; --accent-tint: rgba(138, 191, 158, 0.18); --accent-line: rgba(63, 122, 85, 0.30); }

/* ------------------------------------------------------------------ */
/* Section backgrounds                                                 */
/* ------------------------------------------------------------------ */
.theme-main .bg-paper { background: var(--gm-paper); }
.theme-main .bg-off   { background: var(--gm-off); }

.theme-main .gm-container {
    max-width: 80rem;
    margin: 0 auto;
}

.theme-main .gm-muted { color: var(--gm-muted); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.theme-main .hero-section {
    border-radius: 0 0 2rem 2rem;
    padding-bottom: 4rem;
}

.theme-main .hero-overlay {
    background:
        linear-gradient(180deg, rgba(10, 44, 33, 0.82) 0%, rgba(15, 61, 46, 0.66) 55%, rgba(10, 44, 33, 0.86) 100%);
}

.theme-main .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #D7EBDD;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.theme-main .hero-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8ABF9E;
}

.theme-main .hero-title {
    color: #fff;
    text-wrap: balance;
}

.theme-main .hero-title .hero-accent {
    color: #A9D4B8;
}

.theme-main .hero-sub {
    color: rgba(255, 255, 255, 0.86);
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.theme-main .hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.theme-main .hero-scroll:hover { color: #fff; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.theme-main .gm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.975rem;
    line-height: 1.2;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}

.theme-main .gm-btn i { font-size: 0.85em; transition: transform 0.25s ease; }
.theme-main .gm-btn:hover i.fa-arrow-right { transform: translateX(3px); }
.theme-main .gm-btn:focus-visible { outline: 2px solid #8ABF9E; outline-offset: 3px; }

.theme-main .gm-btn--primary {
    background: var(--gm-forest);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(15, 61, 46, 0.6);
}
.theme-main .gm-btn--primary:hover {
    background: var(--gm-forest-deep);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -10px rgba(15, 61, 46, 0.7);
}

.theme-main .gm-btn--ghost {
    background: transparent;
    color: var(--gm-forest);
    border-color: rgba(15, 61, 46, 0.35);
}
.theme-main .gm-btn--ghost:hover {
    border-color: var(--gm-forest);
    background: rgba(15, 61, 46, 0.05);
}

.theme-main .gm-btn--light {
    background: #fff;
    color: var(--gm-forest);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
}
.theme-main .gm-btn--light:hover {
    background: #EEF6F0;
    transform: translateY(-1px);
}

/* Outline button on dark backgrounds, with a pillar colour dot */
.theme-main .gm-btn--onDark {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}
.theme-main .gm-btn--onDark:hover {
    background: #fff;
    color: var(--gm-forest);
    border-color: #fff;
    transform: translateY(-1px);
}

.theme-main .gm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent, #8ABF9E);
    flex: none;
}

/* ------------------------------------------------------------------ */
/* Badges                                                              */
/* ------------------------------------------------------------------ */
.theme-main .gm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: var(--accent-tint);
    border: 1px solid var(--accent-line);
    color: var(--accent-ink);
}

.theme-main .gm-badge .gm-dot { width: 6px; height: 6px; }

.theme-main .gm-badge--solid {
    background: var(--gm-forest);
    border-color: var(--gm-forest);
    color: #fff;
}

.theme-main .gm-index {
    font-variant-numeric: tabular-nums;
    color: var(--gm-muted);
    opacity: 0.75;
}

/* ------------------------------------------------------------------ */
/* Ecosystem intro: three pillar cards                                 */
/* ------------------------------------------------------------------ */
.theme-main .eco-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 1.5rem 1.5rem 1.4rem;
    background: var(--gm-paper);
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius);
    box-shadow: var(--gm-shadow);
    text-decoration: none;
    color: var(--gm-ink);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.theme-main .eco-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.theme-main .eco-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gm-shadow-hover);
    border-color: var(--accent-line);
}

.theme-main .eco-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.theme-main .eco-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-tint);
    color: var(--accent-ink);
}

.theme-main .eco-card__meta { color: var(--accent-ink); }

.theme-main .eco-card__go {
    margin-top: auto;
    padding-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gm-forest);
}

.theme-main .eco-card__go i { transition: transform 0.25s ease; font-size: 0.8em; }

/* Phones/tablets: compact row cards (icon | title + meta | index/arrow) */
@media (max-width: 767px) {
    .theme-main .eco-card {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        column-gap: 1rem;
        row-gap: 0.15rem;
        align-items: center;
        padding: 1rem 1.1rem;
    }
    .theme-main .eco-card::before { top: 0; bottom: 0; right: auto; width: 3px; height: auto; }
    .theme-main .eco-card__top { display: contents; }
    .theme-main .eco-card__icon { grid-column: 1; grid-row: 1 / span 2; }
    .theme-main .eco-card h3 { grid-column: 2; grid-row: 1; }
    .theme-main .eco-card__meta { grid-column: 2; grid-row: 2; }
    .theme-main .eco-card .gm-index { grid-column: 3; grid-row: 1; text-align: right; }
    .theme-main .eco-card__go { grid-column: 3; grid-row: 2; margin: 0; padding: 0; justify-content: flex-end; }
    .theme-main .eco-card__go .eco-card__go-text { display: none; }
}
.theme-main .eco-card:hover .eco-card__go i { transform: translateY(2px); }

/* ------------------------------------------------------------------ */
/* Pillar sections (Tech / Trip / Youth): one shared structure         */
/* ------------------------------------------------------------------ */
.theme-main .pillar-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .theme-main .pillar-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 4.5rem;
    }
    .theme-main .pillar-grid--flip {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }
    .theme-main .pillar-grid--flip .pillar-copy { order: 2; }
    .theme-main .pillar-grid--flip .pillar-media { order: 1; }
}

.theme-main .pillar-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
    margin-bottom: 1.25rem;
}

.theme-main .pillar-title { margin-bottom: 1rem; color: var(--gm-ink); }
.theme-main .pillar-lead  { color: var(--gm-muted); margin-bottom: 2rem; max-width: 36rem; }

/* Feature list */
.theme-main .gm-features {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--gm-line);
}

.theme-main .gm-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.theme-main .gm-feature__icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-tint);
    color: var(--accent-ink);
    font-size: 1rem;
}

.theme-main .gm-feature h3 { color: var(--gm-ink); margin-bottom: 0.15rem; }
.theme-main .gm-feature p { color: var(--gm-muted); }

/* Stats (Trip) */
.theme-main .gm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--gm-line);
}

.theme-main .gm-stat {
    padding: 1.1rem 1rem;
    background: var(--gm-paper);
    border: 1px solid var(--gm-line);
    border-radius: 1rem;
}

.theme-main .gm-stat .t-stat { color: var(--accent-ink); display: block; margin-bottom: 0.4rem; }
.theme-main .gm-stat .t-small { color: var(--gm-muted); }

@media (max-width: 480px) {
    .theme-main .gm-stat { padding: 0.9rem 0.75rem; }
    .theme-main .gm-stat .t-stat { font-size: 1.75rem; }
}

.theme-main .pillar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 639px) {
    .theme-main .pillar-actions .gm-btn { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Media mosaic: same 6-column layout for every pillar                 */
/*   a = big (4 cols x 2 rows), b/c = small (2 cols), d/e = half row   */
/* ------------------------------------------------------------------ */
.theme-main .gm-mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(clamp(92px, 13vw, 158px), auto);
    gap: clamp(0.6rem, 1.4vw, 1rem);
}

.theme-main .gm-tile {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #E4ECE6;
    box-shadow: var(--gm-shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.theme-main .gm-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--gm-shadow-hover);
}

.theme-main .gm-tile > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.theme-main .gm-tile:hover > img { transform: scale(1.04); }

.theme-main .gm-a { grid-column: span 4; grid-row: span 2; }
.theme-main .gm-b,
.theme-main .gm-c { grid-column: span 2; }
.theme-main .gm-d,
.theme-main .gm-e { grid-column: span 3; aspect-ratio: 4 / 3; }

.theme-main .gm-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem 0.9rem 0.7rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Tech mosaic: content tiles instead of photos */
.theme-main .gm-mosaic--tech .gm-d,
.theme-main .gm-mosaic--tech .gm-e { aspect-ratio: auto; }

.theme-main .gm-code {
    display: flex;
    flex-direction: column;
    background: #0B1F18;
    text-align: left;
}

.theme-main .gm-code pre {
    flex: 1;
    margin: 0;
    white-space: pre;
}

.theme-main .gm-tile-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
}

.theme-main .gm-phone-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: linear-gradient(160deg, #0055A5, #0088FF);
    color: #fff;
    text-align: center;
}

.theme-main .gm-phone { width: 8.5rem; }

.theme-main .gm-deploy {
    background: var(--gm-paper);
    padding: 1.25rem;
    text-align: left;
    border: 1px solid var(--gm-line);
    display: flex;
    flex-direction: column;
}

/* Phone layout for the tech mosaic: code card full width, then 2 x 2 */
@media (max-width: 639px) {
    .theme-main .gm-mosaic--tech .gm-a { grid-column: span 6; grid-row: auto; }
    .theme-main .gm-mosaic--tech .gm-b,
    .theme-main .gm-mosaic--tech .gm-c { grid-column: span 3; aspect-ratio: 1 / 1; }
    .theme-main .gm-phone { width: 7rem; }
    .theme-main .gm-phone-tile { padding: 1rem 0.5rem; }
    .theme-main .gm-deploy { padding: 1rem; }
    .theme-main .gm-deploy ul { font-size: 0.8125rem; }
}

/* ------------------------------------------------------------------ */
/* Contact CTA                                                         */
/* ------------------------------------------------------------------ */
.theme-main .gm-contact {
    position: relative;
    overflow: hidden;
    background: var(--gm-forest);
    color: #fff;
    isolation: isolate;
}

.theme-main .gm-contact__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url('../images/hero_solarpunk.png');
    background-size: cover;
    background-position: center;
    opacity: 0.14;
    mix-blend-mode: luminosity;
}

.theme-main .gm-contact__inner {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.theme-main .gm-contact h2 { color: #fff; margin-bottom: 1rem; text-wrap: balance; }
.theme-main .gm-contact .t-lead { color: rgba(255, 255, 255, 0.82); margin: 0 auto 2.5rem; max-width: 38rem; }

.theme-main .gm-contact__actions {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .theme-main .gm-contact__actions {
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        max-width: none;
    }
}

/* Back-to-top */
.theme-main #back-to-top {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gm-forest);
    color: #fff;
}

@media (max-width: 639px) {
    .theme-main #back-to-top { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .theme-main .gm-tile,
    .theme-main .gm-tile > img,
    .theme-main .eco-card,
    .theme-main .gm-btn { transition: none; }
}
