/* ==========================================================================
   AGRO3D - Shared Styles
   ========================================================================== */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: #0A0608;
    color: #F5EEEF;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #110C0E; }
::-webkit-scrollbar-thumb { background: #7A141F; border-radius: 3px; }

/* Three.js canvas */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Glow effects */
.glow-text {
    text-shadow: 0 0 40px rgba(122, 20, 31, 0.5), 0 0 80px rgba(122, 20, 31, 0.2);
}
.glow-border {
    box-shadow: 0 0 15px rgba(122, 20, 31, 0.15), inset 0 0 15px rgba(122, 20, 31, 0.05);
}
.glow-red {
    box-shadow: 0 0 20px rgba(204, 51, 68, 0.3), 0 0 40px rgba(204, 51, 68, 0.1);
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Nav blur */
.nav-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Card hover */
.service-card {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    border-color: rgba(122, 20, 31, 0.5);
    box-shadow: 0 0 25px rgba(122, 20, 31, 0.15), 0 8px 32px rgba(0,0,0,0.3);
}

/* CTA button */
.cta-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}
.cta-btn:hover::before { left: 100%; }
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(122, 20, 31, 0.4), 0 8px 25px rgba(0,0,0,0.3);
}

/* Separator line */
.sep-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #7A141F, transparent);
}

/* Portfolio placeholder grid */
.portfolio-item {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1A1214, #231A1C);
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.portfolio-item:hover {
    border-color: rgba(122, 20, 31, 0.5);
    transform: scale(1.02);
}

/* Mobile nav */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open {
    transform: translateX(0);
}

/* Active nav link */
.nav-link-active {
    color: #F5EEEF !important;
}

/* ==========================================================================
   Page Header (subpages without Three.js)
   ========================================================================== */
.page-header {
    padding-top: 7rem;
    padding-bottom: 3rem;
    background: linear-gradient(180deg, #110C0E 0%, #0A0608 100%);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: #A89899;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb a:hover {
    color: #F5EEEF;
}
.breadcrumb .separator {
    color: #6B5A5C;
}
.breadcrumb .current {
    color: #CC3344;
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(17, 12, 14, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(45, 31, 34, 0.5);
    padding: 1rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.cookie-banner.visible {
    transform: translateY(0);
}
.cookie-banner-content {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cookie-banner p {
    color: #D4C5C7;
    font-size: 0.875rem;
    line-height: 1.5;
}
.cookie-banner a {
    color: #CC3344;
    text-decoration: underline;
}
.cookie-banner-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item {
    border-bottom: 1px solid rgba(45, 31, 34, 0.3);
}
.faq-question {
    cursor: pointer;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-question h3 {
    color: #F5EEEF;
    font-size: 1rem;
    font-weight: 500;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer.open {
    max-height: 500px;
}
.faq-answer p {
    padding-bottom: 1.25rem;
    color: #A89899;
    line-height: 1.75;
    font-size: 0.9375rem;
}

/* ==========================================================================
   Policy Pages
   ========================================================================== */
.policy-content h2 {
    color: #F5EEEF;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}
.policy-content h2:first-child {
    margin-top: 0;
}
.policy-content p {
    color: #A89899;
    margin-bottom: 1rem;
    line-height: 1.75;
    font-size: 0.9375rem;
}
.policy-content ul {
    color: #A89899;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.75;
}
.policy-content li {
    margin-bottom: 0.5rem;
}
.policy-content a {
    color: #CC3344;
    text-decoration: underline;
}
.policy-content a:hover {
    color: #E05566;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

/* Fieldset reset */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
legend {
    width: 100%;
}

/* Honeypot */
.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Labels */
.form-label {
    display: block;
    color: #D4C5C7;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Inputs */
.form-input {
    width: 100%;
    background: #1A1214;
    border: 1px solid #2D1F22;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    color: #F5EEEF;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder {
    color: #6B5A5C;
}
.form-input:focus {
    border-color: #7A141F;
    box-shadow: 0 0 0 3px rgba(122, 20, 31, 0.15);
}
.form-input:hover:not(:focus) {
    border-color: #3D0A0F;
}

/* Validation states */
.form-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}
.form-input-valid {
    border-color: #22c55e !important;
}

/* Error message */
.form-error {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}
.form-error.visible {
    max-height: 2rem;
    opacity: 1;
    min-height: auto;
}

/* Textarea */
.form-textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 400px;
    line-height: 1.6;
}

/* Select */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B5A5C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-select option {
    background: #1A1214;
    color: #F5EEEF;
}

/* Number input - hide spinners */
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.form-input[type="number"] {
    -moz-appearance: textfield;
}

/* Checkbox */
.form-checkbox-label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #A89899;
    line-height: 1.5;
}
.form-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    background: #1A1214;
    border: 1px solid #2D1F22;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-top: 0.125rem;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    transition: all 0.2s ease;
}
.form-checkbox:checked {
    background: #7A141F;
    border-color: #7A141F;
}
.form-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #F5EEEF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.form-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(122, 20, 31, 0.15);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #2D1F22;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.drop-zone:hover {
    border-color: #3D0A0F;
    background: rgba(122, 20, 31, 0.03);
}
.drop-zone-active {
    border-color: #7A141F !important;
    background: rgba(122, 20, 31, 0.08) !important;
}
.drop-zone-active .drop-zone-icon {
    stroke: #CC3344;
}
.drop-zone-icon {
    stroke: #6B5A5C;
    transition: stroke 0.2s ease;
    display: inline-block;
}
.drop-zone:hover .drop-zone-icon {
    stroke: #A89899;
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #1A1214;
    border: 1px solid #2D1F22;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    animation: fileSlideIn 0.2s ease;
}
@keyframes fileSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}
.file-item-icon {
    flex-shrink: 0;
}
.file-item-name {
    color: #D4C5C7;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-item-size {
    color: #6B5A5C;
    font-size: 0.6875rem;
    margin-top: 0.125rem;
}
.file-item-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6B5A5C;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease, background 0.2s ease;
}
.file-item-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.toast.visible {
    transform: translateX(0);
}
.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(17, 12, 14, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.toast-success .toast-content {
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.toast-error .toast-content {
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.toast-icon {
    flex-shrink: 0;
}
.toast-message {
    color: #D4C5C7;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; opacity: 1; transform: none; }
    .cta-btn::before { display: none; }
    .service-card { transition: none; }
    .portfolio-item { transition: none; }
    .cookie-banner { transition: none; }
    .mobile-menu { transition: none; }
    .faq-answer { transition: none; }
    .form-input { transition: none; }
    .form-error { transition: none; }
    .drop-zone { transition: none; }
    .toast { transition: none; }
    .file-item { animation: none; }
}
