/* FreshBuilder Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--site-body-font, system-ui, -apple-system, 'Segoe UI', sans-serif); line-height: 1.5; -webkit-font-smoothing: antialiased; color: var(--site-text, #1a1a1a); background-color: var(--site-bg, #fff); }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Block system */
.fb-block { position: relative; }
.fb-shader-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fb-block > *:not(.fb-shader-bg):not(.fb-bg-image) { position: relative; z-index: 1; }
.fb-bg-image { pointer-events: none; }

/* Hero */
.fb-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fb-hero-heading { font-family: var(--site-heading-font, inherit); font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.fb-hero-sub { margin-top: 1rem; font-size: clamp(1rem, 2vw, 1.25rem); opacity: 0.7; max-width: 600px; }

/* Buttons */
.fb-button { display: inline-block; border-radius: var(--site-radius, 0.5rem); font-weight: 600; transition: opacity 0.15s, transform 0.15s; cursor: pointer; border: none; }
.fb-button:hover { opacity: 0.9; transform: translateY(-1px); }
.fb-button:active { transform: translateY(0); }
.fb-button--primary { background: var(--site-primary, #1a1a1a); color: var(--site-bg, #fff); }
.fb-button--secondary { background: var(--site-surface, #f0f0f0); color: var(--site-text, #1a1a1a); }
.fb-button--outline { background: transparent; border: 1.5px solid var(--site-primary, currentColor); color: var(--site-primary, currentColor); }
.fb-button--ghost { background: transparent; }
.fb-button--sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.fb-button--md { padding: 0.5rem 1rem; font-size: 0.875rem; }
.fb-button--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.fb-hero-cta { margin-top: 2rem; padding: 0.75rem 2rem; font-size: 1rem; }

/* Content */
.fb-heading { font-family: var(--site-heading-font, inherit); font-weight: 700; }
.fb-text { line-height: 1.7; }
.fb-text p { margin-bottom: 1em; }
.fb-text p:last-child { margin-bottom: 0; }
.fb-text h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5em; }
.fb-text h4 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5em; }
.fb-text ul, .fb-text ol { margin-left: 1.5em; margin-bottom: 1em; }
.fb-text blockquote { border-left: 3px solid #e5e5e5; padding-left: 1em; font-style: italic; margin-bottom: 1em; }
.fb-image { border-radius: 0.5rem; }
.fb-image-placeholder { background: #f5f5f5; border-radius: 0.5rem; }
.fb-divider { border: none; }

/* Columns */
.fb-columns { width: 100%; }
@media (max-width: 768px) {
  .fb-columns { grid-template-columns: 1fr !important; }
}

/* Navigation */
.fb-nav { background: var(--site-surface, rgba(255,255,255,0.95)); border-bottom: 1px solid rgba(0,0,0,0.08); z-index: 100; }
.fb-nav--sticky { position: sticky; top: 0; }
.fb-nav--transparent { background: transparent; border-bottom: none; }
.fb-nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0.75rem 1.5rem; }
.fb-nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.fb-nav-logo-img { height: 28px; width: auto; }
.fb-nav-logo-text { font-weight: 700; font-size: 0.875rem; }
.fb-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.fb-nav-link { font-size: 0.875rem; font-weight: 500; opacity: 0.7; transition: opacity 0.15s; }
.fb-nav-link:hover { opacity: 1; }
.fb-nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.25rem; flex-direction: column; gap: 4px; }
.fb-nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }
.fb-nav-dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 0.5rem; padding: 0.5rem; min-width: 160px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.fb-nav-link:hover .fb-nav-dropdown { display: block; }
@media (max-width: 768px) {
  .fb-nav-toggle { display: flex; }
  .fb-nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(255,255,255,0.98); border-bottom: 1px solid rgba(0,0,0,0.08); padding: 1rem 1.5rem; gap: 0.75rem; backdrop-filter: blur(12px); }
  .fb-nav--open .fb-nav-links { display: flex; }
  .fb-nav--open .fb-nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .fb-nav--open .fb-nav-toggle span:nth-child(2) { opacity: 0; }
  .fb-nav--open .fb-nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
}

/* Feature Card */
.fb-feature-card { text-align: center; padding: 1.5rem; }
.fb-feature-card h4 { font-weight: 600; margin-bottom: 0.5rem; }
.fb-feature-card p { opacity: 0.7; font-size: 0.875rem; }

/* Testimonial */
.fb-testimonial { text-align: center; padding: 2rem; }
.fb-testimonial p { font-style: italic; max-width: 40rem; margin: 0 auto; line-height: 1.7; }

/* Contact Form */
.fb-contact-form { max-width: 28rem; }
.fb-contact-form label { display: block; margin-bottom: 1rem; }
.fb-contact-form span { display: block; font-size: 0.75rem; font-weight: 500; margin-bottom: 0.25rem; }
.fb-contact-form input, .fb-contact-form textarea { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 0.5rem; font-family: inherit; font-size: 0.875rem; }
.fb-contact-form input:focus, .fb-contact-form textarea:focus { outline: none; border-color: var(--fb-primary, #1a1a1a); }

/* Stats */
.fb-stats { display: flex; justify-content: center; gap: 3rem; padding: 2rem; flex-wrap: wrap; }

/* CTA Banner */
.fb-cta-banner { text-align: center; padding: 3rem 2rem; background: rgba(0,0,0,0.03); }
.fb-cta-banner h3 { font-size: 1.5rem; font-weight: 700; }
.fb-cta-banner p { margin-top: 0.5rem; opacity: 0.7; max-width: 32rem; margin-left: auto; margin-right: auto; }

/* Gallery */
.fb-gallery { padding: 1rem 1.5rem; }
.fb-gallery img { border-radius: 0.5rem; }
@media (max-width: 768px) {
  .fb-gallery { grid-template-columns: 1fr !important; }
  .fb-stats { gap: 1.5rem; }
}

/* Shader text fill animation */
@keyframes fb-shader-text-pan {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 50% 100%; }
  75% { background-position: 0% 50%; }
  100% { background-position: 100% 0%; }
}

/* Animations */
.fb-animated { animation-fill-mode: both; }

/* Scroll Reveal */
.fb-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fb-reveal.fb-visible { opacity: 1; transform: translateY(0) scale(1); }
.fb-reveal--scale { opacity: 0; transform: scale(0.94); }
.fb-reveal--scale.fb-visible { opacity: 1; transform: scale(1); }
.fb-reveal--slide-left { opacity: 0; transform: translateX(-30px); }
.fb-reveal--slide-left.fb-visible { opacity: 1; transform: translateX(0); }
.fb-reveal--slide-right { opacity: 0; transform: translateX(30px); }
.fb-reveal--slide-right.fb-visible { opacity: 1; transform: translateX(0); }
.fb-reveal--zoom { opacity: 0; transform: scale(1.04); }
.fb-reveal--zoom.fb-visible { opacity: 1; transform: scale(1); }

/* Stagger delays for children */
.fb-stagger-1 { transition-delay: 100ms; }
.fb-stagger-2 { transition-delay: 200ms; }
.fb-stagger-3 { transition-delay: 300ms; }
.fb-stagger-4 { transition-delay: 400ms; }
.fb-stagger-5 { transition-delay: 500ms; }
.fb-stagger-6 { transition-delay: 600ms; }
.fb-stagger-7 { transition-delay: 700ms; }
.fb-stagger-8 { transition-delay: 800ms; }

/* Hero entrance */
@keyframes fb-hero-fade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fb-hero-enter .fb-hero-heading { opacity: 0; animation: fb-hero-fade 0.8s cubic-bezier(0.16,1,0.3,1) 0.2s both; }
.fb-hero-enter .fb-hero-sub { opacity: 0; animation: fb-hero-fade 0.8s cubic-bezier(0.16,1,0.3,1) 0.5s both; }
.fb-hero-enter .fb-hero-cta { opacity: 0; animation: fb-hero-fade 0.8s cubic-bezier(0.16,1,0.3,1) 0.8s both; }

/* Nav entrance */
@keyframes fb-nav-slide {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}
.fb-nav-enter { animation: fb-nav-slide 0.4s cubic-bezier(0.16,1,0.3,1) both; }

/* Hover micro-interactions */
.fb-hover-lift { transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease; }
.fb-hover-lift:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.fb-hover-zoom { overflow: hidden; }
.fb-hover-zoom img { transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.fb-hover-zoom:hover img { transform: scale(1.06); }
.fb-hover-glow { transition: box-shadow 0.3s ease; }
.fb-hover-glow:hover { box-shadow: 0 0 20px var(--site-accent, rgba(59,130,246,0.3)); }
.fb-nav-link { position: relative; }
.fb-nav-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--site-primary, currentColor); transition: width 0.3s cubic-bezier(0.16,1,0.3,1); }
.fb-nav-link:hover::after { width: 100%; }

/* Button press feedback */
.fb-button { transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; }
.fb-button:hover { transform: translateY(-1px); }
.fb-button:active { transform: translateY(0) scale(0.98); }

/* Accordion */
.fb-accordion-item summary::-webkit-details-marker { display: none; }
.fb-accordion-item[open] .fb-accordion-icon { transform: rotate(180deg); }

/* Tabs */
.fb-tab { transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease; }

/* Logo cloud */
.fb-logo--gray:hover { filter: grayscale(0) !important; opacity: 1 !important; }

/* Marquee */
@keyframes fb-marquee-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fb-marquee-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.fb-marquee:hover .fb-marquee-track { animation-play-state: paused; }

/* CMS skeleton loaders (shown until the local-first client hydrates) */
.fb-skeleton { background: linear-gradient(90deg, var(--site-surface, rgba(0,0,0,0.06)) 25%, var(--site-border, rgba(0,0,0,0.1)) 37%, var(--site-surface, rgba(0,0,0,0.06)) 63%); background-size: 400% 100%; animation: fb-shimmer 1.4s ease infinite; border-radius: 0.375rem; }
@keyframes fb-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* CMS category filter pills (rendered at runtime) */
.fb-filter-pill { border: 1px solid var(--site-border, rgba(0,0,0,0.15)); background: transparent; color: inherit; border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.8125rem; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.fb-filter-pill:hover { border-color: var(--site-primary, #1a1a1a); }
.fb-filter-pill--active { background: var(--site-primary, #1a1a1a); color: var(--site-bg, #fff); border-color: var(--site-primary, #1a1a1a); }
.fb-post-card { transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease; }

/* Parallax */
.fb-parallax { will-change: transform; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fb-reveal { transition: none; opacity: 1; transform: none; }
  .fb-hero-enter .fb-hero-heading,
  .fb-hero-enter .fb-hero-sub,
  .fb-hero-enter .fb-hero-cta { animation: none; opacity: 1; }
  .fb-nav-enter { animation: none; }
  .fb-hover-lift:hover { transform: none; }
  .fb-hover-zoom:hover img { transform: none; }
  .fb-marquee-track { animation: none !important; }
  .fb-skeleton { animation: none; }
}
