/* Easter eggs (js/eggs.js). Everything here is prefixed ks-egg / ks-bp so it never touches the site's own styles. */

/* ---------- toast: "Easter egg found" ---------- */
.ks-egg-toast { position: fixed; z-index: 2147483000; left: 50%; top: calc(18px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -140%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 10px 16px 10px 12px; border-radius: 99px; background: #181b2e; color: #fff; font: 500 14px/1.3 Outfit, system-ui, sans-serif; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .5);
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); pointer-events: none; }
.ks-egg-toast.ks-in { transform: translate(-50%, 0); }
.ks-egg-toast b { color: #ffb890; font-weight: 600; }
.ks-egg-toast i { font-style: normal; color: #fe5621; font-size: 18px; }

/* ---------- collector badge + hints ---------- */
.ks-egg-badge { position: fixed; z-index: 58; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); height: 34px; padding: 0 12px; border: 0; border-radius: 99px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; background: #fff; color: #181b2e; font: 600 12.5px/1 Outfit, system-ui, sans-serif; letter-spacing: .02em; box-shadow: 0 8px 22px -10px rgba(24, 27, 46, .45);
  transition: transform .25s ease, opacity .3s ease; }
.ks-egg-badge:hover { transform: translateY(-2px); }
.ks-egg-badge:focus-visible { outline: 2px solid #fe5621; outline-offset: 3px; }
.ks-egg-badge span { color: #fe5621; font-size: 15px; }
.ks-egg-badge[hidden] { display: none !important; }
body:has(.ks-disco-stop.ks-show) .ks-egg-badge { opacity: 0; pointer-events: none; }
.ks-egg-panel { position: fixed; z-index: 2147482000; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(62px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow: auto;
  padding: 18px 18px 14px; border-radius: 18px; background: #fff; color: #181b2e; font: 400 14px/1.45 Outfit, system-ui, sans-serif; box-shadow: 0 24px 60px -20px rgba(24, 27, 46, .55); }
.ks-egg-panel[hidden] { display: none !important; }
.ks-egg-panel h2 { margin: 0 0 4px; font: 600 17px/1.2 Outfit, system-ui, sans-serif; color: #181b2e; }
.ks-egg-panel > p { margin: 0 0 12px; color: rgba(24, 27, 46, .65); font-size: 13px; }
.ks-egg-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ks-egg-panel li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13.5px; }
.ks-egg-panel li b { font-weight: 600; }
.ks-egg-panel li em { font-style: normal; color: rgba(24, 27, 46, .62); }
.ks-egg-panel li .ks-egg-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; font-size: 11px; border: 1.5px dashed rgba(24, 27, 46, .3); color: transparent; }
.ks-egg-panel li.ks-got .ks-egg-dot { border: 0; background: #fe5621; color: #fff; }
.ks-egg-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font: 400 20px/1 Outfit, sans-serif; color: #181b2e; }
.ks-egg-close:hover { background: rgba(24, 27, 46, .07); }
.ks-egg-close:focus-visible { outline: 2px solid #fe5621; }

/* ---------- "you found them all" card + confetti ---------- */
.ks-egg-card { position: fixed; z-index: 2147482500; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0; width: min(420px, calc(100vw - 32px)); padding: 26px 24px 22px; border-radius: 22px; background: #fff; color: #181b2e;
  text-align: center; font: 400 15px/1.5 Outfit, system-ui, sans-serif; box-shadow: 0 30px 80px -24px rgba(24, 27, 46, .6); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .3s ease; }
.ks-egg-card.ks-in { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.ks-egg-card h2 { margin: 6px 0 8px; font: 600 24px/1.2 Outfit, system-ui, sans-serif; color: #181b2e; }
.ks-egg-card p { margin: 0 0 16px; color: rgba(24, 27, 46, .7); }
.ks-egg-card a { display: inline-block; padding: 11px 20px; border-radius: 99px; background: #fe5621; color: #fff; text-decoration: none; font-weight: 500; }
.ks-egg-card img { width: 72px; height: auto; }
.ks-egg-confetti { position: fixed; inset: 0; z-index: 2147482400; pointer-events: none; }

/* ---------- 2. horizon: a sunrise sweeps up the page ---------- */
.ks-egg-dawn { position: fixed; inset: 0; z-index: 2147481000; pointer-events: none; overflow: hidden; }
.ks-egg-dawn .ks-sky { position: absolute; inset: 0; background: linear-gradient(to top, rgba(254, 86, 33, .55) 0%, rgba(255, 184, 144, .45) 30%, rgba(255, 211, 107, .22) 55%, rgba(255, 211, 107, 0) 80%); transform: translateY(100%); }
.ks-egg-dawn .ks-sun { position: absolute; left: 50%; bottom: 0; width: 34vmin; height: 34vmin; margin-left: -17vmin; border-radius: 50%; background: radial-gradient(circle, #ffd36b 0 55%, rgba(254, 86, 33, .9) 56%, rgba(254, 86, 33, 0) 72%); transform: translateY(70%); }
.ks-egg-dawn .ks-cap { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 600 clamp(26px, 5vw, 56px)/1.15 Outfit, system-ui, sans-serif; color: #181b2e; opacity: 0; padding: 0 16px; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.ks-egg-dawn .ks-cap span { display: inline-block; padding: 16px 26px; border-radius: 20px; background: rgba(255, 246, 242, .9); box-shadow: 0 18px 40px -18px rgba(24, 27, 46, .45); }
.ks-egg-dawn .ks-cap small { display: block; margin-top: 8px; font-size: .38em; font-weight: 500; letter-spacing: .04em; opacity: .75; }
.ks-egg-dawn.ks-go .ks-sky { animation: ks-egg-sky 4.6s ease forwards; }
.ks-egg-dawn.ks-go .ks-sun { animation: ks-egg-sun 4.6s cubic-bezier(.2, .7, .2, 1) forwards; }
.ks-egg-dawn.ks-go .ks-cap { animation: ks-egg-cap 4.6s ease forwards; }
@keyframes ks-egg-sky { 0% { transform: translateY(100%); opacity: 1; } 30% { transform: translateY(0); } 78% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes ks-egg-sun { 0% { transform: translateY(100%); } 35% { transform: translateY(45%); } 78% { opacity: 1; } 100% { transform: translateY(40%); opacity: 0; } }
@keyframes ks-egg-cap { 0%, 25% { opacity: 0; transform: translateY(12px); } 38% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 3. namaste ---------- */
.ks-egg-namaste { position: fixed; z-index: 2147481000; left: 50%; bottom: 0; width: clamp(140px, 18vw, 200px); transform: translate(-50%, 105%); pointer-events: none; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.ks-egg-namaste.ks-in { transform: translate(-50%, 0); }
.ks-egg-namaste svg { display: block; width: 100%; height: auto; }
.ks-egg-namaste .ks-bub { position: absolute; left: 70%; bottom: 78%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: #181b2e; white-space: nowrap; font: 600 16px/1.3 Outfit, system-ui, sans-serif; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .4); }
.ks-egg-namaste .ks-bub small { display: block; font-weight: 400; font-size: 12.5px; opacity: .7; }
@media (max-width: 500px) { .ks-egg-namaste .ks-bub { left: 40%; bottom: 102%; } }

/* ---------- 4. night owl ---------- */
html.ks-night .navbar .brand { position: relative; }
html.ks-night .navbar .brand::after { content: "\263E"; position: absolute; right: -16px; top: -4px; font: 400 16px/1 system-ui, sans-serif; color: #e8a400; pointer-events: none; }
.ks-egg-night { margin: 10px 0 0; font: 400 12px/1.4 Outfit, system-ui, sans-serif; opacity: .7; text-align: inherit; }

/* ---------- 5. CN Tower lights ---------- */
.ks-to.ks-egg-lit .ks-to-in pre { background: repeating-linear-gradient(180deg, #fe5621 0 16px, #ff2d8a 16px 32px, #1fa8ff 32px 48px, #7b4dff 48px 64px, #ffae00 64px 80px); -webkit-background-clip: text; background-clip: text;
  color: transparent !important; -webkit-text-fill-color: transparent !important; font-weight: 700; filter: drop-shadow(0 0 4px rgba(254, 86, 33, .55)); animation: ks-egg-tower 1.2s linear infinite; }
@keyframes ks-egg-tower { to { background-position: 0 -80px; } }
.ks-to { position: relative; }
.ks-egg-fw { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; z-index: 5; animation: ks-egg-fw 1.1s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes ks-egg-fw { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* ---------- 6. you read the whole case study ---------- */
.ks-egg-trophy { position: fixed; z-index: 2147480000; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); display: flex; align-items: center; gap: 14px; width: min(460px, calc(100vw - 32px)); box-sizing: border-box;
  padding: 14px 44px 14px 14px; border-radius: 18px; background: #181b2e; color: #fff; font: 400 14px/1.45 Outfit, system-ui, sans-serif; box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .6); transition: transform .5s cubic-bezier(.3, 1.3, .5, 1); }
.ks-egg-trophy.ks-in { transform: translate(-50%, 0); }
.ks-egg-trophy .ks-cup { flex: none; font-size: 34px; line-height: 1; }
.ks-egg-trophy b { display: block; font-weight: 600; font-size: 15px; }
.ks-egg-trophy a { color: #ffb890; font-weight: 500; }
.ks-egg-trophy .ks-egg-close { color: #fff; }
.ks-egg-trophy .ks-egg-close:hover { background: rgba(255, 255, 255, .1); }

/* ---------- 8. printed note (only on paper) ---------- */
.ks-egg-print { display: none; }
@media print {
  .ks-egg-print { display: block !important; position: fixed; right: 10mm; bottom: 8mm; max-width: 70mm; padding: 3mm 4mm; border: 1px dashed #999; border-radius: 3mm; transform: rotate(-2deg); background: #fff;
    font: italic 10pt/1.35 "Kalam", "Comic Sans MS", cursive; color: #333; }
  .ks-egg-badge, .ks-egg-panel, .ks-egg-toast, .ks-egg-trophy { display: none !important; }
}

/* ---------- 1. blueprint mode ---------- */
html.ks-blueprint, html.ks-blueprint body { background-color: #1b4a8a !important;
  background-image: linear-gradient(rgba(234, 242, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(234, 242, 255, .16) 1px, transparent 1px),
    linear-gradient(rgba(234, 242, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(234, 242, 255, .07) 1px, transparent 1px) !important;
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px !important; background-attachment: fixed !important; }
html.ks-blueprint body *:not([class*="ks-egg"]):not([class*="ks-egg"] *):not([class*="ks-bp"]):not([class*="ks-bp"] *) {
  background-color: transparent !important; background-image: none !important; color: #eaf2ff !important; border-color: rgba(234, 242, 255, .55) !important; box-shadow: none !important; text-shadow: none !important; -webkit-text-fill-color: currentColor !important; }
html.ks-blueprint body img:not([class*="ks-egg"] *), html.ks-blueprint body video { filter: grayscale(1) invert(1) contrast(1.35) brightness(1.05); mix-blend-mode: screen; opacity: .85; }
html.ks-blueprint body svg:not([class*="ks-egg"] svg) * { fill: none !important; stroke: #eaf2ff !important; }
html.ks-blueprint body canvas { filter: grayscale(1) invert(1) brightness(1.4); mix-blend-mode: screen; }
html.ks-blueprint .w-nav, html.ks-blueprint .navbar { border-bottom: 1px dashed rgba(234, 242, 255, .5) !important; }
.ks-bp-dims { position: absolute; left: 0; top: 0; z-index: 9990; pointer-events: none; }
.ks-bp-box { position: absolute; border: 1px dashed rgba(234, 242, 255, .7); }
.ks-bp-w { position: absolute; height: 0; border-top: 1px solid #eaf2ff; }
.ks-bp-w::before, .ks-bp-w::after { content: ""; position: absolute; top: -5px; width: 1px; height: 9px; background: #eaf2ff; }
.ks-bp-w::before { left: 0; } .ks-bp-w::after { right: 0; }
.ks-bp-w span { position: absolute; left: 50%; top: -9px; transform: translate(-50%, -100%); padding: 0 4px; background: #1b4a8a; font: 500 10px/1 "Courier New", monospace; letter-spacing: .06em; color: #eaf2ff; white-space: nowrap; }
.ks-bp-title { position: fixed; z-index: 2147480500; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: auto auto; min-width: 250px;
  border: 1.5px solid #eaf2ff; background: #1b4a8a; color: #eaf2ff; font: 500 10.5px/1.3 "Courier New", monospace; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.ks-bp-title > * { padding: 5px 8px; border: .5px solid rgba(234, 242, 255, .6); }
.ks-bp-title .ks-bp-big { grid-column: 1 / -1; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.ks-bp-title .ks-bp-exit { grid-column: 1 / -1; text-align: center; background: #eaf2ff; color: #1b4a8a; font-weight: 700; }
.ks-bp-title:focus-visible { outline: 2px solid #ffd36b; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ks-egg-toast, .ks-egg-namaste, .ks-egg-trophy, .ks-egg-card { transition: opacity .3s ease; }
  .ks-egg-dawn.ks-go .ks-sky, .ks-egg-dawn.ks-go .ks-sun { animation: none; transform: none; opacity: .6; }
  .ks-egg-dawn.ks-go { animation: ks-egg-fade 4.6s ease forwards; }
  .ks-to.ks-egg-lit .ks-to-in pre { animation: none; }
  @keyframes ks-egg-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* footer line under "Print & fold my site into a box" */
.ks-egg-footnote { margin: 2px 0 0; font: 400 11.5px/1.4 Outfit, system-ui, sans-serif; letter-spacing: .02em; opacity: .6; text-align: center; }
.ks-egg-footnote span { color: #fe5621; }
.ks-egg-hintbtn { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.ks-egg-hintbtn:hover { color: #fe5621; }
.ks-egg-hintbtn:focus-visible { outline: 2px solid #fe5621; outline-offset: 2px; border-radius: 3px; }
.ks-egg-footnote:hover { opacity: 1; }

/* hold the logo for blueprint mode: no phone link menu or text selection on the logo, and the spark grows and turns while you hold */
.navbar .brand { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.navbar .brand svg { transform-origin: 12% 50%; transition: transform .25s ease; }
.navbar .brand.ks-egg-holding svg { transform: scale(1.18) rotate(-8deg); transition: transform 1.5s cubic-bezier(.2, .7, .3, 1); }
.navbar .brand.ks-egg-holding .ks-aha-spark { animation: ks-egg-hold-spin 1.5s linear; transform-box: fill-box; transform-origin: center; }
@keyframes ks-egg-hold-spin { to { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .navbar .brand.ks-egg-holding svg { transform: none; opacity: .6; transition: opacity .3s; } .navbar .brand.ks-egg-holding .ks-aha-spark { animation: none; } }
.navbar .brand svg.ks-aha-desk { transform-origin: 50% 50%; }   /* desktop logo is just the spark */
