/* Main CSS file - imports all other stylesheets */

/* Base styles */
@import url('base/variables.css');
@import url('base/reset.css');
@import url('base/typography.css');

/* Component styles */
@import url('components/header.css');
@import url('components/footer.css');
@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/navigation.css');
@import url('components/logo.css');

/* Page-specific styles */
@import url('pages/home.css');
@import url('pages/use-cases.css');
@import url('pages/insights.css');
@import url('pages/resources.css');
@import url('pages/company.css');
@import url('pages/community.css');
@import url('pages/contact.css');

/* Global utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Widen homepage hero container to reduce subheading line breaks */
body.is-home .hero .container {
    max-width: 1440px;
}

/* Ensure main content is properly positioned below fixed header */
#main-content {
    padding-top: 0; /* Let individual sections handle their own spacing */
    min-height: calc(100vh - 92px);
}

.page-hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, #F9FAFB 0%, rgba(205, 232, 153, 0.1) 100%);
}

/* Make all hero classes consistent with page-hero spacing (non-index pages) */
body.is-subpage .hero,
body.is-subpage .use-cases-hero,
body.is-subpage .resources-hero,
body.is-subpage .blog-hero,
body.is-subpage .page-hero {
    padding: 7.5rem 0 4rem !important;
}

/* Side color fade: apply to all non-index pages (hero + first section) */
body.is-subpage:not(.page-use-cases) .page-hero,
body.is-subpage:not(.page-use-cases) .use-cases-hero,
body.is-subpage:not(.page-use-cases) .resources-hero,
body.is-subpage:not(.page-use-cases) .blog-hero {
    position: relative;
    z-index: 1;
}

body.is-subpage:not(.page-use-cases) .page-hero::before,
body.is-subpage:not(.page-use-cases) .page-hero::after,
body.is-subpage:not(.page-use-cases) .use-cases-hero::before,
body.is-subpage:not(.page-use-cases) .use-cases-hero::after,
body.is-subpage:not(.page-use-cases) .resources-hero::before,
body.is-subpage:not(.page-use-cases) .resources-hero::after,
body.is-subpage:not(.page-use-cases) .blog-hero::before,
body.is-subpage:not(.page-use-cases) .blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24vw;
    pointer-events: none;
    z-index: 0;
}

/* Left/right overlays on hero */
body.is-subpage:not(.page-use-cases) .page-hero::before,
body.is-subpage:not(.page-use-cases) .use-cases-hero::before,
body.is-subpage:not(.page-use-cases) .resources-hero::before,
body.is-subpage:not(.page-use-cases) .blog-hero::before {
    left: 0;
    background: linear-gradient(90deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}

body.is-subpage:not(.page-use-cases) .page-hero::after,
body.is-subpage:not(.page-use-cases) .use-cases-hero::after,
body.is-subpage:not(.page-use-cases) .resources-hero::after,
body.is-subpage:not(.page-use-cases) .blog-hero::after {
    right: 0;
    background: linear-gradient(270deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}

/* First section below hero: continue side fade and vertically fade to white */
body.is-subpage:not(.page-use-cases) .page-hero + section,
body.is-subpage:not(.page-use-cases) .use-cases-hero + section,
body.is-subpage:not(.page-use-cases) .resources-hero + section,
body.is-subpage:not(.page-use-cases) .blog-hero + section {
    position: relative;
    z-index: 1;
}

body.is-subpage:not(.page-use-cases) .page-hero + section::before,
body.is-subpage:not(.page-use-cases) .page-hero + section::after,
body.is-subpage:not(.page-use-cases) .use-cases-hero + section::before,
body.is-subpage:not(.page-use-cases) .use-cases-hero + section::after,
body.is-subpage:not(.page-use-cases) .resources-hero + section::before,
body.is-subpage:not(.page-use-cases) .resources-hero + section::after,
body.is-subpage:not(.page-use-cases) .blog-hero + section::before,
body.is-subpage:not(.page-use-cases) .blog-hero + section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24vw;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%);
}

body.is-subpage:not(.page-use-cases) .page-hero + section::before,
body.is-subpage:not(.page-use-cases) .use-cases-hero + section::before,
body.is-subpage:not(.page-use-cases) .resources-hero + section::before,
body.is-subpage:not(.page-use-cases) .blog-hero + section::before {
    left: 0;
    background: linear-gradient(90deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}

body.is-subpage:not(.page-use-cases) .page-hero + section::after,
body.is-subpage:not(.page-use-cases) .use-cases-hero + section::after,
body.is-subpage:not(.page-use-cases) .resources-hero + section::after,
body.is-subpage:not(.page-use-cases) .blog-hero + section::after {
    right: 0;
    background: linear-gradient(270deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Content spacing - ensure proper separation from footer */
main section:last-child,
.privacy-section,
.terms-section,
.security-section,
.contact-section,
.blog-section,
.resources-section,
.community-section {
    padding-bottom: var(--spacing-6xl);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .page-hero {
        padding: 6rem 0 4rem; /* Same as desktop */
    }
    
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    /* Make all hero classes consistent on mobile */
    .hero,
    .use-cases-hero,
    .resources-hero,
    .blog-hero {
        padding: 6rem 0 4rem !important; /* Same as desktop */
    }
    
    /* Reduce bottom spacing on mobile */
    main section:last-child,
    .privacy-section,
    .terms-section,
    .security-section,
    .contact-section,
    .blog-section,
    .resources-section,
    .community-section {
        padding-bottom: var(--spacing-4xl);
    }
}

/* Business Resources section specific styles */
.business-resources-section {
    padding: var(--spacing-4xl) 0;
    background: var(--color-background);
}

.business-resources-section .section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.business-resources-section .section-title h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.business-resources-section .section-title p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-2xl);
    max-width: 1000px;
    margin: 0 auto;
    align-items: stretch;
}

.resource-card {
    background: var(--color-white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.resource-card h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.resource-card p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-xl);
    flex-grow: 1;
}

.download-button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    font-size: var(--font-size-sm);
    text-align: center;
}

.download-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Contact page specific styles */
.contact-header,
.contact-info-header {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
}

.contact-header h2,
.contact-info-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.contact-header p,
.contact-info-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    margin-top: var(--spacing-2xl);
    background: var(--color-white, #ffffff);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-gray-200, #e5e7eb);
}

.contact-info-container {
    background: var(--color-white, #ffffff);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-gray-200, #e5e7eb);
    margin-top: var(--spacing-2xl);
}

.contact-item {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.contact-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.contact-bullet {
    width: 8px;
    height: 8px;
    background: var(--color-primary, #5D8D49);
    border-radius: 50%;
    margin-top: 0.6rem;
    flex-shrink: 0;
}

.contact-item h3 {
    color: var(--color-primary, #5D8D49);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.contact-item p {
    color: var(--color-text-secondary, #6b7280);
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form field alignment fixes */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-text-primary, #111827);
    margin-bottom: 0.5rem;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group textarea {
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #5D8D49;
    outline: none;
    box-shadow: 0 0 0 2px rgba(93, 141, 73, 0.2);
}

/* Character counter positioning fix */
.character-counter {
    position: relative;
    width: 100%;
    text-align: right;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.character-counter span {
    display: inline-block;
    min-width: 1ch;
}

.form-group:has(label[for="subject"]) {
    margin-bottom: 1rem;
}

/* Two-column layout for contact form */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.contact-form-grid .form-group:nth-child(odd) {
    grid-column: 1;
}

.contact-form-grid .form-group:nth-child(even) {
    grid-column: 2;
}

.contact-form-grid .form-group:nth-child(3) {
    grid-column: 1 / span 2;
}

.contact-form-grid .form-group:nth-child(4) {
    grid-column: 1 / span 2;
}

.contact-form-grid .form-group:nth-child(5) {
    grid-column: 1 / span 2;
}

.contact-form-grid button[type="submit"] {
    grid-column: 1 / span 2;
    justify-self: center;
}

/* Input field styling */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #5D8D49;
    outline: none;
    box-shadow: 0 0 0 2px rgba(93, 141, 73, 0.2);
}

/* Button styling moved to components/buttons.css for consistency across site */

@media (max-width: 768px) {
    .contact-header,
    .contact-info-header {
        margin-bottom: var(--spacing-4xl);
    }
    
    .contact-form-container,
    .contact-info-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-grid .form-group:nth-child(odd),
    .contact-form-grid .form-group:nth-child(even),
    .contact-form-grid .form-group:nth-child(3),
    .contact-form-grid .form-group:nth-child(4),
    .contact-form-grid .form-group:nth-child(5) {
        grid-column: 1;
    }

    .contact-form-grid button[type="submit"] {
        grid-column: 1;
    }

    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-item {
        grid-template-columns: auto 1fr 1fr;
        gap: 0.75rem;
    }
    
    .contact-bullet {
        margin-top: 0.6rem;
    }
    
    .contact-item h3 {
        margin-bottom: 0.25rem;
    }
}

/* Responsive iframe styles for contact form */
.contact-form-container {
    position: relative;
    width: 100%;
    min-height: 500px;
}

.contact-form-container iframe {
    height: 600px;
    width: 100%;
    display: block;
    position: relative;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

/* Ensure iframe scales properly on resize */
@media (max-width: 1024px) {
    .contact-form-container iframe {
        height: 650px;
    }
}

@media (max-width: 768px) {
    .contact-form-container iframe {
        height: 700px;
    }
}

@media (max-width: 480px) {
    .contact-form-container iframe {
        height: 750px;
    }
}

@media (max-width: 360px) {
    .contact-form-container iframe {
        height: 800px;
    }
}

/* Force white backgrounds on all non-home pages with side fades for contact */
body.is-subpage {
    background: #ffffff !important;
}

body.is-subpage.page-contact {
    background: linear-gradient(90deg, 
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 12%,
        rgba(137, 179, 98, 0.10) 24%,
        rgba(255, 255, 255, 1) 30%,
        rgba(255, 255, 255, 1) 70%,
        rgba(137, 179, 98, 0.10) 76%,
        rgba(137, 179, 98, 0.18) 88%,
        rgba(137, 179, 98, 0.28) 100%
    ) !important;
}
body.is-subpage main,
body.is-subpage .page-hero,
body.is-subpage .resource-section,
body.is-subpage .blog-content,
body.is-subpage .community-stats,
body.is-subpage .join-community,
body.is-subpage .mission-section,
body.is-subpage .founders-section,
body.is-subpage .values-section,
body.is-subpage .industry-section,
body.is-subpage .use-cases-hero,
body.is-subpage .resources-hero,
body.is-subpage .blog-hero {
    background: #ffffff !important;
}

/* Allow side fade overlays on specific sections */
body.is-subpage .contact-section,
body.is-subpage .security-section,
body.is-subpage .terms-section {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* Ensure contact section specifically gets side fade overlays */
body.is-subpage .contact-section::before,
body.is-subpage .contact-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24vw;
    pointer-events: none;
    z-index: 0;
}

body.is-subpage .contact-section::before {
    left: 0;
    background: linear-gradient(90deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}

body.is-subpage .contact-section::after {
    right: 0;
    background: linear-gradient(270deg,
        rgba(137, 179, 98, 0.28) 0%,
        rgba(137, 179, 98, 0.18) 14%,
        rgba(137, 179, 98, 0.10) 32%,
        rgba(137, 179, 98, 0.00) 64%
    );
}
