/* =====================================================================
   BENDOKO LIGHT / DARK APPEARANCE SYSTEM
   ===================================================================== */

:root{
  color-scheme:light;
  --theme-page:#FFFFFF;
  --theme-surface:#FFFFFF;
  --theme-surface-soft:#F4F7FB;
  --theme-surface-raised:#FFFFFF;
  --theme-text:#12213A;
  --theme-muted:#657086;
  --theme-line:rgba(12,42,84,.12);
  --theme-shadow:0 24px 70px rgba(7,26,53,.12);
  --theme-header:rgba(255,255,255,.96);
  --theme-card-border:rgba(7,26,53,.10);
}

html[data-theme="dark"]{
  color-scheme:dark;
  --theme-page:#06111F;
  --theme-surface:#0B1728;
  --theme-surface-soft:#0E1D31;
  --theme-surface-raised:#12243C;
  --theme-text:#F7FAFF;
  --theme-muted:#B7C3D5;
  --theme-line:rgba(255,255,255,.12);
  --theme-shadow:0 24px 70px rgba(0,0,0,.34);
  --theme-header:rgba(6,17,31,.96);
  --theme-card-border:rgba(255,255,255,.10);
}

body{
  background:var(--theme-page)!important;
  color:var(--theme-text)!important;
  transition:background-color .25s ease,color .25s ease;
}

.site-header{
  background:var(--theme-header)!important;
  border-bottom:1px solid var(--theme-line);
}
.brand-text{
  color:var(--theme-text)!important;
}
.brand-text small{
  color:var(--theme-muted)!important;
}
.nav a{
  color:var(--theme-text)!important;
}
.nav a:hover,
.nav a.active{
  color:#11469B!important;
}
html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .nav a.active{
  color:#FFE01B!important;
}

.theme-toggle{
  width:48px;
  height:48px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:1px solid var(--theme-line);
  border-radius:50%;
  background:var(--theme-surface-raised);
  color:var(--theme-text);
  box-shadow:0 10px 28px rgba(7,26,53,.10);
  cursor:pointer;
  transition:
    transform .2s ease,
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease;
}
.theme-toggle:hover{
  transform:translateY(-2px) rotate(5deg);
}
.theme-toggle svg{
  width:22px;
  height:22px;
  fill:currentColor;
}
.theme-toggle .theme-icon-moon{display:block}
.theme-toggle .theme-icon-sun{display:none}
html[data-theme="dark"] .theme-toggle .theme-icon-moon{display:none}
html[data-theme="dark"] .theme-toggle .theme-icon-sun{display:block}
.theme-toggle-label{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

/* Light/dark adaptations for standard content surfaces */
.section:not(.section-dark):not(.section-accent):not(.signature-programme):not(.signature-hero){
  background:var(--theme-page)!important;
}
.section-soft,
.signature-solutions,
.performance-proof,
.signature-gallery{
  background:var(--theme-surface-soft)!important;
}
.service-card,
.signature-service-card,
.signature-process-step,
.audience-card,
.partner-card,
.article-card,
.story-card,
.vision-card,
.contact-form,
.contact-note,
.social-contact-shell,
.social-signature-shell,
.insight-signature-card:not(.dark),
.document-card,
.registration-card,
.video-card,
.gallery-card{
  background:var(--theme-surface-raised)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-card-border)!important;
  box-shadow:var(--theme-shadow);
}
.section-heading h1,
.section-heading h2,
.section-heading h3,
.section-copy h1,
.section-copy h2,
.section-copy h3,
.service-card h3,
.signature-service-card h3,
.signature-process-step h3,
.audience-card h3,
.partner-card h3,
.article-card h3,
.story-card h3,
.vision-card h3,
.contact-form h3,
.contact-note h3{
  color:var(--theme-text)!important;
}
.section-heading p,
.section-copy p,
.service-card p,
.signature-service-card p,
.signature-process-step p,
.audience-card p,
.partner-card p,
.article-card p,
.story-card p,
.vision-card p,
.contact-form p,
.contact-note p{
  color:var(--theme-muted)!important;
}
.signature-signal,
.page-growth-ribbon{
  background:var(--theme-surface-raised)!important;
  border-color:var(--theme-line)!important;
}
.signature-signal .signal-metric,
.page-growth-ribbon span{
  border-color:var(--theme-line)!important;
}
.signature-signal span{
  color:var(--theme-muted)!important;
}
.advantage-architecture,
.signature-programme,
.page-hero,
.signature-hero,
.site-footer{
  color:#FFFFFF!important;
}
.advantage-architecture p,
.signature-programme p,
.page-hero p,
.signature-hero p,
.site-footer p{
  color:rgba(255,255,255,.82)!important;
}

/* Forms */
input,
select,
textarea{
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-line)!important;
}
input::placeholder,
textarea::placeholder{
  color:var(--theme-muted)!important;
}
label{
  color:var(--theme-text)!important;
}

/* Tables and separators */
table{
  color:var(--theme-text)!important;
}
th,td{
  border-color:var(--theme-line)!important;
}
hr{
  border-color:var(--theme-line)!important;
}

/* Dark-mode image treatment */
html[data-theme="dark"] .signature-gallery-item,
html[data-theme="dark"] .proof-image,
html[data-theme="dark"] .gallery-item,
html[data-theme="dark"] .award-card,
html[data-theme="dark"] .video-card{
  box-shadow:0 20px 55px rgba(0,0,0,.35)!important;
}

/* WhatsApp floating action */
.floating-call.whatsapp-connect{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:182px;
  min-height:52px;
  padding:12px 18px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#25D366,#128C7E)!important;
  color:#FFFFFF!important;
  border:1px solid rgba(255,255,255,.26)!important;
  box-shadow:0 16px 42px rgba(18,140,126,.34)!important;
  font-weight:900!important;
  letter-spacing:.025em!important;
  text-decoration:none!important;
}
.floating-call.whatsapp-connect:hover{
  transform:translateY(-4px)!important;
  box-shadow:0 22px 50px rgba(18,140,126,.42)!important;
}
.whatsapp-connect svg{
  width:22px;
  height:22px;
  flex:0 0 auto;
  fill:#FFFFFF;
}
.whatsapp-connect span{
  color:#FFFFFF!important;
}

/* Prevent a flash of the wrong theme */
html.theme-ready body{
  transition:background-color .25s ease,color .25s ease;
}

@media (max-width:900px){
  .theme-toggle{
    width:44px;
    height:44px;
  }
}
@media (max-width:620px){
  .floating-call.whatsapp-connect{
    min-width:52px;
    width:52px;
    height:52px;
    padding:0!important;
    border-radius:50%!important;
  }
  .floating-call.whatsapp-connect span{
    display:none;
  }
}
@media (prefers-reduced-motion:reduce){
  .theme-toggle,
  body{
    transition:none!important;
  }
}
