/* ============================================
   LowCarbonLife – Design System & Custom Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Greens: desaturated, gray-toned for minimal sophistication */
  --color-cream: #F5F1EA;
  --color-cream-dark: #EDE9E0;
  --color-cream-light: #FAF8F4;
  --color-charcoal: #2C2A26;
  --color-charcoal-light: #5D5A53;
  --color-sage: #6B7D74;
  --color-sage-light: #9DA9A2;
  --color-sage-dark: #566C62;
  --color-sage-pale: #D8DDD9;
  --color-terracotta: #C08B5C;
  --color-terracotta-light: #D4A373;
  --color-forest: #5E6E66;
  --announcement-height: 32px;
  --nav-height: 80px;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--announcement-height));
}

body {
  font-family: 'Open Sans', system-ui, sans-serif;
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  overflow-x: hidden;
}

::selection {
  background-color: var(--color-sage-pale);
  color: var(--color-charcoal);
}

/* --- Typography --- */
h1, h2, h3, h4, .font-serif {
  font-family: 'Raleway', 'Helvetica Neue', sans-serif;
}

.font-handwritten {
  font-family: 'Caveat', cursive;
}

/* --- Paper Grain Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Announcement Bar --- */
.announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  background-color: var(--color-charcoal);
  color: rgba(245, 241, 234, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  height: var(--announcement-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 400;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.announcement-bar .nowrap {
  white-space: nowrap;
}

.announcement-bar.hidden-bar {
  transform: translateY(-100%);
}

/* --- Navigation --- */
.nav-fixed {
  position: fixed;
  top: var(--announcement-height);
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background-color: var(--color-cream);
  border-bottom: 1px solid rgba(44, 42, 38, 0.06);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-fixed.scrolled {
  top: 0;
  background-color: rgba(245, 241, 234, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(44, 42, 38, 0.08);
  height: var(--nav-height);
}

.nav-fixed.scrolled .nav-link {
  color: var(--color-charcoal);
}

.nav-link {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* --- Hero --- */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 700px;
  margin-top: calc(var(--announcement-height) + var(--nav-height));
  overflow: hidden;
  background-color: #7A8B82;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease-out;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(107, 125, 116, 0.35) 0%,
    rgba(107, 125, 116, 0.15) 40%,
    rgba(107, 125, 116, 0.4) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(2rem, 8vw, 8rem);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.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; }

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.12s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.24s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.36s; }

/* --- Product Cards --- */
.product-card {
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card .product-image {
  overflow: hidden;
  background-color: var(--color-cream-dark);
}

.product-card .product-image img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.06);
}

.product-card .product-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-overlay-btn {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--color-charcoal);
  padding: 0.75rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translateY(12px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-overlay-btn {
  transform: translateY(0);
}

/* --- Section Divider: Torn Paper Edge --- */
.torn-edge {
  position: relative;
}

.torn-edge::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-cream);
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% 30%, 97% 55%, 94% 35%, 90% 60%, 86% 40%, 82% 55%, 78% 30%,
    74% 50%, 70% 35%, 66% 55%, 62% 30%, 58% 50%, 54% 35%, 50% 55%,
    46% 30%, 42% 50%, 38% 35%, 34% 55%, 30% 30%, 26% 50%, 22% 35%,
    18% 55%, 14% 30%, 10% 50%, 6% 35%, 3% 55%, 0% 30%
  );
  z-index: 2;
}

/* --- Brand Values --- */
.value-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-sage);
  border-radius: 50%;
  color: var(--color-sage);
  margin-bottom: 1rem;
  transition: all 0.4s;
}

.value-card:hover .value-icon {
  background-color: var(--color-sage);
  color: var(--color-cream);
}

/* --- About Section: Split Layout --- */
.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  right: -1.5rem;
  bottom: -1.5rem;
  border: 1px solid var(--color-sage-light);
  z-index: -1;
}

/* --- Reviews --- */
.review-card {
  background: var(--color-cream-light);
  border: 1px solid rgba(44, 42, 38, 0.06);
  padding: 2rem;
  transition: box-shadow 0.4s;
}

.review-card:hover {
  box-shadow: 0 8px 32px rgba(44, 42, 38, 0.06);
}

.star {
  color: var(--color-terracotta);
}

/* --- Newsletter --- */
.newsletter-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 241, 234, 0.4);
  color: var(--color-cream);
  padding: 0.75rem 0;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.3s;
}

.newsletter-input::placeholder {
  color: rgba(245, 241, 234, 0.5);
}

.newsletter-input:focus {
  border-bottom-color: var(--color-cream);
}

/* --- Footer --- */
.footer-link {
  color: rgba(245, 241, 234, 0.6);
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--color-cream);
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--color-cream);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: 'Raleway', 'Helvetica Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--color-charcoal);
  margin: 0.75rem 0;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
}

.mobile-menu a:hover {
  opacity: 0.5;
}

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switcher button {
  padding: 0.25rem 0.5rem;
  transition: opacity 0.3s;
  border-radius: 2px;
}

.lang-switcher button.active {
  opacity: 1;
  background-color: rgba(107, 125, 116, 0.1);
}

.lang-switcher button:not(.active) {
  opacity: 0.4;
}

.lang-switcher button:not(.active):hover {
  opacity: 0.7;
}

/* --- CTA Button --- */
.btn-primary {
  display: inline-block;
  background-color: var(--color-sage);
  color: var(--color-cream);
  padding: 0.9rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background-color: var(--color-sage-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(107, 125, 116, 0.2);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-charcoal);
  padding: 0.9rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--color-charcoal);
  transition: all 0.4s;
}

.btn-secondary:hover {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
}

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-terracotta);
  color: white;
  padding: 0.75rem 1.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.4s;
}

.btn-amazon:hover {
  background-color: #A87A4F;
  transform: translateY(-1px);
}

/* --- Badge --- */
.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  background-color: var(--color-sage);
  color: var(--color-cream);
}

.badge-sale {
  background-color: var(--color-terracotta);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-sage-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-sage);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --announcement-height: 40px;
    --nav-height: 60px;
  }

  .announcement-bar {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.5rem;
    line-height: 1.4;
    height: var(--announcement-height);
  }

  .hero-section {
    min-height: 500px;
    height: calc(100vh - var(--announcement-height) - var(--nav-height));
    height: calc(100svh - var(--announcement-height) - var(--nav-height));
  }

  .hero-content {
    padding: 0 1.5rem;
  }

  .torn-edge::before {
    height: 20px;
  }

  .about-image-wrapper::after {
    display: none;
  }

  /* Product cards: show subtle CTA on mobile (no hover on touch) */
  .product-card .product-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
  }

  .product-overlay-btn {
    transform: translateY(0);
    font-size: 0.5rem;
    padding: 0.35rem 0.6rem;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.85);
  }

  /* Smaller section padding on mobile */
  .section-mobile-compact {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  /* Review cards horizontal scroll on mobile */
  .reviews-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .reviews-scroll > * {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  /* Newsletter form stacking */
  .newsletter-input {
    font-size: 1rem;
  }

  /* Footer: 2-column grid for link sections */
  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Buttons: full width on mobile */
  .btn-primary,
  .btn-secondary {
    display: block;
    text-align: center;
    width: 100%;
  }

  .btn-secondary {
    display: inline-block;
    width: auto;
  }
}

/* Small phones (< 400px) */
@media (max-width: 400px) {
  .hero-section {
    min-height: 450px;
  }
}

/* --- Placeholder Image Styling --- */
.placeholder-img {
  position: relative;
}

.placeholder-img::after {
  content: 'Quiver AI Illustration';
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.6rem;
  pointer-events: none;
}
