/* ===== BIN CHICKEN CO — DESIGN TOKENS & CUSTOM STYLES ===== */

/* Material Design 3 Color System */
:root {
  --md-sys-color-primary: #f59e0b;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-primary-container: #fef3c7;
  --md-sys-color-on-primary-container: #78350f;
  --md-sys-color-secondary: #71717a;
  --md-sys-color-on-secondary: #fff;
  --md-sys-color-tertiary: #a16207;
  --md-sys-color-tertiary-fixed: #fbbf24;
  --md-sys-color-surface: #fafaf9;
  --md-sys-color-on-surface: #18181b;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f5f5f4;
  --md-sys-color-surface-container: #e7e5e4;
  --md-sys-color-surface-container-high: #d6d3d1;
  --md-sys-color-outline-variant: #a1a1aa;
  --md-sys-color-on-surface-variant: #52525b;
}

/* Font families */
.font-headline { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.font-manrope { font-family: 'Manrope', 'Inter', system-ui, sans-serif; }
.font-body { font-family: 'Inter', system-ui, sans-serif; }
.font-label { font-family: 'Manrope', 'Inter', system-ui, sans-serif; }

/* Semantic color utilities */
.bg-primary { background-color: var(--md-sys-color-primary) !important; }
.text-primary { color: var(--md-sys-color-primary) !important; }
.text-on-primary { color: var(--md-sys-color-on-primary) !important; }
.bg-surface { background-color: var(--md-sys-color-surface); }
.text-on-surface { color: var(--md-sys-color-on-surface); }
.bg-surface-container-lowest { background-color: var(--md-sys-color-surface-container-lowest); }
.bg-surface-container-low { background-color: var(--md-sys-color-surface-container-low); }
.bg-surface-container { background-color: var(--md-sys-color-surface-container); }
.bg-surface-container-high { background-color: var(--md-sys-color-surface-container-high); }
.text-secondary { color: var(--md-sys-color-secondary); }
.text-tertiary { color: var(--md-sys-color-tertiary); }
.border-primary { border-color: var(--md-sys-color-primary) !important; }
.border-outline-variant { border-color: var(--md-sys-color-outline-variant); }
.shadow-primary\/20 { box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.2); }

/* Home hero word cycling */
.word-cycle-container {
  display: inline-block;
  position: relative;
  height: 1.15em;
  overflow: hidden;
  vertical-align: bottom;
}
.word-cycle-track {
  display: block;
  animation: wordCycle 10s infinite;
}
.word-cycle-track span {
  display: block;
  height: 1.15em;
  line-height: 1.15;
  color: var(--md-sys-color-primary);
}
@keyframes wordCycle {
  0%, 16% { transform: translateY(0); }
  20%, 36% { transform: translateY(-20%); }
  40%, 56% { transform: translateY(-40%); }
  60%, 76% { transform: translateY(-60%); }
  80%, 96% { transform: translateY(-80%); }
  100% { transform: translateY(0); }
}

/* Service card hover */
.service-card { transition: all 0.3s ease; }
.service-card:hover { transform: translateY(-4px); }
.service-card img { transition: filter 0.5s ease, opacity 0.5s ease; }

/* Grayscale hover effect */
.grayscale-hover { filter: grayscale(100%) contrast(1.1); transition: filter 0.5s ease; }
.grayscale-hover:hover { filter: grayscale(0%) contrast(1); }

/* Bar fill animation */
.bar-fill {
  width: 0;
  transition: width 1.5s ease-out;
}
.bar-fill.animate {
  /* Width set inline */
}

/* Zero delay badge */
.zero-delay-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px dashed var(--md-sys-color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Testimonial border draw-in */
.testimonial-border {
  position: relative;
  border: none;
  padding: 3rem 3rem;
}
@media (min-width: 768px) {
  .testimonial-border { padding: 5rem 5rem; }
}
.testimonial-border::before {
  content: '';
  position: absolute;
  inset: -1.5rem;
  border: 4px solid var(--md-sys-color-outline-variant, #e4e4e7);
  border-radius: 1.5rem;
  clip-path: inset(0 0 calc(var(--border-progress, 100) * 1%) 0);
  will-change: clip-path;
}

/* Clickable highlight */
.bc-highlight {
  transition: background-color 0.3s ease, padding 0.3s ease;
  border-radius: 4px;
  padding: 0 2px;
}
.bc-highlight.highlighted {
  background-color: #fde68a;
  padding: 0 6px;
}

/* Crack overlay for demo page */
.bc-cracks {
  opacity: 0;
  animation: cracksAppear 0.2s ease-out 0.7s forwards;
  background:
    /* Main impact crack - thick */
    linear-gradient(32deg, transparent 28%, rgba(255,255,255,0.5) 28%, rgba(255,255,255,0.5) 28.4%, transparent 28.4%),
    /* Secondary crack */
    linear-gradient(68deg, transparent 22%, rgba(255,255,255,0.4) 22%, rgba(255,255,255,0.4) 22.3%, transparent 22.3%),
    /* Branching crack */
    linear-gradient(12deg, transparent 38%, rgba(255,255,255,0.35) 38%, rgba(255,255,255,0.35) 38.3%, transparent 38.3%),
    /* Horizontal fracture */
    linear-gradient(82deg, transparent 52%, rgba(255,255,255,0.3) 52%, rgba(255,255,255,0.3) 52.25%, transparent 52.25%),
    /* Downward crack */
    linear-gradient(135deg, transparent 18%, rgba(255,255,255,0.4) 18%, rgba(255,255,255,0.4) 18.3%, transparent 18.3%),
    /* Cross fracture */
    linear-gradient(48deg, transparent 58%, rgba(255,255,255,0.3) 58%, rgba(255,255,255,0.3) 58.25%, transparent 58.25%),
    /* Web crack lower */
    linear-gradient(158deg, transparent 42%, rgba(255,255,255,0.35) 42%, rgba(255,255,255,0.35) 42.3%, transparent 42.3%),
    /* Short splinter */
    linear-gradient(95deg, transparent 33%, rgba(255,255,255,0.25) 33%, rgba(255,255,255,0.25) 33.2%, transparent 33.2%);
}
@keyframes cracksAppear {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Demolition slam */
.bc-slam {
  display: inline-block;
  animation: slamIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
}
.bc-slam.replay {
  animation: none;
}
.bc-slam.replay-go {
  animation: slamIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes slamIn {
  0% {
    opacity: 0;
    transform: scale(2.5) translateY(-20px);
    letter-spacing: 0.15em;
  }
  60% {
    opacity: 1;
    transform: scale(0.95) translateY(2px);
    letter-spacing: -0.03em;
  }
  75% {
    transform: scale(1.02) translateY(-1px);
  }
  100% {
    transform: scale(1) translateY(0);
    letter-spacing: inherit;
  }
}
.bc-slam-container {
  animation: impactShake 0.15s ease-out 0.7s both;
}
@keyframes impactShake {
  0% { transform: translateY(0); }
  25% { transform: translateY(3px); }
  50% { transform: translateY(-2px); }
  75% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

/* Dust particles */
.bc-dust {
  position: relative;
}
.bc-dust::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.3) 0%, transparent 70%);
  animation: dustPuff 1s ease-out 0.75s both;
}
@keyframes dustPuff {
  0% { opacity: 0; transform: scaleX(0.3); }
  30% { opacity: 1; transform: scaleX(1.2); }
  100% { opacity: 0; transform: scaleX(2) translateY(6px); }
}

/* Auto-highlight on scroll */
.bc-highlight-auto {
  transition: background-color 0.6s ease, padding 0.3s ease;
  border-radius: 4px;
  padding: 0 2px;
}
.bc-highlight-auto.highlighted {
  background-color: rgba(253, 230, 138, 0.3);
  padding: 0 6px;
}

/* Shake CTA */
.bc-shake {
  animation: ctaShake 4s ease-in-out infinite;
}
@keyframes ctaShake {
  0%, 88%, 100% { transform: translateX(0); }
  90% { transform: translateX(-4px) rotate(-1deg); }
  92% { transform: translateX(4px) rotate(1deg); }
  94% { transform: translateX(-3px) rotate(-0.5deg); }
  96% { transform: translateX(3px) rotate(0.5deg); }
  98% { transform: translateX(0); }
}

/* Industrial glass effect */
.industrial-glass {
  background: rgba(24, 24, 27, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Ghost border */
.ghost-border {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact page: picker/form show-hide via :target */
.bc-contact-flow {
  display: flex;
  flex-direction: column;
}
.bc-picker {
  order: -1;
}
.bc-form-panel {
  display: none;
}
.bc-form-panel:target {
  display: block;
}
.bc-form-panel:target ~ .bc-picker {
  display: none;
}

/* Waste tag toggle (CSS only) */
.bc-waste-tag { position: relative; }
.bc-waste-tag:active,
.bc-waste-tag:focus {
  border-color: var(--md-sys-color-primary) !important;
  background-color: rgba(245, 158, 11, 0.08);
}

/* Size card hover */
.bc-size-card:hover {
  border-color: var(--md-sys-color-primary) !important;
  background-color: rgba(245, 158, 11, 0.05);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}
.mobile-menu.active {
  display: block;
}
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #18181b;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 101;
}
.mobile-menu.active .mobile-menu-panel {
  transform: translateX(0);
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Material Icons (loaded via Google Fonts link in HTML) */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* Contact form inputs */
.bc-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(161, 161, 170, 0.2);
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  color: #18181b;
  transition: border-color 0.2s;
}
.bc-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}
.bc-input::placeholder {
  color: rgba(113, 113, 122, 0.6);
}
.bc-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(161, 161, 170, 0.2);
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  color: #18181b;
  appearance: auto;
}
.bc-select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
}
.bc-checkbox {
  accent-color: var(--md-sys-color-primary);
  width: 1rem;
  height: 1rem;
}
.bc-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 900;
  font-family: 'Inter', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.bc-btn:hover {
  opacity: 0.92;
  transform: scale(1.005);
}

/* Active nav link */
.nav-link-active {
  color: var(--md-sys-color-primary) !important;
  border-bottom: 2px solid var(--md-sys-color-primary);
  padding-bottom: 2px;
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.open .faq-answer {
  max-height: 500px !important;
  overflow: visible !important;
  padding-bottom: 1.5rem;
}
.open .faq-arrow {
  transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .word-cycle-container { display: block; }
}
