/* ==========================================================================
   CSS Reset & Variables
   ========================================================================== */
   :root {
    /* Colors */
    --color-primary: #E7671F;
    --color-primary-dark: #C65516;
    --color-bg-light: #F9FAFB;
    --color-bg-dark: #222222;
    --color-text: #374151;
    --color-text-muted: #6B7280;
    --color-white: #FFFFFF;
    --color-black: #000000;
    
    --color-border: #E5E7EB;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(12px);
  
    /* Typography */
    --font-sans: 'Inter', 'Open Sans', 'Roboto', sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -10px rgba(0,0,0,0.15);
  
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg-light);
    scroll-behavior: smooth;
    line-height: 1.6;
  }
  
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }
  
  a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-bg-dark);
  }
  
  /* ==========================================================================
     Typography & Utilities
     ========================================================================== */
  .text-primary { color: var(--color-primary); }
  .text-center { text-align: center; }
  .text-white { color: var(--color-white); }
  .text-muted { color: var(--color-text-muted); }
  
  .bg-primary { background-color: var(--color-primary); }
  .bg-dark { background-color: var(--color-bg-dark); }
  .bg-light { background-color: var(--color-bg-light); }
  
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  /* ==========================================================================
     Header (Glassmorphism)
     ========================================================================== */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
  }
  
  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
  }
  
  .brand-logo img {
    height: 50px;
    transition: transform var(--transition-normal);
  }
  
  .brand-logo:hover img {
    transform: scale(1.05);
  }
  
  .nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
  }
  
  .nav-item {
    position: relative;
  }
  
  .nav-link {
    font-weight: 500;
    color: var(--color-bg-dark);
    padding: var(--space-xs) 0;
    position: relative;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-normal);
  }
  
  .nav-link:hover::after {
    width: 100%;
  }
  
  .nav-link:hover {
    color: var(--color-primary);
  }
  
  /* ==========================================================================
     Hero Section & Motion Graphics
     ========================================================================== */
  .hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding-top: 150px; /* Increased offset to give image top padding */
  }

  .hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
  }

  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Reduced overlay opacity to make the image more visible (opacity increase) */
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.6) 0%, rgba(15, 15, 15, 0.2) 100%);
    z-index: 2;
  }

  @keyframes waterFlow {
    0% { transform: scale(1.1) translate(0, 0); }
    33% { transform: scale(1.15) translate(-1%, 1%); }
    66% { transform: scale(1.12) translate(1%, -1%); }
    100% { transform: scale(1.1) translate(0, 0); }
  }
  
  .hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    animation: fadeUp 1s ease-out forwards;
  }
  
  .hero-title {
    font-size: 3.5rem;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeUp 1s 0.2s ease-out forwards;
  }
  
  .hero-title span {
    color: var(--color-primary);
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeUp 1s 0.4s ease-out forwards;
  }
  
  /* Motion Graphic Container */
  .hero-graphic {
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 100%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .svg-pipes {
    width: 100%;
    height: auto;
    max-height: 80vh;
    filter: drop-shadow(0 0 30px rgba(231, 103, 31, 0.3));
  }
  
  .svg-pipe-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPipe 4s ease-in-out forwards infinite alternate;
  }
  
  .svg-pipe-path.delay-1 { animation-delay: 0.5s; }
  .svg-pipe-path.delay-2 { animation-delay: 1s; }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
  }
  
  .btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(231, 103, 31, 0.4);
  }
  
  .btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 103, 31, 0.6);
    color: var(--color-white);
  }
  
  .btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
  }
  
  .btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-bg-dark);
  }
  
  /* ==========================================================================
     Product Cards
     ========================================================================== */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
  }

  /* Modern Premium Card */
  .premium-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  }
  .premium-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(231, 103, 31, 0.15);
  }
  .premium-card-img-wrapper {
    position: relative;
    height: 280px;
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs);
    overflow: hidden;
  }
  .premium-card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
  .premium-card:hover .premium-card-img {
    transform: scale(1.15);
  }
  .premium-card-content {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 1px solid rgba(0,0,0,0.03);
  }
  .premium-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    transition: color 0.3s ease;
  }
  .premium-card:hover .premium-card-title {
    color: var(--color-primary);
  }
  .premium-card-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
  }
  .premium-card-action {
    margin-top: auto;
    padding-top: var(--space-lg);
    display: flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .premium-card-action svg {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    transition: transform 0.3s ease;
  }
  .premium-card:hover .premium-card-action svg {
    transform: translateX(6px);
  }
  
  .product-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--color-border);
  }
  
  .product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
  }
  
  .product-image {
    height: 200px;
    background-color: #f3f4f6;
    position: relative;
    overflow: hidden;
  }
  
  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
  }
  
  .product-card:hover .product-image img {
    transform: scale(1.1);
  }
  
  .product-content {
    padding: var(--space-md);
  }
  
  .product-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    font-family: var(--font-sans);
    font-weight: 700;
  }
  
  .product-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
  }
  
  /* ==========================================================================
     Footer
     ========================================================================== */
  .site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding: var(--space-2xl) 0 var(--space-md);
    margin-top: auto;
  }
  
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
  }
  
  .footer-col h4 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
  }
  
  .footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-primary);
  }
  
  .footer-links {
    list-style: none;
  }
  
  .footer-links li {
    margin-bottom: var(--space-xs);
  }
  
  .footer-links a {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
  }
  
  /* ==========================================================================
     Animations
     ========================================================================== */
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes drawPipe {
    from {
      stroke-dashoffset: 1000;
    }
    to {
      stroke-dashoffset: 0;
    }
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .hero-section {
      padding-top: 120px; /* Better offset for header on mobile */
    }
    
    .hero-bg {
      filter: none !important; /* SVG filter often renders badly on mobile GPUs */
      background-position: center top;
    }

    .hero-title {
      font-size: 2.2rem;
    }
    
    .nav-links {
      display: none; /* In a real app, implement a hamburger menu */
    }
    
    .hero-graphic {
      display: none !important; /* Hiding the pipes on mobile because they block the text */
    }

    /* Disable framer motion fade-up on mobile to prevent layout shift / overflow */
    .fm-fade-up {
      opacity: 1 !important;
      transform: none !important;
      transition: none !important;
    }
  }

  /* ==========================================================================
     Framer Motion Style Scroll Animations
     ========================================================================== */
  .fm-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
  
  .fm-fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
  }
  
  .fm-stagger-1 { transition-delay: 0.1s; }
  .fm-stagger-2 { transition-delay: 0.2s; }
  .fm-stagger-3 { transition-delay: 0.3s; }
  .fm-stagger-4 { transition-delay: 0.4s; }

  .fm-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
  
  /* Make the SVG pipes animate only when visible */
  .fm-visible .svg-pipe-path {
    animation: drawPipe 3s ease-in-out forwards;
  }
  .fm-visible .svg-pipe-path.delay-1 { animation-delay: 0.5s; }
  .fm-visible .svg-pipe-path.delay-2 { animation-delay: 1s; }
