/* ============================================
   Homepage Styles - Terpal Sales
   Light theme with scroll animations
   ============================================ */

/* --- CSS Variables --- */
:root {
    --h-primary: #4f46e5;
    --h-primary-dark: #4338ca;
    --h-primary-light: #eef2ff;
    --h-gradient-start: #667eea;
    --h-gradient-end: #764ba2;
    --h-text-dark: #111827;
    --h-text-medium: #374151;
    --h-text-light: #6b7280;
    --h-bg-white: #ffffff;
    --h-bg-light: #f9fafb;
    --h-bg-gray: #f3f4f6;
    --h-border: #e5e7eb;
    --h-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --h-radius: 8px;
    --h-radius-lg: 16px;
    --h-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --h-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --h-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --h-transition: all 0.3s ease;
    --h-navbar-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--h-navbar-height);
}

body {
    font-family: var(--h-font);
    color: var(--h-text-dark);
    background: var(--h-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* --- Scroll Animation Base States --- */
[data-animate] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

[data-animate="fade-in"] {
    transform: none;
}

[data-animate="fade-in-up"] {
    transform: translateY(40px);
}

[data-animate="fade-in-down"] {
    transform: translateY(-40px);
}

[data-animate="fade-in-left"] {
    transform: translateX(-40px);
}

[data-animate="fade-in-right"] {
    transform: translateX(40px);
}

[data-animate="scale-in"] {
    transform: scale(0.9);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    * {
        animation-duration: 0s !important;
    }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--h-transition);
    background: transparent;
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--h-shadow);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--h-text-dark);
}

.nav-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--h-text-medium);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--h-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--h-primary);
    border-radius: 1px;
}

.nav-cta {
    background: var(--h-primary);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: var(--h-radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--h-transition);
}

.nav-cta:hover {
    background: var(--h-primary-dark);
    transform: translateY(-1px);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--h-text-dark);
}

.nav-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--h-shadow-lg);
    padding: 1rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-mobile-menu.open {
    display: flex;
    animation: slideDown 0.3s ease;
}

.nav-mobile-menu .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--h-border);
    font-size: 1rem;
}

.nav-mobile-menu .nav-link:last-of-type {
    border-bottom: none;
}

.nav-mobile-menu .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
    display: block;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--h-navbar-height);
    background: var(--h-bg-white);
}

.hero-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--h-primary-light);
    color: var(--h-primary);
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--h-text-dark);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--h-text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--h-primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--h-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--h-transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--h-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--h-shadow-lg);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--h-primary);
    padding: 0.875rem 2rem;
    border-radius: var(--h-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--h-transition);
    border: 2px solid var(--h-primary);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--h-primary-light);
    transform: translateY(-2px);
}

/* Hero Visual / Decorative Panel */
.hero-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--h-gradient-start), var(--h-gradient-end));
    border-radius: var(--h-radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-shape {
    position: absolute;
    border-radius: var(--h-radius-lg);
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-shape-1 {
    width: 200px;
    height: 200px;
    top: -40px;
    right: -40px;
}

.hero-shape-2 {
    width: 150px;
    height: 150px;
    bottom: 60px;
    left: -30px;
    animation-delay: -2s;
}

.hero-shape-3 {
    width: 100px;
    height: 100px;
    bottom: -20px;
    right: 40px;
    background: rgba(255, 255, 255, 0.15);
    animation-delay: -4s;
}

.hero-shape-4 {
    width: 120px;
    height: 120px;
    top: 50px;
    left: 50px;
    background: rgba(255, 255, 255, 0.08);
    animation-delay: -1s;
}

.hero-icon-center {
    color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   STATS / BUSINESS SECTION
   ============================================ */
.stats-section {
    padding: 5rem 0;
    background: var(--h-bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--h-primary);
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--h-text-dark);
}

.section-header p {
    color: var(--h-text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stat-card {
    background: var(--h-bg-light);
    border-radius: var(--h-radius-lg);
    padding: 2rem;
    text-align: center;
    border-top: 3px solid var(--h-primary);
    transition: var(--h-transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--h-shadow-xl);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--h-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--h-primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--h-text-dark);
    line-height: 1;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--h-primary);
}

.stat-label {
    color: var(--h-text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* ============================================
   ABOUT US SECTION
   ============================================ */
.about-section {
    padding: 5rem 0;
    background: var(--h-bg-light);
}

.about-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--h-text-dark);
}

.about-content p {
    color: var(--h-text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-features {
    list-style: none;
    margin: 1.5rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--h-text-medium);
    font-size: 0.95rem;
}

.about-features li svg {
    flex-shrink: 0;
    color: var(--h-primary);
    margin-top: 2px;
}

.about-visual {
    position: relative;
    height: 450px;
}

.about-visual-main {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--h-gradient-start), var(--h-gradient-end));
    border-radius: var(--h-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.about-visual-main .hero-shape {
    background: rgba(255, 255, 255, 0.08);
}

.about-visual-icon {
    color: rgba(255, 255, 255, 0.2);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: white;
    border-radius: var(--h-radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--h-shadow-xl);
    text-align: center;
}

.about-badge-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--h-primary);
    line-height: 1;
}

.about-badge-text {
    font-size: 0.85rem;
    color: var(--h-text-light);
    margin-top: 0.25rem;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
    padding: 5rem 0;
    background: var(--h-bg-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.product-card {
    background: var(--h-bg-white);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
    padding: 2rem;
    transition: var(--h-transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--h-shadow-xl);
    border-color: transparent;
}

.product-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: white;
}

.product-icon.pvc {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.product-icon.pe {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.product-icon.canvas {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.product-icon.clear {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.product-icon.waring {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.product-icon.custom {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.product-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--h-text-dark);
}

.product-card p {
    color: var(--h-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   CONTACT / CTA SECTION
   ============================================ */
.contact-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--h-gradient-start), var(--h-gradient-end));
    color: white;
    text-align: center;
}

.contact-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-section .contact-subtitle {
    opacity: 0.9;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--h-primary);
    padding: 0.875rem 2rem;
    border-radius: var(--h-radius);
    font-weight: 600;
    transition: var(--h-transition);
    border: none;
    cursor: pointer;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--h-shadow-lg);
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--h-radius);
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: var(--h-transition);
    cursor: pointer;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.contact-info-item svg {
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #111827;
    color: #d1d5db;
    padding: 4rem 0 0;
}

.footer-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0;
}

.footer-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.footer-brand-text {
    margin-top: 1rem;
    line-height: 1.7;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    transition: var(--h-transition);
}

.footer-social-link:hover {
    background: var(--h-primary);
    color: white;
}

.footer-column h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 0.9rem;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    text-align: center;
    opacity: 0.5;
    font-size: 0.85rem;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        height: 300px;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-visual {
        height: 300px;
        order: -1;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-buttons .btn-white,
    .contact-buttons .btn-outline-white {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-container {
        padding: 1rem;
    }

    .about-badge {
        bottom: -10px;
        left: 10px;
    }
}
