/* =============================================================================
   ApexPlus kit: the brand (Oxygen, orange and navy, as on apexplus.ca), the blueprint
   house with its three jobs, the tool belt and the repair list.
   The ApexPlus page and the ApexPlus box on the homepage both use it.
   ============================================================================= */

@font-face { font-family: "Oxygen"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/oxygen-400.woff2") format("woff2"); }
@font-face { font-family: "Oxygen"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/oxygen-700.woff2") format("woff2"); }

:root {
  --ax-orange: #ff6600;
  --ax-orange-2: #ff8a3d;
  --ax-orange-3: #ffb347;
  --ax-orange-d: #b34700;
  --ax-logo: #e8692f;
  --ax-peach: #fff1e6;
  --ax-navy: #0f172a;
  --ax-navy-2: #0b1222;
  --ax-navy-3: #1e293b;
  --ax-slate: #334155;
  --ax-muted: #64748b;
  --ax-line: #e2e8f0;
  --ax-mist: #f8fafc;
  --ax-chalk: #e8eef9;
  --ax-blue: #7da2ff;
  --ax-star: #fbbf24;
  --ax-red: #e11d48;
  --ax-green: #22c55e;
  --ax-green-d: #15803d;
  --ax-font: "Oxygen", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ax-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Icons, logo, buttons ---------- */
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ap-logo { display: inline-flex; align-items: center; gap: .34em; font: 700 1em/1 var(--ax-font); letter-spacing: -.01em; white-space: nowrap; }
.ap-mark { flex: none; width: 1.62em; height: 1.1em; fill: var(--ax-logo); }

.ap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--ax-orange), var(--ax-orange-2)); color: #fff;
  font: 700 16px/1.1 var(--ax-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 26px -10px rgb(255 102 0 / .75), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: translate .2s, box-shadow .2s, opacity .2s, filter .2s; -webkit-tap-highlight-color: transparent;
}
.ap-btn:hover { translate: 0 -2px; box-shadow: 0 16px 34px -10px rgb(255 102 0 / .85), inset 0 1px 0 rgb(255 255 255 / .25); }
.ap-btn:active { translate: 0 1px; }
.ap-btn:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .5; translate: none; box-shadow: none; }
.ap-btn:focus-visible { outline: 3px solid var(--ax-orange-3); outline-offset: 3px; }
.ap-btn .i { font-size: 1.1em; }

/* ---------- The blueprint house (the same drawing as the hero of apexplus.ca) ---------- */
.ax-house { position: relative; display: block; aspect-ratio: 1; container-type: inline-size; --line: var(--ax-chalk); --lw: 2.4px; }
.house { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.house * { vector-effect: non-scaling-stroke; }
.house .h-shadow { fill: url(#ax-shadow); }
.house .h-body { fill: #fff; fill-opacity: .035; }
.house .h-roof-fill { fill: var(--ax-orange); fill-opacity: .09; }
.house .h-wins { fill: #18223b; }
.house .h-lit { fill: url(#ax-win); opacity: 0; transition: opacity 1s ease; }
.house .h-door { fill: url(#ax-roof); }
.house .h-knob { fill: var(--ax-navy-2); }
.house .h-lines, .house .h-roof, .house .pipe, .house .handle, .house .plate, .house .slots, .house .hole, .house .crack {
  fill: none; stroke: var(--line); stroke-width: var(--lw); stroke-linecap: round; stroke-linejoin: round;
}
.house .h-roof { stroke: url(#ax-roof); stroke-width: calc(var(--lw) * 2); }
.house .h-dim { fill: none; stroke: var(--ax-blue); stroke-width: 1.2px; stroke-dasharray: 4 5; }
.house .h-label { fill: var(--ax-blue); font: 700 15px var(--ax-mono); }

/* The three jobs: a hole in the wall, a broken outlet, a dripping outdoor tap. */
.house .hole { fill: #04070f; stroke-width: 2px; }
.house .crack { stroke-width: 1.6px; }
.house .patch { fill: var(--line); opacity: 0; }
.house .plate { fill: rgb(255 255 255 / .05); stroke-width: 2px; transition: fill .5s; }
.house .slots { stroke-width: 2px; transition: stroke .5s; }
.house .pipe { stroke-width: 3px; }
.house .handle { stroke-width: 2.6px; transform-box: fill-box; transform-origin: 50% 100%; transition: rotate .7s cubic-bezier(.3, 1.5, .5, 1); }
.house .puddle { fill: #7dc4ff; opacity: .6; transform-box: fill-box; transform-origin: center; transition: scale .8s, opacity .8s; }

.fixed-hole .house .hole, .fixed-hole .house .crack { opacity: 0; transition: opacity .5s .25s; }
.fixing-hole .house .patch { animation: ax-patch 1.4s ease both; }
@keyframes ax-patch { 0% { opacity: 0; } 25%, 55% { opacity: .95; } 100% { opacity: 0; } }
.fixed-outlet .house .plate { fill: #fff; }
.fixed-outlet .house .slots { stroke: var(--ax-navy); }
.fixed-tap .house .handle { rotate: 90deg; }
.fixed-tap .house .puddle { scale: 0; opacity: 0; }
.is-home .house .h-lit { opacity: 1; }

/* Moving bits sit on top as plain HTML, so the browser can animate them without redrawing the house. */
.ax-house .fx { position: absolute; display: block; pointer-events: none; }
.fx-drip { left: 80.4%; top: 63.3%; width: 2.05cqw; height: 2.7cqw; margin-left: -1.03cqw; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #7dc4ff; opacity: 0; animation: ax-drip 1.7s cubic-bezier(.5, 0, .9, .5) infinite; }
@keyframes ax-drip {
  0% { transform: translateY(0) scale(.2); opacity: 0; }
  18% { transform: translateY(0) scale(1); opacity: 1; }
  72% { transform: translateY(8.4cqw) scale(1, 1.15); opacity: 1; }
  80%, 100% { transform: translateY(8.8cqw) scale(1.5, .3); opacity: 0; }
}
.fx-spark { left: 32.7%; top: 55.4%; width: 9.75cqw; height: 9.75cqw; opacity: 0; animation: ax-spark 1.5s steps(1, end) infinite; }
.fx-spark svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--ax-orange-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ax-spark { 0%, 30% { opacity: 0; } 34% { opacity: 1; } 40% { opacity: .15; } 46% { opacity: 1; } 52%, 70% { opacity: 0; } 74% { opacity: 1; } 79%, 100% { opacity: 0; } }
.fixed-tap .fx-drip, .fixed-outlet .fx-spark { animation: none; opacity: 0; }
.fx-smoke { left: 62.4%; top: 9.6%; width: 9cqw; height: 9cqw; }
.fx-smoke b { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgb(203 213 225 / .55), rgb(203 213 225 / .22) 45%, transparent 70%); opacity: 0; }
.is-home .fx-smoke b { animation: ax-smoke 3.6s ease-out infinite; }
.is-home .fx-smoke b:nth-child(2) { animation-delay: 1.2s; }
.is-home .fx-smoke b:nth-child(3) { animation-delay: 2.4s; }
@keyframes ax-smoke { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(3.4cqw, -12cqw) scale(1.9); opacity: 0; } }

/* The jobs you can tap. */
.spot {
  --s: max(40px, 13cqw);
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); z-index: 2;
  width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); padding: 0;
  border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.spot::before { content: ""; position: absolute; inset: 10%; border: 2.5px solid var(--ax-orange); border-radius: 50%; background: rgb(255 102 0 / .1); box-shadow: 0 0 16px rgb(255 102 0 / .55), inset 0 0 12px rgb(255 102 0 / .3); transition: scale .25s cubic-bezier(.3, 1.6, .5, 1), background-color .3s; }
.spot::after { content: ""; position: absolute; inset: 10%; border: 2px solid var(--ax-orange); border-radius: 50%; animation: ax-ping 1.9s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ax-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
.spot:hover::before, .spot:focus-visible::before, .spot.is-picked::before, .spot.is-target::before { scale: 1.12; background-color: rgb(255 102 0 / .22); }
.spot:focus-visible { outline: 3px solid #fff; outline-offset: 0; }
.spot.is-picked::after, .spot.is-target::after, .is-holding .spot:not(.is-fixed)::after { inset: -4%; border-style: dashed; opacity: 1; animation: ax-spin 5s linear infinite; }
@keyframes ax-spin { from { transform: rotate(0); } to { transform: rotate(1turn); } }
.spot.is-fixed { cursor: default; }
.spot.is-fixed::before {
  inset: 0 0 auto auto; width: 38%; height: 38%; border: 2px solid #fff; background: var(--ax-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 64% no-repeat;
  box-shadow: 0 4px 10px rgb(0 0 0 / .35); scale: 1;
}
.spot.is-fixed::after { display: none; }
.spot .tip {
  position: absolute; left: 50%; bottom: calc(100% - 4px); translate: -50% 4px;
  padding: 5px 9px; border-radius: 8px; background: #fff; color: var(--ax-navy); box-shadow: 0 8px 20px -8px rgb(0 0 0 / .5);
  font: 700 12px/1 var(--ax-font); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
.spot:hover .tip, .spot:focus-visible .tip, .spot.is-picked .tip, .spot.is-target .tip { opacity: 1; translate: -50% 0; }
.spot.is-fixed .tip, .is-busy .spot .tip { display: none; }

/* ---------- The tool belt ---------- */
.belt { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tool {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 7px;
  min-width: 82px; padding: 12px 10px 10px; border: 1px solid rgb(255 255 255 / .1); border-radius: 18px;
  background: rgb(15 23 42 / .78); color: #fff; font: 700 12.5px/1 var(--ax-font); white-space: nowrap;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 26px -16px rgb(0 0 0 / .9), inset 0 1px 0 rgb(255 255 255 / .07);
  transition: translate .3s cubic-bezier(.3, 1.5, .5, 1), background-color .2s, border-color .2s, box-shadow .2s;
}
.tool .i { font-size: 30px; color: var(--ax-orange-2); stroke-width: 1.8; transition: color .2s, opacity .2s; }
.tool:hover { translate: 0 -3px; border-color: rgb(255 138 61 / .55); }
.tool[aria-pressed="true"] { translate: 0 -7px; border-color: transparent; background: linear-gradient(135deg, var(--ax-orange), var(--ax-orange-2)); box-shadow: 0 18px 30px -12px rgb(255 102 0 / .85); }
.tool[aria-pressed="true"] .i { color: #fff; }
.tool.is-out .i { opacity: .12; }
.tool:focus-visible { outline: 3px solid var(--ax-orange-3); outline-offset: 2px; }
.tool-ghost { position: absolute; left: 0; top: 0; z-index: 30; display: block; pointer-events: none; color: #fff; filter: drop-shadow(0 8px 10px rgb(0 0 0 / .5)); }
.tool-ghost .i { display: block; width: 100%; height: 100%; stroke-width: 1.9; }

/* ---------- Today's repair list (the white card from the hero of apexplus.ca) ---------- */
.task-card { width: 236px; padding: 16px 18px 15px; border-radius: 18px; background: #fff; color: var(--ax-navy); box-shadow: 0 30px 60px -22px rgb(2 6 23 / .7); font: 700 15px/1.2 var(--ax-font); }
.task-head { display: flex; align-items: center; gap: 8px; margin: 0 0 13px; color: var(--ax-muted); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.task-head .i { font-size: 16px; color: var(--ax-orange); }
.task-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.task-card li { display: flex; align-items: center; gap: 10px; }
.task-card .tick { flex: none; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid #cbd5e1; border-radius: 6px; transition: background-color .3s, border-color .3s; }
.task-card .tick .i { width: 13px; height: 13px; color: #fff; stroke-width: 3.4; opacity: 0; scale: .3; transition: opacity .2s, scale .4s cubic-bezier(.3, 1.7, .5, 1); }
.task-card li.is-done .tick { background: var(--ax-green); border-color: var(--ax-green); }
.task-card li.is-done .tick .i { opacity: 1; scale: 1; }
.task-bar { display: block; height: 6px; margin-top: 15px; border-radius: 3px; background: #edf1f6; overflow: hidden; }
.task-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--ax-orange), var(--ax-orange-3)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .7s cubic-bezier(.2, .9, .3, 1); }

/* What just happened, in words. */
.ax-msg { margin: 0; min-height: 1.45em; color: rgb(226 232 240 / .85); font: 700 15px/1.45 var(--ax-font); text-align: center; }
.ax-msg[data-kind="ok"] { color: #86efac; }
.ax-msg[data-kind="err"] { color: #fda4af; }
.ax-msg.pop { animation: ax-pop .35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes ax-pop { from { opacity: 0; translate: 0 6px; } }

@media (prefers-reduced-motion: reduce) {
  .fx-drip, .fx-spark, .fx-smoke b, .spot::after, .ax-msg.pop, .fixing-hole .house .patch { animation: none !important; }
  .fx-drip { opacity: 1; transform: translateY(3cqw); }
  .fx-spark { opacity: 1; }
  .tool, .spot::before, .house .handle, .task-bar i { transition: none; }
}
