/* ALZA Build 55 — persistent dual-theme system + floating WhatsApp correction.
   Default = approved ALZA Blue. Optional = Dark SaaS. */

/* ---------- Floating WhatsApp: viewport-fixed on every route ---------- */
.whatsapp-chat{
  position:fixed!important;
  left:auto!important;
  right:max(20px,env(safe-area-inset-right,0px))!important;
  bottom:max(20px,calc(18px + env(safe-area-inset-bottom,0px)))!important;
  z-index:12000!important;
  transform:translateZ(0);
  isolation:isolate;
}
@media(max-width:620px){
  .whatsapp-chat{
    right:calc(14px + env(safe-area-inset-right,0px))!important;
    bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;
    width:52px!important;height:52px!important;min-height:52px!important;
  }
  .whatsapp-chat img{width:27px!important;height:27px!important}
}

/* ---------- Theme toggle ---------- */
.theme-toggle-v55{
  appearance:none;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:5px 8px 5px 10px;
  color:#cfe9ff;border:1px solid rgba(87,184,255,.25);border-radius:12px;
  background:linear-gradient(180deg,rgba(8,42,82,.76),rgba(4,24,52,.74));
  box-shadow:inset 0 1px rgba(255,255,255,.035),0 10px 28px rgba(0,8,24,.12);
  transition:border-color .2s ease,background .2s ease,color .2s ease,box-shadow .2s ease;
  white-space:nowrap;
}
.theme-toggle-v55:hover{color:#fff;border-color:rgba(79,207,255,.48);box-shadow:0 10px 30px rgba(6,114,220,.15)}
.theme-toggle-icon-v55{display:grid;place-items:center;width:20px;height:20px;color:#62dcff}
.theme-toggle-icon-v55 svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle-label-v55{font-size:.76rem;font-weight:800;letter-spacing:.01em}
.theme-toggle-switch-v55{position:relative;width:30px;height:17px;border-radius:999px;background:rgba(112,160,205,.22);box-shadow:inset 0 0 0 1px rgba(124,191,247,.16)}
.theme-toggle-switch-v55>span{position:absolute;left:3px;top:3px;width:11px;height:11px;border-radius:50%;background:#79e6ff;box-shadow:0 0 12px rgba(75,218,255,.58);transition:transform .25s cubic-bezier(.22,1,.36,1),background .25s ease}
.theme-toggle-v55.is-dark .theme-toggle-switch-v55>span{transform:translateX(13px);background:#a99cff;box-shadow:0 0 13px rgba(149,126,255,.62)}

/* ---------- Dark SaaS tokens ---------- */
html[data-theme="dark-saas"]{
  color-scheme:dark;
  --ink:#f7f9fc;
  --muted:#aab4c4;
  --line:rgba(155,170,196,.18);
  --surface:#05060a;
  --surface-soft:#080a10;
  --navy-950:#05060a;
  --navy-900:#090c14;
  --navy-800:#101522;
  --alza-bg:#05060a;
  --alza-bg-2:#090c14;
  --alza-panel:rgba(13,16,25,.88);
  --alza-panel-strong:rgba(16,20,31,.96);
  --alza-line:rgba(151,166,194,.18);
  --alza-line-hot:rgba(116,215,255,.48);
  --alza-text:#f7f9fc;
  --alza-muted:#aab4c4;
}

html[data-theme="dark-saas"] body.enterprise-theme{
  color:#f7f9fc!important;
  background:
    radial-gradient(900px 560px at 84% 4%,rgba(92,75,255,.105),transparent 64%),
    radial-gradient(760px 520px at 6% 28%,rgba(25,184,255,.055),transparent 68%),
    linear-gradient(180deg,#05060a 0%,#070910 48%,#040509 100%)!important;
}
html[data-theme="dark-saas"] body.enterprise-theme::before{opacity:.035!important;background-size:84px 84px!important;background-image:linear-gradient(rgba(172,184,212,.20) 1px,transparent 1px),linear-gradient(90deg,rgba(172,184,212,.20) 1px,transparent 1px)!important}
html[data-theme="dark-saas"] .experience-grid-v54{opacity:.035;background-image:linear-gradient(rgba(180,190,220,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(180,190,220,.22) 1px,transparent 1px)}
html[data-theme="dark-saas"] .experience-orb-one-v54{background:radial-gradient(circle,rgba(87,68,255,.30),rgba(52,40,150,.09) 50%,transparent 72%)}
html[data-theme="dark-saas"] .experience-orb-two-v54{background:radial-gradient(circle,rgba(27,186,255,.18),rgba(28,87,145,.06) 52%,transparent 73%)}
html[data-theme="dark-saas"] .alza-scroll-progress-v54{background:linear-gradient(90deg,#4de4ff,#6c8cff 48%,#a58aff);box-shadow:0 0 18px rgba(90,219,255,.54),0 0 34px rgba(129,102,255,.25)}

/* Header/navigation */
html[data-theme="dark-saas"] .site-header{background:linear-gradient(180deg,rgba(5,6,10,.96),rgba(7,8,14,.88))!important;border-bottom-color:rgba(167,179,203,.13)!important;box-shadow:0 12px 36px rgba(0,0,0,.32)!important}
html[data-theme="dark-saas"] .contact-bar{background:#05060a!important;border-bottom-color:rgba(150,164,190,.12)!important}
html[data-theme="dark-saas"] .contact-bar-inner{color:#aab4c4!important}
html[data-theme="dark-saas"] .desktop-nav>a:not(.btn){color:#bcc5d3!important}
html[data-theme="dark-saas"] .desktop-nav>a:not(.btn):hover{color:#fff!important;background:rgba(137,119,255,.075)!important;border-color:rgba(155,136,255,.18)!important}
html[data-theme="dark-saas"] .desktop-nav>a[aria-current="page"]:not(.btn){color:#fff!important;background:linear-gradient(180deg,rgba(112,91,255,.15),rgba(33,26,90,.08))!important;border-color:rgba(151,132,255,.28)!important;box-shadow:0 0 24px rgba(109,86,255,.08) inset!important}
html[data-theme="dark-saas"] .nav-toggle{background:#0c1019!important;border-color:rgba(160,176,204,.22)!important}
html[data-theme="dark-saas"] .theme-toggle-v55{color:#ece9ff;border-color:rgba(158,141,255,.28);background:linear-gradient(180deg,rgba(35,29,75,.78),rgba(16,14,34,.86))}

/* Typography / hierarchy */
html[data-theme="dark-saas"] body.enterprise-theme h1,
html[data-theme="dark-saas"] body.enterprise-theme h2,
html[data-theme="dark-saas"] body.enterprise-theme h3,
html[data-theme="dark-saas"] body.enterprise-theme h4,
html[data-theme="dark-saas"] .footer-title{color:#f8f9fc!important}
html[data-theme="dark-saas"] body.enterprise-theme p,
html[data-theme="dark-saas"] body.enterprise-theme .lead,
html[data-theme="dark-saas"] body.enterprise-theme .muted,
html[data-theme="dark-saas"] .card p,
html[data-theme="dark-saas"] .resource-card p,
html[data-theme="dark-saas"] .use-case p,
html[data-theme="dark-saas"] .faq-answer{color:#aab4c4!important}
html[data-theme="dark-saas"] .kicker,html[data-theme="dark-saas"] .text-link{color:#6edfff!important}
html[data-theme="dark-saas"] .eyebrow{color:#d6f5ff!important;background:rgba(22,115,156,.10)!important;border-color:rgba(78,204,255,.22)!important}
html[data-theme="dark-saas"] .breadcrumbs,html[data-theme="dark-saas"] .article-meta,html[data-theme="dark-saas"] .fine-print{color:#8f9aac!important}

/* Sections / hero */
html[data-theme="dark-saas"] .section-soft,
html[data-theme="dark-saas"] .section-dark{background:linear-gradient(180deg,rgba(9,11,17,.78),rgba(5,7,11,.62))!important}
html[data-theme="dark-saas"] .section::before{background:linear-gradient(90deg,transparent,rgba(155,168,197,.09) 24%,rgba(121,139,178,.17) 50%,rgba(155,168,197,.09) 76%,transparent)!important}
html[data-theme="dark-saas"] .page-index .hero.hero-branded::after{background:linear-gradient(90deg,rgba(5,6,10,.98) 0%,rgba(5,6,10,.90) 35%,rgba(5,6,10,.44) 64%,rgba(5,6,10,.22) 100%)!important}
html[data-theme="dark-saas"] .hero-copy h1 span{background:linear-gradient(100deg,#fff 0%,#a8f0ff 32%,#7e9dff 65%,#b19aff 100%);-webkit-background-clip:text;background-clip:text;color:transparent}

/* Cards / panels / pricing */
html[data-theme="dark-saas"] .card,
html[data-theme="dark-saas"] .resource-card,
html[data-theme="dark-saas"] .use-case,
html[data-theme="dark-saas"] .glass-panel,
html[data-theme="dark-saas"] .form-card,
html[data-theme="dark-saas"] .download-status,
html[data-theme="dark-saas"] .boundary-diagram,
html[data-theme="dark-saas"] .cutover-stage,
html[data-theme="dark-saas"] .license-footnote,
html[data-theme="dark-saas"] .plan-card,
html[data-theme="dark-saas"] .faq-item,
html[data-theme="dark-saas"] .article,
html[data-theme="dark-saas"] .prose,
html[data-theme="dark-saas"] .app-panel,
html[data-theme="dark-saas"] .tab-panel,
html[data-theme="dark-saas"] .pricing-guidance,
html[data-theme="dark-saas"] .pricing-disclaimer,
html[data-theme="dark-saas"] .signal{
  color:#eef1f6!important;
  border-color:rgba(151,166,194,.17)!important;
  background:linear-gradient(155deg,rgba(14,17,26,.94),rgba(8,10,16,.92))!important;
  box-shadow:0 20px 60px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme="dark-saas"] .motion-surface-v54::after{background:radial-gradient(480px circle at var(--spot-x,50%) var(--spot-y,50%),rgba(123,105,255,.13),rgba(51,190,255,.045) 32%,transparent 60%)!important}
html[data-theme="dark-saas"] .card-icon,
html[data-theme="dark-saas"] .plan-icon{background:linear-gradient(145deg,rgba(104,84,255,.16),rgba(27,87,131,.11))!important;border-color:rgba(133,119,255,.25)!important}
html[data-theme="dark-saas"] .card-icon svg{color:#86dfff!important}
html[data-theme="dark-saas"] .proof-strip{background:linear-gradient(160deg,rgba(14,17,27,.94),rgba(8,10,17,.90))!important;border-color:rgba(151,166,194,.18)!important;box-shadow:0 24px 64px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.025)!important}
html[data-theme="dark-saas"] .feature-chip,
html[data-theme="dark-saas"] .tag{color:#d8ddea!important;background:#0e121c!important;border-color:rgba(160,176,204,.18)!important}

/* Tabs / FAQ */
html[data-theme="dark-saas"] .app-tabs,html[data-theme="dark-saas"] .tabs{background:rgba(8,10,16,.84)!important;border-color:rgba(151,166,194,.16)!important}
html[data-theme="dark-saas"] .app-tab,html[data-theme="dark-saas"] .tab-button,html[data-theme="dark-saas"] .faq-question{color:#c7ceda!important}
html[data-theme="dark-saas"] .app-tab.active,
html[data-theme="dark-saas"] .app-tab[aria-selected="true"],
html[data-theme="dark-saas"] .tab-button.active,
html[data-theme="dark-saas"] .tab-button[aria-selected="true"]{color:#fff!important;background:linear-gradient(135deg,#6654e8,#238fd3)!important;border-color:rgba(160,145,255,.36)!important;box-shadow:0 8px 24px rgba(78,60,210,.22)!important}
html[data-theme="dark-saas"] .faq-question:hover{background:rgba(126,107,255,.06)!important}

/* Buttons / CTA */
html[data-theme="dark-saas"] .btn:not(.btn-ghost):not(.btn-secondary){background:linear-gradient(135deg,#5e55e8 0%,#357fe6 52%,#22bde7 100%)!important;border-color:rgba(140,211,255,.34)!important}
html[data-theme="dark-saas"] .btn-ghost,
html[data-theme="dark-saas"] .btn-secondary{color:#e6e9f0!important;background:rgba(13,16,25,.86)!important;border-color:rgba(157,171,197,.22)!important}
html[data-theme="dark-saas"] .cta-band{background:radial-gradient(580px 230px at 82% 0%,rgba(109,89,255,.15),transparent 60%),linear-gradient(140deg,rgba(16,18,28,.97),rgba(8,10,16,.98))!important;border-color:rgba(146,133,255,.25)!important;box-shadow:0 24px 72px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.03)!important}
html[data-theme="dark-saas"] .cta-band::before{background:radial-gradient(circle,rgba(112,90,255,.17),transparent 70%)!important}

/* Forms / tables */
html[data-theme="dark-saas"] input,
html[data-theme="dark-saas"] select,
html[data-theme="dark-saas"] textarea{color:#f6f7fa!important;background:#0b0e16!important;border-color:rgba(156,171,198,.22)!important}
html[data-theme="dark-saas"] input::placeholder,html[data-theme="dark-saas"] textarea::placeholder{color:#737f92!important}
html[data-theme="dark-saas"] label{color:#dce1e9!important}
html[data-theme="dark-saas"] table{color:#e9edf3!important;background:#0a0d14!important}
html[data-theme="dark-saas"] th{color:#f6f7fa!important;background:#101521!important;border-color:rgba(151,166,194,.17)!important}
html[data-theme="dark-saas"] td{color:#b8c1cf!important;border-color:rgba(151,166,194,.13)!important}

/* Modal and footer */
html[data-theme="dark-saas"] .modal{background:rgba(0,0,0,.76)!important}
html[data-theme="dark-saas"] .modal-card{color:#f7f9fc!important;background:linear-gradient(160deg,#111520,#080a10)!important;border-color:rgba(154,169,196,.22)!important;box-shadow:0 30px 100px rgba(0,0,0,.55)!important}
html[data-theme="dark-saas"] .modal-close{color:#e6e9ef!important;background:#0d111a!important;border-color:rgba(153,168,194,.20)!important}
html[data-theme="dark-saas"] .site-footer{background:linear-gradient(180deg,#070910 0%,#040509 100%)!important;border-top-color:rgba(151,166,194,.14)!important}
html[data-theme="dark-saas"] .site-footer p,html[data-theme="dark-saas"] .footer-links{color:#949faf!important}
html[data-theme="dark-saas"] .footer-links a:hover{color:#fff!important}

/* Mobile nav must inherit the active theme. */
@media(max-width:1199px){
  .theme-toggle-v55{width:100%;min-height:52px;margin-top:10px;padding:10px 8px;justify-content:flex-start;border-radius:10px}
  .theme-toggle-switch-v55{margin-left:auto}
  html[data-theme="dark-saas"] .desktop-nav{background:rgba(5,6,10,.992)!important;border-top-color:rgba(151,166,194,.15)!important}
}
@media(max-width:480px){.theme-toggle-label-v55{font-size:.92rem}}
@media(prefers-reduced-motion:reduce){.theme-toggle-switch-v55>span{transition:none!important}}
