/* Anonymous Invisible — portable, dependency-free stylesheet */

:root {
  --background: #c9aa83;
  --foreground: #17130f;
  --card: #d8bb91;
  --card-foreground: #17130f;
  --popover: #d8bb91;
  --popover-foreground: #17130f;
  --primary: #17130f;
  --primary-foreground: #f5ddad;
  --secondary: #d7b47d;
  --secondary-foreground: #17130f;
  --muted: #b99a70;
  --muted-foreground: #554535;
  --accent: #e2492f;
  --accent-foreground: #fff9e8;
  --destructive: #ae2419;
  --border: #3a2d21;
  --input: #3a2d21;
  --ring: #e2492f;
  --pointer-x: 0;
  --pointer-y: 0;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

.dark {
  --background: #17130f;
  --foreground: #f5ddad;
  --card: #241d17;
  --card-foreground: #f5ddad;
  --popover: #241d17;
  --popover-foreground: #f5ddad;
  --primary: #f5ddad;
  --primary-foreground: #17130f;
  --secondary: #3b3026;
  --secondary-foreground: #f5ddad;
  --muted: #3b3026;
  --muted-foreground: #c3aa84;
  --accent: #e2492f;
  --accent-foreground: #fff9e8;
  --destructive: #ff6a50;
  --border: #8c7255;
  --input: #8c7255;
  --ring: #e2492f;
}

* { box-sizing: border-box; }

html {
  background: #17130f;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.experience {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgb(33 24 17 / 20%), transparent 35%, rgb(255 227 181 / 8%)),
    url('./assets/anonymous-bg.webp');
  background-size: cover;
  background-position: center;
}

.experience::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, transparent 0 119px, rgb(27 20 15 / 7%) 120px),
    linear-gradient(180deg, rgb(239 213 173 / 5%), rgb(24 18 14 / 20%));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.film-grain {
  position: absolute;
  inset: -30%;
  z-index: 12;
  opacity: 0.1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, #000 0 0.65px, transparent 0.9px),
    radial-gradient(circle at 70% 60%, #fff 0 0.55px, transparent 0.8px);
  background-size: 7px 7px, 5px 5px;
  animation: noise-shift 0.28s steps(2) infinite;
  mix-blend-mode: overlay;
}

.cursor-wash {
  position: absolute;
  left: var(--cursor-x);
  top: var(--cursor-y);
  z-index: 1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 225 171 / 19%), transparent 67%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 20;
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0.8rem clamp(1.4rem, 3.2vw, 4.5rem);
  border-bottom: 2px solid rgb(28 21 16 / 82%);
  background: rgb(218 187 143 / 65%);
  backdrop-filter: blur(12px) saturate(0.8);
  box-shadow: 0 2px rgb(255 231 190 / 35%);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-family: 'Courier New', Courier, monospace;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 52px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #201810;
  border-radius: 50%;
  background: #1b1510;
  box-shadow: 4px 4px 0 rgb(32 24 16 / 20%);
}

.brand-mark img {
  width: 72px;
  max-width: none;
  transform: translateY(5px) rotate(-4deg);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.9rem; }

.brand small {
  margin-top: 0.35rem;
  color: #5e4430;
  font-size: 0.68rem;
  font-weight: 800;
}

.case-stamp {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgb(43 31 22 / 48%);
  color: #3e2e21;
  background: rgb(228 201 159 / 28%);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d64029;
  box-shadow: 0 0 0 0 rgb(214 64 41 / 55%);
  animation: live-pulse 1.8s infinite;
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.5vw, 1.5rem);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-actions > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding-block: 0.6rem;
}

.nav-actions > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0.28rem;
  height: 2px;
  background: #17130f;
  transition: right 180ms ease;
}

.nav-actions > a:hover::after,
.nav-actions > a:focus-visible::after { right: 0; }
.nav-actions svg { width: 0.85rem; }

.ca-button {
  min-width: 148px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.9rem;
  border: 2px solid #17130f;
  border-radius: 0;
  background: #17130f;
  color: #f4d8a7;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 5px 5px 0 #d4492e;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button-icon { font-size: 0.95rem; line-height: 1; }

.ca-button:hover {
  background: #2c2118;
  box-shadow: 2px 2px 0 #d4492e;
  transform: translate(3px, 3px) rotate(-1deg);
}

.ca-button:focus-visible,
.character-stage:focus-visible,
.paper-link:focus-visible,
.nav-actions a:focus-visible {
  outline: 3px solid #e2492f;
  outline-offset: 4px;
}

.hero {
  position: relative;
  z-index: 4;
  min-height: calc(100svh - 130px);
  display: grid;
  grid-template-columns: minmax(560px, 0.92fr) minmax(560px, 1.08fr);
  align-items: center;
  gap: clamp(1rem, 2.6vw, 4rem);
  padding: clamp(1.4rem, 3vh, 2.4rem) clamp(2rem, 5vw, 6.5rem) 4.4rem;
}

.copy-zone {
  position: relative;
  z-index: 6;
  align-self: center;
  max-width: 850px;
}

.eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(1.2rem, 2vh, 2rem);
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgb(37 27 19 / 60%);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eyebrow span:first-child {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.eyebrow svg { width: 1rem; color: #d63f2c; }

h1 {
  margin: 0;
  color: #17130f;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(5rem, 7.4vw, 9.2rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0.035em 0.035em 0 rgb(244 217 171 / 58%);
}

h1 span, h1 em { display: block; font-style: normal; }

h1 em {
  color: transparent;
  -webkit-text-stroke: max(2px, 0.025em) #17130f;
  transform: translateX(clamp(1rem, 3.4vw, 4rem));
}

.lore-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(185px, 0.65fr);
  gap: clamp(1rem, 2.2vw, 2.6rem);
  margin-top: clamp(1.5rem, 2.5vh, 2.5rem);
}

.lore-copy {
  padding: 1.1rem 1.25rem 1.15rem;
  border: 1px solid rgb(38 28 20 / 54%);
  background: rgb(226 194 147 / 34%);
  box-shadow: inset 0 0 35px rgb(255 231 190 / 12%);
  backdrop-filter: blur(5px);
  transform: rotate(-0.45deg);
}

.lore-copy p {
  margin: 0.65rem 0 0;
  color: #36271d;
  font-size: clamp(0.88rem, 0.86vw, 1.03rem);
  line-height: 1.46;
}

.lore-copy .lore-lead {
  margin: 0 0 0.6rem;
  color: #17130f;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1rem, 1vw, 1.18rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.045em;
}

.case-notes {
  margin: 0;
  border-top: 2px solid #2f2218;
  font-family: 'Courier New', Courier, monospace;
}

.case-notes > div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.72rem 0;
  border-bottom: 1px dashed rgb(47 34 24 / 70%);
}

.case-notes dt, .case-notes dd {
  margin: 0;
  font-size: clamp(0.65rem, 0.7vw, 0.78rem);
  line-height: 1.25;
}

.case-notes dt { color: #73573e; }

.case-notes dd {
  max-width: 55%;
  font-weight: 900;
  text-align: right;
}

.primary-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.paper-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.05rem;
  border: 2px solid #20170f;
  background: rgb(230 198 151 / 72%);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 5px 5px 0 rgb(32 23 15 / 18%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.paper-link-dark { background: #20170f; color: #efd4a5; }

.paper-link:hover {
  transform: translateY(-3px) rotate(1deg);
  box-shadow: 7px 8px 0 rgb(32 23 15 / 20%);
}

.paper-link svg { width: 1rem; }

.subject-zone {
  position: relative;
  height: min(77vh, 820px);
  min-height: 590px;
  display: grid;
  place-items: center;
  transform: translate(calc(var(--pointer-x) * -7px), calc(var(--pointer-y) * -5px));
  transition: transform 120ms linear;
}

.signal-rings {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(46vw, 760px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(4deg);
}

.signal-rings span {
  position: absolute;
  inset: calc(var(--ring-index, 0) * 10%);
  border: 1px solid rgb(41 29 20 / 22%);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(255 226 177 / 5%);
  animation: ring-breathe 6s ease-in-out infinite;
}

.signal-rings span:nth-child(1) { --ring-index: 0; }
.signal-rings span:nth-child(2) { --ring-index: 1; animation-delay: -1.5s; }
.signal-rings span:nth-child(3) { --ring-index: 2; animation-delay: -3s; }
.signal-rings span:nth-child(4) { --ring-index: 3; animation-delay: -4.5s; }

.character-stage {
  position: relative;
  z-index: 5;
  width: min(44vw, 770px);
  aspect-ratio: 1;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(calc(var(--pointer-x) * 22px), calc(var(--pointer-y) * 15px));
}

.character-image {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 16px rgb(27 20 15 / 22%));
  transform-origin: 50% 70%;
  animation: character-float 5.8s ease-in-out infinite;
  transition: opacity 500ms ease, filter 500ms ease, transform 500ms cubic-bezier(.2,.8,.2,1);
}

.character-stage:hover .character-image {
  filter: drop-shadow(0 30px 18px rgb(27 20 15 / 28%)) saturate(1.08);
}

.character-shadow {
  position: absolute;
  z-index: 1;
  left: 18%;
  right: 9%;
  bottom: 4%;
  height: 9%;
  border-radius: 50%;
  background: rgb(30 22 17 / 53%);
  filter: blur(19px);
  transform: scaleX(0.88);
  animation: shadow-breathe 5.8s ease-in-out infinite;
  transition: transform 500ms ease, opacity 500ms ease;
}

.hole-glow {
  position: absolute;
  z-index: 6;
  border-radius: 50%;
  opacity: 0.05;
  background: radial-gradient(circle, #e14a31 0 18%, transparent 64%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: hole-listen 4.2s ease-in-out infinite;
  transition: opacity 300ms ease;
}

.character-stage:hover .hole-glow { opacity: 0.26; }
.hole-left { width: 12%; height: 12%; left: 29%; top: 48%; }
.hole-right { width: 13%; height: 13%; left: 51%; top: 47%; animation-delay: -0.35s; }
.hole-mouth { width: 8%; height: 11%; left: 44%; top: 62%; animation-delay: -0.7s; }

.scan-line {
  position: absolute;
  z-index: 7;
  left: 14%;
  right: 7%;
  top: 25%;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #e34b30, transparent);
  box-shadow: 0 0 14px #e34b30;
  animation: scan-character 7s ease-in-out infinite;
  pointer-events: none;
}

.is-vanished .character-image,
.is-vanished .hole-glow,
.is-vanished .scan-line { opacity: 0; }

.is-vanished .character-image {
  transform: scale(0.975) rotate(1deg);
  filter: blur(12px);
  animation-play-state: paused;
}

.is-vanished .character-shadow {
  opacity: 0.72;
  transform: scaleX(0.62);
}

.vanish-message {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgb(40 29 20 / 58%);
  background: rgb(224 192 145 / 58%);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  transform: translateX(-50%) rotate(1deg);
  backdrop-filter: blur(7px);
}

.vanish-message svg { width: 1rem; }

.presence-meter {
  position: absolute;
  right: 0;
  bottom: 4%;
  display: grid;
  grid-template-columns: auto repeat(8, 5px) auto;
  align-items: end;
  gap: 4px;
  color: #4a3727;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  font-weight: 900;
  transform: rotate(-90deg) translateX(100%);
  transform-origin: right bottom;
}

.presence-meter i {
  width: 5px;
  height: 12px;
  background: #2a1e15;
  animation: meter-jump 1.4s steps(2) infinite alternate;
}

.presence-meter i:nth-of-type(2n) { height: 20px; animation-delay: -0.5s; }
.presence-meter i:nth-of-type(3n) { height: 8px; animation-delay: -0.9s; }

.coordinates {
  position: absolute;
  z-index: 3;
  top: 8%;
  right: 4%;
  display: grid;
  gap: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: right;
  opacity: 0.58;
}

.paper-note {
  position: absolute;
  z-index: 9;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgb(52 37 25 / 42%);
  background: #d8b579;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.055em;
  box-shadow: 7px 9px 17px rgb(37 27 20 / 15%);
}

.paper-note::before {
  content: '';
  position: absolute;
  left: 26%;
  top: -8px;
  width: 50%;
  height: 16px;
  background: rgb(239 210 158 / 70%);
  transform: rotate(-4deg);
}

.note-one { left: -1%; top: 18%; transform: rotate(-7deg); }
.note-two { right: 0; top: 30%; transform: rotate(5deg); }

.spark-stamp {
  position: absolute;
  z-index: 10;
  right: 4.5%;
  top: 16%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  border: 2px solid rgb(163 49 34 / 70%);
  color: rgb(163 49 34 / 83%);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.06em;
  transform: rotate(8deg);
  mix-blend-mode: multiply;
}

.spark-stamp svg { width: 1rem; }

.edge-code {
  position: absolute;
  z-index: 10;
  top: 50%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  opacity: 0.46;
  writing-mode: vertical-rl;
}

.edge-code-left { left: 0.8rem; transform: translateY(-50%) rotate(180deg); }
.edge-code-right { right: 0.8rem; transform: translateY(-50%); }

.ticker {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  overflow: hidden;
  border-top: 2px solid #17130f;
  border-bottom: 2px solid #17130f;
  background: #d64a30;
  color: #17130f;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 38px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.ticker > div {
  display: inline-flex;
  gap: 1.45rem;
  min-width: max-content;
  animation: ticker-roll 25s linear infinite;
}

.ticker b { color: #f4d9aa; }

@keyframes character-float {
  0%, 100% { transform: translateY(-1.2%) rotate(-0.6deg); }
  45% { transform: translateY(1.6%) rotate(0.8deg); }
  70% { transform: translateY(0.2%) rotate(0deg); }
}

@keyframes shadow-breathe {
  0%, 100% { transform: scaleX(0.85); opacity: 0.48; }
  45% { transform: scaleX(1); opacity: 0.3; }
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(0.98); opacity: 0.42; }
  50% { transform: scale(1.035); opacity: 0.78; }
}

@keyframes hole-listen {
  0%, 78%, 100% { transform: scale(0.78); }
  84% { transform: scale(1.35); }
  91% { transform: scale(0.96); }
}

@keyframes scan-character {
  0%, 68%, 100% { top: 26%; opacity: 0; }
  72% { opacity: 0.7; }
  88% { top: 78%; opacity: 0.5; }
  92% { opacity: 0; }
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgb(214 64 41 / 58%); }
  70% { box-shadow: 0 0 0 8px rgb(214 64 41 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(214 64 41 / 0%); }
}

@keyframes meter-jump {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

@keyframes ticker-roll { to { transform: translateX(-50%); } }

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1.5%, -1%); }
  50% { transform: translate(-1%, 1.5%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-1.5%, -1%); }
}

@media (min-width: 1100px) and (min-height: 700px) {
  .experience { height: 100svh; }
}

@media (max-width: 1280px) {
  .topbar { grid-template-columns: auto 1fr; }
  .case-stamp { display: none; }
  .hero {
    grid-template-columns: minmax(500px, 0.95fr) minmax(480px, 1.05fr);
    padding-inline: 3.5rem;
  }
  .note-two, .spark-stamp { display: none; }
}

@media (max-width: 1020px) {
  .experience { overflow: visible; }
  .topbar { grid-template-columns: 1fr auto; align-items: center; }
  .nav-actions > a { display: none; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 3rem 2rem 6rem;
  }
  .copy-zone { max-width: none; }
  .subject-zone { height: min(85vw, 720px); min-height: 540px; }
  .character-stage { width: min(78vw, 690px); }
  .signal-rings { width: min(84vw, 720px); }
  .edge-code { display: none; }
}

@media (max-width: 640px) {
  .topbar { min-height: 74px; padding: 0.65rem 1rem; }
  .brand-mark { width: 44px; }
  .brand strong { font-size: 0.76rem; }
  .brand small { font-size: 0.58rem; }
  .ca-button { min-width: 126px; height: 40px; font-size: 0.72rem; }
  .hero { padding: 2rem 1rem 5.5rem; }
  .eyebrow { font-size: 0.65rem; }
  h1 { font-size: clamp(4.25rem, 19vw, 6.5rem); }
  h1 em { transform: translateX(0.55rem); }
  .lore-grid { grid-template-columns: 1fr; }
  .lore-copy p { font-size: 0.94rem; }
  .case-notes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .primary-links { align-items: stretch; flex-direction: column; }
  .paper-link { width: 100%; }
  .subject-zone { min-height: 410px; }
  .character-stage { width: min(100vw, 500px); }
  .note-one, .coordinates, .presence-meter { display: none; }
  .vanish-message { width: max-content; max-width: 92vw; font-size: 0.64rem; }
  .ticker { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-wash { display: none; }
}
