/*
Theme Name: Colony Worms
Theme URI: https://www.colonyworms.com
Author: Colony Worms Team
Author URI: https://www.colonyworms.com
Description: A custom WordPress theme for Colony Worms - promoting regenerative farming and vermiculture for a sustainable future. Features include custom page templates, Elementor integration, and optimized for organic farming businesses.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: colonyworms
Tags: regenerative-farming, vermiculture, organic, sustainability, green, agriculture

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ===================================
   CSS RESET & BASE STYLES
   =================================== */

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

:root {
    /* Brand Colors */
    --primary-green: #4a7c2c;
    --secondary-green: #6b9d3d;
    --dark-green: #2d5016;
    --light-green: #e8f5e0;
    --earth-brown: #8b6f47;
    --warm-cream: #f9f6f0;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Container */
    --container-width: 1200px;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-green);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

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

a:hover {
    color: var(--dark-green);
}

/* ===================================
   LAYOUT COMPONENTS
   =================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-light {
    background-color: var(--warm-cream);
}

.section-green {
    background-color: var(--light-green);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
    max-width: var(--container-width);
    margin: 0 auto;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
    font-family: var(--font-heading);
}

.site-logo span {
    color: var(--earth-brown);
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
    background-color: var(--light-green);
    color: var(--primary-green);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-green);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

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

.hero-content h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--earth-brown);
    color: white;
    border-color: var(--earth-brown);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--earth-brown);
    border-color: var(--earth-brown);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-green);
}

.btn-green {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.btn-green:hover {
    background-color: var(--dark-green);
    border-color: var(--dark-green);
    transform: translateY(-2px);
}

/* ===================================
   CARD COMPONENTS
   =================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-green);
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ===================================
   FEATURES SECTION
   =================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(74, 124, 44, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-green);
}

.feature-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===================================
   TESTIMONIALS
   =================================== */

.testimonial-slider {
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
}

.testimonial {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-green);
}

/* ===================================
   CONTACT FORM
   =================================== */

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-green);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
    background-color: var(--dark-green);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-green);
}

/* Brand marks are inline SVG using currentColor, so they inherit the link colour. */
.social-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.social-link {
    color: #ffffff;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .main-navigation {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        transition: left 0.3s ease;
        padding: 2rem;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .card-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }

/* ===================================
   WORDPRESS SPECIFIC STYLES
   =================================== */

.wp-block-image {
    margin: 2rem 0;
}

.wp-block-image img {
    border-radius: 8px;
    width: 100%;
    height: auto;
}

.alignwide {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Elementor Compatibility */
.elementor-widget-container {
    margin: 0;
}

.elementor-section {
    position: relative;
}

/* ===================================
   HERO PHOTO TREATMENT
   =================================== */

/* The photo sits under a green tint so the white hero copy stays legible.
   The image URL comes from the --hero-image custom property set in the template. */
.hero-section.has-hero-image {
    background-image:
        linear-gradient(135deg, rgba(45, 80, 22, 0.86) 0%, rgba(74, 124, 44, 0.72) 100%),
        var(--hero-jpg);
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat, no-repeat;
    padding: calc(var(--spacing-xl) * 1.3) 0;
}

/* Prefer WebP (roughly a third the weight here) where the browser supports
   image-set; the rule above stays as the JPEG fallback everywhere else. */
@supports (background-image: image-set(url("i.webp") type("image/webp"))) {
    .hero-section.has-hero-image {
        background-image:
            linear-gradient(135deg, rgba(45, 80, 22, 0.86) 0%, rgba(74, 124, 44, 0.72) 100%),
            image-set(var(--hero-webp) type("image/webp"), var(--hero-jpg) type("image/jpeg"));
    }
}

/* The decorative dot pattern competes with the photograph — drop it here. */
.hero-section.has-hero-image::before {
    opacity: 0.12;
}

.hero-section.has-hero-image .hero-content h1,
.hero-section.has-hero-image .hero-content p {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* ===================================
   SITE-WIDE BACKGROUND + GLASS SURFACES
   ===================================

   One fixed photographic backdrop behind every page, with content sitting on
   translucent "glass" panels above it. The image is attached to a pseudo
   element rather than the body so that `background-attachment: fixed` can be
   avoided on mobile, where it causes severe scroll jank in iOS Safari. */

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.site-bg__poster,
.site-bg__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Poster sits under the video: visible immediately, then covered once the
   video paints, and left showing if the video never plays. */
.site-bg__poster { z-index: 0; }
.site-bg__video  { z-index: 1; }

/* Deliberately light. Section bands and cards each add their own translucency
   on top, so anything heavier here compounds and washes the video out entirely. */
.site-bg__tint {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(249, 246, 240, 0.18) 0%, rgba(249, 246, 240, 0.24) 45%, rgba(232, 245, 224, 0.20) 100%);
}

/* Looping motion is a genuine accessibility problem for some people. */
@media (prefers-reduced-motion: reduce) {
    .site-bg__video {
        display: none;
    }
}

body.has-site-bg {
    background-color: transparent;
}

/* The hero no longer paints its own media — the site background shows through.
   It keeps a deeper tint of its own so the white headline stays legible. */
.hero-section {
    position: relative;
    z-index: 1;
}

.hero-section--transparent {
    background: none;
    padding: calc(var(--spacing-xl) * 1.15) 0;
}

.hero-section--transparent::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.72) 0%, rgba(74, 124, 44, 0.58) 100%);
    opacity: 1;
}

.hero-section--transparent .hero-content {
    position: relative;
    z-index: 2;
}

.hero-section--transparent .hero-content h1,
.hero-section--transparent .hero-content p {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

/* --- Glass panels ---------------------------------------------------------

   Sections that previously used flat fills become translucent so the photo
   reads through them. `backdrop-filter` is progressively enhanced: browsers
   without it simply get a more opaque panel, which still looks correct. */

/* Bands are barely there — the video should be plainly visible between the
   cards. Contrast for text is carried by the cards and panels, not by these. */
.has-site-bg .section:not(.hero-section) {
    background-color: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px) saturate(115%);
    -webkit-backdrop-filter: blur(6px) saturate(115%);
}

.has-site-bg .section-light,
.has-site-bg .section-green {
    background-color: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .has-site-bg .section:not(.hero-section) {
        background-color: rgba(255, 255, 255, 0.80);
    }
    .has-site-bg .section-light,
    .has-site-bg .section-green {
        background-color: rgba(255, 255, 255, 0.86);
    }
}

/* Headings and intro copy sit straight on the band with the video behind them,
   so they need their own lift rather than relying on the panel underneath. */
.has-site-bg .section:not(.hero-section) > .container > h2,
.has-site-bg .section:not(.hero-section) > .container > p {
    color: #1f3a10;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85), 0 1px 12px rgba(255, 255, 255, 0.6);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .has-site-bg .section-light,
    .has-site-bg .section-green {
        background-color: rgba(255, 255, 255, 0.92);
    }
}

/* Cards, photo tiles and feature blocks all share the same glass recipe. */
.has-site-bg .card,
.has-site-bg .photo-card,
.has-site-bg .feature-item,
.has-site-bg .glass-panel {
    background-color: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px) saturate(115%);
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 6px 26px rgba(45, 80, 22, 0.10);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .has-site-bg .card,
    .has-site-bg .photo-card,
    .has-site-bg .feature-item,
    .has-site-bg .glass-panel {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* Sticky header picks up the same treatment so it does not float as a hard bar. */
.has-site-bg .site-header {
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

/* ===================================
   INTERIOR PAGES (posts, pages, archives)
   =================================== */

/* Content on interior pages sits on one glass sheet rather than running loose
   against the background, which is what made the Notes page look unstyled. */
.has-site-bg .site-main > .section > .container > article,
.has-site-bg .site-main > .section > .container > .page-content,
.has-site-bg .site-main .entry-wrap {
    background-color: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px) saturate(115%);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(45, 80, 22, 0.12);
    padding: clamp(1.75rem, 4vw, 3.5rem);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .has-site-bg .site-main > .section > .container > article,
    .has-site-bg .site-main .entry-wrap {
        background-color: rgba(255, 255, 255, 0.96);
    }
}

.site-main .entry-header {
    margin-bottom: 1.5rem;
}

.site-main .entry-title {
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.site-main .entry-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(45, 80, 22, 0.12);
}

.site-main .entry-meta a {
    color: var(--primary-green);
}

/* Comfortable measure for long-form reading. */
.site-main .entry-content {
    max-width: 68ch;
    font-size: 1.05rem;
}

.site-main .entry-content > * + * {
    margin-top: 1.25rem;
}

.site-main .entry-content h2 {
    margin-top: 2.5rem;
    color: var(--dark-green);
}

.site-main .entry-content img,
.site-main .entry-content figure img {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

.site-main .entry-content figure {
    margin: 2rem 0;
}

.site-main .entry-content figcaption {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.6rem;
    font-style: italic;
}

.site-main .entry-footer:empty {
    display: none;
}

/* ===================================
   COMMENTS
   =================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(45, 80, 22, 0.12);
    max-width: 68ch;
}

.comments-area .comment-reply-title,
.comments-area .comments-title {
    font-family: var(--font-heading);
    color: var(--dark-green);
    margin-bottom: 0.75rem;
}

.comments-area .comment-notes,
.comments-area .logged-in-as {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.comments-area label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
}

.comments-area input[type="text"],
.comments-area input[type="email"],
.comments-area input[type="url"],
.comments-area textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(45, 80, 22, 0.2);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comments-area input[type="text"]:focus,
.comments-area input[type="email"]:focus,
.comments-area input[type="url"]:focus,
.comments-area textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 44, 0.15);
}

.comments-area p {
    margin-bottom: 1rem;
}

.comments-area .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.comments-area .comment-form-cookies-consent label {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.comments-area .form-submit input[type="submit"] {
    display: inline-block;
    padding: 0.85rem 2rem;
    background-color: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.comments-area .form-submit input[type="submit"]:hover {
    background-color: var(--dark-green);
    transform: translateY(-1px);
}

/* ===================================
   POST NAVIGATION
   =================================== */

.post-navigation {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(45, 80, 22, 0.12);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.post-navigation a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 500;
}

/* ===================================
   FOOTER CONTACT LIST
   =================================== */

.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 0.4rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-contact a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===================================
   INSTAGRAM CALLOUT
   =================================== */

.contact-instagram {
    margin-top: 1.25rem;
}

.contact-instagram a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-green);
    text-decoration: none;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 2px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-instagram a:hover {
    color: var(--primary-green);
    border-color: var(--dark-green);
}

/* ===================================
   HERO VIDEO
   =================================== */

/* Layer order inside the hero: still image (section background) -> video ->
   green tint (::after) -> text (.hero-content). The still sits underneath so
   there is never a bare box while the video buffers or if it never plays. */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* With a video present the tint moves to ::after so it paints ABOVE the video.
   The section background therefore drops its own gradient, otherwise the
   fallback state would be tinted twice and read far too dark. */
.hero-section.has-hero-video {
    background-image: var(--hero-jpg);
}

@supports (background-image: image-set(url("i.webp") type("image/webp"))) {
    .hero-section.has-hero-video {
        background-image: image-set(var(--hero-webp) type("image/webp"), var(--hero-jpg) type("image/jpeg"));
    }
}

.hero-section.has-hero-video::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.86) 0%, rgba(74, 124, 44, 0.72) 100%);
    pointer-events: none;
}

/* Lift the copy above the new tint layer. */
.hero-section.has-hero-video .hero-content {
    z-index: 2;
}

/* Looping motion triggers nausea for some people, and it is an accessibility
   requirement — fall back to the still frame. */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
}

/* ===================================
   MISSION SECTION
   =================================== */

/* Was an inline 1fr 1fr grid, which stayed two columns on phones and squeezed
   the photo to a sliver. Moved here so it can collapse. */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Lead with the photograph on small screens. */
    .mission-grid > div:last-child {
        order: -1;
    }
}

/* ===================================
   PHOTO GALLERY
   =================================== */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.photo-card {
    margin: 0;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
}

/* <picture> is inline by default; make it behave like the plain <img> did
   so it sizes correctly as a flex item. */
.photo-card picture {
    display: block;
    line-height: 0;
}

.photo-card img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    background-color: var(--light-green);
}

.photo-card figcaption {
    padding: 1.25rem 1.5rem 1.5rem;
}

.photo-card figcaption strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--dark-green);
    margin-bottom: 0.35rem;
}

.photo-card figcaption span {
    display: block;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-light);
}

/* Give the first photo the full width of the grid so it reads as a lead image. */
.photo-grid .photo-card:first-child {
    grid-column: 1 / -1;
}

.photo-grid .photo-card:first-child img {
    height: 420px;
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .photo-card img,
    .photo-grid .photo-card:first-child img {
        height: 220px;
    }
}

/* ===================================
   CONTACT FORM HONEYPOT
   =================================== */

/* Positioned off-screen rather than display:none — some bots skip hidden
   inputs, and this keeps the field in the accessibility tree's dead zone
   via aria-hidden on the wrapper instead. */
.cw-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
