/* Shared UI for every page: header controls, menu, progress, back-to-top,
   copy buttons, FAQ, light/dark theme, print. Loaded after each page's own styles. */

/* ---------- Page load fade ---------- */
@media (prefers-reduced-motion: no-preference){
  body{animation:pagein .45s ease-out backwards}
  @keyframes pagein{from{opacity:0}to{opacity:1}}
}

/* ---------- Skip link ---------- */
.skip{position:absolute;left:12px;top:-80px;z-index:100;background:#D4A93A;color:#0A1830;padding:12px 18px;border-radius:3px;font-weight:700;font-size:15px;text-decoration:none}
.skip:focus{top:calc(env(safe-area-inset-top,0px) + 12px)}
[tabindex="-1"]:focus{outline:none}

/* ---------- Buttons: hover, pressed, keyboard focus ---------- */
.btn,.icon-btn,.copy-chip,.to-top{transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .12s ease,box-shadow .2s ease;-webkit-tap-highlight-color:transparent}
.btn:active,.icon-btn:active,.copy-chip:active,.to-top:active{transform:translateY(1px) scale(.98)}
.btn:focus-visible,.icon-btn:focus-visible,.copy-chip:focus-visible,.to-top:focus-visible,.menu a:focus-visible,.nav a:focus-visible,summary:focus-visible{outline:3px solid #D4A93A;outline-offset:3px;border-radius:3px}
.btn-gold:active{background:#BF9530}
.btn-line:hover{background:rgba(212,169,58,.08)}
.btn-line:active{background:rgba(212,169,58,.16)}
.btn[disabled]{opacity:.75;cursor:progress}
/* Buttons on white surfaces get a navy focus ring so it stays visible */
form .btn:focus-visible,form :focus-visible,.copy-chip:focus-visible{outline-color:#0A1830}
[data-theme="dark"] .copy-chip:focus-visible{outline-color:#D4A93A}
/* Form buttons */
.formfoot .btn[type=submit]:active{background:#0F2242}
.btn-outline-dark{background:#fff;color:#0A1830;border:1.5px solid #0A1830}
.btn-outline-dark:hover{background:#F3F1EC}
.btn-outline-dark:active{background:#E6E1D6}
@media (prefers-reduced-motion: reduce){.btn,.icon-btn,.copy-chip,.to-top{transition:none}.btn:active,.icon-btn:active,.copy-chip:active,.to-top:active{transform:none}}

/* Spinner for the quote button */
.spin{display:inline-block;width:16px;height:16px;margin-right:10px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite;vertical-align:-3px}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.spin{animation:none;border-color:#fff;border-right-color:transparent}}

/* ---------- Header controls ---------- */
.bar{position:sticky;top:0;z-index:20}
#bar.bar{position:fixed}
.bar.menu-open{background:rgba(6,16,31,.97)!important;border-bottom:1px solid #22365A}
.bar-actions{display:flex;align-items:center;gap:12px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:3px;border:1.5px solid #3A4E73;background:transparent;color:#C3CCDB;cursor:pointer}
.icon-btn:hover{border-color:#D4A93A;color:#E7C877}
.icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ico-sun{display:none}
[data-theme="dark"] .ico-sun{display:block}
[data-theme="dark"] .ico-moon{display:none}
.menu-btn{display:none}
.menu-btn i,.menu-btn i::before,.menu-btn i::after{display:block;width:20px;height:2px;background:currentColor;border-radius:1px;transition:transform .25s ease,background-color .2s ease;position:relative}
.menu-btn i::before,.menu-btn i::after{content:"";position:absolute;left:0}
.menu-btn i::before{top:-6px}.menu-btn i::after{top:6px}
.menu-btn[aria-expanded="true"] i{background:transparent}
.menu-btn[aria-expanded="true"] i::before{transform:translateY(6px) rotate(45deg)}
.menu-btn[aria-expanded="true"] i::after{transform:translateY(-6px) rotate(-45deg)}
.lbl-short{display:none}
@media (max-width:980px){
  .menu-btn{display:inline-flex}
  .bar-actions .theme-toggle{display:none}
}
@media (max-width:420px){
  .lbl-long{display:none}.lbl-short{display:inline}
  .bar-actions{gap:10px}
  .bar-actions .btn{padding:0 14px}
}
/* Pages without the cinematic hero: header nav hides behind the menu on small screens */
@media (max-width:980px){body.page .bar .nav{display:none}}

/* Mobile menu panel */
.menu{position:absolute;left:0;right:0;top:100%;background:rgba(6,16,31,.97);border-bottom:1px solid #22365A;padding:8px clamp(18px,4vw,56px) 18px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.menu[hidden]{display:none}
.menu ul{list-style:none;margin:0;padding:0}
.menu li + li{border-top:1px solid #1C3052}
.menu a{display:flex;align-items:center;min-height:52px;color:#F4F6FA;text-decoration:none;font-size:18px;font-weight:600}
.menu a:hover,.menu a[aria-current]{color:#E7C877}
.menu .menu-theme{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:14px;border-top:1px solid #22365A;color:#C3CCDB;font-size:16px}
@media (prefers-reduced-motion: no-preference){.menu:not([hidden]){animation:menuin .22s ease-out}@keyframes menuin{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}}
@media (min-width:981px){.menu{display:none!important}}

/* ---------- Scroll progress bar (sits on the header's bottom edge) ---------- */
.progress{position:absolute;left:0;right:0;bottom:-1px;height:3px;pointer-events:none}
.progress i{display:block;height:100%;background:linear-gradient(90deg,#D4A93A,#E7C877);transform-origin:left;transform:scaleX(0)}

/* ---------- Back to top ---------- */
.to-top{position:fixed;right:18px;bottom:calc(env(safe-area-inset-bottom,0px) + 20px);z-index:25;width:48px;height:48px;border-radius:50%;border:1.5px solid #D4A93A;background:#0A1830;color:#E7C877;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;visibility:hidden;transform:translateY(10px);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s,background-color .2s ease;box-shadow:0 8px 24px rgba(6,16,31,.35)}
.to-top.show{opacity:1;visibility:visible;transform:none;transition:opacity .25s ease,transform .25s ease,visibility 0s,background-color .2s ease}
.to-top:hover{background:#15294A}
.to-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:700px){body.has-mcta .to-top{bottom:calc(env(safe-area-inset-bottom,0px) + 84px);right:14px}}
@media (prefers-reduced-motion: reduce){.to-top,.to-top.show{transition:none;transform:none}}

/* ---------- Copy buttons in Company data ---------- */
dl.facts dd.copyable{display:flex;align-items:center;justify-content:space-between;gap:12px}
.copy-chip{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border:1px solid #A39D90;border-radius:3px;background:#fff;color:#0A1830;font:600 14px/1 "Public Sans",system-ui,sans-serif;cursor:pointer}
.copy-chip svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.copy-chip:hover{background:#F3F1EC;border-color:#0A1830}
.copy-chip.done{color:#1F5130;border-color:#1F5130}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- FAQ: +/- icon and smooth open ---------- */
details.faq summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::after{content:"";flex:none;width:16px;height:16px;background:linear-gradient(#8A6610,#8A6610) center/16px 2px no-repeat,linear-gradient(#8A6610,#8A6610) center/2px 16px no-repeat;transition:background-size .25s ease}
details.faq[open]:not(.closing) summary::after{background-size:16px 2px,2px 0}
details.faq summary:hover{color:#8A6610}
details.faq .faq-body{overflow:hidden}
details.faq .faq-body p{margin:0;padding-top:12px}
@media (prefers-reduced-motion: reduce){details.faq summary::after{transition:none}}

/* ---------- Dark theme (hero, proof band, quote section and footer are always dark) ---------- */
:root[data-theme="dark"]{color-scheme:dark}
[data-theme="dark"] .solid-wrap,[data-theme="dark"] body.page{background:#0A1426;color:#E6EAF1}
[data-theme="dark"] .solid-wrap .sec + .sec{border-top-color:#22365A}
[data-theme="dark"] .solid-wrap h2,[data-theme="dark"] body.page main h2,[data-theme="dark"] .card h3,[data-theme="dark"] .perf h3,[data-theme="dark"] summary,[data-theme="dark"] ol.steps b,[data-theme="dark"] dd{color:#F4F6FA}
[data-theme="dark"] .solid-wrap p,[data-theme="dark"] body.page main p,[data-theme="dark"] .card ul,[data-theme="dark"] ol.steps{color:#B4BFCF}
[data-theme="dark"] .card,[data-theme="dark"] .perf article,[data-theme="dark"] dl.facts,[data-theme="dark"] details{background:#0F2242;border-color:#22365A}
[data-theme="dark"] .card:hover{border-color:#5B6B88;box-shadow:0 14px 34px rgba(0,0,0,.35)}
[data-theme="dark"] .card.dark{background:#06101F;border-color:#3A4E73}
[data-theme="dark"] dl.facts div{border-bottom-color:#1C3052}
[data-theme="dark"] dt{color:#9AA6BA}
[data-theme="dark"] .sec .eyebrow,[data-theme="dark"] .perf small{color:#E7C877}
[data-theme="dark"] .cta{border:1px solid #22365A}
[data-theme="dark"] .copy-chip{background:transparent;color:#F4F6FA;border-color:#3A4E73}
[data-theme="dark"] .copy-chip:hover{background:#15294A;border-color:#D4A93A}
[data-theme="dark"] .copy-chip.done{color:#8FD3A6;border-color:#8FD3A6}
[data-theme="dark"] details.faq summary::after{background:linear-gradient(#E7C877,#E7C877) center/16px 2px no-repeat,linear-gradient(#E7C877,#E7C877) center/2px 16px no-repeat}
[data-theme="dark"] details.faq[open]:not(.closing) summary::after{background-size:16px 2px,2px 0}
[data-theme="dark"] details.faq summary:hover{color:#E7C877}

/* ---------- Print: clean, white, for a contracting officer's file ---------- */
.print-only{display:none}
@media print{
  @page{margin:16mm}
  *,*::before,*::after{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important;animation:none!important;transition:none!important}
  html,body{background:#fff!important;font-size:11pt}
  #stage,.bar,.menu,.skip,.to-top,.mcta,.progress,.scenes,.proof,.btn,.copy-chip,.icon-btn,form,.cta,.hero .actions,.cue{display:none!important}
  .print-only{display:block!important;border-bottom:2px solid #000;padding-bottom:10px;margin-bottom:18px}
  .print-only b{font-size:16pt;font-family:Georgia,serif}
  .js .rv,.js .copy{opacity:1!important;transform:none!important}
  .sec,main,.hero{padding:10px 0!important;max-width:none!important}
  .split{display:block!important}
  h1{font-size:22pt!important}h2{font-size:16pt!important;margin:14px 0 6px!important}h3{font-size:13pt!important}
  dl.facts,.card,.perf article,details{border:1px solid #999!important;break-inside:avoid}
  dl.facts div{border-bottom:1px solid #ccc!important}
  .cards,.perf{gap:8px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card:hover,.perf article:hover{transform:none!important}
  .card::before,details.faq summary::after{display:none!important}
  .card svg{display:none!important}
  a{text-decoration:none!important}
  .quote .contact{display:block!important}
  .quote .contact a,.quote .contact span{display:block!important;min-height:0!important}
  footer{padding:12px 0!important;border-top:1px solid #000}
  .eyebrow{display:block!important}
  h1,h2,h3,.eyebrow{break-after:avoid;page-break-after:avoid}
  .split > div:first-child{break-inside:avoid}
  #data{break-before:page}
  .print-only + .scenes + .proof + .solid-wrap #products{break-before:auto}
}

/* Dark mode: keep the subpage hero distinct from the page below */
[data-theme="dark"] body.page .hero{border-bottom:1px solid #22365A}
