/* ========================================
   Critical Above-the-Fold Styles
   (Keep these at the top for faster rendering)
======================================== */

/* Global Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "DIN Condensed Bold", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fcfcfc;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation - Critical */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  width: 100%;
}

.site-tagline {
  text-align: left;
  color: #fff;
  font-style: italic;
  margin: 0 0 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 48px;
  width: auto;
}

/* Hero Sections - Critical for LCP */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  /* Add will-change for better rendering performance */
  will-change: transform;
  /* Use transform3d to enable hardware acceleration */
  transform: translate3d(0, 0, 0);
}

/* Optimize hero background loading */
.hero--home {
  color: #fe2802;
  height: 60vh;
  /* Simplified background for faster loading - remove image-set complexity */
  background-image: url("images/sonciel_banner.webp");
  /* Add fallback */
  background-image: 
    url("images/sonciel_banner.webp"),
    url("images/sonciel_banner.jpg");
  /* Optimize background rendering */
  background-attachment: scroll; /* Better than fixed for mobile */
  contain: layout style paint; /* CSS containment for better performance */
}

.hero--products {
  color: #fff;
  height: clamp(40px, 5vh, 80px); /* minimum 40px, responsive 5vh, max 80px */
  background-image: 
    url("images/sonciel_banner_mid.webp"),
    url("images/sonciel_banner_mid.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  contain: layout style paint;
}
.image-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Main tagline strip - Critical */
.tagline-box {
  background: #000;
  color: #fff;
  width: 100%;
  text-align: center;
  padding: 0.75rem 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0;
  /* Add performance optimization */
  contain: layout style;
}

/* Coming Soon Banner */
.hero-home {
  background: #000;
  color: #fff;
  width: 100%;
  padding: 2rem 1rem;
  text-align: center;
  margin: 0;
  contain: layout style;
}

.hero-home .tagline-box {
  background: transparent;
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  padding: 0;
}

/* ========================================
   Non-Critical Styles (Can be loaded later)
======================================== */

img {
  max-width: 100%;
  display: block;
  /* Add decoding optimization */
  decoding: async;
}

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

/* Desktop Navigation */
.site-nav {
  display: flex;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #fff;
  padding: 0.5rem;
  transition: opacity 0.3s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  opacity: 0.8;
  text-decoration: underline;
}

/* Hamburger Menu Button */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: #fff;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: relative;
}

.hamburger::before {
  transform: translateY(-6px);
}

.hamburger::after {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
}

/* Reusable Components */
.heading-box {
  background: #000;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  display: block;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  contain: layout style;
}

/* Layout Helpers */
main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  contain: layout;
}

.about,
.compliance,
.blog-snippets,
.newsletter,
.products {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  contain: layout;
}

/* Star List */
.star-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.star-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.5rem;
}

.star-list li::before {
  content: "\2727";
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 1.1rem;
  color: #c0392b;
}

/* ====== Numbered List – custom, unobtrusive ====== */
.num-list {
      /* removes browser bullets AND starts our counter */
      list-style: none;
      counter-reset: item;
      margin: 0;
      padding: 0;
    }
    
    /* each list item */
    .num-list li {
      position: relative;
      padding-left: 1.8rem;     /* room for the number */
      margin-bottom: 0.5rem;
    }
    
    /* the custom number “badge” */
    .num-list li::before {
      counter-increment: item;              /* +1 each <li> */
      content: "(" counter(item) ")";       /* e.g. (1) (2) (3) */
      position: absolute;
      left: 0;
      top: 0.05em;
    
      /* style = small, muted, but readable */
      font-size: 0.85rem;
      line-height: 1;
      font-weight: 600;
      color: #c0392b;        /* your accent colour */
      opacity: 0.7;          /* makes it “quiet” */
    }

/* Product Page Components */
.specs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.column {
  flex: 1 1 250px;
}

.seller-wrapper {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
}

.seller-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.seller-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid #0070f3;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  color: #0070f3;
  transition: all 0.25s ease;
}

.seller-btn:hover {
  background: #0070f3;
  color: #fff;
}

/* Newsletter & CTA - Optimize gradient */
.bottom-cta {
  background: linear-gradient(
    90deg,
    #3aaee4 0%,
    #42cbb8 25%,
    #f2d88c 50%,
    #f7b0b0 75%,
    #e76c6c 100%
  );
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem;
  contain: layout style paint;
}

.bottom-cta p {
  font-size: 1.25rem;
  max-width: 48rem;
  margin: 0 auto 1.5rem;
}

.cta-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.newsletter .sender-form-field {
  margin-top: 1rem;
}

.newsletter button {
  padding: 0.75rem 1.25rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: opacity 0.2s linear;
}

.newsletter button:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  background: #000;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

footer p {
  margin: 0.25rem 0;
}

.social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-links li {
  display: inline-flex;
}

/* Cookie Notice */
#essential-cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  color: #fff;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  font-size: 0.9rem;
  text-align: center;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

#essential-cookie-notice a {
  color: #00ffff;
}

#essential-cookie-notice button {
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  background: #333;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
}

/* ========================================
   Mobile Navigation
======================================== */
@media (max-width: 992px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: #000;
    z-index: 1000;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
  }
}

    #banner {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .image-container {
        flex: 1;
        min-width: 200px;
        margin: 0;
    }
    
    .image-container figure {
        display: flex;
        flex-direction: column;
        margin: 0;
        height: 100%;
    }
    
    figcaption {
        text-align: center;
        font-style: italic;
        font-size: 0.9rem;
        color: #666;
        padding: 0.5rem;
        margin-top: 0.5rem;
        background: #f8f9fa;
        border-radius: 4px;
    }
    


    /* Responsive image wrapper with aspect ratio */
    .responsive-image-wrapper {
        position: relative;
        width: 100%;
        /* Maintain 1:1 aspect ratio (square) */
        aspect-ratio: 1 / 1;
        /* Fallback for browsers without aspect-ratio support */
        padding-bottom: 100%;
        height: 0;
        overflow: hidden;
        border-radius: 8px;
        background: #f0f0f0; /* Placeholder color while loading */
    }
    
    /* For browsers that support aspect-ratio, reset the padding hack */
    @supports (aspect-ratio: 1) {
        .responsive-image-wrapper {
            padding-bottom: 0;
            height: auto;
        }
    }
    
    .responsive-image-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover; /* Maintains aspect ratio, crops if necessary */
        object-position: center;
        /* Optimize image rendering */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
   

    /* Slightly smaller on mobile to accommodate three images */
    .responsive-image-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .responsive-image-wrapper {
        max-width: 280px;
    }
}
/* ========================================
   Responsive Design - Optimized
======================================== */
@media (max-width: 600px) {
  .hero--home {
    height: 40vh;
  }
 
  .hero--products {
    height: clamp(40px, 7vh, 60px); /* slightly taller on mobile but still slim */
  }
  
  main {
    padding: 2rem 1rem;
  }
  
  .specs-wrapper {
    flex-direction: column;
  }
  
  .seller-list {
    justify-content: center;
  }
}

@media (min-width: 840px) {
  .bottom-cta {
    text-align: left;
  }
  
  .bottom-cta .cta-inner {
    grid-template-columns: 1fr minmax(26rem, 34rem);
  }
  
  .bottom-cta .cta-inner p {
    margin: 0 0 1.25rem 0;
  }
}

@media (min-width: 992px) {
  .hero--home {
    height: 60vh;
  }
  
  .hero--products {
    height: 5vh;
  }
}

/* Enhanced responsive design for images */
@media (max-width: 768px) {
    #banner {
        flex-direction: column;
        align-items: center;
    }
    
    .image-container {
        max-width: 100%;
        width: 100%;
    }

    /* Slightly smaller on mobile to accommodate three images */
    .responsive-image-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
}
