/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Warm, earthy color palette - suitable for trades/construction imagery */
    --primary-color: #1a1612;
    --secondary-color: #3d3528;
    --text-color: #2c2416;
    --text-light: #5a4e3f;
    --bg-light: #f5f1eb;
    --bg-sepia: #e8e0d4;
    /* Accent colors - blue tones */
    --accent-primary: #285881;
    --accent-primary-dark: #1e4261;
    --accent-primary-light: #3a6fa0;
    --accent-secondary: #d4a574;
    --accent-blue: #3a6b8f;
    --accent-blue-dark: #2a4f6b;
    --accent-blue-light: #5a8fb8;
    --white: #ffffff;
    --sepia-overlay: rgba(44, 36, 22, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    font-size: 16px;
    background: var(--white);
}

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

/* Typography - Serif for headlines, sans-serif for body */
h1, h2, h3, .section-title, .hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 22, 18, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(40, 88, 129, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 45px;
    width: auto;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-primary-light);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - Vintage cinematic style */
.hero {
    margin-top: 80px;
    padding: 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 22, 18, 0.75) 0%,
        rgba(26, 22, 18, 0.65) 40%,
        rgba(40, 88, 129, 0.4) 100%
    );
    z-index: 1;
}

/* Fallback if hero image doesn't exist */
.hero:not([style*="background-image"]) {
    background: linear-gradient(
        135deg,
        var(--bg-sepia) 0%,
        var(--bg-light) 50%,
        rgba(44, 90, 160, 0.1) 100%
    );
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: var(--spacing-xl) 0;
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    letter-spacing: 0.2em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 0.8rem 2.2rem;
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    max-width: 900px;
    line-height: 1.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.cta-button.primary {
    background: var(--accent-primary);
    color: var(--white);
    border-color: var(--accent-primary);
}

.cta-button.primary:hover {
    background: var(--accent-primary-dark);
    border-color: var(--accent-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 88, 129, 0.4);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    border-width: 2px;
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Section Styles */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.3rem;
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.lead-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

/* Our Vision Section */
.vision {
    background: var(--white);
}

.vision-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    align-items: center;
}

.vision-text p {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.vision-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-style: italic;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--bg-sepia);
}

.vision-visual {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vision-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Founder Model Section */
.founder-model {
    background: var(--bg-light);
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.model-item {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(44, 36, 22, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.model-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 36, 22, 0.12);
}

.model-item-image {
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
}

.model-image-overlay {
    position: absolute;
    top: 25%;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 30%,
        rgba(0, 0, 0, 0.5) 70%,
        rgba(0, 0, 0, 0.65) 100%
    );
    padding: var(--spacing-md);
    text-align: center;
    border-radius: 0 0 8px 8px;
    z-index: 1;
}

.model-image-overlay h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 1), 0 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.02em;
}

.model-image-overlay p {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 1), 0 1px 3px rgba(0, 0, 0, 0.9);
    margin: 0;
    line-height: 1.4;
}

.model-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.model-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    font-weight: 600;
}

.model-item p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.model-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Criteria Section */
.criteria {
    background: var(--white);
}

.criteria-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    align-items: start;
}

.criteria-list h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-weight: 600;
}

.fit-list {
    list-style: none;
}

.fit-list li {
    padding: var(--spacing-sm) 0;
    color: var(--text-light);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--bg-sepia);
    line-height: 1.8;
}

.fit-list li:last-child {
    border-bottom: none;
}

.fit-list li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.trades-visual {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trades-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Network Section */
.network {
    background: var(--bg-light);
}

.network-result {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.network-visual {
    background: var(--white);
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

/* Human Advantage Section */
.human-advantage {
    background: var(--white);
}

.advantage-content {
    max-width: 900px;
    margin: 0 auto;
}

.advantage-content p {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.advantage-visual {
    background: var(--bg-light);
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

/* Visual Placeholders */
.visual-placeholder {
    color: var(--text-light);
    text-align: center;
    padding: var(--spacing-lg);
    font-style: italic;
    font-size: 0.9rem;
}

/* Contact Form Section */
.contact {
    background: var(--bg-light);
}

.contact-form {
    max-width: 800px;
    margin: var(--spacing-lg) auto 0;
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(44, 36, 22, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--bg-sepia);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

#location-status {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

#lookup-zip-btn {
    display: none; /* Hidden by default (desktop) */
    padding: var(--spacing-sm);
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: background 0.3s, transform 0.1s;
    -webkit-tap-highlight-color: rgba(40, 88, 129, 0.3); /* Visible tap highlight on mobile */
    height: 100%;
    align-self: stretch;
    min-height: calc(1rem + var(--spacing-sm) * 2 + 4px); /* Match input field height */
    touch-action: manipulation; /* Prevent double-tap zoom */
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 10; /* Ensure button is above other elements */
}

#lookup-zip-btn:hover {
    background: var(--accent-primary-dark);
}

#lookup-zip-btn:active {
    transform: scale(0.98);
    background: var(--accent-primary-dark);
}

#lookup-zip-btn:disabled {
    background: #999;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.form-note {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    align-items: center;
    text-align: center;
}

.footer-main {
    text-align: left;
}

.footer-main p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.footer-affiliate {
    font-style: italic;
    color: var(--bg-sepia);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 var(--spacing-xs);
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-primary-light);
}

.footer-address {
    font-size: 0.9rem;
    color: var(--bg-sepia);
    text-align: right;
}

.footer-address p {
    margin-bottom: var(--spacing-xs);
}

/* Responsive Breakpoints */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-md) 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        background-attachment: scroll;
        margin-top: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .vision-content,
    .criteria-content {
        grid-template-columns: 1fr;
    }

    .criteria-list {
        text-align: center;
    }

    .criteria-list h3 {
        text-align: center;
    }

    .fit-list {
        text-align: center;
    }

    .fit-list li {
        text-align: center;
        padding-left: 0;
    }

    .fit-list li::before {
        display: none;
    }

    .model-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-main {
        text-align: center !important;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-address {
        text-align: center !important;
    }
}

/* Lookup button removed on mobile - will be fixed later */

/* Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    #lookup-zip-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .logo {
        height: 35px;
    }

    .hero {
        padding: var(--spacing-sm) 0;
        min-height: calc(100vh - 60px);
        height: calc(100vh - 60px);
        margin-top: 60px;
        display: flex;
        align-items: center;
    }

    .hero-overlay {
        padding: 0.5rem 0 var(--spacing-md) 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        min-height: 100%;
    }

    .hero .container {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-bottom: var(--spacing-md);
        padding-top: 0;
    }

    .hero-title {
        font-size: 1.7rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-md);
        line-height: 1.5;
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
        margin-bottom: var(--spacing-sm);
        margin-top: 0;
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }

    .hero-cta .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-cta .cta-button {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .lead-text {
        font-size: 1.1rem;
    }

    .vision-tagline {
        font-size: 1.2rem;
    }

    .model-item h3 {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .contact-form {
        padding: var(--spacing-md);
    }
}

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    :root {
        --max-width: 1400px;
    }

    .hero-title {
        font-size: 4.5rem;
    }
}
