/* The site's menu and footer, on the static LAB pages.
   Copied from styles.css rather than linked: the site sheet also styles .grid,
   .card, .tab and friends, and a LAB page uses those names for its own things.
   Only the chrome travels: nav, footer, clocks, social icons, cursor, scrollbars. */

:root {
  --bg: #0a0a0c; --bg-soft: #121217; --bg-card: #16161d; --line: #26262f;
  --text: #ececf1; --muted: #8a8a99; --accent: #43db24;
  --maxw: 1240px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "InterBlack", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --intro-mosaic-bright: 1;
}

/* the nav is fixed: the page starts under it */
body.lab-page { padding-top: 78px; }

/* cursor and scrollbars, same as the rest of the site */
body.lab-page { cursor: url("/assets/img/arrow.png") 2 2, auto; }
body.lab-page a, body.lab-page button, body.lab-page summary, body.lab-page label,
body.lab-page select, body.lab-page [role="button"], body.lab-page .social, body.lab-page .nav-toggle,
body.lab-page input[type="range"], body.lab-page .lab-tr__piste {
  cursor: url("/assets/img/cursor.png") 53 2, pointer !important;
  cursor: image-set(url("/assets/img/cursor.png") 1x, url("/assets/img/cursor-2x.png") 2x) 53 2, pointer !important;
}
body.lab-page input:not([type="range"]), body.lab-page textarea { cursor: text !important; }

@keyframes glitch {
  10% { text-shadow: -7px 0 0 #ff0078, 6px 0 0 #06ff00, -8px 0 0 #00eaff; }
  20% { text-shadow: 5px 0 0 #ff0078, 1px 0 0 #06ff00, 2px 0 0 #00eaff; }
  30% { text-shadow: 8px 0 0 #ff0078, 5px 0 0 #06ff00, -4px 0 0 #00eaff; }
  40% { text-shadow: -6px 0 0 #ff0078, 13px 0 0 #06ff00, -9px 0 0 #00eaff; }
  50% { text-shadow: 15px 0 0 #ff0078, -5px 0 0 #06ff00, 7px 0 0 #00eaff; }
  0%, 60%, 100% { text-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff; }
}
@keyframes glitchBox {
  0%, 100% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
  33% { box-shadow: 3px 0 0 #00eaff, -3px 0 0 #ff0078; }
  66% { box-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff; }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10, 10, 12, 0.6);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(10, 10, 12, 0.92); border-color: var(--line); }
.nav-brand { margin-right: auto; }
.nav-logo { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; padding: 8px 14px 12px; font-family: var(--font-display); font-weight: 900;
  font-size: 15px; letter-spacing: .04em; color: var(--muted);
  text-transform: uppercase; transition: color .18s; text-decoration: none;
}
.nav-links a:hover { color: #fff; animation: glitch .3s linear infinite; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px;
  background: var(--accent);
  box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;
  animation: navStripe 3s steps(1) infinite;
}
@keyframes navStripe {
  0%, 86%, 100% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
  88% { box-shadow: -6px 0 0 #ff0078, 5px 0 0 #00eaff; }
  90% { box-shadow: 5px 0 0 #ff0078, -4px 0 0 #06ff00; }
  92% { box-shadow: -3px 0 0 #00eaff, 7px 0 0 #ff0078; }
  94% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
}
.nav-cats { display: none; }
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer;
}
@media (min-width: 900px) {
  .nav { justify-content: center; }
  .nav-brand { position: absolute; left: clamp(16px, 4vw, 28px); top: calc(50% - 17px); margin-right: 0; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; flex-direction: column; gap: 0;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
    padding: 8px; min-width: 180px; display: none;
  }
  .nav-links.open { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a.active::after, .nav-links a:hover, .social:hover { animation: none; }
}

/* ============ FOOTER ============ */
.footer { position: relative; overflow: hidden; margin-top: 70px; }
.footer-bg { position: absolute; inset: 0; z-index: 0; }
.footer-mosaic {
  position: absolute; inset: 0 -160px;
  display: grid; grid-template-columns: repeat(auto-fill, 130px); grid-auto-rows: 82px; gap: 3px;
  animation: mosaicDrift 80s linear infinite alternate;
}
@keyframes mosaicDrift { from { transform: translateX(0); } to { transform: translateX(-160px); } }
.footer-mosaic img { width: 100%; height: 100%; object-fit: cover; opacity: var(--intro-mosaic-bright); display: block; }
.footer-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(5,5,10,.82) 22%, rgba(5,5,10,.8) 78%, var(--bg) 100%),
    radial-gradient(120% 120% at 50% 50%, rgba(5,5,10,.5), rgba(5,5,10,.84));
}
@media (prefers-reduced-motion: reduce) { .footer-mosaic { animation: none; } }
.footer-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) clamp(28px, 5vw, 80px) clamp(44px, 5vw, 72px);
  display: flex; flex-direction: column; align-items: center;
}
.footer-bar {
  position: relative; z-index: 1;
  padding: 20px clamp(28px, 5vw, 80px);
  background: rgba(4, 4, 8, .82);
  border-top: 1px solid rgba(255,255,255,.12);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 28px;
}
.footer-bar > .footer-left { justify-self: start; }
.footer-bar > .footer-socials { justify-self: center; }
.footer-bar > .footer-craft { justify-self: end; }
.footer-craft { display: inline-flex; align-items: center; gap: 12px; }
.footer-craft-logos { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand-logo { height: 22px; width: auto; opacity: .85; transition: opacity .2s; display: block; }
.footer-craft:hover .footer-brand-logo { opacity: 1; }
.footer-copy { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-left { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-craft-by { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-craft-cc { display: inline-flex; align-items: center; gap: 8px; }
.cc-ico { height: 22px; width: auto; mix-blend-mode: lighten; display: block; }
@media (max-width: 760px) {
  .footer-bar { display: flex; flex-direction: column; gap: 16px; text-align: center; }
  .footer-craft {
    flex-direction: column; gap: 14px; width: 100%;
    border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px;
  }
  .footer-craft-logos { justify-content: center; gap: 22px; }
}
.footer-socials { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--muted);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.social:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); animation: glitchBox .3s steps(2) infinite; }
.social-svg { width: 15px; height: 15px; fill: currentColor; }

/* clocks */
.clocks { display: flex; justify-content: center; align-items: flex-start; gap: clamp(28px, 6vw, 90px); }
.clock { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.clk-face { width: clamp(130px, 18vw, 280px); height: auto; display: block; }
.clk-ring { fill: none; stroke: rgba(255,255,255,.32); stroke-width: 1; }
.clk-tick { stroke: rgba(255,255,255,.5); stroke-width: .9; }
.clk-tick.maj { stroke: #fff; stroke-width: 1.6; }
.clk-h { stroke: #fff; stroke-linecap: round; transition: transform .35s cubic-bezier(.4, 2.3, .6, 1); }
.clk-h.hour { stroke-width: 3.4; }
.clk-h.min  { stroke-width: 2.4; }
.clk-h.sec  { stroke-width: 1.2; stroke: var(--accent); }
.clk-cap { fill: #fff; }
.clk-city { font-family: var(--font-display); font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--muted); }

/* ============ SHARE ============ */
.lab-share { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 44px 0 0; }
.lab-share__b {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 5px; color: var(--muted);
  transition: background .2s, border-color .2s, color .2s, transform .2s; text-decoration: none;
}
.lab-share__b svg { width: 18px; height: 18px; fill: currentColor; }
.lab-share__b svg.trait { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lab-share__b:hover, .lab-share__b:focus-visible { background: var(--accent); border-color: var(--accent); color: #0a0a0c; transform: translateY(-2px); outline: none; animation: glitchBox .3s steps(2) infinite; }
.lab-share__b.is-done { background: var(--accent); border-color: var(--accent); color: #0a0a0c; animation: none; }
/* the link colour of the page must not win here: on green the glyph is near-black, filled or stroked */
.lab-share a.lab-share__b:hover, .lab-share a.lab-share__b:focus-visible,
.lab-share a.lab-share__b.is-done, .lab-share button.lab-share__b:hover,
.lab-share button.lab-share__b:focus-visible, .lab-share button.lab-share__b.is-done { color: #0a0a0c; }
.lab-share__b:hover svg, .lab-share__b:focus-visible svg, .lab-share__b.is-done svg { fill: #0a0a0c; }
.lab-share__b:hover svg.trait, .lab-share__b:focus-visible svg.trait, .lab-share__b.is-done svg.trait { fill: none; stroke: #0a0a0c; }

.lab-share__k { width: 100%; text-align: center; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 10px; letter-spacing: .16em; color: var(--muted); margin-bottom: 2px; }

/* ============ DISCOVER MORE ============ */
.lab-more { max-width: 1024px; margin: 64px auto 0; padding: 0 22px; }
.lab-more__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.lab-more__t { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 3vw, 30px); line-height: 1; margin: 0; }
.lab-more__all {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 11px; letter-spacing: .1em;
  color: var(--text); background: var(--bg-card); border: 1px solid var(--line); padding: 11px 16px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: border-color .2s, color .2s;
}
.lab-more__all:hover { border-color: var(--accent); color: var(--accent); }
.lab-more__g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lab-more__c { display: block; text-decoration: none; color: inherit; min-width: 0; }
.lab-more__i { display: block; overflow: hidden; border-radius: 5px; border: 1px solid var(--line); margin-bottom: 14px; background: #000; }
.lab-more__i img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform .3s ease, filter .3s ease; }
.lab-more__c:hover .lab-more__i img { transform: scale(1.04); filter: brightness(1.07); }
.lab-more__h { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 17px; line-height: 1.15; margin: 0 0 8px; color: var(--text); }
.lab-more__c:hover .lab-more__h { color: var(--accent); }
.lab-more__m { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.lab-more__m b { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
@media (max-width: 860px) { .lab-more__g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lab-more__g { grid-template-columns: minmax(0, 1fr); } .lab-more__top { flex-direction: column; align-items: flex-start; } }
