/* cliffcoffin.com tech layer, brand v2.0. Control is the grid, the axis, the data and Cyber Blue;
   chaos is red and the glitch frame, and only chaos flickers. Everything here is decorative and aria-hidden.
   Loaded after /live/live.css (and /home.css on the home page). Respects .no-motion and reduced motion. */
:root { --hc: #ffffff47; }

/* Registration ticks: four corner marks drawn with gradients, coloured by --hc. */
.ticks, .hud-fig::before, .rel::before, .yt::before, .live-card .lc-media::before {
  background:
    linear-gradient(var(--hc), var(--hc)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--hc), var(--hc)) 100% 100% / 1px 14px no-repeat;
}

/* Nav: current page on the axis, local time as telemetry. */
.nav-links a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--cc-blue); padding-bottom: 5px; margin-bottom: -5px; }
.nav-tele { font: 400 11px/1 var(--cc-font-mono); letter-spacing: .08em; color: #8a8a8a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nav-tele b { font-weight: 700; color: var(--cc-blue); margin-right: 6px; }
@media (max-width: 960px) { .nav-tele { display: none; } }

/* Section labels: indexed like the brand book, with a rule running out to the margin. */
main { counter-reset: cc-sec; }
.label { display: flex; align-items: center; gap: 12px; }
.label::before { counter-increment: cc-sec; content: "//" counter(cc-sec, decimal-leading-zero); color: var(--cc-blue); }
.label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #ffffff26, #ffffff00 75%); }

/* Hero status chip (the red dot stays the one red element). */
.hero-cap { display: inline-flex; padding: 9px 14px; border: 1px solid #ffffff2e; background: #121212a6; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 700 11px/1.45 var(--cc-font-mono); letter-spacing: .1em; text-transform: uppercase; }

/* Hero HUD: grid, stepped scan line, corner brackets, readouts. Sits above the fade, below the copy. */
.hud { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hud-grid { position: absolute; inset: 0; background-image: linear-gradient(#00aeef17 1px, transparent 1px), linear-gradient(90deg, #00aeef17 1px, transparent 1px); background-size: 64px 64px; background-position: -1px -1px; -webkit-mask-image: radial-gradient(ellipse 75% 65% at 72% 38%, #000 10%, transparent 78%); mask-image: radial-gradient(ellipse 75% 65% at 72% 38%, #000 10%, transparent 78%); }
.hud-axis { position: absolute; left: 0; right: 0; top: 38%; height: 1px; background: linear-gradient(90deg, transparent, #00aeef33 30%, #00aeef33 70%, transparent); }
.hud-axis::after { content: ""; position: absolute; inset: -3px 0 auto 0; height: 7px; background: repeating-linear-gradient(90deg, #00aeef40 0 1px, transparent 1px 64px); background-position: -1px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.hud-scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #00aeef99 20%, #00aeef99 80%, transparent); opacity: .7; animation: cc-scan calc(var(--cc-t-beat) * 16) steps(32, end) infinite; }
@keyframes cc-scan { from { transform: translateY(0); } to { transform: translateY(100svh); } }
.hc { position: absolute; width: 18px; height: 18px; border: 0 solid #ffffff66; }
.hc.tl { top: 76px; left: clamp(16px, 4vw, 48px); border-top-width: 1px; border-left-width: 1px; }
.hc.tr { top: 76px; right: clamp(16px, 4vw, 48px); border-top-width: 1px; border-right-width: 1px; }
.hc.bl { bottom: 20px; left: clamp(16px, 4vw, 48px); border-bottom-width: 1px; border-left-width: 1px; }
.hc.br { bottom: 20px; right: clamp(16px, 4vw, 48px); border-bottom-width: 1px; border-right-width: 1px; }
.hud-read { position: absolute; top: 106px; right: calc(clamp(16px, 4vw, 48px) + 30px); display: grid; gap: 8px; font: 400 11px/1 var(--cc-font-mono); letter-spacing: .08em; text-transform: uppercase; color: #ffffffb3; font-variant-numeric: tabular-nums; }
.hud-read div { display: flex; justify-content: flex-end; gap: 12px; }
.hud-read dt { color: var(--cc-blue); font-weight: 700; }
.hud-read dd { margin: 0; }
@media (max-width: 720px) {
  .hud-read { top: 92px; right: clamp(16px, 4vw, 48px); }
  .hud-read div:not(:last-child) { display: none; }
  .hc.tl, .hc.tr { top: 64px; }
  .hud-axis { display: none; }
}

/* Wordmark glitch: red and blue silhouettes of the mark, cut in for one beat on the sixteenth. At rest the mark is untouched. */
.cc-glitch { position: relative; display: block; width: fit-content; max-width: 100%; }
.cc-glitch .gl { position: absolute; inset: 0; opacity: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; mix-blend-mode: screen; pointer-events: none; }
.cc-glitch .gl-r { background: var(--cc-red); }
.cc-glitch .gl-b { background: var(--cc-blue); }
.cc-glitch.go > img { animation: cc-jolt var(--cc-t-beat) steps(1, end) 1; }
.cc-glitch.go .gl-r { animation: cc-gl-r var(--cc-t-beat) steps(1, end) 1; }
.cc-glitch.go .gl-b { animation: cc-gl-b var(--cc-t-beat) steps(1, end) 1; }
@keyframes cc-jolt { 0% { transform: translateX(3px); clip-path: inset(0 0 0 0); } 25% { transform: translateX(-2px); clip-path: inset(0 0 22% 0); } 50% { transform: translateX(1px); } 75%, 100% { transform: none; clip-path: none; } }
@keyframes cc-gl-r { 0% { opacity: .9; transform: translateX(-7px); clip-path: inset(14% 0 56% 0); } 25% { opacity: .9; transform: translateX(5px); clip-path: inset(60% 0 10% 0); } 50% { opacity: .9; transform: translateX(-3px); clip-path: inset(32% 0 44% 0); } 75%, 100% { opacity: 0; } }
@keyframes cc-gl-b { 0% { opacity: .9; transform: translateX(7px); clip-path: inset(48% 0 24% 0); } 25% { opacity: .9; transform: translateX(-5px); clip-path: inset(6% 0 70% 0); } 50% { opacity: .9; transform: translateX(4px); clip-path: inset(72% 0 4% 0); } 75%, 100% { opacity: 0; } }

/* Video timecode and registration ticks on loops, cards and the YouTube facades. */
.hud-fig { position: relative; }
.hud-fig::before { content: ""; position: absolute; left: 8px; top: 8px; width: calc(100% - 16px); aspect-ratio: 4 / 5; z-index: 1; pointer-events: none; }
.hud-fig:hover { --hc: var(--cc-blue); }
.vtc { position: absolute; left: 14px; top: 14px; z-index: 2; font: 400 10px/1 var(--cc-font-mono); letter-spacing: .08em; color: #ffffffd9; background: #121212a6; padding: 5px 7px; font-variant-numeric: tabular-nums; pointer-events: none; }
.vtc b { color: var(--cc-blue); font-weight: 700; margin-right: 6px; }
.live-card .lc-media { position: relative; }
.live-card .lc-media::before { content: ""; position: absolute; inset: 8px; z-index: 1; pointer-events: none; }
.live-card:hover { --hc: var(--cc-blue); }
.yt::before { content: ""; position: absolute; inset: 10px; z-index: 1; pointer-events: none; }
.yt:hover { --hc: var(--cc-blue); }

/* Release covers: index, outer registration marks, and on hover a stepped scan and one RGB-split frame. */
.rel { position: relative; }
.rel::before { content: ""; position: absolute; left: -7px; top: -7px; width: calc(100% + 14px); aspect-ratio: 1; z-index: 1; pointer-events: none; }
.rel:hover { --hc: var(--cc-blue); }
.rel::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(var(--cc-blue), var(--cc-blue)) 0 0 / 100% 1px no-repeat; }
.rel:hover::after { animation: cc-sweep var(--cc-t-beat) steps(8, end) 1; }
@keyframes cc-sweep { 0% { opacity: .9; background-position: 0 0; } 99% { opacity: .9; background-position: 0 100%; } 100% { opacity: 0; } }
.rel:hover img { animation: cc-rgb var(--cc-t-beat) steps(1, end) 1; }
@keyframes cc-rgb { 0% { filter: saturate(1) drop-shadow(4px 0 0 #ff0000b3) drop-shadow(-4px 0 0 #00aeefb3); } 25% { filter: saturate(1) drop-shadow(-3px 0 0 #ff0000b3) drop-shadow(3px 0 0 #00aeefb3); } 50%, 100% { filter: saturate(1); } }
.rel-idx { position: absolute; left: 8px; top: 8px; z-index: 2; font: 400 10px/1 var(--cc-font-mono); letter-spacing: .08em; color: #fff; background: #121212b3; padding: 5px 7px; transition: transform var(--cc-t-beat) var(--cc-ease-strike); font-variant-numeric: tabular-nums; }
.rel:hover .rel-idx { transform: translateY(-4px); }

/* Catalogue rows: a cyan pip on the axis at hover. */
.cat a { position: relative; }
.cat a::before { content: ""; position: absolute; left: -14px; top: 50%; width: 5px; height: 5px; margin-top: -2px; background: var(--cc-blue); opacity: 0; transition: opacity var(--cc-t-16th) steps(1, end); }
.cat a:hover::before { opacity: 1; }

/* Events page head: the same grid, quieter. */
.page-head { position: relative; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: 60px 0 -40px; z-index: -1; pointer-events: none; background-image: linear-gradient(#00aeef12 1px, transparent 1px), linear-gradient(90deg, #00aeef12 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 30%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 80% 30%, #000 0%, transparent 75%); }

/* Footer system line. */
.foot .sys { margin-top: 22px; padding-top: 16px; border-top: 1px dashed #ffffff14; display: flex; flex-wrap: wrap; gap: 6px 22px; font: 400 11px/1.4 var(--cc-font-mono); letter-spacing: .08em; text-transform: uppercase; color: #6f6f6f; font-variant-numeric: tabular-nums; }
.foot .sys .k { color: var(--cc-blue); }

/* Motion off: nothing moves, the data stays readable. */
.no-motion .hud-scan, .no-motion .cc-glitch .gl { display: none; }
.no-motion .cc-glitch.go > img, .no-motion .rel:hover img, .no-motion .rel:hover::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .hud-scan, .cc-glitch .gl { display: none; }
  .cc-glitch.go > img, .rel:hover img, .rel:hover::after { animation: none; }
}
