:root {
    --bg-color: #ffffff;
    --text-color: #2c2c2c;
    --text-color-light: #5a5a5a;
    --heading-color: #000;
    --border-color: rgba(0, 0, 0, 0.06);
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #fafafa;
    --card-bg-hover: #f5f5f5;
    --btn-primary-bg: #000;
    --btn-primary-text: #fff;
    --btn-secondary-bg: #fff;
    --btn-secondary-text: #000;
    --btn-secondary-border: #e0e0e0;
    --integration-bg: #000;
    --integration-text: #fff;
    --integration-text-light: #b0b0b0;
    --integration-card-bg: #1a1a1a;
    --integration-card-bg-hover: #2a2a2a;
    --footer-bg: #000;
    --footer-text: #fff;
    --footer-text-light: #b0b0b0;
    --footer-border: #2a2a2a;
    --focus-shadow: rgba(0,0,0,0.1);
    --hero-image-bg: #f5f5f5;
    --hamburger-bg: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

main {
    flex-grow: 1;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.75rem 4%;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 55px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--heading-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header-cta {
    padding: 0.7rem 1.8rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    text-decoration: none;
}

.header-cta:hover {
    background: var(--integration-card-bg);
}

.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
}

.theme-toggle-btn:hover {
    opacity: 0.8;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--hamburger-bg);
    margin: 6px 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Accessibility utility */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0; padding: 0; margin: -1px;
}

/* Utility: center content horizontally */
.centered-section {
    text-align: center;
}

/* Legacy logo sizing used in contractor_platform_website.html */
.logo-legacy img {
    height: 392px;
    width: auto;
}

/* Make CTA button smaller on mobile */
@media (max-width: 768px) {
    .header-cta {
        display: none;
    }
}

/* Page Header for sub-pages */
.page-header {
    padding: 12rem 4% 6rem;
    background: var(--card-bg);
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-header p {
    font-size: 1.3rem;
    color: var(--text-color-light);
    margin-top: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero {
    padding: 12rem 4% 6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 700px;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--heading-color);
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-color-light);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.btn-primary {
    padding: 1rem 2.5rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    border-radius: 6px;
}

.btn-primary:hover {
    background: var(--integration-card-bg);
    transform: translateY(-1px);
}

/* Demo form button: move inline styles here for linting and consistency */
.demo-form .btn-primary {
    width: 100%;
    padding: 1.2rem;
}

/* Focus styles for accessibility */
.btn-primary:focus-visible,
.hamburger-menu:focus {
    outline: 3px solid rgba(0, 0, 0, 0.12);
    outline-offset: 4px;
}

.btn-secondary {
    padding: 1rem 2.5rem;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    border-radius: 6px;
}

.btn-secondary:hover {
    border-color: var(--heading-color);
}

.hero-image {
    width: 100%;
    height: 600px;
    background: var(--hero-image-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image {
    position: relative;
}

.hero-image-buttons {
    position: absolute;
    left: 50%;
    bottom: 32%; /* place roughly at the lower third of the image */
    transform: translateX(-50%);
    display: flex;
    gap: 1.2rem;
    z-index: 2;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.06); /* subtle contrast over image */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Responsive adjustments: ensure buttons are accessible on small screens */
@media (max-width: 768px) {
    .hero-image-buttons {
        position: static;
        transform: none;
        margin: 1.25rem auto 0;
        bottom: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        background: transparent;
        padding: 0;
    }
    .hero-image {
        height: auto;
    }
    .hero-image img {
        height: auto;
    }
}

/* Stats Section */
.stats {
    padding: 8rem 4%;
    background: var(--card-bg);
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color-light);
    font-weight: 400;
}

/* Features Section */
.features {
    padding: 8rem 4%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Contact form styles */
.contact-section {
    padding: 6rem 4%;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.contact-form label {
    font-size: 0.95rem;
    color: var(--text-color-light);
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    outline: 3px solid var(--focus-shadow);
    outline-offset: 3px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.form-actions .btn-primary {
    flex: 0 0 auto;
}

.form-actions .btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
}

.support-note {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color-light);
}

.section-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--heading-color);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-color-light);
    margin-bottom: 5rem;
    max-width: 700px;
    line-height: 1.6;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-bottom: 8rem;
    align-items: center;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row:nth-child(even) .feature-content {
    order: 2;
}

.feature-row:nth-child(even) .feature-image {
    order: 1;
}

.feature-content h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    letter-spacing: -0.02em;
}

.feature-content p {
    font-size: 1.15rem;
    color: var(--text-color-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.feature-image {
    width: 100%;
    height: 450px;
    background: var(--hero-image-bg);
    border-radius: 12px;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Integration Section */
.integration {
    padding: 8rem 4%;
    background: var(--integration-bg);
    color: var(--integration-text);
}

.integration-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.integration h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.integration p {
    font-size: 1.3rem;
    color: var(--integration-text-light);
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.integration-image {
    width: 100%;
    height: 500px;
    background: var(--integration-card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4rem;
}

.integration-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.supplier-card {
    padding: 2.5rem;
    background: var(--integration-card-bg);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--integration-text);
    transition: all 0.2s;
}

.supplier-card:hover {
    background: var(--integration-card-bg-hover);
}

/* Benefits Grid */
.benefits {
    padding: 8rem 4%;
    max-width: 1400px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.benefit-card {
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    transition: all 0.2s;
}

.benefit-card:hover {
    background: var(--card-bg-hover);
}

.benefit-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.benefit-card p {
    font-size: 1.05rem;
    color: var(--text-color-light);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 10rem 4%;
    background: var(--card-bg);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cta-section p {
    font-size: 1.3rem;
    color: var(--text-color-light);
    margin-bottom: 3rem;
    line-height: 1.7;
}

/* Demo Page Form */
.demo-form-section {
    padding: 8rem 4%;
    max-width: 800px;
    margin: 0 auto;
}

.demo-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--heading-color);
    box-shadow: 0 0 0 2px var(--focus-shadow);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
footer {
    padding: 4rem 4% 3rem;
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--footer-text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--footer-text);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    color: var(--text-color-light);
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1, .page-header h1 {
        font-size: 3rem;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .feature-row:nth-child(even) .feature-content,
    .feature-row:nth-child(even) .feature-image {
        order: initial;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 500;
    }

    .hamburger-menu {
        display: block;
    }

    /* Hide desktop CTA and show a mobile version inside the menu */
    .nav-links .header-cta {
        display: block;
        padding: 1rem 2.5rem;
    }

    .hero {
        padding: 10rem 4% 4rem;
    }

    .hero h1, .page-header h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-color-light: #888888;
    --heading-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(18, 18, 18, 0.85);
    --card-bg: #1e1e1e;
    --card-bg-hover: #2a2a2a;
    --btn-primary-bg: #fff;
    --btn-primary-text: #000;
    --btn-secondary-bg: transparent;
    --btn-secondary-text: #fff;
    --btn-secondary-border: #444;
    --integration-bg: #000;
    --integration-text: #fff;
    --integration-text-light: #b0b0b0;
    --integration-card-bg: #1a1a1a;
    --integration-card-bg-hover: #2a2a2a;
    --footer-bg: #000;
    --footer-text: #fff;
    --footer-text-light: #b0b0b0;
    --footer-border: #2a2a2a;
    --focus-shadow: rgba(255,255,255,0.1);
    --hero-image-bg: #1e1e1e;
    --hamburger-bg: #fff;
}

.dark-mode .btn-secondary:hover {
    border-color: var(--heading-color);
    background: rgba(255, 255, 255, 0.05);
}