
/* ===== N-Bone — custom styles ===== */

:root {
  --flame: #e0481e;
  --bark: #2e2620;
  --cream: #faf4ea;
  --leaf: #3f7d3a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  background: var(--cream);
  color: var(--bark);
  -webkit-font-smoothing: antialiased;
}

/* Section anchor offset for sticky header */
section[id] {
  scroll-margin-top: 5.5rem;
}

/* --- Sticky header states --- */
#siteHeader {
  background: transparent;
  border-bottom: 1px solid transparent;
}
#siteHeader.scrolled {
  background: rgba(250, 244, 234, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(46, 38, 32, 0.08);
  box-shadow: 0 8px 24px -16px rgba(46, 38, 32, 0.4);
}
#siteHeader.scrolled .nav-link {
  color: var(--bark);
}
.nav-link {
  color: var(--bark);
  position: relative;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--flame);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 999px;
  background: var(--flame);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-group.visible > * {
  opacity: 1;
  transform: none;
}
.reveal-group.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-group.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-group.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-group.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-group.visible > *:nth-child(6) { transition-delay: 0.4s; }

/* --- Product filter buttons --- */
.filter-btn {
  background: #fff;
  border-color: rgba(46, 38, 32, 0.12);
  color: var(--bark);
}
.filter-btn:hover {
  border-color: var(--flame);
  color: var(--flame);
}
.filter-btn.active {
  background: var(--flame);
  border-color: var(--flame);
  color: #fff;
}

/* --- Product cards --- */
.product-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, opacity 0.4s ease;
}
.product-card:hover {
  transform: translateY(-6px);
}
.product-card.hide {
  display: none;
}

/* --- Comparison tabs --- */
.compare-tab {
  color: var(--bark);
}
.compare-tab:hover {
  color: var(--flame);
}
.compare-tab.active {
  background: var(--flame);
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(224, 72, 30, 0.7);
}

/* --- FAQ accordion --- */
.faq-item {
  background: #fff;
  border: 1px solid rgba(46, 38, 32, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.faq-item.open {
  box-shadow: 0 14px 30px -18px rgba(46, 38, 32, 0.35);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-weight: 800;
  font-size: 1.05rem;
}
.faq-chevron {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--flame);
  transition: transform 0.3s ease, background 0.3s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(45deg);
  background: var(--flame);
  color: #fff;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a-inner {
  padding: 0 1.5rem 1.4rem;
  color: rgba(46, 38, 32, 0.72);
  font-weight: 600;
  line-height: 1.7;
}

/* --- Review track / carousel --- */
#reviewTrack {
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 72, 30, 0.5) transparent;
}
#reviewTrack::-webkit-scrollbar {
  height: 8px;
}
#reviewTrack::-webkit-scrollbar-thumb {
  background: rgba(224, 72, 30, 0.45);
  border-radius: 999px;
}
.review-card {
  flex: 0 0 auto;
  width: 100%;
  max-width: 360px;
  scroll-snap-align: start;
}

/* --- Stars --- */
.stars {
  display: inline-flex;
  gap: 1px;
  letter-spacing: 1px;
  color: #f59e0b;
}

/* --- To-top button --- */
#toTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- Family items --- */
.family-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.family-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -18px rgba(46, 38, 32, 0.4);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
