@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Handel Gothic Normal - Font Face Placeholder */
@font-face {
    font-family: 'Handel Gothic';
    src: local('Handel Gothic'), local('HandelGothic-Normal');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: rgb(165, 141, 98);
    --secondary: rgb(217, 188, 140);
    --dark: rgb(54, 54, 54);
    --black: rgb(0, 0, 0);
    --white: rgb(255, 255, 255);
    --font-heading: 'Handel Gothic', 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

@theme {
    --color-primary: var(--primary);
    --color-secondary: var(--secondary);
    --color-dark: var(--dark);
    --font-heading: var(--font-heading);
    --font-body: var(--font-body);
}

/* Explicit Utility Overrides for Tailwind 4 CDN */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.border-primary { border-color: var(--primary); }
.border-secondary { border-color: var(--secondary); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--black);
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 600;
}

.glass-nav {
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    transform: translateZ(0); 
    backface-visibility: hidden;
}

.glass-nav.scrolled, .glass-nav:hover {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--black);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-logo {
    content: url('/images/Final-Logo.png');
    transition: all 0.3s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.glass-nav.scrolled .nav-logo,
.glass-nav:hover .nav-logo {
    content: url('/images/Black.png');
    transform: translateZ(0);
}

.glass-nav.scrolled .nav-link, .glass-nav:hover .nav-link {
    color: var(--black);
}

.glass-nav.scrolled .contact-cta, .glass-nav:hover .contact-cta {
    border-color: transparent;
}

/* Ensure text is white on transparent background if needed, 
   but since hero has dark overlay, let's keep it adaptable */
.glass-nav:not(.scrolled):not(:hover) .nav-link {
    color: white;
}

.glass-nav:not(.scrolled):not(:hover) .contact-cta {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-nav:not(.scrolled):not(:hover) #mobile-menu-button {
    color: white;
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    /* transition: color 0.3s ease; */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    /* transition: width 0.3s ease; */
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.active {
    transform: rotate(180deg);
}

.mobile-sidebar.open {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.contact-cta {
    background: var(--secondary);
    color: var(--dark);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-cta:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(165, 141, 98, 0.3);
}


.social-bar {
    position: fixed;
    right: 12px;
    bottom: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 640px) {
    .social-bar {
        right: 8px;
        bottom: 16px;
    }
}

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.social-icon:hover {
    background: var(--primary);
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 8px 15px rgba(165, 141, 98, 0.3);
    color: var(--white);
}

/* Testimonial Loop */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.testimonial-track {
    display: flex;
    width: max-content;
    animation: scroll-left 20s linear infinite;
}

.video-carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-right 60s linear infinite;
}

.testimonial-container:hover .testimonial-track, 
.testimonial-track:hover, 
.video-carousel-track:hover {
    animation-play-state: paused !important;
}

.video-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgb(243 244 246);
    transition: all 500ms;
    aspect-ratio: 4 / 5;
    width: 180px;
    margin: 0 1rem;
}

@media (min-width: 640px) {
    .video-card {
        width: 240px;
    }
}

@media (min-width: 1024px) {
    .video-card {
        width: 280px;
    }
}

.video-card:hover {
    @apply shadow-2xl scale-[1.02] border-primary/20;
}

/* Video Thumbnail System */
.video-thumb-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
}

.video-thumb-container img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-thumb-container:hover img {
    transform: scale(1.1);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(165, 141, 98, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 0 30px rgba(165, 141, 98, 0.4);
    transition: all 0.4s ease;
    z-index: 2;
}

.video-thumb-container:hover .play-button-overlay {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 50px rgba(165, 141, 98, 0.6);
}

.video-thumb-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    z-index: 1;
}

.clean-link {
    @apply transition-colors duration-300 hover:text-primary;
}

/* Solar System Animation */
@keyframes rotate-cw {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate-ccw {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes counter-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes counter-rotate-ccw {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    margin: 0 auto;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(165, 141, 98, 0.3);
    border-radius: 50%;
}

.ring-inner {
    width: 60%;
    height: 60%;
    animation: rotate-cw 40s linear infinite;
}

.ring-outer {
    width: 90%;
    height: 90%;
    animation: rotate-ccw 60s linear infinite;
}

.orbiting-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(165, 141, 98, 0.2);
    transition: all 0.3s ease;
}

.ring-inner .orbiting-item { animation: counter-rotate 40s linear infinite; }
.ring-outer .orbiting-item { animation: counter-rotate-ccw 60s linear infinite; }

.orbiting-item:hover {
    transform: scale(1.1) !important;
    border-color: var(--secondary);
    z-index: 10;
}

.central-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 30px rgba(165, 141, 98, 0.5);
    z-index: 5;
}

/* Language Switcher */
.lang-switcher-container {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--black);
}

.scrolled .lang-btn {
    background: rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-switcher-container:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 600;
    color: var(--black);
}

.lang-option:hover {
    background: var(--secondary);
    color: var(--primary);
}

.lang-option.active {
    background: var(--primary);
    color: white !important;
}

/* Mobile Sidebar Lang Switcher */
.mobile-lang-switcher {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile Sidebar Accordion Styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    opacity: 0;
}

.accordion-content.active {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 1rem;
}

.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.active {
    transform: rotate(180deg);
}

.mobile-lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-lang-option:hover {
    background: var(--secondary);
    color: var(--primary);
}

.mobile-lang-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* Performance Section & Comparison Sheet */
.performance-section {
    position: relative;
    background: linear-gradient(135deg, #fbf9f3 0%, #ffffff 100%);
    overflow: hidden;
}

.performance-sheet {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(165, 141, 98, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.perf-tab-btn {
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dark);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.perf-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Comparison Grid Styles */
.perf-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 0.8fr;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(165, 141, 98, 0.1);
    transition: all 0.3s ease;
}

@media (max-width: 1200px) {
    .perf-row {
        grid-template-columns: 1.5fr 1fr 2fr;
    }
    .perf-improvement {
        grid-row: 1;
        grid-column: 3;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .perf-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }
    .perf-label {
        grid-column: span 2;
    }
    .perf-before {
        text-align: left;
    }
    .perf-after-container {
        grid-column: span 2;
        padding-right: 0;
    }
    .perf-improvement {
        grid-column: span 2;
        justify-content: flex-start;
        padding-top: 0.5rem;
        border-top: 1px dashed rgba(165, 141, 98, 0.1);
    }
}

.perf-row:last-child {
    border-bottom: none;
}

.perf-row:hover {
    background: rgba(165, 141, 98, 0.03);
    transform: translateX(10px);
}

.perf-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.perf-label i {
    width: 35px;
    height: 35px;
    background: rgba(165, 141, 98, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.perf-before {
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
}

.perf-after-container {
    padding-right: 1.5rem;
}

.perf-after-val {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.perf-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(165, 141, 98, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.perf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0, 0.2, 1);
}

.perf-improvement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: #059669; /* emerald-600 */
}

/* Visual Journey Flow */
.journey-step {
    position: relative;
    text-align: center;
    flex: 1;
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid rgba(165, 141, 98, 0.2);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.journey-step:hover .step-icon-wrapper {
    border-color: var(--primary);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 30px rgba(165, 141, 98, 0.2);
}

.step-icon-wrapper i {
    font-size: 1.75rem;
    color: var(--primary);
}

.step-line {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(165, 141, 98, 0.1);
    z-index: 1;
}

.journey-step:last-child .step-line {
    display: none;
}

.journey-step.active .step-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--primary);
    animation: fill-line 1s forwards;
}

@keyframes fill-line {
    to { width: 100%; }
}

@media (max-width: 1024px) {
    .step-line {
        display: none;
    }
    .journey-container {
        flex-direction: column;
        gap: 3rem;
    }
    .perf-tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }
}

/* Scroll Reveals Helper */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Product Performance Storytelling */
.performance-story-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid rgba(165, 141, 98, 0.15);
}

/* 1. Milk Tank Visuals */
.milk-tank-wrapper {
    width: 140px;
    height: 220px;
    background: rgba(255, 255, 255, 0.5);
    border: 3px solid #e2e8f0;
    border-radius: 20px 20px 10px 10px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

.milk-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0; /* Initial height */
    background: #e0f7ff;
    transition: height 3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -5px 15px rgba(224, 247, 255, 0.5);
}

.tank-wave {
    position: absolute;
    top: -15px;
    left: 0;
    width: 200%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23e0f7ff'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave-move 3s infinite linear;
}

@keyframes wave-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* 2. Calf Growth UI */
.growth-stage {
    text-align: center;
    transition: all 0.6s ease;
    filter: grayscale(100%) opacity(0.3);
}

.growth-stage.active {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

.growth-connector {
    height: 3px;
    background: rgba(165, 141, 98, 0.1);
    flex-grow: 1;
    margin: 0 1.5rem;
    position: relative;
    align-self: center;
}

.growth-connector::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width 1.5s ease;
}

.growth-stage.active ~ .growth-connector::after {
    width: 100%;
}

/* 3. Bull Meter (Scientific Gauge) */
.gauge-container {
    position: relative;
    width: 240px;
    height: 120px;
    margin: 0 auto;
    overflow: hidden;
}

.gauge-bg {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(from 270deg, #e2e8f0 180deg, transparent 180deg);
    position: absolute;
}

.gauge-fill {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(from 90deg, var(--primary) 180deg, transparent 180deg);
    position: absolute;
    transform: rotate(0deg); 
    transition: transform 2s cubic-bezier(0.1, 0, 0.2, 1);
}

.gauge-center {
    width: 200px;
    height: 200px;
    background: #fbf9f3;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
}

.gauge-center .val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: -5px;
}

.gauge-center .label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--dark/50);
    text-transform: uppercase;
    letter-spacing: 1px;
}
