/* ═══════════════════════════════════════════════════════════
   beng. Components v0.2 – Dark Impact Theme
   All class names preserved for JS/HTML compatibility
   ═══════════════════════════════════════════════════════════ */

/* ── HEADER ── */
.site-header{
  position:sticky;top:0;z-index:100;
  padding:14px 0;
  background:rgba(5,8,14,0.6);
  backdrop-filter:blur(20px) saturate(1.4);
  -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border-bottom:1px solid var(--border);
  transition:background .3s, padding .3s;
}
.site-header.is-scrolled{
  padding:8px 0;
  background:rgba(5,8,14,0.92);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.brand{display:flex;align-items:center;text-decoration:none;}
.brand:hover{text-decoration:none;opacity:.9;}
.brand-logo{height:28px;width:auto;display:block;filter:brightness(0) invert(1);opacity:.95;}
.nav{display:flex;align-items:center;gap:6px;}
.nav-link{
  color:var(--muted);
  text-decoration:none;
  font-size:14px;font-weight:500;
  padding:8px 14px;border-radius:var(--radius-md);
  transition:color .2s, background .2s;
}
.nav-link:hover{
  color:var(--text);
  background:rgba(255,255,255,0.06);
  text-decoration:none;
  opacity:1;
}
.nav-toggle{
  display:none;
  border:1px solid var(--border);
  background:transparent;
  border-radius:var(--radius-sm);
  padding:8px 10px;
  cursor:pointer;
  color:var(--text);
}
.nav-toggle span{display:block;width:18px;height:2px;background:var(--text);margin:3px 0;border-radius:1px;}

/* Mobile nav */
@media (max-width:720px){
  .nav{display:none;}
  .nav.is-open{
    display:flex;flex-direction:column;
    position:absolute;top:100%;left:0;right:0;
    background:rgba(5,8,14,0.95);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border-bottom:1px solid var(--border);
    padding:12px 20px;gap:2px;
  }
  .nav.is-open .nav-link{
    padding:12px 16px;
    border-radius:var(--radius-sm);
    width:100%;
  }
  .nav-toggle{display:block;}
}

/* ── SECTIONS ── */
.section{
  padding:48px 0;
  position:relative;
  isolation:isolate;
}
.section-muted{background:rgba(14,22,40,0.40);}
.section-head{margin:0 0 20px;}
.section-head h2{
  margin:0 0 6px;font-size:22px;font-weight:700;
  position:relative;letter-spacing:-.01em;
}
.section-head h2::after{
  content:"";display:block;
  width:44px;height:3px;border-radius:999px;
  margin-top:10px;
  background:white;
  opacity:.9;
}
.section-head p{margin:0;color:var(--muted);}

/* Section blending – softer in dark */
.section::before{
  content:"";
  position:absolute;left:0;right:0;top:-36px;
  height:72px;pointer-events:none;z-index:-1;
  background:linear-gradient(to bottom, transparent 0%, rgba(5,8,14,.55) 50%, transparent 100%);
  filter:blur(14px);opacity:.9;
}
.section-band{
  background:linear-gradient(180deg, rgba(46,142,224,.04), rgba(242,107,43,.03));
  border-top:0;border-bottom:0;
}

/* Section panel */
.section-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:24px;padding:32px;
  box-shadow:var(--shadow-md);
}
@media (max-width:860px){.section-panel{padding:22px;border-radius:20px;}}
@media (max-width:520px){.section-panel{padding:18px;border-radius:18px;}}

/* ── BUTTONS ── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;padding:13px 22px;border-radius:var(--radius-md);
  border:1px solid transparent;
  background:var(--primary);
  color:#fff;font-weight:700;letter-spacing:.01em;font-size:14px;
  box-shadow:0 4px 24px rgba(46,142,224,0.25);
  text-decoration:none;cursor:pointer;
  transition:transform .12s ease, box-shadow .2s ease, opacity .15s ease;
}
.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 36px rgba(46,142,224,0.35);
  text-decoration:none;opacity:1;
}
.btn:active{transform:translateY(0);opacity:.92;}

.btn-ghost{
  background:rgba(255,255,255,0.05);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
}
.btn-ghost:hover{
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.16);
  box-shadow:var(--shadow-md);
  opacity:1;
}
button:disabled{opacity:.4;cursor:not-allowed;}

.small{font-size:13px;color:var(--muted);}

.card{
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);box-shadow:var(--shadow-sm);
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover{
  transform:translateY(-3px);
  border-color:rgba(255,255,255,0.12);
  box-shadow:var(--shadow-md);
}

/* ── FORMS ── */
.form{
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);box-shadow:var(--shadow-md);
  padding:24px;
  display:flex;flex-direction:column;gap:18px;
}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:var(--muted);}
input,textarea{
  border:1px solid var(--border);border-radius:var(--radius-md);
  padding:12px 14px;font-size:14px;outline:none;font-family:inherit;
  background:rgba(255,255,255,0.04);
  color:var(--text);
  transition:border-color .2s, box-shadow .2s;
}
input::placeholder,textarea::placeholder{color:rgba(148,163,184,0.5);}
input:focus,textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(46,142,224,0.2);
}
.checkbox{flex-direction:row;align-items:flex-start;gap:10px;margin-top:0;}
.checkbox input[type="checkbox"]{accent-color:var(--primary);margin-top:3px;}
.form-actions{display:flex;align-items:center;gap:14px;margin-top:0;}

/* ── FOOTER ── */
.site-footer{border-top:1px solid var(--border);padding:20px 0;}
.footer-inner{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-size:13px;color:var(--muted);
}
.footer-links a{color:var(--muted);text-decoration:none;margin-left:14px;}
.footer-links a:hover{text-decoration:underline;color:var(--text);}
@media (max-width:600px){
  .footer-inner{flex-direction:column;text-align:center;gap:8px;}
}

/* ── CHAT ── */
.chat-shell{
  border:1px solid var(--border);border-radius:var(--radius-xl);
  background:var(--surface);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
}
.chat-topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,0.02);
}
.chat-status{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);}
.dot{width:8px;height:8px;border-radius:999px;background:var(--trust);transition:background .3s;}
.chat-shell.is-live .dot{background:var(--trust);}
.chat-actions{display:flex;gap:8px;align-items:center;}
.chat-native{padding:14px;}
.chat-messages{
  height:360px;overflow:auto;
  padding:16px;
  border:1px solid var(--border);border-radius:var(--radius-md);
  background:rgba(5,8,14,0.5);
  display:flex;flex-direction:column;gap:10px;
}
.chat-messages::-webkit-scrollbar{width:4px;}
.chat-messages::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.1);border-radius:999px;}

.chat-guidance{margin:10px 2px 0;color:var(--muted);font-size:13px;line-height:1.45;}
.chat-bubble{
  max-width:76%;padding:12px 16px;
  border-radius:18px;margin:0;
  line-height:1.55;font-size:14px;
}
.chat-bubble.user{
  align-self:flex-end;margin-left:auto;
  background:var(--primary);color:#fff;
  border-bottom-right-radius:6px;
}
.chat-bubble.bot{
  align-self:flex-start;margin-right:auto;
  background:rgba(255,255,255,0.06);
  color:var(--text);
  border:1px solid var(--border);
  border-bottom-left-radius:6px;
}
.chat-link{color:var(--primary);text-decoration:underline;word-break:break-word;}
.chat-image{display:block;max-width:100%;height:auto;margin-top:10px;border-radius:12px;border:1px solid var(--border);}

.chat-form{display:flex;gap:10px;align-items:center;margin-top:12px;}
#chatInput{
  flex:1;min-width:0;width:100%;
  padding:12px 16px;border-radius:var(--radius-md);
  border:1px solid var(--border);
  background:rgba(255,255,255,0.04);
  color:var(--text);
  outline:none;font-family:inherit;font-size:14px;
  transition:border-color .2s;
}
#chatInput::placeholder{color:rgba(148,163,184,0.5);}
#chatInput:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(46,142,224,0.15);
}
#chatSendBtn{flex:0 0 auto;}
.chat-fineprint{margin:8px 2px 0;font-size:12px;color:var(--muted);}

/* ── CHIPS (Quick Actions) ── */
.chips-wrap{margin-top:14px;margin-bottom:16px;}
.chips-title{font-size:13px;color:var(--muted);margin:0 0 8px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;}
.chips{display:flex;flex-wrap:wrap;gap:10px;margin:0;}
.chip{
  border:1px solid rgba(46,142,224,0.2);
  background:rgba(46,142,224,0.06);
  color:var(--text);
  border-radius:999px;padding:10px 16px;
  font-size:13px;font-weight:600;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, border-color .2s, background .2s;
}
.chip:hover{
  transform:translateY(-2px);
  border-color:var(--primary);
  background:rgba(46,142,224,0.12);
  opacity:1;
}
.chip:active{transform:translateY(0);}
.chip:focus-visible{outline:2px solid var(--focus);outline-offset:2px;}

/* ── LOGO TILES ── */
.logo-tiles{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;align-items:stretch;
}
.logo-tile{
  display:flex;align-items:center;justify-content:center;
  min-height:64px;padding:12px 14px;
  border:1px solid var(--border);border-radius:var(--radius-md);
  background:rgba(255,255,255,0.03);
  text-decoration:none;
  transition:transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
}
.logo-tile:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.14);
  box-shadow:var(--shadow-md);
  text-decoration:none;
}
.logo-tile img{
  max-height:32px;max-width:140px;width:auto;height:auto;
  display:block;opacity:.45;
  filter:brightness(0) invert(1);
  transition:opacity .2s ease, filter .2s ease;
}
.logo-tile:hover img,.logo-tile:focus-visible img{
  opacity:.8;
}
.logo-tile:focus-visible{outline:2px solid var(--focus);outline-offset:2px;}
@media (max-width:520px){
  .logo-tiles{grid-template-columns:repeat(2,minmax(0,1fr));}
  .logo-tile img{max-width:120px;}
}

/* ── CASES ── */
.badge{
  display:inline-flex;align-items:center;gap:6px;
  border-radius:999px;padding:5px 10px;font-size:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.04);
  color:var(--muted);font-weight:600;
}
.badge-outcome{
  display:inline-flex;align-items:center;
  padding:5px 10px;border-radius:999px;
  border:1px solid rgba(34,197,94,0.25);
  background:rgba(34,197,94,0.1);
  color:#86EFAC;font-weight:700;font-size:12px;
}
.badge-highlight{
  border-color:rgba(242,107,43,0.25);
  background:rgba(242,107,43,0.1);
  color:#FDBA74;font-weight:700;
}
.tag{
  display:inline-flex;align-items:center;
  border:1px solid var(--border);background:rgba(255,255,255,0.04);
  border-radius:999px;padding:5px 10px;font-size:12px;color:var(--muted);
}
.tag-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.04);
  font-size:12px;font-weight:600;color:var(--muted);
}
.case-tags{display:flex;flex-wrap:wrap;gap:8px;}

.cases-toolbar{display:flex;align-items:center;justify-content:space-between;margin:10px 0 16px;}
.cases-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
@media (max-width:980px){.cases-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:620px){.cases-grid{grid-template-columns:1fr;}}

.case-card{
  position:relative;
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  padding:22px;overflow:hidden;
  transition:transform .15s ease, border-color .2s, box-shadow .2s;
}
.case-card:hover{
  transform:translateY(-4px);
  border-color:rgba(255,255,255,0.14);
  box-shadow:var(--shadow-lg);
}
.case-card:focus-within{outline:2px solid var(--focus);outline-offset:2px;}
.case-title{margin:10px 0 10px;font-size:20px;line-height:1.15;font-weight:700;letter-spacing:-.01em;}
.case-text{
  margin:0 0 14px;color:var(--muted);line-height:1.6;font-size:15px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.case-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px;}
.case-link{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--primary);text-decoration:none;position:relative;z-index:2;margin-top:20px;}
.case-link:hover{text-decoration:underline;}
.case-card-link{position:absolute;inset:0;z-index:1;border-radius:var(--radius-lg);}
.case-card-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px;}
.case-action{display:inline-flex;align-items:center;gap:8px;margin-top:14px;font-weight:700;color:var(--primary);text-decoration:none;}
.case-action:hover{text-decoration:underline;}

.partner-explain{margin-top:14px;color:var(--muted);font-size:13px;line-height:1.5;}
.partner-map{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.5;}

/* Skeleton loading */
.skeleton{
  background:linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size:200% 100%;
  animation:skeleton-pulse 1.5s ease infinite;
  border-radius:var(--radius-sm);
  margin-bottom:10px;
}
@keyframes skeleton-pulse{
  0%{background-position:200% 0;}
  100%{background-position:-200% 0;}
}

/* ── REVEAL ANIMATIONS ── */
.reveal{opacity:1;transform:none;}
.js .reveal{
  opacity:0;transform:translateY(20px);
  transition:opacity .5s ease, transform .5s ease;
}
.js .reveal.is-visible{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){
  .js .reveal{transition:none;transform:none;opacity:1;}
}

/* Stagger reveals inside grids */
.js .cases-grid .reveal:nth-child(1){transition-delay:0ms;}
.js .cases-grid .reveal:nth-child(2){transition-delay:80ms;}
.js .cases-grid .reveal:nth-child(3){transition-delay:160ms;}
.js .cases-grid .reveal:nth-child(4){transition-delay:240ms;}
.js .cases-grid .reveal:nth-child(5){transition-delay:320ms;}
.js .cases-grid .reveal:nth-child(6){transition-delay:400ms;}
.js .logo-tiles .logo-tile:nth-child(n){transition:transform .15s ease, background .2s, border-color .2s, box-shadow .2s, opacity .4s ease;}

/* Section top blending – dark variant */
.section:not(:first-of-type)::before{
  content:"";position:absolute;top:-1px;left:0;right:0;
  height:28px;
  background:linear-gradient(to bottom, rgba(5,8,14,0), rgba(5,8,14,1));
  pointer-events:none;
}
.section.section-band:not(:first-of-type)::before{
  background:linear-gradient(to bottom, rgba(5,8,14,0), rgba(14,22,40,1));
}
.section-frame{padding:0;border:none;background:transparent;box-shadow:none;}

/* Soft glow on reveal sections */
.section.reveal{position:relative;}
.section.reveal::before{
  content:"";position:absolute;left:0;right:0;top:-22px;
  height:44px;pointer-events:none;
  background:linear-gradient(180deg, rgba(5,8,14,0) 0%, rgba(5,8,14,1) 100%);
}

/* ── LEGACY COMPAT (logo-rail, logo-grid, logo-card) ── */
.logo-rail{list-style:none;padding:0;margin:0;display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:6px;}
.logo-rail::-webkit-scrollbar{height:10px;}
.logo-rail::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.1);border-radius:999px;}
.logo-rail-item{scroll-snap-align:start;flex:0 0 auto;}
.logo-card{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;min-height:92px;padding:14px 12px;
  border:1px solid var(--border);border-radius:var(--radius-md);
  background:var(--surface);box-shadow:var(--shadow-sm);
  text-decoration:none;transition:transform .12s ease, opacity .15s ease, box-shadow .12s ease;
}
.logo-card img{
  max-width:150px;max-height:42px;display:block;opacity:.45;
  filter:brightness(0) invert(1);
  transition:opacity .15s ease, transform .12s ease, filter .15s ease;
}
.logo-card:hover img,.logo-card:focus-visible img,.logo-card:active img{opacity:.8;}
.logo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;}
.logo-caption{font-size:12px;font-weight:700;color:var(--muted);}
.logo-favicon{width:44px;height:44px;max-width:44px;max-height:44px;filter:brightness(0) invert(1);opacity:.45;}
.logo-card:hover .logo-favicon,.logo-card:focus-visible .logo-favicon{opacity:.8;}
.logo-toggle{margin-top:10px;}
.logo-toggle summary{
  cursor:pointer;display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--border);border-radius:12px;padding:10px 12px;
  background:var(--surface);box-shadow:var(--shadow-sm);font-size:14px;color:var(--text);
}
.logo-toggle summary:hover{background:var(--surface-2);}
@media (min-width:980px){
  .logo-rail{overflow:visible;scroll-snap-type:none;flex-wrap:wrap;padding-bottom:0;}
  .logo-toggle summary{display:none;}
  .logo-toggle{display:block;}
}

.nav-logo img{height:28px;width:auto;display:block;}

/* Contact detail stack */
.contact-detail{display:flex;flex-direction:column;gap:8px;font-size:15px;}
.contact-detail a{color:var(--muted);text-decoration:none;transition:color .2s;}
.contact-detail a:hover{color:var(--primary);text-decoration:underline;}
