/* ============================================================
   WAFGENE — SHARED COMPONENTS (header, footer, nav, misc)
   ============================================================ */

/* --- Site header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--ink-100);
  box-shadow: 0 2px 16px rgba(10,28,53,0.05);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-block: 10px;
  transition: min-height .25s var(--ease);
}
.site-header.is-scrolled .wrap { min-height: 64px; }

.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img.brand-mark { height: 34px; width: auto; transition: height .25s var(--ease); }
.site-header.is-scrolled .brand-mark { height: 28px; }
.brand-lockup .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-900);
  line-height: 1.0;
}
.brand-lockup .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  margin-top: -5px;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .brand-lockup .brand-sub { font-size: 0.6rem; }
  .brand-lockup .brand-name { font-size: 0.92rem; }
}

.primary-nav { display: none; }
@media (min-width: 980px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .primary-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-700);
    transition: color .2s, background .2s;
  }
  .primary-nav a:hover { color: var(--violet-700); background: var(--paper-dusk); }
  .primary-nav a.is-active { color: var(--violet-700); font-weight: 600; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 640px) {
  .entity-switch { display: none; }
  [data-site="shop"] .header-actions .btn-outline { display: none; }
}

/* Entity switcher */
.entity-switch { position: relative; }
.entity-switch > button {
  display: flex; align-items: center; gap: 6px;
  background: var(--paper-dusk); border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-900);
}
.entity-switch > button svg { width: 14px; height: 14px; transition: transform .2s; }
.entity-switch[data-open="true"] > button svg { transform: rotate(180deg); }
.entity-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--paper); border: 1px solid var(--ink-100);
  border-radius: var(--radius-md); box-shadow: var(--shadow-raise);
  min-width: 240px; padding: 8px; display: none;
}
.entity-switch[data-open="true"] .entity-menu { display: block; }
.entity-menu a {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px; border-radius: var(--radius-sm);
}
.entity-menu a:hover { background: var(--paper-dusk); }
.entity-menu a strong { font-size: 0.88rem; color: var(--ink-900); }
.entity-menu a span { font-size: 0.76rem; color: var(--ink-500); }

.nav-toggle {
  display: inline-flex; background: none; border: none; padding: 6px;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--ink-900); }
@media (min-width: 980px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  position: fixed;
  top: 76px; left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--paper); overflow-y: auto;
  padding: 8px 24px 32px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block; padding: 16px 4px;
  border-bottom: 1px solid var(--ink-100);
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--ink-900);
}
.mobile-nav .mobile-cta { margin-top: 20px; }
@media (min-width: 980px) { .mobile-nav { display: none !important; } }

/* --- Footer --- */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.72); padding-block: 64px 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a { font-size: 0.9rem; color: rgba(255,255,255,0.66); transition: color .18s; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand-mark { height: 32px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.55); max-width: 36ch; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 16px; height: 16px; }
.footer-social a:hover { border-color: var(--orchid-300); color: var(--orchid-300); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: 0.8rem; color: rgba(255,255,255,0.42);
}
.footer-bottom .legal-links { display: flex; gap: 18px; }

/* --- Stats strip --- */
.stats-strip { background: var(--dark); color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 28px;
}
@media (min-width: 760px) { .stats-grid { grid-template-columns: repeat(4,1fr); } }
.stat-item { display: flex; flex-direction: column; }
.stat-item .stat-number {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem);
  color: #fff; line-height: 1; display: block;
}
.stat-item .stat-label { margin-top: 8px; font-size: 0.875rem; color: rgba(255,255,255,0.62); display: block; }

/* --- CTA banner --- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--violet-900), var(--violet-800) 60%, var(--violet-700));
  color: #fff;
  padding: clamp(36px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; font-size: var(--step-3); }
.cta-banner p { color: rgba(255,255,255,0.78); margin-bottom: 0; }
.cta-banner .btn-primary { background: #fff; color: var(--violet-800); }
.cta-banner .btn-primary:hover { background: var(--lilac-100); }

/* --- Accordion (FAQ) --- */
.accordion { border-top: 1px solid var(--ink-100); }
.accordion-item { border-bottom: 1px solid var(--ink-100); }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; background: none; border: none; text-align: left;
  padding: 22px 4px; font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; color: var(--ink-900);
}
.accordion-trigger .plus {
  flex-shrink: 0; width: 22px; height: 22px; position: relative;
}
.accordion-trigger .plus::before, .accordion-trigger .plus::after {
  content: ""; position: absolute; background: var(--violet-700);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.accordion-trigger .plus::before { width: 14px; height: 2px; }
.accordion-trigger .plus::after { width: 2px; height: 14px; transition: transform .25s var(--ease); }
.accordion-item[data-open="true"] .plus::after { transform: translate(-50%,-50%) rotate(90deg) scaleY(0); }
.accordion-panel {
  max-height: 0; overflow: hidden; transition: max-height .3s var(--ease);
}
.accordion-panel-inner { padding: 0 4px 22px; color: var(--ink-500); max-width: 68ch; }

/* --- Testimonial --- */
.testimonial-card {
  background: var(--paper); border: 1px solid var(--ink-100);
  border-radius: var(--radius-md); padding: 30px;
}
.testimonial-card p.quote {
  font-family: var(--font-display); font-size: 1.1rem; color: var(--ink-900);
  max-width: none;
}
.testimonial-person { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--paper-dusk); color: var(--violet-700);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
}
.testimonial-person strong { display: block; font-size: 0.9rem; color: var(--ink-900); }
.testimonial-person span { font-size: 0.8rem; color: var(--ink-500); }

/* --- Stepper / process timeline --- */
.stepper {
  display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 860px) {
  .stepper { grid-template-columns: repeat(var(--steps, 4), 1fr); }
}
.step {
  position: relative; padding: 26px 20px 20px 0;
  border-top: 3px solid var(--ink-100);
}
.step.is-accent { border-top-color: var(--violet-600); }
.step .step-index {
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  color: var(--violet-700); margin-bottom: 10px; display: block;
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--ink-500); }

/* --- Icon badge --- */
.icon-badge {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  background: var(--accent-tint, var(--lilac-100));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.icon-badge svg { width: 24px; height: 24px; color: var(--accent, var(--violet-700)); }

/* --- Service card --- */
.service-card {
  background: var(--paper); border: 1px solid var(--ink-100);
  border-radius: var(--radius-md); padding: 26px;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.service-card:hover { box-shadow: var(--shadow-rest); border-color: var(--lilac-200); }
.service-card h4 { margin-bottom: 8px; }
.service-card p { font-size: 0.92rem; color: var(--ink-500); margin-bottom: 14px; }

/* --- Skip link --- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink-900); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); transition: top .2s;
}
.skip-link:focus { top: 12px; }
