/* Clawed Club — shared styles for all three pages.
   Layout: each section is an editor pane. The page sits on top; a code layer sits behind it
   and is shown only by the occasional glitch and the rarer claw tear (see effects.js). */

:root {
  color-scheme: dark;
  --color-bg: #120F0D;
  --color-surface: #1C1815;
  --color-text: #EDE6DF;
  --color-muted: #A69C92;
  --color-line: #3A322C;
  --color-accent: #D2A679;
  --color-on-accent: #120F0D;
  --color-glitch-a: #B5653F;
  --color-glitch-b: #D2A679;
  --color-code-bg: #060504;
  --color-code: #E0B878;
  --color-code-dim: #7A6D5E;
  --color-error: #E08A6A;

  --font-heading-code: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-heading-sharp: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --color-field-line: #7A6D5E;   /* form field outlines: 3.5:1 on the window, for WCAG 1.4.11 */

  --radius: 6px;

  /* Spacing scale: use only these */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem;
  --s-6: 1.5rem; --s-7: 2rem; --s-8: 2.5rem; --s-9: 3rem; --s-10: 4rem;

  /* Type scale: use only these */
  --t-xs: .75rem; --t-sm: .8125rem; --t-md: .9375rem; --t-base: 1rem; --t-lg: 1.125rem;
  --t-xl: 1.375rem; --t-2xl: 2rem;
  --t-h2: clamp(1.375rem, 3vw, 1.875rem); --t-h1: clamp(2rem, 6.5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* keeps hidden elements hidden even when a class sets display */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 1rem/1.65 var(--font-body);
  padding: var(--s-6) max(16px, 4vw) var(--s-10);
  overflow-x: hidden;
}
.wrap { max-width: 64rem; margin: 0 auto; display: grid; gap: var(--s-7); }
.stack { display: grid; gap: var(--s-7); min-width: 0; }

a { color: var(--color-accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px;
}
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--color-accent); color: var(--color-on-accent); padding: var(--s-2) var(--s-3); }

/* ---- Editor window ---- */
.window {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  min-width: 0;
}
.tabs {
  display: flex; flex-wrap: wrap;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
  border-radius: var(--radius) var(--radius) 0 0;
  font: 400 var(--t-sm)/1 var(--font-heading-code);
}
.tabs a, .tabs span {
  padding: var(--s-3) var(--s-4);
  color: var(--color-muted);
  text-decoration: none;
  border-right: 1px solid var(--color-line);
}
.tabs a:hover { color: var(--color-text); }
.tabs [aria-current="page"], .tabs span { background: var(--color-surface); color: var(--color-text); }

.pane { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.gutter {
  padding: var(--s-8) var(--s-3); text-align: right; user-select: none;
  font: 400 var(--t-sm)/2 var(--font-heading-code);
  color: var(--color-code-dim);
  border-right: 1px solid var(--color-line);
}
.body { padding: var(--s-8) clamp(var(--s-4), 4vw, var(--s-9)) var(--s-9); min-width: 0; }
.window > .body { padding-block: var(--s-7) var(--s-8); }

/* ---- Type ---- */
.eyebrow { font: 400 var(--t-sm)/1.4 var(--font-heading-code); color: var(--color-muted); margin: 0 0 var(--s-4); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: 700 var(--t-h1)/1.08 var(--font-heading-code); letter-spacing: -.02em; }
h2 { font: 600 var(--t-h2)/1.2 var(--font-heading-sharp); margin-bottom: var(--s-4); }
p { margin: 0 0 var(--s-4); max-width: 40rem; }
.lede { color: var(--color-muted); margin: var(--s-5) 0 var(--s-7); font-size: var(--t-lg); }
.lede:has(+ .lede-sub) { margin-bottom: var(--s-4); }
.lede-sub { color: var(--color-text); font-family: var(--font-heading-code); font-size: var(--t-sm); margin: 0 0 var(--s-3); }
.lede-sub + .muted { margin: 0 0 var(--s-6); font-size: var(--t-sm); }
.muted { color: var(--color-muted); }
.family-note {
  border-left: 2px solid var(--color-accent);
  padding: var(--s-1) 0 var(--s-1) var(--s-4); margin: var(--s-6) 0 0; max-width: 40rem;
  font-size: var(--t-lg);
}

.btn {
  display: inline-block; padding: var(--s-3) var(--s-5); border: 0; cursor: pointer;
  background: var(--color-accent); color: var(--color-on-accent);
  font: 600 var(--t-md)/1 var(--font-heading-code);
  text-decoration: none; border-radius: var(--radius);
}
.btn:hover { background: var(--color-text); }

/* ---- Tiers ---- */
.tiers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: var(--s-6) 0; border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden;
}
.tier {
  padding: var(--s-6); display: grid; gap: var(--s-3); align-content: start; min-width: 0;
  border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line);
  margin: 0 -1px -1px 0;
}
.tier h3 { font: 400 var(--t-sm)/1.4 var(--font-heading-code); color: var(--color-muted); }
.tier p { margin: 0; font-size: var(--t-md); }
.price { font: 700 var(--t-2xl)/1.1 var(--font-heading-code) !important; font-variant-numeric: tabular-nums; }
.price small { font: 400 var(--t-sm)/1 var(--font-heading-code); color: var(--color-muted); }
.price s { font-weight: 400; font-size: var(--t-lg); color: var(--color-muted); margin-right: var(--s-2); }
.tier ul { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-2); font-size: var(--t-md); }

/* ---- Class run-down (Juniors) ---- */
.agenda {
  list-style: none; margin: var(--s-6) 0; padding: 0; max-width: 40rem;
  border: 1px solid var(--color-line); border-radius: var(--radius);
}
.agenda li {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: baseline;
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--color-line); font-size: var(--t-md);
}
.agenda li:first-child { border-top: 0; }
.agenda .time, .agenda .len { font: 400 var(--t-sm)/1.4 var(--font-heading-code); color: var(--color-muted); }
.agenda .time { color: var(--color-accent); }

/* ---- Form ---- */
form { display: grid; gap: var(--s-4); max-width: 34rem; margin-top: var(--s-6); }
.field { display: grid; gap: var(--s-2); }
label, legend { font: 400 var(--t-sm)/1.4 var(--font-heading-code); color: var(--color-muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; padding: var(--s-3);
  background: var(--color-bg); color: var(--color-text);
  border: 1px solid var(--color-field-line); border-radius: var(--radius);
  font: 400 var(--t-base)/1.4 var(--font-body);
}
textarea { min-height: 6rem; resize: vertical; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2); align-items: start; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--color-accent); }
.check label { font: 400 var(--t-md)/1.5 var(--font-body); color: var(--color-text); }
fieldset.choices { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); min-width: 0; }
fieldset.choices legend { width: 100%; padding: 0; margin-bottom: var(--s-2); }
fieldset.choices label { display: inline-flex; align-items: center; gap: var(--s-2); font: 400 var(--t-md)/1.5 var(--font-body); color: var(--color-text); cursor: pointer; }
fieldset.choices.stacked { flex-direction: column; gap: var(--s-2); }
fieldset.choices input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--color-accent); }
/* Honeypot field: off-screen, not hidden with display:none, so bots still see and fill it */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { font: 400 var(--t-sm)/1.5 var(--font-heading-code); color: var(--color-accent); margin: 0; }
.form-status.error { color: var(--color-error); }

footer.site { font: 400 var(--t-sm)/1.6 var(--font-heading-code); color: var(--color-muted); padding: var(--s-4) 0 0; }

/* ---- Glitch (Glitchcore, text-effects.colorion.co; neon removed; runs once per trigger) ---- */
.fx-glitch { position: relative; display: inline-block; }
.fx-glitch::before, .fx-glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.fx-glitch::before { color: var(--color-glitch-a); clip-path: inset(0 0 55% 0); }
.fx-glitch::after  { color: var(--color-glitch-b); clip-path: inset(45% 0 0 0); }
.is-glitching .fx-glitch::before { animation: fx-glitch-a .7s steps(1) 1; }
.is-glitching .fx-glitch::after  { animation: fx-glitch-b .7s steps(1) 1; }
@keyframes fx-glitch-a {
  0%, 100% { transform: translate(0); opacity: 0; }
  10% { transform: translate(-5px, -2px); opacity: .9; }
  30% { transform: translate(4px, 1px); opacity: .9; }
  50% { transform: translate(0); opacity: 0; }
  70% { transform: translate(-3px, 2px); opacity: .9; }
  85% { transform: translate(0); opacity: 0; }
}
@keyframes fx-glitch-b {
  0%, 100% { transform: translate(0); opacity: 0; }
  20% { transform: translate(5px, 2px); opacity: .9; }
  40% { transform: translate(-4px, -1px); opacity: .9; }
  55% { transform: translate(0); opacity: 0; }
  75% { transform: translate(3px, -2px); opacity: .9; }
  90% { transform: translate(0); opacity: 0; }
}

/* ---- Code layer behind the page (filled by effects.js) ---- */
.code-layer {
  position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none;
  background: var(--color-code-bg); color: var(--color-code);
  font: 400 var(--t-sm)/1.7 var(--font-heading-code);
  visibility: hidden;
}
.code-layer pre { margin: 0; padding: var(--s-4) var(--s-5); white-space: pre; font: inherit; }
.code-layer .dim { color: var(--color-code-dim); }

/* Glitch: thin bands of code flash */
.is-glitching .code-layer { visibility: visible; animation: peek .7s steps(1) 1 both; }
@keyframes peek {
  0%, 100% { clip-path: inset(0 0 100% 0); }
  10% { clip-path: inset(34% 0 60% 0); }
  30% { clip-path: inset(63% 0 31% 0); }
  50% { clip-path: inset(0 0 100% 0); }
  70% { clip-path: inset(18% 0 78% 0); }
  85% { clip-path: inset(0 0 100% 0); }
}

/* Claw tear: drawn on a canvas by effects.js (three slashes with torn-paper edges) */
.tear-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 41; pointer-events: none; }

@media (max-width: 30rem) {
  .gutter { display: none; }
  .pane { grid-template-columns: minmax(0, 1fr); }
}

/* Reduced motion: no glitch, no tear, no smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx-glitch::before, .fx-glitch::after, .code-layer, .code-layer pre { animation: none !important; }
  .code-layer { visibility: hidden !important; }
}

/* ---- Draft: home page additions, in the current style ---- */
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; max-width: none; }
.btn.ghost { background: transparent; color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-line); }
.btn.ghost:hover { background: var(--color-line); }
.tiers.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.tier .big { font: 700 var(--t-xl)/1.2 var(--font-heading-code); }
@media (max-width: 34rem) {
  .agenda li { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .agenda .len { grid-column: 2; }
}

/* ---- Rhythm: wide and narrow windows ----
   Wide windows hold grids and forms; narrow ones hold a list or a few paragraphs.
   A narrow window with .offset sits on the right, so the page zig-zags as you scroll. */
.stack > .window.narrow { width: min(100%, 46rem); }
.stack > .window.narrow.offset { justify-self: end; }
@media (max-width: 48rem) { .stack > .window.narrow { width: auto; justify-self: stretch; } }

/* Club cards: keep the buttons level */
#clubs .tier { grid-template-rows: auto auto 1fr auto; align-content: stretch; }
#clubs .tier > p { align-self: start; }

/* ---- Draft: the site reacts (with response.js) ---- */
@property --rx-d1 { syntax: "<color>"; inherits: true; initial-value: #3A322C; }
@property --rx-d2 { syntax: "<color>"; inherits: true; initial-value: #3A322C; }
@property --rx-d3 { syntax: "<color>"; inherits: true; initial-value: #3A322C; }

/* Title-bar dots, dim until you hover the window */
.window > .tabs::after {
  content: ""; align-self: center; margin: 0 .9rem 0 auto; width: 2.6rem; height: .6rem; flex: none;
  background:
    radial-gradient(circle at .3rem 50%, var(--rx-d1) .22rem, transparent .25rem),
    radial-gradient(circle at 1.3rem 50%, var(--rx-d2) .22rem, transparent .25rem),
    radial-gradient(circle at 2.3rem 50%, var(--rx-d3) .22rem, transparent .25rem);
}
.window { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, --rx-d1 .2s, --rx-d2 .2s .05s, --rx-d3 .2s .1s; }
.window:hover { --rx-d1: #B5653F; --rx-d2: #D2A679; --rx-d3: #8FCB8A; border-color: #4A4038; }
@media (hover: hover) {
  .window:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px #000; }
}
@media (max-width: 40rem) { header.window > .tabs::after { display: none; } }

/* Buttons press down like keys */
.btn { box-shadow: 0 3px 0 #8A6646; transition: transform .07s ease, box-shadow .07s ease, background-color .15s; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 #8A6646; }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--color-line), 0 3px 0 var(--color-line); }
.btn.ghost:active { box-shadow: inset 0 0 0 1px var(--color-line), 0 0 0 var(--color-line); }

/* Blinking cursor at the end of the heading you're looking at */
.rx-caret {   /* a text character (▌), so it stays on the same line as the last word */
  color: var(--color-accent); font-family: var(--font-heading-code); font-weight: 400;
  margin-right: -.6em; animation: rx-blink 1.05s steps(1) infinite;
}
@keyframes rx-blink { 50% { opacity: 0; } }

/* Headings typing in: the untyped part is there, just see-through */
.rx-rest { color: transparent; }

/* Form: green check on a field that's filled in correctly */
.field { position: relative; }
.field.rx-ok > input, .field.rx-ok > textarea, .field.rx-ok > select { border-color: #5E8F5A; }
.field.rx-ok::after {
  content: "\2713"; position: absolute; right: .8rem; bottom: .62rem; pointer-events: none;
  font: 700 var(--t-md)/1.4 var(--font-heading-code); color: #8FCB8A;
  animation: rx-pop .25s ease-out;
}
.field.rx-ok:has(> textarea)::after { right: 1.7rem; }   /* clear of the resize handle */
.field.rx-ok > input { padding-right: 2.2rem; }
@keyframes rx-pop { from { opacity: 0; transform: scale(.4); } }

@media (prefers-reduced-motion: reduce) {
  .window, .btn { transition: none; }
  .window:hover, .btn:active { transform: none; }
  .rx-caret { animation: none; }
  .field.rx-ok::after { animation: none; }
}

/* ---- Draft: gremlin traces (placed by traces.js; all decorative) ---- */
.window, footer.site { position: relative; }

/* A note left in the code */
.tr-note {
  margin: var(--s-6) 0 0; user-select: none;
  font: 400 var(--t-xs)/1.4 var(--font-heading-code); color: var(--color-code-dim);
}

/* Eyes in the footer: open, blink once, close */
.tr-eyes {
  position: absolute; right: var(--tr-ex, 10%); bottom: .35rem; display: flex; gap: .55rem;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.tr-eyes span {
  width: .45rem; height: .28rem; border-radius: 50%;
  background: var(--color-code); box-shadow: 0 0 6px rgba(224, 184, 120, .55);
}
.tr-eyes.is-open { opacity: .85; transition-duration: 1s; }
.tr-eyes.is-open span { animation: tr-blink 3.2s ease-in-out 1 both; }
@keyframes tr-blink {
  0%, 40%, 46%, 100% { transform: scaleY(1); }
  43% { transform: scaleY(.1); }
}
@media (prefers-reduced-motion: reduce) {
  .tr-eyes { display: none; }
}

/* ---- Draft: screen glitches (glitches.js; test keys 1–6) ---- */
.gx { position: fixed; inset: 0; z-index: 60; cursor: pointer; }

/* 1. Black screen of death */
.gx-black { background: #000; }
.gx-term { position: absolute; left: var(--s-6); top: var(--s-6); font: 400 var(--t-md)/1.6 var(--font-heading-code); color: #C8C8C8; }
.gx-caret { animation: rx-blink 1s steps(1) infinite; }
.gx-black.is-leaving { opacity: 0; transition: opacity .3s; }

/* 2. Blue screen (the club's own) */
.gx-blue { background: #1F5FBF; color: #fff; display: grid; align-content: center; }
.gx-blue-inner { padding: 0 max(var(--s-6), 10vw); max-width: 52rem; font: 400 clamp(1rem, 2vw, 1.375rem)/1.5 var(--font-body); }
.gx-blue-inner p { max-width: none; margin: 0 0 var(--s-6); }
.gx-face { font: 300 clamp(5rem, 14vw, 9rem)/1 var(--font-body) !important; margin-bottom: var(--s-7) !important; }
.gx-small { font-size: var(--t-md); opacity: .85; }
.gx-blue.is-restarting { background: #000; }
.gx-blue.is-restarting .gx-blue-inner { visibility: hidden; }

/* 3. TV powering off: the page collapses to a line, then a dot */
.gx-tv-back { background: #000; z-index: 59; }
.wrap.gx-tv-off, .wrap.gx-tv-on { position: relative; z-index: 60; }
.wrap.gx-tv-off { animation: gx-tv-off .6s cubic-bezier(.6, 0, .9, .4) both; }
.wrap.gx-tv-on { animation: gx-tv-off .45s cubic-bezier(.1, .6, .4, 1) reverse both; }
@keyframes gx-tv-off {
  0%   { transform: scale(1, 1); filter: brightness(1); }
  55%  { transform: scale(1, .004); filter: brightness(4); }
  100% { transform: scale(0, .004); filter: brightness(8); }
}
.gx-tv-dot {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 14px 4px rgba(255, 255, 255, .7);
  animation: gx-dot 1.2s ease-in forwards;
}
@keyframes gx-dot { to { opacity: 0; transform: scale(.3); } }
.gx-tv-back.is-leaving { animation: gx-fade-out .45s ease-out forwards; pointer-events: none; }
@keyframes gx-fade-out { to { opacity: 0; } }
/* the gremlin who fixes the TV: pixel sprite, never catches clicks */
.gx-gremlin { position: fixed; bottom: 3vh; z-index: 61; image-rendering: pixelated; pointer-events: none; }

/* 4. Screen hit */
.wrap.gx-jolt { animation: gx-jolt .45s cubic-bezier(.3, .7, .4, 1); }
@keyframes gx-jolt {
  0% { transform: translate(0); } 10% { transform: translate(-14px, 9px); } 25% { transform: translate(11px, -7px); }
  40% { transform: translate(-7px, 4px); } 60% { transform: translate(4px, -2px); } 80% { transform: translate(-2px, 1px); } 100% { transform: translate(0); }
}
.gx-crack canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gx-flash {
  position: absolute; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 60%);
  animation: gx-flash .35s ease-out forwards;
}
@keyframes gx-flash { to { opacity: 0; transform: scale(1.6); } }
.gx-crack.is-leaving { opacity: 0; transition: opacity .6s; }

/* 5. Half the screen turns an odd color */
.gx-half { cursor: pointer; animation: gx-half-flicker .75s steps(1) both; }
.gx-half-left   { right: 50%; border-right: 2px solid rgba(255, 255, 255, .5); }
.gx-half-right  { left: 50%;  border-left: 2px solid rgba(255, 255, 255, .5); }
.gx-half-top    { bottom: 50%; border-bottom: 2px solid rgba(255, 255, 255, .5); }
.gx-half-bottom { top: 50%;   border-top: 2px solid rgba(255, 255, 255, .5); }
.gx-half { backdrop-filter: invert(1) hue-rotate(180deg) saturate(1.6); }
.gx-tint-white  { background: rgba(0, 220, 255, .08); }
/* The colored ones: flip to light, then push the whole half into one hue (lights = solid color, darks stay dark) */
.gx-tint-yellow { backdrop-filter: invert(1) hue-rotate(180deg) brightness(.72) sepia(1) saturate(6) hue-rotate(8deg) contrast(1.15); }
.gx-tint-blue   { backdrop-filter: invert(1) hue-rotate(180deg) brightness(.72) sepia(1) saturate(6) hue-rotate(178deg) contrast(1.15); }
.gx-tint-pink   { backdrop-filter: invert(1) hue-rotate(180deg) brightness(.72) sepia(1) saturate(6) hue-rotate(275deg) contrast(1.15); }
.gx-tint-green  { backdrop-filter: invert(1) hue-rotate(180deg) brightness(.72) sepia(1) saturate(6) hue-rotate(75deg) contrast(1.15); }
@keyframes gx-half-flicker {
  0% { opacity: 0; } 3% { opacity: 1; } 5% { opacity: .2; } 7%, 61% { opacity: 1; } 62% { opacity: .5; } 64%, 95% { opacity: 1; } 100% { opacity: 1; }
}

/* 6. Jank: the screen stops drawing properly (big chunks in the wrong place, black holes it never painted) */
.gx-jank { background: transparent; }
.gx-jank canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Screen hit: two canvases; the bleed flickers while the glass stays */
.gx-crack canvas.gx-bleed { animation: gx-bleed-flicker 1.3s steps(1) infinite; }
@keyframes gx-bleed-flicker { 0%, 100% { opacity: 1; } 31% { opacity: .55; } 34% { opacity: 1; } 72% { opacity: .8; } 74% { opacity: 1; } }

/* 7. TV static */
.gx-static { background: #000; opacity: 0; }
.gx-static canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }

/* 8–9. Tearing and artifacting: copies of the page, clipped to strips and blocks */
.gx-tearing, .gx-artifacts { background: transparent; }
.gx-slice { position: absolute; inset: 0; overflow: hidden; background: var(--color-bg); }
.gx-slice > .wrap { pointer-events: none; }
.gx-artifacts canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }

/* Home: the "how we prompt" note under Why we exist */
.prompt-note { margin-top: var(--s-6); padding: var(--s-4) var(--s-5); border-left: 3px solid var(--color-accent); background: rgba(255, 255, 255, .03); }
.prompt-note h3 { margin: 0 0 var(--s-2); font-family: var(--font-heading-code); font-size: var(--t-sm); font-weight: 400; color: var(--color-accent); }
.prompt-note p { margin: 0; }

/* Locked apply forms
   The form stays in the page but is inert, greyed out and crossed out. Two bars make a big X,
   a padlock sits where they cross, and a paper tag hangs off it on a string.
   The overlay is decorative (aria-hidden); the .sr-only note says the same thing to screen readers. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.form-lock {
  --lock-grey: #8C847D;
  --lock-bar: #5E5751;
  --lock-hole: #24201C;
  --lock-paper: #E9E0CC;
  --lock-ink: #2A2420;
  --lock-w: 120px;                         /* padlock width; everything else hangs off this */
  position: relative;
}
.form-lock > form {
  filter: grayscale(1);
  opacity: .3;
  user-select: none;
}
.lock-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;                        /* the tag can never push the page sideways */
}
.lock-x { position: absolute; inset: 0; width: 100%; height: 100%; }
.lock-x line {
  stroke: var(--lock-bar);
  stroke-width: 14;
  vector-effect: non-scaling-stroke;       /* same thickness however tall the form is */
}
.lock-center {
  position: absolute; left: 50%; top: 50%;
  width: var(--lock-w);
  transform: translate(-50%, -50%);
}
.lock-padlock { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.lock-padlock .shackle { fill: none; stroke: var(--lock-grey); stroke-width: 14; stroke-linecap: round; }
.lock-padlock rect { fill: var(--lock-grey); }
.lock-padlock .hole { fill: var(--lock-hole); }

/* String: starts at the right side of the padlock body, ends at the tag's punched hole */
.lock-string {
  position: absolute;
  left: calc(var(--lock-w) * .82);
  top: calc(var(--lock-w) * .64);
  width: calc(var(--lock-w) * .6);
  height: auto; overflow: visible;
}
.lock-string path { fill: none; stroke: var(--lock-paper); stroke-width: 1.5; stroke-linecap: round; opacity: .8; vector-effect: non-scaling-stroke; }

/* Luggage tag: chamfered left end, punched hole, tilted on the string */
.lock-tag {
  position: absolute;
  left: calc(var(--lock-w) * 1.41 - .7rem);
  top: calc(var(--lock-w) * .99);
  width: 9.5rem;
  margin: 0;
  padding: var(--s-2) var(--s-3) var(--s-2) 1.6rem;
  background: var(--lock-paper);
  color: var(--lock-ink);
  font: 500 var(--t-xs)/1.45 var(--font-heading-code);
  letter-spacing: -.01em;
  clip-path: polygon(.9rem 0, 100% 0, 100% 100%, .9rem 100%, 0 72%, 0 28%);
  transform-origin: .7rem 50%;
  transform: translateY(-50%) rotate(-10deg);
}
.lock-tag::before {                        /* the punched hole */
  content: ""; position: absolute;
  left: .45rem; top: 50%;
  width: .5rem; height: .5rem; margin-top: -.25rem;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
}
.lock-tag span {                           /* the scribbled sad face */
  display: inline-block;
  margin-left: .5em;
  font-weight: 700;
  transform: rotate(8deg);
}

@media (max-width: 34rem) {
  .form-lock { --lock-w: 78px; }
  .lock-x line { stroke-width: 11; }
  /* No room beside the padlock: the string drops from the body and the tag hangs below it */
  .lock-string {
    left: calc(var(--lock-w) * .687);
    top: calc(var(--lock-w) * 1.047);
    transform-origin: 2.2% 11.4%;
    transform: rotate(60deg);
  }
  .lock-tag {
    left: calc(var(--lock-w) * .73 - .7rem);
    top: calc(var(--lock-w) * 1.74);
    width: 8rem; padding-left: 1.5rem;
  }
}
