/* assets/css/global.css
   BMD / BulNation Maximum Design
*/

/* =========================
   Theme variables
   ========================= */

:root[data-theme="dark"]{
  --bg0:#090a0c;
  --bg1:#0e1115;

  --text:#f1f0ec;
  --muted:#aeb3bc;

  --glass-bg:#14181e;
  --glass-border:#2a3038;

  --shadow:0 10px 24px rgba(0,0,0,.32);
  --shadow-soft:0 4px 12px rgba(0,0,0,.24);

  --accent:#ff2d2d;       /* BulNation red */
  --accent2:#c92e39;
  --accent3:#62a9db;

  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius:var(--radius-md);

  --container: 1200px;

  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: "Orbitron", "Inter", system-ui, sans-serif;

  /* UI surfaces */
  --surface-bg:rgba(9,10,12,.94);
  --surface-bg-strong:#0d1014;
  --surface-border:#252b32;

  --ui-bg:#161a20;
  --ui-bg-hover:#1d232a;
  --ui-border:#303740;
  --ui-border-hover:#4a535f;

  --nav-text: rgba(232,232,238,.88);

  /* Background glow */
  --glow1:rgba(255,45,45,.035);
  --glow2:rgba(98,169,219,.025);
  --glow3:transparent;

  /* Theme toggle dot */
  --theme-dot-core: rgba(155, 15, 25, .95);   /* deep burgundy */
  --theme-dot-halo: rgba(255,45,45,.24);
  --theme-dot-ring: rgba(255,255,255,.16);

  --focus-ring:rgba(255,75,75,.72);
  --theme-menu-bg: rgba(14,15,20,.97);
  --theme-menu-border: rgba(255,255,255,.14);
  --theme-menu-shadow:0 8px 20px rgba(0,0,0,.36);
  --theme-option-hover-bg: rgba(255,255,255,.06);
  --theme-option-selected-bg: rgba(255,45,45,.10);
  --theme-option-selected-border: rgba(255,45,45,.28);

  /* Midnight Atelier semantic surfaces */
  --panel-bg:#14181e;
  --panel-bg-raised:#1a1f26;
  --panel-border:#2b323b;
  --panel-border-hover: rgba(255,45,45,.30);
  --panel-highlight: rgba(255,255,255,.18);
  --paint-line: linear-gradient(90deg, rgba(255,45,45,.92), rgba(255,75,110,.54), rgba(78,161,255,.42));
  --paint-line-glow: rgba(255,45,45,.18);
  --card-shadow:0 3px 10px rgba(0,0,0,.22);
  --card-shadow-hover:0 6px 16px rgba(0,0,0,.28);
  --media-bg:#0d1014;
  --media-border: rgba(255,255,255,.12);
  --media-warm: rgba(255,45,45,.13);
  --media-cool: rgba(78,161,255,.09);
  --label-bg: rgba(255,255,255,.055);
  --label-border: rgba(255,255,255,.13);
  --label-text: rgba(232,232,238,.70);
  --content-soft: rgba(232,232,238,.86);
  --content-muted: rgba(184,186,198,.94);
  --accent-wash: rgba(255,45,45,.10);
  --accent-border: rgba(255,45,45,.30);
  --accent-glow: rgba(255,45,45,.20);
  --cta-shadow:0 3px 0 rgba(128,0,10,.55);
}

:root[data-theme="light"]{
  /* Light “Daylight Glass” (contrast-fixed) */
  --bg0:#e7eaee;
  --bg1:#dfe3e8;

  /* stronger contrast */
  --text:#12131a;
  --muted: rgba(18,19,26,.72);

  /* glass so it doesn't wash text out */
  --glass-bg:#f8f9fa;
  --glass-border:#bdc4cc;

  --shadow:0 8px 20px rgba(29,36,44,.13);
  --shadow-soft:0 3px 9px rgba(29,36,44,.10);

  --accent:#ff2d2d;
  --accent2:#ff4b6e;
  --accent3:#2f7cff;

  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius:var(--radius-md);

  --container: 1200px;

  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: "Orbitron", "Inter", system-ui, sans-serif;

  /* header/footer surfaces */
  --surface-bg:rgba(248,249,250,.94);
  --surface-bg-strong:#f8f9fa;
  --surface-border:#bfc6ce;

  /* UI buttons/icons */
  --ui-bg:#f3f5f7;
  --ui-bg-hover:#fff;
  --ui-border:#b6bec7;
  --ui-border-hover:#7f8995;

  --nav-text: rgba(18,19,26,.82);

  /* background glow quieter */
  --glow1: rgba(255,45,45,.08);
  --glow2: rgba(47,124,255,.08);
  --glow3: rgba(255,75,110,.06);

  /* Theme toggle dot (light core) */
  --theme-dot-core: rgba(255,255,255,.95);
  --theme-dot-halo: rgba(47,124,255,.18);
  --theme-dot-ring: rgba(0,0,0,.12);

  --focus-ring:rgba(174,0,17,.58);
  --theme-menu-bg: rgba(255,255,255,.96);
  --theme-menu-border: rgba(0,0,0,.14);
  --theme-menu-shadow: 0 20px 55px rgba(0,0,0,.14);
  --theme-option-hover-bg: rgba(0,0,0,.05);
  --theme-option-selected-bg: rgba(255,45,45,.10);
  --theme-option-selected-border: rgba(180,0,18,.34);

  /* Midnight Atelier semantic surfaces */
  --panel-bg:#f7f8f9;
  --panel-bg-raised:#fff;
  --panel-border:#c1c8d0;
  --panel-border-hover: rgba(180,0,18,.27);
  --panel-highlight: rgba(255,255,255,.88);
  --paint-line: linear-gradient(90deg, rgba(190,16,28,.82), rgba(255,45,45,.48), rgba(47,124,255,.35));
  --paint-line-glow: rgba(180,0,18,.10);
  --card-shadow:0 2px 7px rgba(29,36,44,.09);
  --card-shadow-hover:0 5px 13px rgba(29,36,44,.13);
  --media-bg: rgba(255,255,255,.64);
  --media-border: rgba(0,0,0,.10);
  --media-warm: rgba(255,45,45,.09);
  --media-cool: rgba(47,124,255,.07);
  --label-bg: rgba(255,255,255,.82);
  --label-border: rgba(0,0,0,.11);
  --label-text: rgba(18,19,26,.62);
  --content-soft: rgba(18,19,26,.78);
  --content-muted: rgba(18,19,26,.60);
  --accent-wash: rgba(255,45,45,.10);
  --accent-border: rgba(180,0,18,.30);
  --accent-glow: rgba(180,0,18,.14);
  --cta-shadow:0 3px 0 rgba(128,0,10,.25);
}

:root[data-theme="spectra"]{
  --bg0:#080b10;
  --bg1:#101820;

  --text:#eef3f6;
  --muted:#afbec8;

  --glass-bg: rgba(196,220,232,.075);
  --glass-border: rgba(154,202,219,.18);

  --shadow: 0 22px 70px rgba(0,0,0,.58);
  --shadow-soft: 0 14px 40px rgba(0,0,0,.48);

  --accent:#d9394d;
  --accent2:#b92f40;
  --accent3:#45a9bf;

  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius:var(--radius-md);
  --container: 1200px;
  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: "Orbitron", "Inter", system-ui, sans-serif;

  --surface-bg:rgba(8,12,17,.95);
  --surface-bg-strong:#0b1117;
  --surface-border: rgba(154,202,219,.12);

  --ui-bg: rgba(196,220,232,.055);
  --ui-bg-hover: rgba(196,220,232,.10);
  --ui-border: rgba(154,202,219,.16);
  --ui-border-hover: rgba(154,202,219,.28);

  --nav-text: rgba(238,243,246,.88);

  --glow1: rgba(217,57,77,.14);
  --glow2: rgba(63,182,209,.14);
  --glow3: rgba(127,174,199,.10);

  --theme-dot-core: rgba(63,182,209,.94);
  --theme-dot-halo: rgba(63,182,209,.30);
  --theme-dot-ring: rgba(214,237,245,.28);

  --focus-ring:rgba(79,194,216,.68);
  --theme-menu-bg: rgba(8,12,17,.97);
  --theme-menu-border: rgba(154,202,219,.22);
  --theme-menu-shadow: 0 22px 60px rgba(0,0,0,.58);
  --theme-option-hover-bg: rgba(196,220,232,.08);
  --theme-option-selected-bg: rgba(63,182,209,.12);
  --theme-option-selected-border: rgba(63,182,209,.34);

  --panel-bg:#111a21;
  --panel-border: rgba(154,202,219,.15);
  --panel-bg-hover: rgba(196,220,232,.09);
  --panel-border-hover: rgba(63,182,209,.30);
  --field-bg: rgba(196,220,232,.055);
  --field-border: rgba(154,202,219,.18);
  --field-focus-border: rgba(63,182,209,.42);
  --field-focus-ring: rgba(63,182,209,.16);
  --content-soft: rgba(238,243,246,.84);
  --content-muted: rgba(175,190,200,.94);
  --accent-wash: rgba(217,57,77,.13);
  --accent-border: rgba(217,57,77,.33);
  --accent-glow: rgba(217,57,77,.22);
  --reflection-wash: rgba(63,182,209,.12);
  --reflection-border: rgba(63,182,209,.30);
  --media-bg: rgba(6,10,14,.48);
  --media-red: rgba(217,57,77,.18);
  --media-cyan: rgba(63,182,209,.15);

  /* Midnight Atelier semantic surfaces */
  --panel-bg-raised:#17232c;
  --panel-highlight: rgba(214,237,245,.20);
  --paint-line: linear-gradient(90deg, rgba(217,57,77,.92), rgba(223,84,100,.58), rgba(63,182,209,.64));
  --paint-line-glow: rgba(63,182,209,.17);
  --card-shadow:0 3px 10px rgba(0,0,0,.26);
  --card-shadow-hover:0 6px 16px rgba(0,0,0,.32);
  --media-border: rgba(154,202,219,.17);
  --media-warm: rgba(217,57,77,.17);
  --media-cool: rgba(63,182,209,.14);
  --label-bg: rgba(196,220,232,.060);
  --label-border: rgba(154,202,219,.18);
  --label-text: rgba(175,190,200,.96);
  --cta-shadow:0 3px 0 rgba(105,18,31,.55);
}

/* Safety fallback if html has no data-theme */
:root{
  --bg0:#0b0b0e;
  --bg1:#12141a;
  --text:#e8e8ee;
  --muted:#b8bac6;
  --glass-bg: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.16);
  --shadow: 0 22px 70px rgba(0,0,0,.55);
  --shadow-soft: 0 14px 40px rgba(0,0,0,.45);
  --accent:#ff2d2d;
  --accent2:#ff4b6e;
  --accent3:#4ea1ff;
  --radius-xs:2px;
  --radius-sm:4px;
  --radius-md:6px;
  --radius-lg:8px;
  --radius:var(--radius-md);
  --container: 1200px;
  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: "Orbitron", "Inter", system-ui, sans-serif;

  --surface-bg: rgba(10,10,14,.55);
  --surface-bg-strong: rgba(10,10,14,.70);
  --surface-border: rgba(255,255,255,.08);

  --ui-bg: rgba(255,255,255,.04);
  --ui-bg-hover: rgba(255,255,255,.06);
  --ui-border: rgba(255,255,255,.10);
  --ui-border-hover: rgba(255,255,255,.16);

  --nav-text: rgba(232,232,238,.88);

  --glow1: rgba(255,45,45,.10);
  --glow2: rgba(78,161,255,.08);
  --glow3: rgba(255,75,110,.08);

  --theme-dot-core: rgba(155, 15, 25, .95);
  --theme-dot-halo: rgba(255,45,45,.24);
  --theme-dot-ring: rgba(255,255,255,.16);

  --focus-ring: rgba(255,45,45,.22);
  --theme-menu-bg: rgba(14,15,20,.97);
  --theme-menu-border: rgba(255,255,255,.14);
  --theme-menu-shadow: 0 20px 55px rgba(0,0,0,.46);
  --theme-option-hover-bg: rgba(255,255,255,.06);
  --theme-option-selected-bg: rgba(255,45,45,.10);
  --theme-option-selected-border: rgba(255,45,45,.28);

  /* Midnight Atelier semantic surfaces (dark fallback) */
  --panel-bg: rgba(255,255,255,.055);
  --panel-bg-raised: rgba(255,255,255,.075);
  --panel-border: rgba(255,255,255,.12);
  --panel-border-hover: rgba(255,45,45,.30);
  --panel-highlight: rgba(255,255,255,.18);
  --paint-line: linear-gradient(90deg, rgba(255,45,45,.92), rgba(255,75,110,.54), rgba(78,161,255,.42));
  --paint-line-glow: rgba(255,45,45,.18);
  --card-shadow: 0 16px 44px rgba(0,0,0,.38);
  --card-shadow-hover: 0 22px 56px rgba(0,0,0,.48);
  --media-bg: rgba(10,10,14,.38);
  --media-border: rgba(255,255,255,.12);
  --media-warm: rgba(255,45,45,.13);
  --media-cool: rgba(78,161,255,.09);
  --label-bg: rgba(255,255,255,.055);
  --label-border: rgba(255,255,255,.13);
  --label-text: rgba(232,232,238,.70);
  --content-soft: rgba(232,232,238,.86);
  --content-muted: rgba(184,186,198,.94);
  --accent-wash: rgba(255,45,45,.10);
  --accent-border: rgba(255,45,45,.30);
  --accent-glow: rgba(255,45,45,.20);
  --cta-shadow: 0 18px 42px rgba(255,45,45,.20);
}

/* Basic reset */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  font-family:var(--font-ui);
  overflow-x:hidden;
  background: var(--bg1); /* fallback */
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;

  background:
    linear-gradient(90deg, transparent 0 49.92%, rgba(255,255,255,.018) 50%, transparent 50.08%),
    linear-gradient(0deg, transparent 0 49.92%, rgba(255,255,255,.014) 50%, transparent 50.08%),
    linear-gradient(135deg, var(--bg0), var(--bg1));
  background-size:48px 48px,48px 48px,auto;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font:inherit; }
button,input,select,textarea{ color:inherit; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:3px;
}
::selection{ background:var(--accent); color:#fff; }

/* Layout */
.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.site-main{
  flex:1;
  padding-bottom:48px;
}
.container{
  width:min(var(--container), calc(100% - 40px));
  margin-inline:auto;
}

/* Tablet width: a little more breathing room without forcing phone-like stacking */
@media (min-width: 701px) and (max-width: 1180px){
  .container{
    width:min(1120px, calc(100% - 56px));
  }
}

/* Glass utility */
.glass{
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:var(--shadow-soft);
  position:relative;
  overflow:hidden;
}
.glass::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:var(--accent);
  opacity:.9;
  pointer-events:none;
}
.glass::after{ content:none; }

/* Light glass: reduce washout */
:root[data-theme="light"] .glass::before{ opacity:.20; }
:root[data-theme="light"] .glass::after{ opacity:.28; }

/* Fallback if backdrop-filter unsupported */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  .glass{
    background: rgba(20,20,26,.72);
  }
  :root[data-theme="spectra"] .glass{
    background: rgba(12,18,24,.88);
  }
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--surface-bg);
  border-bottom: 1px solid var(--surface-border);
}
.header-row{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:240px;
}

.brand-mark{
  height:40px;              /* КЛЮЧОВО */
  width:auto;
  display:flex;
  align-items:center;
}


.brand-mark .logo{
  height:78px;
  width:auto;
  display:block;
}


/* Default (dark theme) */
.brand-mark .logo-light{ display:none; }

/* Light theme swap */
:root[data-theme="light"] .brand-mark .logo-dark{ display:none; }
:root[data-theme="light"] .brand-mark .logo-light{ display:block; }

.brand-text{
  display:flex;
  flex-direction:column;
  justify-content:center;   /* КЛЮЧОВО */
  line-height:1.05;
}


.brand-name{
  font-family: var(--font-display);
  letter-spacing:.06em;
  font-weight:700;
  font-size:14px;
  text-transform:uppercase;
  transform: translateY(-1px); /* микро-оптика */
}

.brand-tag{
  font-size:12px;
  color:var(--muted);
  opacity:.9;
}


.nav{
  display:flex;
  align-items:center;
  gap:4px;
}
.nav-link{
  font-size:13px;
  color: var(--nav-text);
  padding:10px 10px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  position:relative;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.nav-link:hover{
  background:var(--ui-bg-hover);
  border-color:var(--ui-border);
  transform: translateY(-1px);
}
:root[data-theme="light"] .nav-link:hover{
  background: rgba(0,0,0,.05);
}

.nav-link.is-active{
  color:inherit;
  background: rgba(255,45,45,.10);
  border:1px solid rgba(255,45,45,.46);
  box-shadow:inset 0 -2px 0 var(--accent);
}


/* Product dropdown */
.nav-dropdown{
  position:relative;
}

.nav-dropdown-toggle{
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:transparent;
  color:var(--nav-text);
  font:inherit;
  cursor:pointer;
}

.nav-dropdown-toggle:focus{
  outline:none;
}

.nav-dropdown-toggle:focus-visible{
  box-shadow:0 0 0 3px var(--focus-ring);
}

.nav-chevron,
.m-products-chevron{
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
  transition:transform .18s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-chevron,
.m-products-toggle[aria-expanded="true"] .m-products-chevron{
  transform:translateY(2px) rotate(225deg);
}

.nav-dropdown-menu{
  position:absolute;
  top:calc(100% + 11px);
  left:50%;
  z-index:80;
  width:268px;
  padding:8px;
  border:1px solid var(--theme-menu-border);
  border-radius:var(--radius-md);
  background:var(--theme-menu-bg);
  box-shadow:var(--theme-menu-shadow);
  transform:translateX(-50%);
}

.nav-dropdown-menu::before{
  content:"";
  position:absolute;
  left:50%;
  top:-6px;
  width:10px;
  height:10px;
  border-left:1px solid var(--theme-menu-border);
  border-top:1px solid var(--theme-menu-border);
  background:var(--theme-menu-bg);
  transform:translateX(-50%) rotate(45deg);
}

.nav-dropdown-menu[hidden],
.m-submenu[hidden]{
  display:none;
}

.nav-dropdown-item{
  position:relative;
  z-index:1;
  min-height:58px;
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  align-items:center;
  gap:9px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  color:var(--text);
  transition:background .16s ease, border-color .16s ease, transform .16s ease;
}

.nav-dropdown-item + .nav-dropdown-item{
  margin-top:4px;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible{
  outline:none;
  border-color:var(--ui-border);
  background:var(--theme-option-hover-bg);
  transform:translateX(2px);
}

.nav-dropdown-item.is-active{
  border-color:rgba(255,45,45,.34);
  background:rgba(255,45,45,.10);
}

.nav-dropdown-index{
  font-family:var(--font-display);
  font-size:10px;
  letter-spacing:.08em;
  color:var(--accent);
  opacity:.86;
}

.nav-dropdown-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.nav-dropdown-copy strong{
  font-size:12px;
  letter-spacing:.015em;
}

.nav-dropdown-copy small{
  color:var(--muted);
  font-size:10px;
  line-height:1.25;
}

.m-nav-group{
  min-width:0;
}

.m-products-toggle{
  appearance:none;
  width:100%;
  justify-content:space-between;
  color:var(--text);
  font:inherit;
  text-align:left;
  cursor:pointer;
}

.m-submenu{
  display:grid;
  gap:7px;
  margin:8px 0 2px 14px;
  padding:2px 0 2px 12px;
  border-left:2px solid rgba(255,45,45,.42);
}

.m-sublink{
  min-height:48px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  gap:6px;
  padding:0 14px;
  border:1px solid var(--panel-border);
  border-radius:var(--radius-sm);
  background:var(--panel-bg);
  color:var(--text);
  font-size:13px;
}

.m-sublink span{
  font-family:var(--font-display);
  font-size:9px;
  letter-spacing:.08em;
  color:var(--accent);
}

.m-sublink strong{
  font-weight:600;
}

.m-sublink:hover,
.m-sublink:focus-visible{
  outline:none;
  border-color:var(--panel-border-hover);
  background:var(--panel-bg-raised);
}

.m-sublink.is-active{
  border-color:rgba(255,45,45,.34);
  background:rgba(255,45,45,.11);
}

:root[data-theme="light"] .nav-dropdown-item.is-active,
:root[data-theme="light"] .m-sublink.is-active{
  background:rgba(255,45,45,.08);
}

:root[data-theme="spectra"] .nav-dropdown-item.is-active,
:root[data-theme="spectra"] .m-sublink.is-active{
  border-color:var(--accent-border);
  background:var(--accent-wash);
}

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

.icon-btn{
  width:40px; height:40px;
  display:grid;
  place-items:center;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.icon-btn:hover{
  transform: translateY(-1px);
  background: var(--ui-bg-hover);
  border-color: var(--ui-border-hover);
}

/* Theme toggle: tiny glass dot (subtle) */
.theme-dot{
  width:40px; height:40px;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.theme-dot:hover{
  transform: translateY(-1px);
  background: var(--ui-bg-hover);
  border-color: var(--ui-border-hover);
}
.theme-dot span{
  width:14px;
  height:14px;
  border-radius:999px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.65), rgba(255,255,255,0) 55%),
              var(--theme-dot-core);
  box-shadow:
    0 0 0 1px var(--theme-dot-ring) inset,
    0 0 18px var(--theme-dot-halo);
}
.theme-dot:focus{ outline:none; }
.theme-dot:focus-visible{
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.theme-picker{
  position:relative;
}

.theme-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:70;
  width:176px;
  padding:7px;
  border:1px solid var(--theme-menu-border);
  border-radius:var(--radius-md);
  background:var(--theme-menu-bg);
  box-shadow:var(--theme-menu-shadow);
}

.theme-menu[hidden]{
  display:none;
}

.theme-option{
  width:100%;
  min-height:40px;
  padding:0 9px;
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font-size:12px;
  font-weight:600;
  text-align:left;
}

.theme-option:hover{
  background:var(--theme-option-hover-bg);
}

.theme-option[aria-checked="true"]{
  border-color:var(--theme-option-selected-border);
  background:var(--theme-option-selected-bg);
}

.theme-option:focus{
  outline:none;
}

.theme-option:focus-visible{
  box-shadow:0 0 0 3px var(--focus-ring);
}

.theme-swatch{
  width:15px;
  height:15px;
  flex:0 0 auto;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.20);
}

.theme-swatch.is-dark{
  background:linear-gradient(135deg, #0b0b0e, #ff2d2d);
}

.theme-swatch.is-light{
  border-color:rgba(0,0,0,.14);
  background:linear-gradient(135deg, #f7f8fc, #ff2d2d);
}

.theme-swatch.is-spectra{
  background:linear-gradient(135deg, #080b10 14%, #d9394d 54%, #3fb6d1);
}

.theme-option-label{
  flex:1;
}

.theme-check{
  display:none;
  font-size:12px;
  font-weight:900;
}

.theme-option[aria-checked="true"] .theme-check{
  display:block;
}

/* Burger */
.burger{
  width:44px; height:44px;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  display:none;
  align-items:center;
  justify-content:center;
  gap:5px;
  cursor:pointer;
  transition: background .18s ease, border-color .18s ease;
}
.burger span{
  display:block;
  width:18px;
  height:2px;
  background: rgba(255,255,255,.88);
  border-radius:99px;
  transition: transform .18s ease, opacity .18s ease;
}
:root[data-theme="light"] .burger span{
  background: rgba(17,18,24,.88);
}

/* Mobile nav */
.mobile-nav{
  display:none;
}
.m-link{
  display:block;
  padding:12px 12px;
  border-radius:var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,.08);
  margin:10px 0;
}
:root[data-theme="light"] .m-link{
  background: rgba(255,255,255,.62);
  border-color: rgba(0,0,0,.12);
}

.m-link.is-active{
  border-color: rgba(255,45,45,.24);
  background: rgba(255,45,45,.10);
}
.m-contact{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  color: var(--muted);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:44px;
  padding:0 16px;
  border-radius:var(--radius-sm);
  border:1px solid var(--ui-border);
  background:var(--ui-bg);
  color:#fff;
  font-weight:600;
  font-size:13px;
  letter-spacing:.01em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}
.btn:active{ transform: translateY(0); }

.btn-primary{
  border:1px solid #ff5a5a;
  background:var(--accent);
  box-shadow:var(--cta-shadow);
}
.btn-primary:hover{
  background:#ff4141;
  border-color: rgba(255,45,45,.48);
}
.btn-ghost{
  background: rgba(255,255,255,.04);
}

/* Light theme button contrast (fix CTA readability) */
:root[data-theme="light"] .btn{
  color: rgba(18,19,26,.92);
  border-color: rgba(0,0,0,.14);
  background: rgba(255,255,255,.88);
  box-shadow:none;
}
:root[data-theme="light"] .btn:hover{
  background: rgba(255,255,255,.96);
  border-color: rgba(0,0,0,.20);
}
:root[data-theme="light"] .btn-primary{
  color:#fff !important;
  border-color: rgba(180, 0, 18, .55);
  background:#c51625;
  box-shadow:var(--cta-shadow);
}
:root[data-theme="light"] .btn-primary:hover{
  background:#a90f1c;
  border-color: rgba(180,0,18,.70);
}


/* Sections */
.section{
  padding:70px 0;
}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.section-title{
  margin:0;
  font-family: var(--font-display);
  letter-spacing:.05em;
  text-transform:uppercase;
  font-size:18px;
}
.section-sub{
  margin:0;
  color:var(--muted);
  max-width:640px;
  font-size:13px;
  line-height:1.55;
}

/* Grid helpers */
.grid{
  display:grid;
  gap:18px;
}
.cards-4{
  grid-template-columns: repeat(4, 1fr);
}

/* Footer */
.site-footer{
  margin-top:auto;
  padding:44px 0 22px;
  border-top: 1px solid var(--surface-border);
  background: var(--surface-bg);
}
.footer-grid{
  display:flex;
  flex-direction:column;
  gap:22px;
}
.footer-grid > *{
  min-width:0;
}
.footer-main{
  display:grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .9fr) minmax(220px, .9fr);
  gap:clamp(22px, 5vw, 86px);
  align-items:start;
}
.footer-col{
  min-width:0;
}
.footer-brand{
  font-family: var(--font-display);
  letter-spacing:.06em;
  text-transform:uppercase;
  font-weight:700;
  max-width:100%;
  overflow-wrap:anywhere;
}
.footer-title{
  font-size:12px;
  color: inherit;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.footer-link{
  display:block;
  max-width:100%;
  padding:8px 0;
  color: var(--muted);
  font-size:13px;
  overflow-wrap:anywhere;
  word-break:normal;
}
.footer-link[href^="mailto:"]{
  word-break:break-word;
}
.footer-link:hover{ color: inherit; }
.footer-muted{
  max-width:100%;
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
  overflow-wrap:anywhere;
}

.social-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.social{
  width:40px; height:40px;
  display:grid; place-items:center;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  color: inherit;
  font-weight:700;
  font-size:12px;
}
.social:hover{
  background: var(--ui-bg-hover);
  color: inherit;
}

.footer-nav{
  min-width:0;
  padding-top:18px;
  border-top:1px solid var(--surface-border);
}
.footer-nav-links{
  display:grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(145px, 1fr);
  gap:2px 28px;
  align-items:start;
}
.footer-nav .footer-link{
  padding:6px 0;
}

.footer-bottom{
  margin-top:22px;
  padding-top:18px;
  border-top: 1px solid var(--surface-border);
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}
.footer-bottom > *{
  min-width:0;
}
.footer-signature{
  width:min(720px, 100%);
  display:grid;
  grid-template-columns:minmax(24px, 1fr) auto minmax(24px, 1fr);
  align-items:center;
  gap:14px;
  color:var(--muted);
  text-align:center;
}
.footer-signature-line{
  height:1px;
  min-width:0;
  background:linear-gradient(90deg, transparent, var(--surface-border), transparent);
}
.footer-signature-text{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 14px;
  border:1px solid var(--ui-border);
  border-radius:var(--radius-xs);
  border-left:3px solid var(--accent);
  background:var(--ui-bg);
  color:var(--content-soft);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:none;
  white-space:nowrap;
}

@media (max-width: 980px){
  .footer-main{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:22px;
  }
  .footer-nav-links{
    grid-auto-columns:minmax(130px, 1fr);
    gap:2px 22px;
  }
}

@media (max-width: 700px){
  .footer-main{
    grid-template-columns: 1fr;
    gap:20px;
  }
  .footer-nav-links{
    grid-template-rows:none;
    grid-auto-flow:row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns:auto;
    gap:0 18px;
  }
}

@media (max-width: 520px){
  .footer-signature{
    grid-template-columns:1fr;
    gap:10px;
  }
  .footer-signature-line{
    display:none;
  }
  .footer-signature-text{
    width:100%;
    white-space:normal;
    line-height:1.45;
    padding:9px 12px;
  }
}

@media (max-width: 380px){
  .footer-nav-links{
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (min-width: 701px) and (max-width: 1180px){
  .site-main{ padding-bottom:38px; }
  .header-row{ height:66px; }
  .brand-mark .logo{ height:70px; }
}

@media (max-width: 980px){
  .nav{ display:none; }
  .burger{ display:flex; flex-direction:column; }
  .burger:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px var(--focus-ring);
  }
  .burger[aria-expanded="true"]{
    background:var(--ui-bg-hover);
    border-color:var(--ui-border-hover);
  }
  .burger[aria-expanded="true"] span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }
  .burger[aria-expanded="true"] span:nth-child(2){
    opacity:0;
    transform:scaleX(.35);
  }
  .burger[aria-expanded="true"] span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }
  .mobile-nav:not([hidden]){
    display:block;
    position:fixed;
    inset:0;
    z-index:45;
    height:100vh;
    height:100dvh;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:calc(88px + env(safe-area-inset-top, 0px)) 0 max(28px, env(safe-area-inset-bottom, 0px));
    border-top:1px solid var(--surface-border);
    background:var(--surface-bg-strong);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
  }
  .mobile-nav:not([hidden]) .container{
    position:relative;
    display:grid;
    gap:10px;
    max-width:540px;
  }
  .m-link{
    min-height:58px;
    margin:0;
    padding:0 18px;
    display:flex;
    align-items:center;
    font-weight:600;
    letter-spacing:.02em;
    background:var(--panel-bg);
    border-color:var(--panel-border);
    box-shadow:none;
  }
  .m-link:hover{
    background:var(--panel-bg-raised);
    border-color:var(--panel-border-hover);
  }
  .m-link:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px var(--focus-ring), var(--card-shadow);
  }
  html.menu-open,
  html.menu-open body{
    overflow:hidden;
    overscroll-behavior:none;
  }
  .cards-4{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand{ min-width:auto; }
}
@media (max-width: 560px){
  .cards-4{ grid-template-columns: 1fr; }
  .section{ padding:56px 0; }
  .header-row{ height:68px; }
  .brand-tag{ display:none; }
  .footer-grid{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  .burger,
  .burger span{
    transition:none;
  }
}

/* Beyond accent link (header + mobile + footer) */
.nav-link-beyond{
  border: 1px solid rgba(78,161,255,.22);
  background: rgba(78,161,255,.08);
  color: rgba(232,232,238,.95);
  display:inline-flex;
  align-items:center;
  gap:8px;
}
:root[data-theme="light"] .nav-link-beyond{
  color: rgba(18,19,26,.86);
  background: rgba(47,124,255,.10);
  border-color: rgba(47,124,255,.22);
}

.nav-link-beyond:hover{
  background: rgba(78,161,255,.12);
  border-color: rgba(78,161,255,.32);
}
:root[data-theme="light"] .nav-link-beyond:hover{
  background: rgba(47,124,255,.14);
  border-color: rgba(47,124,255,.28);
}

.nav-link-beyond.is-active{
  color:#fff;
  background: rgba(78,161,255,.14);
  border: 1px solid rgba(78,161,255,.36);
}
:root[data-theme="light"] .nav-link-beyond.is-active{
  color: rgba(18,19,26,.92);
  background: rgba(47,124,255,.16);
  border-color: rgba(47,124,255,.34);
}

.nav-beyond-dot{
  font-size:12px;
  opacity:.9;
  transform: translateY(-1px);
}

.m-link-beyond{
  border-color: rgba(78,161,255,.22);
  background: rgba(78,161,255,.08);
}
:root[data-theme="light"] .m-link-beyond{
  border-color: rgba(47,124,255,.22);
  background: rgba(47,124,255,.10);
}

.m-link-beyond.is-active{
  border-color: rgba(78,161,255,.34);
  background: rgba(78,161,255,.14);
}
:root[data-theme="light"] .m-link-beyond.is-active{
  border-color: rgba(47,124,255,.32);
  background: rgba(47,124,255,.14);
}

.m-beyond-dot{ font-size:12px; opacity:.9; }

.footer-link-beyond{
  color: rgba(232,232,238,.92);
}
:root[data-theme="light"] .footer-link-beyond{
  color: rgba(18,19,26,.78);
}
.footer-link-beyond:hover{
  color: inherit;
}







/* --- Floating Notice (BMD) --- */
.fnotice{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(520px, calc(100vw - 36px));
}

.fnotice-card{
  padding: 12px 14px;
  box-shadow:var(--shadow-soft);
  border-radius:var(--radius-md);
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform .22s ease, opacity .22s ease;
}

/* Layout */
.fnotice-top{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.fnotice-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:var(--radius-xs);
  font-weight:900;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  border: 1px solid rgba(78,161,255,.24);
  background: rgba(78,161,255,.10);
}
:root[data-theme="light"] .fnotice-badge{
  border-color: rgba(47,124,255,.22);
  background: rgba(47,124,255,.10);
}

.fnotice-title{
  font-family: var(--font-display);
  letter-spacing:.05em;
  text-transform:uppercase;
  font-size:12.5px;
  opacity:.95;
  flex: 1;
  min-width: 180px;
}

.fnotice-actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.fnotice-btn{
  width:36px;
  height:36px;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fnotice-btn:hover{
  transform: translateY(-1px);
  background: var(--ui-bg-hover);
  border-color: var(--ui-border-hover);
}
.fnotice-btn-ghost{
  opacity: .9;
}

.fnotice-text{
  margin: 10px 0 0;
  color: rgba(232,232,238,.84);
  font-size:13px;
  line-height:1.55;
}
:root[data-theme="light"] .fnotice-text{
  color: rgba(18,19,26,.74);
}

.fnotice-hint{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top: 10px;
  color: var(--muted);
  font-size:12px;
  opacity:.92;
}
.fnotice-hint-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%),
              rgba(255,75,110,.85);
  box-shadow: 0 0 14px rgba(255,75,110,.18);
}

/* Mini (collapsed) button */
.fnotice-mini{
  display:none;
  width:46px;
  height:46px;
  border-radius:var(--radius-sm);
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fnotice-mini:hover{
  transform: translateY(-1px);
  background: var(--ui-bg-hover);
  border-color: var(--ui-border-hover);
}
.fnotice-mini-dot{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:18px;
  filter: drop-shadow(0 0 12px rgba(255,75,110,.20));
}

/* Collapsed state */
.fnotice.is-collapsed{
  width: 46px;
}
.fnotice.is-collapsed .fnotice-card{
  padding: 0;
  border-radius:var(--radius-sm);
}
.fnotice.is-collapsed .fnotice-body{
  display:none;
}
.fnotice.is-collapsed .fnotice-mini{
  display:block;
}

/* Hide state (smooth) */
.fnotice.is-hidden{
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.98);
}

/* Mobile positioning a bit safer */
@media (max-width: 560px){
  .fnotice{
    right: 12px;
    bottom: 12px;
    width: min(520px, calc(100vw - 24px));
  }
  .fnotice.is-collapsed{ width:46px; }
}

/* Spectra pilot: shared public shell only */
:root[data-theme="spectra"] .glass::before{
  background:var(--accent3);
}

:root[data-theme="spectra"] .glass::after{
  content:none;
}

:root[data-theme="spectra"] .nav-link:hover{
  background:var(--panel-bg-hover);
}

:root[data-theme="spectra"] .nav-link.is-active,
:root[data-theme="spectra"] .m-link.is-active{
  background:var(--accent-wash);
  border-color:var(--accent-border);
}

:root[data-theme="spectra"] .m-link{
  background:var(--panel-bg);
  border-color:var(--panel-border);
}

:root[data-theme="spectra"] .btn{
  border-color:var(--field-border);
  background:var(--panel-bg);
  color:var(--text);
}

:root[data-theme="spectra"] .btn:hover{
  border-color:var(--panel-border-hover);
  background:var(--panel-bg-hover);
}

:root[data-theme="spectra"] .btn-primary{
  border-color:var(--accent-border);
  background:var(--accent);
  box-shadow:var(--cta-shadow);
}

:root[data-theme="spectra"] .btn-primary:hover{
  border-color:rgba(217,57,77,.50);
  background:#df3d53;
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

:root[data-theme="spectra"] .nav-link-beyond,
:root[data-theme="spectra"] .m-link-beyond,
:root[data-theme="spectra"] .fnotice-badge{
  border-color:var(--reflection-border);
  background:var(--reflection-wash);
}

:root[data-theme="spectra"] .nav-link-beyond:hover,
:root[data-theme="spectra"] .nav-link-beyond.is-active,
:root[data-theme="spectra"] .m-link-beyond.is-active{
  border-color:rgba(63,182,209,.42);
  background:rgba(63,182,209,.17);
}

:root[data-theme="spectra"] .footer-link-beyond,
:root[data-theme="spectra"] .fnotice-text{
  color:var(--content-soft);
}
