/* Shared appearance controls. Dark surfaces use blue-green depth, not inversion. */
:root{--control-border:#9bb1a9;--control-hover:#e4ece6}
.site-header,.site-header.is-scrolled{height:88px}
.header-inner{gap:clamp(12px,1.3vw,20px)}
.brand,.brand img{width:178px}
html[lang] .desktop-nav{gap:clamp(16px,2vw,30px);font-size:13px}
.language-switcher{flex:none}
.language-switcher summary{min-width:58px;min-height:40px;border-color:var(--control-border)}
.theme-toggle{display:grid;place-items:center;width:40px;height:40px;flex:none;padding:10px;border:1px solid var(--control-border);border-radius:50%;background:transparent;color:var(--teal);transition:background .3s,color .3s,border-color .3s}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{background:var(--control-hover)}
.theme-toggle svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-sun{display:none}
.site-header.on-dark .theme-toggle{color:#d4eee2;border-color:#778e84}
.site-header.on-dark .theme-toggle:hover{background:#29433b}
.theme-changing body,.theme-changing .site-header,.theme-changing .chapter-copy,.theme-changing .home-products,.theme-changing .home-intro,.theme-changing .home-contact,.theme-changing .site-footer{transition:background-color .45s,color .45s,border-color .45s}

html[data-theme="dark"]{
  color-scheme:dark;
  --paper:#061c21;--white:#0d2b30;--ink:#e6f0ed;--muted:#a6bfbe;
  --teal:#6aecd0;--teal-dark:#08262c;--sage:#90beb6;
  --line:#23474b;--light-line:rgba(110,219,202,.24);
  --shadow:0 30px 80px rgba(0,7,11,.4);
  --control-border:#356066;--control-hover:#133c40;
}
html[data-theme="dark"] body{background-color:var(--paper);background-image:radial-gradient(ellipse at 87% 0,rgba(39,141,148,.1),transparent 45%);background-attachment:fixed}
html[data-theme="dark"] ::selection{background:#62d8c3;color:#032126}
html[data-theme="dark"] :focus-visible{outline-color:#79eed4}
html[data-theme="dark"] .theme-icon-sun{display:block}
html[data-theme="dark"] .theme-icon-moon{display:none}
html[data-theme="dark"] .site-header,html[data-theme="dark"] .home-page .site-header,html[data-theme="dark"] .home-page .site-header.on-dark{--header-surface:#061c21;--header-line:#23474b;--header-popover:#0d2b30;--header-hover:#163a3e;--control-border:#356066;--control-hover:#133c40;background:var(--header-surface);color:var(--ink);border-bottom:1px solid var(--header-line);box-shadow:none}
html[data-theme="dark"] .home-page .site-header.on-film{--header-surface:#191a1e;--header-line:#34383b;--header-popover:#222428;--header-hover:#323a3b;--control-border:#51595b;--control-hover:#2a3032}
html[data-theme="dark"] .brand img{filter:brightness(0) invert(1);mix-blend-mode:normal}
html[data-theme="dark"] .nav-contact,html[data-theme="dark"] .home-page .site-header .nav-contact{background:linear-gradient(115deg,#6bead0,#8ce8d8);color:#082b2e;border-color:transparent;box-shadow:0 0 24px rgba(65,219,193,.09)}
html[data-theme="dark"] .nav-contact:hover,html[data-theme="dark"] .home-page .site-header .nav-contact:hover{background:#a4f6e3;box-shadow:0 0 30px rgba(65,219,193,.22)}
html[data-theme="dark"] .desktop-nav>a:not(.nav-contact)::after{background:#6aecd0}
html[data-theme="dark"] .menu-toggle span{background:#c9e8e0}
html[data-theme="dark"] .language-switcher,html[data-theme="dark"] .site-header .language-switcher,html[data-theme="dark"] .site-header .theme-toggle{color:#c4e6df}
html[data-theme="dark"] .site-header .language-switcher summary,html[data-theme="dark"] .site-header .theme-toggle{border-color:var(--control-border)}
html[data-theme="dark"] .language-switcher summary:hover,html[data-theme="dark"] .language-switcher[open] summary,html[data-theme="dark"] .site-header .theme-toggle:hover{background:var(--control-hover);border-color:#6cbaac}
html[data-theme="dark"] .language-menu{background:var(--header-popover);border-color:var(--control-border);box-shadow:0 20px 50px rgba(0,0,0,.35)}
html[data-theme="dark"] .language-menu a:hover,html[data-theme="dark"] .language-menu a:focus-visible,html[data-theme="dark"] .language-menu a[aria-current="page"]{background:var(--header-hover);color:#9ef5dd}
html[data-theme="dark"] .mobile-nav:not([hidden]){background:var(--header-surface);color:var(--ink);box-shadow:0 20px 40px rgba(0,0,0,.3)}
html[data-theme="dark"] .mobile-nav a{border-color:var(--header-line)}

/* Independent evening scenes blend into the same surface as the company copy. */
html[data-theme="dark"] .company-hero{--hero-surface:#10191f;--hero-rgb:16 25 31;background:var(--hero-surface)}
html[data-theme="dark"] .direction-selector{border-color:#2b5357}
html[data-theme="dark"] .direction-section{background:radial-gradient(ellipse at 20% 30%,#123b40,transparent 60%),#08262c;border-color:#25494e}
html[data-theme="dark"] .direction-bioelectric{background:radial-gradient(ellipse at 80% 35%,#173e39,transparent 62%),#082b2b}
html[data-theme="dark"] .direction-sleep{background:radial-gradient(ellipse at 20% 30%,#173d4c,transparent 62%),#09252f}
html[data-theme="dark"] .direction-illustration,html[data-theme="dark"] .direction-bioelectric .direction-illustration,html[data-theme="dark"] .direction-sleep .direction-illustration{background:none}
html[data-theme="dark"] .signal-trace{stroke:#78ddc8;filter:drop-shadow(0 0 3px rgba(91,227,193,.3))}
html[data-theme="dark"] .company-copy h1{color:#edf7f3;text-shadow:0 4px 45px rgba(23,129,124,.1)}
html[data-theme="dark"] .company-copy h1 em{color:#edf7f3}
html[data-theme="dark"] .company-description{color:#bfd0d0}
html[data-theme="dark"] .button-solid{background:linear-gradient(110deg,#64e9ca,#8aead5);color:#062c2d;box-shadow:0 0 30px rgba(41,214,183,.08)}
html[data-theme="dark"] .button-solid:hover{background:#a1f5e0;box-shadow:0 9px 32px rgba(47,208,178,.2)}
html[data-theme="dark"] .button-outline{color:#c6f4e5;border-color:#4c9b91;background:rgba(8,41,45,.3)}
html[data-theme="dark"] .button-outline:hover{background:#123b3e;border-color:#91dcc8}
html[data-theme="dark"] .button-light{background:#ddf1e9;color:#103c38}
html[data-theme="dark"] .button-light:hover{background:#b8f2df}
html[data-theme="dark"] .text-link:hover{color:#8af1d6}
html[data-theme="dark"] .round-link:hover{color:#082d2d}
html[data-theme="dark"] .skip-link{color:#062b2c}

/* Keep real product colors; frame photographic surfaces as lit exhibits. */
html[data-theme="dark"] .home-opening,html[data-theme="dark"] .film-story{background:var(--film-surface,#191a1e)}
html[data-theme="dark"] .story-bottom{border-color:#355b5b}
html[data-theme="dark"] .home-intro{background:var(--paper)}
html[data-theme="dark"] .home-products{background:#061c21}
html[data-theme="dark"] .home-development{background:radial-gradient(ellipse at 20% 0,rgba(40,131,119,.19),transparent 65%),#07252b;border-block:1px solid #204c50}
html[data-theme="dark"] .development-services>a{border-color:#28565a}
html[data-theme="dark"] .home-contact{background:radial-gradient(ellipse at 90% 100%,rgba(34,105,108,.16),transparent 65%),#061c21}
html[data-theme="dark"] .product-card p{color:var(--muted)}
html[data-theme="dark"] .card-meta{color:#8daeb0}
html[data-theme="dark"] .card-image{background:radial-gradient(ellipse at 50% 25%,#26454a,#112e34);border:1px solid #325155}
html[data-theme="dark"] .card-arrow{background:#0e3439;color:#a0eed8;box-shadow:0 3px 15px rgba(0,7,12,.2)}
html[data-theme="dark"] .detail-image,html[data-theme="dark"] .solution-image,html[data-theme="dark"] .about-photo-grid a{background:#19383d;border:1px solid #34575c;box-shadow:0 16px 40px rgba(0,7,12,.18)}

/* Catalogs, technical detail and contact pages share the same material palette. */
html[data-theme="dark"] .filter-btn{color:#b6d1ca;border-color:#3b605f}
html[data-theme="dark"] .filter-btn.is-active,html[data-theme="dark"] .filter-btn:hover{background:#72d9bf;border-color:#72d9bf;color:#092d2b}
html[data-theme="dark"] .search-field{border-color:#527473}
html[data-theme="dark"] .search-field input{color:var(--ink)}
html[data-theme="dark"] .search-field input::placeholder{color:#91acae}
html[data-theme="dark"] .detail-use,html[data-theme="dark"] .about-statement{background:linear-gradient(125deg,#0e3439,#08262e);border-block:1px solid #254b50}
html[data-theme="dark"] .service-capabilities{background:radial-gradient(ellipse at 90% 20%,#153d41,transparent 70%),#092a30;border-block:1px solid #24484c}
html[data-theme="dark"] .capability-tags span{border-color:#476968;background:rgba(14,60,61,.4);color:#bcdfd3}
html[data-theme="dark"] .about-photo-grid span{color:#c9eee1;background:rgba(7,39,44,.92);border:1px solid #547a78}
html[data-theme="dark"] .contact-panel{background:radial-gradient(ellipse at 100% 0,rgba(45,127,128,.14),transparent 70%),#102d34;border:1px solid #315358}
html[data-theme="dark"] .contact-email{border-color:#4e7473}
html[data-theme="dark"] .site-footer{background:#04171d;border-color:#22474d}
html[data-theme="dark"] .footer-bottom{border-color:#24434b;color:#8badb1}
html[data-theme="dark"] .footer-label{color:#8ebbb7}

@media(max-width:1180px){
  html[lang] .desktop-nav{display:none}
  .menu-toggle{height:40px;width:40px;display:flex;flex-direction:column;justify-content:center;gap:6px;background:transparent;border:0;padding:8px;flex:none}
  .menu-toggle span{width:24px;height:1px;background:var(--teal);transition:transform .3s}
  .menu-toggle[aria-expanded="true"] span:first-child{transform:translateY(3.5px) rotate(45deg)}
  .menu-toggle[aria-expanded="true"] span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
  .mobile-nav:not([hidden]){display:flex;flex-direction:column;gap:0;position:absolute;top:100%;left:0;right:0;background:var(--paper);padding:10px max(18px,4.25vw) 24px;box-shadow:0 20px 30px rgba(20,55,51,.12)}
  .mobile-nav a{padding:15px 0;border-bottom:1px solid var(--line);font-size:16px}
}
@media(max-width:760px){
  .site-header,.site-header.is-scrolled{height:72px}
  .header-inner,.home-page .header-inner{gap:8px}
  .brand,.brand img,.home-page .brand,.home-page .brand img{width:130px}
  .language-switcher summary{font-size:11px;min-width:57px;min-height:38px;padding:7px;gap:6px}
  .theme-toggle{width:38px;height:38px;padding:9px}
  .language-menu{right:-42px}
  html[data-theme="dark"] .chapter-copy{padding-top:36px}
}
@media(max-width:380px){
  .brand,.brand img,.home-page .brand,.home-page .brand img{width:118px}
  .header-inner,.home-page .header-inner{gap:6px}
  .language-switcher summary{min-width:53px}
  .theme-toggle{width:36px;height:36px;padding:9px}
  .menu-toggle{width:36px;padding:6px}
}
