/* 
  Petersen Farms - Modern Farmhouse & Woodsy Aesthetic
  "Storybook / Magazine" - REFINED v12 - Tabbed Lead Gen
*/

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    /* Palette - Organic Forest & Harvest */
    --color-primary: #2F5233;
    /* Deep Forest Green */
    --color-secondary: #7A4F37;
    /* Rich Walnut */
    --color-accent: #E2A62C;
    /* Warm Harvest Gold */

    --color-bg-body: #F9F7F2;
    /* Warm Oatmeal/Cream */
    --color-bg-alt: #EFEBE0;
    /* Soft Stone */
    --color-bg-white: #FFFFFF;

    --color-text-main: #2F2F2F;
    /* Soft Black */
    --color-text-muted: #5A5A5A;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing & Structure */
    --container-width: 1100px;
    --header-height: 100px;
    --border-radius-pill: 50px;
    --border-radius-hero: 0 0 40px 40px;
    --border-radius-card: 32px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    font-size: 18px;
    line-height: 1.8;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-primary);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

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

.section-padding {
    padding: 100px 0;
}

/* Buttons - Stitch Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 38px;
    border-radius: var(--border-radius-pill);
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    position: relative;
    z-index: 1;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Stitch Effect for Accent Button */
.btn-accent {
    background-color: var(--color-accent);
    color: #3E2914;
    font-weight: 800;
    box-shadow: 0 4px 0 rgba(122, 79, 55, 0.4);
    border: 2px dashed rgba(62, 41, 20, 0.3);
    background-clip: padding-box;
}

.btn-accent:hover {
    box-shadow: 0 6px 0 rgba(122, 79, 55, 0.4);
}

.btn-primary {
    background-color: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Hero Secondary Outline Button specifically */
.btn-outline-hero {
    border: 2px solid #FFF;
    color: #FFF;
    background: transparent;
    margin-left: 1rem;
}

.btn-outline-hero:hover {
    background: white;
    color: var(--color-primary);
}

.btn-outline {
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    background: transparent;
}

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

/* Sticky Mobile CTA */
.sticky-mobile-cta {
    display: none;
    /* Desktop hidden */
}

/* Header - Transparent & Integrated */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 90px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.6));
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    /* Taller */
    margin: 0 20px;
    border-radius: 0 0 40px 40px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    background-size: cover;
    background-position: center;
    background-color: #2F5233;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(47, 82, 51, 0.9) 0%, rgba(47, 82, 51, 0.8) 35%, rgba(47, 82, 51, 0.2) 65%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 45%;
    padding-left: 5%;
    text-align: left;
    margin-top: 4rem;
}

.hero h1 {
    font-size: 4rem;
    color: #FFF;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(62, 41, 20, 0.6);
    line-height: 1.1;
}

.hero p {
    font-size: 1.4rem;
    color: #F9F7F2;
    margin-bottom: 2.5rem;
    font-weight: 400;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    max-width: 90%;
}

/* Values Bar - Polaroid Style */
.values-bar {
    position: relative;
    padding: 0;
    background: transparent;
    margin-top: -60px;
    /* Overlap the hero */
    z-index: 10;
}

.values-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.value-item {
    background: white;
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    /* Imitate Polaroid bottom space */
    border: 1px solid #7A4F37;
    /* Thin Walnut Border */
    box-shadow: 0 10px 25px rgba(47, 82, 51, 0.1);
    text-align: center;
    transition: transform 0.4s ease;
    width: 300px;
    /* Fixed width */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value-item:nth-child(1) {
    transform: rotate(-2deg);
    margin-top: 20px;
}

.value-item:nth-child(2) {
    transform: rotate(1deg);
    z-index: 2;
}

.value-item:nth-child(3) {
    transform: rotate(-1deg);
    margin-top: 15px;
}

.value-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 20px 40px rgba(47, 82, 51, 0.2);
    z-index: 20;
}

.value-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #EEE;
}

.value-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.value-item:hover .value-image img {
    transform: scale(1.1);
}

.value-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.value-item p {
    font-size: 1rem;
    color: #5D544C;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Mid-Page CTA Banner */
.mid-cta-banner {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin: 4rem 0;
    border-top: 4px solid var(--color-accent);
    border-bottom: 4px solid var(--color-accent);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 10px);
}

.mid-cta-banner h2 {
    color: #FFF;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* About Section */
.about-section {
    background-color: var(--color-bg-alt);
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image img {
    border: 8px solid white;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: rotate(1deg);
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: rotate(0deg) scale(1.02);
}

/* Gallery Section */
.gallery-section {
    background: var(--color-bg-body);
}

.gallery-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.gallery-item img {
    height: 260px;
    width: 100%;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    transform: rotate(-0.5deg);
}

.gallery-item:nth-child(even) img {
    transform: rotate(0.5deg);
}

.gallery-item:hover img {
    transform: scale(1.03) rotate(0deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Contact Section */
.contact-section {
    background-color: var(--color-bg-alt);
    padding-bottom: 5rem;
}

.contact-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    background: white;
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(42, 74, 48, 0.15);
}

.contact-info {
    background-color: var(--color-primary);
    color: #FDFBF7;
    /* WARM CREAM - Forced High Contrast */
    padding: 4rem;
    position: relative;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 10px);
}

.contact-info h2 {
    color: #E2A62C;
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

/* CONTRAST SAFETIES */
.contact-info p {
    color: #FDFBF7 !important;
    /* Force legibility */
    opacity: 1;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    color: #FDFBF7;
    /* High Contrast */
}

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

.contact-list i {
    color: var(--color-accent);
    margin-right: 1.5rem;
    font-size: 1.3rem;
    margin-top: 2px;
}

/* COMPACT FORM UPDATES & TABS */
.contact-form-wrapper {
    padding: 3rem;
    background-color: #F9F7F2;
    /* Soft Sandstone */
}

/* Tab Styles */
.lead-tabs {
    display: flex;
    margin-bottom: 1rem;
    background: #EFEBE0;
    border-radius: 50px;
    padding: 4px;
    overflow: hidden;
}

.lead-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    border-radius: 40px;
    font-family: var(--font-body);
    font-weight: 700;
    color: #5A5A5A;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lead-tab.active {
    background-color: var(--color-primary);
    color: #FDFBF7;
    box-shadow: 0 2px 10px rgba(47, 82, 51, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Urgent Help */
.urgent-help {
    text-align: center;
    margin-bottom: 1.5rem;
}

.urgent-help p {
    font-size: 0.9rem;
    color: #7A4F37;
    margin-bottom: 0;
}

.urgent-help a {
    text-decoration: underline;
    font-weight: 700;
}

.contact-form h2 {
    color: var(--color-secondary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    border: 1px solid #E0DACD;
    border-radius: 12px;
    background: #FFF;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.3s ease;
    color: #3C352F;
    /* Dark Charcoal - High Contrast in Input */
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(226, 166, 44, 0.15);
}

/* Custom Select */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A4F37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
}

.send-btn {
    border-radius: 50px;
    font-size: 1rem;
    padding: 14px;
    box-shadow: 0 10px 20px rgba(226, 166, 44, 0.2);
    width: 100%;
    margin-top: 0.5rem;
}

/* Footer - Spacious */
footer {
    background-color: var(--color-primary);
    color: #FDFBF7;
    /* High Contrast */
    padding: 80px 0;
    text-align: left;
}

/* Override Global P for Footer */
footer p {
    color: #FDFBF7 !important;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Desktop Default */
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-brand {
    flex: 2;
    min-width: 300px;
    padding-right: 2rem;
}

.footer-logo {
    height: 70px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.footer-brand p {
    opacity: 0.95;
    font-size: 1.1rem;
    color: #FDFBF7;
    /* Explicit contrast */
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h3 {
    color: var(--color-accent);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

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

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #FDFBF7;
    /* Explicit contrast */
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.95;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer-copyright {
    display: block;
    width: 100%;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.8;
    font-size: 0.95rem;
    color: #FDFBF7;
    /* Explicit contrast */
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .container {
        width: 92%;
    }

    .hero-content {
        width: 100%;
        padding: 0 1.5rem;
        background: linear-gradient(0deg, rgba(47, 82, 51, 0.9) 0%, transparent 100%);
        margin-top: 6rem;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(47, 82, 51, 0.3) 0%, rgba(47, 82, 51, 0.7) 100%);
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .btn-outline-hero {
        margin-left: 0;
    }

    .values-bar {
        margin-top: 0;
        padding-top: 3rem;
    }

    .values-grid {
        flex-direction: column;
        align-items: center;
    }

    .value-item {
        width: 100%;
        max-width: 380px;
        margin-top: 0 !important;
        transform: rotate(0deg) !important;
        margin-bottom: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        order: -1;
    }

    /* Contact Mobile Flow */
    .contact-split {
        display: flex;
        flex-direction: column-reverse;
    }

    .contact-form-wrapper {
        padding: 3rem 1.5rem;
    }

    .contact-info {
        padding: 3rem 1.5rem;
    }

    /* Footer Mobile - Flex Fixes */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 3rem;
    }

    .footer-brand {
        padding-right: 0;
    }

    .footer-links {
        text-align: center;
        width: 100%;
    }

    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo {
        margin: 0 auto 1.5rem auto;
    }

    /* Sticky CTA */
    .sticky-mobile-cta {
        display: block;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        z-index: 2000;
        padding: 0;
        background: transparent;
        /* TRANSPARENT */
    }

    .sticky-mobile-cta .btn {
        width: 100%;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        border: 2px solid white;
    }

    /* Add padding to footer bottom to account for sticky btn */
    footer {
        padding-bottom: 120px;
    }
}