/* Documentation: Full CSS file for Wooly Ways Farm v10.
 */

/* ========================================
 CSS VARIABLES — Color Palette              **
 ======================================== */
:root {
    --dark-primary: #1e1812;      /* 40% — Main backgrounds */
    --mid-tone: #4a4035;          /* 30% — Cards, secondary elements */
    --light-accent: #b8a896;      /* 30% — Text, highlights */
    --accent-hover: #d4a574;      /* CTA, hovers */
    --text-primary: #b8a896;
    --text-secondary: #a89b8f;
    --overlay-dark: rgba(30, 24, 18, 0.7);
    --white-dot: #ffffff;
    --border-glow: #ffffff;       /* WHITE glowing border & trail */
}

/* ========================================
 RESET & BASE STYLES                        **
 ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-primary);
    cursor: url('sheep-cursor.png'), auto;
    overflow-x: hidden;
    perspective: 1000px; /* Required for 3D tilt */
}

/* ========================================
 LAYOUT & CONTAINER                         **
 ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
 NAVIGATION BAR — Fixed, Responsive         **
 ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--dark-primary);
    padding: 1rem 0;
    z-index: 100;
    border-bottom: 2px solid var(--mid-tone);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 24, 18, 0.95);
}

.nav-brand {
    font-size: 1.8rem;
    color: var(--light-accent);
    float: left;
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-menu {
    list-style: none;
    float: right;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-hover);
}

.nav-icon {
    font-size: 1.2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--light-accent);
    margin: 3px 0;
    transition: 0.3s;
}

/* ========================================
 HERO SECTION — Fullscreen with Parallax    **
 ======================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1614183654058-0bac05af5ab0?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0') no-repeat center/cover;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light-accent);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* ========================================
 SECTION BASE STYLES                        **
 ======================================== */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--light-accent);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* ========================================
 CARDS GRID — Responsive Layout             **
 ======================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
 CARD BASE — All Cards (Why, Services, Map) **
 ======================================== */
.card {
    background: var(--mid-tone);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 2px solid var(--mid-tone);
    text-decoration: none;
    color: inherit;
    display: block;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

/* HOVER: TILT + WHITE BORDER + GLOW */
.card:hover {
    transform: translateY(-10px) rotateX(8deg) rotateY(8deg);
    border-color: #ffffff;
    box-shadow:
    0 20px 40px rgba(0,0,0,0.3),
    0 0 20px rgba(255,255,255,0.4),
    inset 0 0 20px rgba(255,255,255,0.1);
    z-index: 10;
}

/* Optional: Slight scale on active press */
.card:active {
    transform: translateY(-8px) rotateX(6deg) rotateY(6deg) scale(0.98);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.2);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light-accent);
}

.card p {
    color: var(--text-secondary);
}

/* ========================================
 CONTACT CARD — NO HOVER ANIMATION          **
 ======================================== */
.contact-card {
    background: var(--mid-tone);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #ffffff;
    position: relative;
    overflow: visible;
    /* Remove all hover effects */
    transform: none !important;
    transition: none !important;
}

.contact-card:hover {
    transform: none !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}

/* ========================================
 MISSION CARD
 ======================================== */
.mission-card {
    position: relative;
    padding: 2rem;
    border-radius: 12px;
    background: var(--mid-tone);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid transparent;
}

/* Main glowing border pulse */
.mission-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    box-shadow:
    0 0 20px rgba(255,255,255,0.5),
    0 0 40px rgba(255,255,255,0.3),
    inset 0 0 20px rgba(255,255,255,0.2);
    animation: missionBorderPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes missionBorderPulse {
    0%, 100% {
        box-shadow:
        0 0 20px rgba(255,255,255,0.5),
        0 0 40px rgba(255,255,255,0.3),
        inset 0 0 20px rgba(255,255,255,0.2);
    }
    50% {
        box-shadow:
        0 0 40px rgba(255,255,255,0.8),
        0 0 60px rgba(255,255,255,0.5),
        inset 0 0 30px rgba(255,255,255,0.4);
    }
}

/* TRAVELING DOT WITH GLOWING TRAIL */
.mission-card .trail-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 25px #ffffff, 0 0 50px #ffffff, 0 0 75px rgba(255,255,255,0.8);
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: travelWithTrail 4s linear infinite;
}

.mission-card .trail-dot::before,
.mission-card .trail-dot::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: trailFade 4s linear infinite;
}

.mission-card .trail-dot::after {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
    animation-delay: 0.1s;
}

@keyframes travelWithTrail {
    0%   { transform: translateX(-50%) translateY(-6px); }
    25%  { transform: translateX(calc(100% - 12px)) translateY(-6px); }
    50%  { transform: translateX(calc(100% - 12px)) translateY(calc(100% - 12px)); }
    75%  { transform: translateX(-6px) translateY(calc(100% - 12px)); }
    100% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes trailFade {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}

.mission p {
    font-size: 1.6rem;
    color: var(--text-primary);
}

/* ========================================
 CONTACT SECTION                            **
 ======================================== */
.contact {
    background: var(--mid-tone);
}

/* Contact Details */
.contact-details {
    text-align: left;
    margin: 2rem 0;
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-icon {
    font-size: 1.2rem;
}

.contact-details a {
    color: var(--accent-hover);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--light-accent);
}

/* ========================================
 GOOGLE MAPS CARD
 ======================================== */
.map-card {
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--mid-tone), var(--accent-hover));
    display: block;
    text-decoration: none;
    color: #ffffff !important;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--mid-tone);
}

.map-card iframe {
    display: block;
    width: 100%;
    height: 200px;
    border: none;
}

.map-content {
    padding: 1rem 1.5rem;
    text-align: center;
}

.map-content h3,
.map-content p {
    color: #ffffff !important;
}

.map-content h3 {
    margin-bottom: 0.5rem;
}

.map-content p {
    opacity: 0.9;
    margin: 0;
}

/* ========================================
 CONTACT FORM                               **
 ======================================== */
.contact-form {
    margin-top: 2rem;
    text-align: left;
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--light-accent);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-accent);
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--dark-primary);
    border-radius: 5px;
    background: var(--dark-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
 CTA BUTTON                                 **
 ======================================== */
.cta-button {
    background: var(--accent-hover);
    color: var(--dark-primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: 100%;
}

.cta-button:hover {
    transform: scale(1.05);
    background: var(--light-accent);
}

/* ========================================
 RESPONSIVE DESIGN                          **
 ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-primary);
        flex-direction: column;
        padding: 1rem;
    }
    .nav-menu.active {
        display: flex;
    }
    .hamburger {
        display: flex;
        float: right;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 3rem 0;
    }
    .logo {
        height: 32px;
    }
    .mission p {
        font-size: 1.4rem;
    }
    .contact-form {
        padding: 0 1rem;
    }
    .map-card iframe {
        height: 150px;
    }
    /* Reduce tilt on mobile */
    .card:hover {
        transform: translateY(-8px) rotateX(4deg) rotateY(4deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* ========================================
 SMOOTH SCROLL & PARALLAX                   **
 ======================================== */
html {
    scroll-behavior: smooth;
}

.hero {
    background-attachment: fixed;
}

/* ========================================
 END OF CSS                                 **
 ======================================== */
