/* ============================================================================
   VISIONLINK BRAND -- drop-in stylesheet
   (c) OMNILINK ENTERPRISES, INC. ALL RIGHTS RESERVED.
   Governed by VPOS-BRD-001 Rev 1.4.  Constraints applied: C9, C11, C15..C18.

   Substrate-neutral. No framework, no build step, no dependency.
   Link it, then paste the lockup partial. Nothing here targets a vendor
   selector, so it cannot be broken by a vendor update.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root{
  --vl-mark:#2B5FA8;      /* aperture wedges AND the V             */
  --vl-paper:#FFFFFF;     /* hexagonal core -- OPAQUE (C16)        */
  --vl-word:#101B2B;      /* VISION                                */
  --vl-word2:#2B5FA8;     /* LINK                                  */
  --vl-sub:#4A5560;       /* POINT OF SALE -- 7.61:1 on white, AAA */
  --vl-sub-ink:#101B2B;   /* max authority -- 17.30:1              */
}

/* Dark surfaces. Both themes hold AAA; neither is left at AA. */
:root[data-theme="dark"]{
  --vl-mark:#5FA3E8; --vl-paper:#FFFFFF;
  --vl-word:#E8EDF3; --vl-word2:#5FA3E8;
  --vl-sub:#A3B4C6;  --vl-sub-ink:#E8EDF3;   /* 7.73:1 on #0D2038 */
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --vl-mark:#5FA3E8; --vl-paper:#FFFFFF;
    --vl-word:#E8EDF3; --vl-word2:#5FA3E8;
    --vl-sub:#A3B4C6;  --vl-sub-ink:#E8EDF3;
  }
}

/* ------------------------------------------------------- the mark itself */
.vl-mark{display:block;flex:0 0 auto}

/* C15 -- ONE VISUAL CYCLE IS 60 DEGREES, NOT 360.
   The mark is six-fold symmetric: after 60deg it is identical to its start,
   so a 360deg loop performs six visual cycles per revolution. Rate governs
   whether motion reads or strobes, and it applies to a ONE-SHOT exactly as it
   applies to a loop -- the eye still has to track a blade through the turn:

     360deg / 1.4s   = 257 deg/s = 4.29 cyc/s   strobes  (the original defect)
     120deg / .62s   = 194 deg/s = 3.23 cyc/s   strobes
      60deg / .55s   = 109 deg/s = 1.82 cyc/s   busy
      60deg / .80s   =  75 deg/s = 1.25 cyc/s   reads    <-- the entrance
   Clockwise: positive degrees, y axis down. */
@keyframes vl-spin60{to{transform:rotate(60deg)}}

/* transform-box:fill-box is not cosmetic. Percentage transform-origin on an
   SVG <g> resolves against the viewBox reference box and engines disagree
   about the min-x/min-y offset; where it is not applied the group ORBITS.

   C20 -- THE ENTRANCE IS THE DEFAULT, AND IT IS PURE CSS.
   One 60deg turn, eased to rest, on page load. No JavaScript, no class to
   toggle, no framework hook: the animation is declared on the element and
   the browser runs it once as the page paints. It therefore works inside a
   vendor page we do not control, and inside a Vue island we cannot reach.
   60deg lands exactly on-lattice, so the mark settles into a pose identical
   to its rest state -- there is no snap-back to hide. */
.vl-aperture{
  transform-box:fill-box;transform-origin:50% 50%;
  animation:vl-spin60 .8s cubic-bezier(.22,.61,.36,1) 1;
}

/* Opt OUT for a given instance -- e.g. a mark inside a printed receipt view. */
.vl-no-spin .vl-aperture{animation:none}

/* C36 -- THE V. AIRBORNE GP bold, green D gradient at rest, lime pulse on fetch.
   Colour lives in the SVG <linearGradient> stops, not here, because a gradient
   cannot be a CSS custom property. The rest layer is always painted; the lime
   layer is opacity 0 and only moves under .vl-spin. The core is opaque white
   on every ground (C16), so the V never needs a theme variant. */
.vl-vee-lime{opacity:0}
.vl-spin .vl-vee-lime{
  animation:vl-pulse 1.6s ease-in-out infinite;
  filter:drop-shadow(0 0 2.5px rgba(168,224,99,.85));
}
@keyframes vl-pulse{0%,100%{opacity:0}50%{opacity:1}}

/* Opt IN to the continuous loop, and ONLY while genuinely fetching.
   Never idle-loop it: cashiers face this screen for eight-hour shifts, and
   permanent motion in the chrome is a distraction, not a delight. */
.vl-spin .vl-aperture{animation:vl-spin60 1.05s linear infinite}

/* ONCE PER SESSION, not once per page load.
   A POS is a multi-page app: a cashier crosses twenty screens an hour, and an
   entrance on every one of them is indistinguishable from an idle loop. Pair
   this class with the inline guard in head.partial.html to spin on arrival
   only, then stay still for the rest of the session. */
.vl-seen .vl-aperture{animation:none}

/* Rotation only. Never scale, never dilate: a contracting aperture is a
   shutter, and a shutter is a pupil. */
@media (prefers-reduced-motion:reduce){
  .vl-aperture,.vl-vee-lime{animation:none!important;filter:none!important}
}

/* ------------------------------------------------------------- the lockup */
.vl-lockup{display:flex;align-items:center;gap:14px}
.vl-text{display:inline-block}
.vl-word{font-family:"Space Grotesk","Segoe UI",system-ui,sans-serif;
  font-weight:700;font-size:30px;line-height:1;letter-spacing:-.005em;
  color:var(--vl-word);white-space:nowrap}
.vl-word i{font-family:"Exo 2","Segoe UI",system-ui,sans-serif;font-weight:200;
  font-style:normal;letter-spacing:.16em;color:var(--vl-word2);margin-left:.16em}

/* Subline justified to the wordmark's exact width. Each glyph is a flex item
   and space-between distributes the slack, so there is no trailing
   letter-space and both edges align at any size, in any face.
   C18 -- weight 400, never 300 or lighter at 11px and below. A contrast
   ratio says nothing about stroke thickness. */
.vl-sub{font-family:"Exo 2","Segoe UI",system-ui,sans-serif;font-weight:400;
  font-size:10px;color:var(--vl-sub);margin-top:6px;
  display:flex;justify-content:space-between;width:100%}
.vl-sub span{display:block}
.vl-sub span.sp{width:.30em}
.vl-sub.vl-ink{color:var(--vl-sub-ink)}

/* ------------------------------------------------- locked light lockup */
/* Pins the light tokens LOCALLY, so this stays light even for a dark-mode
   viewer. Correct wherever the ground is white and outside our control:
   printed collateral, PDF invoices, emailed receipts, a partner's slide. */
.vl-onwhite{background:#FFFFFF;
  --vl-mark:#2B5FA8; --vl-paper:#FFFFFF;
  --vl-word:#101B2B; --vl-word2:#2B5FA8;
  --vl-sub:#4A5560;  --vl-sub-ink:#101B2B}   /* white ground only -- see .vl-onsilver */

/* ------------------------------------------------- locked SILVER lockup */
/* C10 + C17 as corrected (Sec. 11.10). Silver #AEB8C4 is a mid-luminance
   ground and it eats mid-luminance foregrounds -- that is why C10 says ink or
   navy only, and a 10px subline is MORE vulnerable to it than the mark, not
   less. The white-ground subline #4A5560 measures 3.79:1 here and FAILS AA;
   #101B2B measures 8.61:1. Do not reintroduce #4A5560 on this ground.
   (An earlier revision claimed 4.85:1 -- that was measured against #C9CFD6,
   a colour that was never part of this palette.) */
.vl-onsilver{background:#AEB8C4;
  --vl-mark:#101B2B; --vl-paper:#FFFFFF;      /* C10: ink, never blue -- blue is 3.21:1 */
  --vl-word:#101B2B; --vl-word2:#101B2B;
  --vl-sub:#101B2B;  --vl-sub-ink:#101B2B}

/* --------------------------------------------------- collapsed rail form */
/* One SVG, two states. No second asset, no raster at 1x/2x/3x. */
.vl-lockup.is-collapsed .vl-text{display:none}
.vl-lockup.is-collapsed{justify-content:center;gap:0}

/* ------------------------------------------------------------ size rules */
/* C9 -- the V is a large-size asset. Lockup and sidebar (32-40px) take the
   full mark. Favicon, app tile and the 20mm package mark use the SMALL CUT
   (22deg gaps, r18, no core, no V). Do not shrink the full mark past 32px. */
.vl-mark--sm{width:24px;height:24px}
.vl-mark--md{width:38px;height:38px}
.vl-mark--lg{width:64px;height:64px}
