@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600;700&family=Playfair+Display:ital,wght@1,500&display=swap');

:root {
  --paper: #f2efe7;
  --ink: #1f211d;
  --muted: #73756e;
  --line: #cbc8bf;
  --acid: #d9ff43;
  --orange: #ff5a24;
  --stage: #dcdad3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, Arial, sans-serif;
  min-width: 320px;
}

button, input { font: inherit; }
button { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  opacity: .17;
  pointer-events: none;
  z-index: 30;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.site-header {
  height: 94px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(22px, 5vw, 78px);
}

.brand { color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -1.2px; }
.brand-dot { color: var(--orange); }
.tagline { margin: 0; font: 11px DM Mono, monospace; color: var(--muted); letter-spacing: .03em; }
.sound-toggle { justify-self: end; border: 0; background: none; cursor: pointer; display: flex; gap: 9px; align-items: center; font: 10px DM Mono, monospace; text-transform: uppercase; }
.sound-icon { color: var(--orange); font-size: 13px; }
.sound-toggle[aria-pressed="false"] { opacity: .45; }

main { width: min(1120px, calc(100% - 44px)); margin: auto; }
.intro { text-align: center; padding: 62px 20px 50px; }
.eyebrow { margin: 0 0 22px; font: 500 10px DM Mono, monospace; letter-spacing: .17em; color: var(--muted); }
h1 { margin: 0; font-size: clamp(43px, 6.6vw, 86px); letter-spacing: -.061em; line-height: .96; font-weight: 500; }
h1 em { font-family: 'Playfair Display', serif; font-weight: 500; color: var(--orange); }
.intro-copy { max-width: 500px; margin: 24px auto 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.workbench { max-width: 1120px; margin: 0 auto 90px; }
.url-form { max-width: 880px; margin: 0 auto 12px; }
.url-form label { display: block; margin-bottom: 10px; font: 500 10px DM Mono, monospace; letter-spacing: .12em; }
.url-row { display: flex; border-bottom: 1px solid var(--ink); }
.url-row:focus-within { border-bottom-width: 2px; }
.url-row input { flex: 1; min-width: 0; padding: 14px 2px 16px; border: 0; outline: 0; background: transparent; font: 13px DM Mono, monospace; color: var(--ink); }
.url-row input::placeholder { color: #aaa89f; }
.load-button { border: 0; padding: 0 4px 0 24px; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.load-button span { margin-left: 10px; color: var(--orange); }
.form-notes { padding: 9px 0 19px; display: flex; justify-content: space-between; color: var(--muted); font: 9px DM Mono, monospace; }
.form-error { min-height: 15px; margin: -10px 0 6px; color: #b72f16; font: 10px DM Mono, monospace; }

.destruction-console { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; align-items: start; }
.stage-shell { border: 1px solid #aaa79e; padding: 10px; background: rgba(242,239,231,.94); box-shadow: 8px 10px 0 rgba(31,33,29,.06); }
.stage { position: relative; height: clamp(420px, 43vw, 536px); min-height: 310px; overflow: hidden; background: var(--stage); isolation: isolate; transform: translateZ(0); }
.stage::before { content: ''; position: absolute; inset: 0; opacity: .19; background-image: linear-gradient(45deg, #bbb 25%, transparent 25%), linear-gradient(-45deg, #bbb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #bbb 75%), linear-gradient(-45deg, transparent 75%, #bbb 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.stage-placeholder { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #8c8d86; font: 10px DM Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
.placeholder-mark { margin: auto; width: 52px; height: 52px; display: grid; place-content: center; border: 1px solid #aeaca4; border-radius: 50%; font-size: 25px; font-weight: 300; }
#targetImage { position: absolute; inset: 0; width: 100%; height: 100%; display: none; object-fit: contain; z-index: 1; }
.effect-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.simulation-canvas { position: absolute; z-index: 18; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage-status { position: absolute; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 500 11px DM Mono, monospace; letter-spacing: .18em; color: white; text-shadow: 0 1px 5px #000; text-transform: uppercase; opacity: 0; white-space: nowrap; }
.stage-meta { display: flex; justify-content: space-between; padding: 12px 3px 2px; font: 9px DM Mono, monospace; color: var(--muted); letter-spacing: .08em; }
.reset-link { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; color: var(--muted); }
.reset-link:disabled { opacity: .3; cursor: default; }

.fates { padding: 4px 0 0; }
.section-heading { display: block; margin-bottom: 19px; }
.section-heading .eyebrow { margin-bottom: 11px; }
h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.045em; font-weight: 500; }
.section-heading > p { margin: 7px 0 0; color: var(--muted); text-align: left; font-size: 10px; line-height: 1.5; }
.section-heading > p span { font: 9px DM Mono, monospace; }
.fate-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fate-card { position: relative; min-height: 142px; padding: 14px; text-align: left; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.fate-card:not(:disabled):hover { background: var(--ink); color: var(--paper); transform: translateY(-4px); z-index: 2; }
.fate-card:disabled { cursor: not-allowed; opacity: .4; }
.fate-number { position: absolute; top: 12px; left: 13px; font: 8px DM Mono, monospace; color: var(--muted); }
.fate-icon { display: block; height: 47px; margin: 12px 0 2px; text-align: center; font-size: 37px; line-height: 47px; font-weight: 300; }
.icon-nuke { color: var(--orange); }
.icon-burn { color: #db671d; }
.icon-dissolve { letter-spacing: 8px; }
.fate-card strong { display: block; font-size: 12px; font-weight: 600; }
.fate-card small { display: block; margin-top: 4px; color: var(--muted); font: 8px/1.35 DM Mono, monospace; }
.card-arrow { position: absolute; right: 12px; bottom: 12px; color: var(--orange); opacity: 0; transition: opacity .2s; }
.fate-card:hover .card-arrow { opacity: 1; }

footer { border-top: 1px solid var(--line); text-align: center; padding: 55px 20px 44px; color: var(--muted); font: 10px DM Mono, monospace; line-height: 1.7; }
footer p { margin: 2px 0; }
footer strong { color: var(--ink); font-size: 12px; }
footer .privacy { margin-top: 24px; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

/* Effect primitives */
.cinematic-shade { position: absolute; z-index: 20; inset: 0; box-shadow: inset 0 0 90px 24px #0009; opacity: 0; animation: cinematicShade var(--duration, 4s) ease-in-out forwards; }
.flash { position: absolute; z-index: 14; inset: 0; background: white; animation: flash 2.2s ease-out forwards; }
.blast-core { position: absolute; z-index: 13; left: 50%; top: 50%; width: 8px; aspect-ratio: 1; border-radius: 50%; background: white; box-shadow: 0 0 20px 10px white, 0 0 70px 40px #fff27a, 0 0 150px 90px #ff661f; transform: translate(-50%,-50%); animation: blastCore 3.4s cubic-bezier(.12,.8,.24,1) forwards; }
.dust-ring { position: absolute; z-index: 10; left: 50%; top: 58%; width: 40px; height: 12px; border: 7px solid #8d4b22aa; border-radius: 50%; filter: blur(3px); transform: translate(-50%,-50%); animation: dustRing 5s ease-out forwards; }
.shockwave { position: absolute; z-index: 12; left: 50%; top: 50%; width: 30px; aspect-ratio: 1; border: 8px solid white; border-radius: 50%; box-shadow: 0 0 24px #ffb13b, inset 0 0 24px #ffb13b; transform: translate(-50%,-50%); animation: shock 3.2s cubic-bezier(.1,.7,.3,1) forwards; animation-delay: var(--delay, 0s); }
.mushroom { position: absolute; z-index: 11; left: 50%; top: 50%; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, white 0 8%, #fff49a 12%, #ff8a23 38%, #4d1705 72%, transparent 73%); filter: blur(2px); transform: translate(-50%,-50%) scale(0); animation: boom 4.5s ease-out forwards; }
.blast-cloud { position: absolute; z-index: 9; left: 50%; top: 50%; width: var(--size); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff6bd 0 7%, #f29a36 25%, #6c2a0c 62%, transparent 70%); filter: blur(var(--blur)); mix-blend-mode: screen; animation: cloudBurst 5.4s ease-out forwards; animation-delay: var(--delay); }
.debris, .ember, .erase-dust, .void-spark, .fallout, .ash { position: absolute; left: var(--left); top: var(--top); width: var(--size); height: var(--size); border-radius: 50%; background: var(--color); box-shadow: 0 0 8px var(--color); }
.debris { z-index: 15; animation: debrisFly 5.5s cubic-bezier(.12,.55,.4,1) forwards; animation-delay: var(--delay); }
.fallout { z-index: 16; border-radius: 40%; filter: blur(.4px); animation: falloutDrift var(--duration) ease-in forwards; animation-delay: var(--delay); }
.slice, .pixel { position: absolute; background-repeat: no-repeat; z-index: 2; }
.slice img, .pixel img { position: absolute; max-width: none; object-fit: contain; pointer-events: none; }
.slice { transform-origin: top; animation: shred 5.5s cubic-bezier(.3,.05,.75,.4) forwards; animation-delay: var(--delay); }
.pixel { animation: pixelAway 5.4s ease-in forwards; animation-delay: var(--delay); }
.blade { position: absolute; z-index: 5; top: -10%; left: -8%; width: 4px; height: 120%; background: linear-gradient(to bottom, transparent, white 20% 80%, transparent); box-shadow: 0 0 9px white, 0 0 18px #7fe8ff; transform: rotate(8deg); animation: bladeCut 2.2s ease-in forwards; }
.flame { position: absolute; bottom: -30px; width: 38px; height: 115px; border-radius: 60% 40% 55% 45%; background: radial-gradient(ellipse at 50% 95%, #fff 0 6%, #ffd52b 18%, #ff641e 47%, #b30e00 67%, transparent 70%); filter: blur(2px); transform-origin: bottom; animation: flame .22s ease-in-out infinite alternate; }
.burn-line { position: absolute; z-index: 3; left: -5%; bottom: -5%; width: 110%; height: 30%; background: radial-gradient(ellipse at 50% 100%, transparent 0 37%, #ffd43b 42%, #e3380e 48%, #180c08 54%, transparent 59%); filter: blur(4px); animation: burnLine 8.7s linear forwards; }
.soot { position: absolute; inset: 0; background: linear-gradient(to top, #080706 0%, #281109 30%, transparent 52%); animation: burnRise 8.7s linear forwards; }
.heat-haze { position: absolute; z-index: 8; inset: 0; backdrop-filter: blur(0); background: repeating-linear-gradient(0deg, transparent 0 8px, #ff8b2412 10px 13px); mix-blend-mode: screen; animation: heatHaze 8.8s ease-in-out forwards; }
.smoke { position: absolute; bottom: -40px; left: var(--left); width: var(--size); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #241f1b99, #5a514977 45%, transparent 70%); filter: blur(8px); animation: smokeRise var(--duration) ease-out forwards; animation-delay: var(--delay); }
.ember { z-index: 6; animation: emberRise var(--duration) ease-out forwards; animation-delay: var(--delay); }
.ash { z-index: 7; border-radius: 20%; box-shadow: none; animation: ashFloat var(--duration) ease-out forwards; animation-delay: var(--delay); }
.eraser { position: absolute; width: 105px; height: 48px; border-radius: 6px 6px 15px 6px; background: linear-gradient(90deg, #ff6f91 0 72%, #d8d2bf 72%); box-shadow: 2px 8px 18px #0005; animation: eraseSweep 8.2s ease-in-out forwards; }
.erase-dust { animation: dustDrift 3.6s ease-out forwards; animation-delay: var(--delay); box-shadow: none; }
.void-hole { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #020202; box-shadow: 0 0 40px 18px #42225c, 0 0 90px 35px #000; transform: translate(-50%,-50%); animation: voidGrow 6.8s ease-in forwards; }
.accretion { position: absolute; z-index: 5; left: 50%; top: 50%; width: 18px; aspect-ratio: 1; border-radius: 50%; border: 4px solid #ff8e39; box-shadow: 0 0 10px #fff, 0 0 22px #ff4f1f, inset 0 0 15px #8d33ff; transform: translate(-50%,-50%) rotateX(68deg); animation: accretionGrow 6.75s cubic-bezier(.2,.7,.3,1) forwards; }
.void-spark { z-index: 6; animation: sparkSuck 6.1s ease-in forwards; animation-delay: var(--delay); }

.stage.effect-nuke { animation: stageShake 2.4s .18s ease-out; }
.stage.effect-nuke #targetImage { animation: imageNuke 2.5s .18s ease-in forwards; }
.stage.effect-burn #targetImage { animation: imageBurn 8.8s linear forwards; }
.stage.effect-shred #targetImage, .stage.effect-dissolve #targetImage { opacity: 0; }
.stage.effect-shred { animation: stageJolt 2.2s ease-out; }
.stage.effect-erase #targetImage { animation: imageErase 8.3s linear forwards; }
.stage.effect-void #targetImage { animation: imageVoid 6.9s cubic-bezier(.7,0,.9,.5) forwards; }
.stage.is-done .stage-status { animation: statusIn .5s forwards; }

@keyframes cinematicShade { 0%,8% { opacity: 0 } 35% { opacity: .6 } 82% { opacity: .35 } 100% { opacity: 0 } }
@keyframes flash { 0% { opacity: 0 } 5% { opacity: 1 } 28% { opacity: .92 } 62% { opacity: .25 } 100% { opacity: 0 } }
@keyframes blastCore { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0 } 8% { opacity: 1 } 45% { transform: translate(-50%,-50%) scale(9); opacity: 1 } 100% { transform: translate(-50%,-50%) scale(22); opacity: 0 } }
@keyframes dustRing { 0%,15% { width: 40px; height: 12px; opacity: 0 } 30% { opacity: .85 } 100% { width: 145%; height: 48%; border-width: 1px; opacity: 0 } }
@keyframes shock { to { width: 140%; opacity: 0; border-width: 1px; } }
@keyframes boom { 40% { transform: translate(-50%,-50%) scale(3); opacity: 1 } 100% { transform: translate(-50%,-70%) scale(6); opacity: 0 } }
@keyframes cloudBurst { 0% { transform: translate(-50%,-50%) scale(.05); opacity: 0 } 20% { opacity: 1 } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(2.8); opacity: 0 } }
@keyframes debrisFly { 0% { transform: translate(-50%,-50%) scale(.2); opacity: 1 } 100% { transform: translate(var(--x), var(--y)) scale(.1); opacity: 0 } }
@keyframes falloutDrift { 0% { transform: translate(0,-30px) rotate(0); opacity: 0 } 15% { opacity: .85 } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0 } }
@keyframes stageShake { 0%,100% { transform: translate(0) } 12% { transform: translate(-12px, 7px) } 24% { transform: translate(10px, -8px) } 38% { transform: translate(-8px, -4px) } 55% { transform: translate(7px, 5px) } 72% { transform: translate(-3px, 2px) } }
@keyframes stageJolt { 0%,100% { transform: translateX(0) } 22% { transform: translateX(-5px) skewX(-1deg) } 38% { transform: translateX(5px) skewX(1deg) } }
@keyframes imageNuke { to { filter: brightness(8) saturate(0); transform: scale(1.25); opacity: 0; } }
@keyframes flame { to { transform: scaleX(.7) scaleY(1.15) skewX(8deg); filter: blur(4px); } }
@keyframes burnRise { 0% { transform: translateY(105%); } 100% { transform: translateY(-34%); } }
@keyframes burnLine { 0% { transform: translateY(120%) } 100% { transform: translateY(-410%) } }
@keyframes heatHaze { 0%,8% { opacity: 0; backdrop-filter: blur(0) } 25%,78% { opacity: 1; backdrop-filter: blur(2px) } 100% { opacity: 0; backdrop-filter: blur(5px) } }
@keyframes smokeRise { 0% { transform: translateY(0) scale(.4); opacity: 0 } 20% { opacity: .65 } 100% { transform: translate(var(--x), -460px) scale(2.4); opacity: 0 } }
@keyframes emberRise { 0% { transform: translate(0,0); opacity: 0 } 15% { opacity: 1 } 100% { transform: translate(var(--x), var(--y)); opacity: 0 } }
@keyframes ashFloat { 0% { transform: translate(0,0) rotate(0); opacity: 0 } 18% { opacity: .75 } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0 } }
@keyframes imageBurn { 0%, 10% { opacity: 1; filter: none; clip-path: inset(0) } 40% { filter: sepia(1) contrast(1.4) brightness(.75); clip-path: inset(0 0 18% 0) } 70% { filter: sepia(1) contrast(2) brightness(.38); clip-path: inset(0 0 58% 0) } 92% { opacity: .45; filter: grayscale(1) brightness(.12); clip-path: inset(0 0 90% 0) } 100% { opacity: 0; filter: brightness(0); clip-path: inset(0 0 100% 0); transform: scale(.96); } }
@keyframes bladeCut { to { left: 108%; } }
@keyframes shred { 0%,18% { transform: translateY(0) } 45% { transform: translate(var(--x), 8%) rotate(var(--r)) } 100% { transform: translate(var(--x2), 125%) rotate(var(--r2)); opacity: 0; } }
@keyframes pixelAway { 0%,22% { filter: none } 38% { filter: brightness(1.8) saturate(2) } 100% { transform: translate(var(--x), var(--y)) scale(0) rotate(var(--r)); filter: brightness(3); opacity: 0; } }
@keyframes eraseSweep { 0% { left: -20%; top: 4%; transform: rotate(-8deg) } 18% { left: 84%; top: 18%; transform: rotate(5deg) } 22% { left: 84%; top: 28%; } 42% { left: -18%; top: 38%; transform: rotate(-8deg) } 46% { left: -18%; top: 49%; } 65% { left: 84%; top: 59%; transform: rotate(5deg) } 70% { left: 84%; top: 71%; } 88% { left: -18%; top: 82%; transform: rotate(-8deg) } 100% { left: 85%; top: 92%; transform: rotate(5deg) } }
@keyframes imageErase { 0% { clip-path: inset(0) } 20% { clip-path: inset(22% 0 0) } 43% { clip-path: inset(45% 0 0) } 66% { clip-path: inset(68% 0 0) } 89% { clip-path: inset(89% 0 0) } 100% { clip-path: inset(100% 0 0) } }
@keyframes dustDrift { 0% { transform: scale(.3); opacity: 0 } 20% { opacity: .75 } 100% { transform: translate(var(--x), var(--y)) scale(1.5); opacity: 0 } }
@keyframes voidGrow { 0%,55% { width: 10px; height: 10px } 100% { width: 145%; height: 145%; } }
@keyframes accretionGrow { 0% { transform: translate(-50%,-50%) rotateX(68deg) rotateZ(0) scale(.1) } 60% { transform: translate(-50%,-50%) rotateX(68deg) rotateZ(480deg) scale(12) } 100% { transform: translate(-50%,-50%) rotateX(68deg) rotateZ(920deg) scale(42); opacity: 0 } }
@keyframes sparkSuck { 0% { transform: translate(0,0) scale(1); opacity: 1 } 75% { opacity: 1 } 100% { left: 50%; top: 50%; transform: scale(0); opacity: 0 } }
@keyframes imageVoid { 0%,18% { transform: scale(1); filter: none } 55% { transform: scale(.82) rotate(12deg); filter: contrast(1.6) saturate(2) hue-rotate(20deg) } 100% { transform: scale(0) rotate(920deg); filter: blur(14px) saturate(3); opacity: 0; } }
@keyframes statusIn { from { opacity: 0; transform: translate(-50%, 0) } to { opacity: 1; transform: translate(-50%, -50%) } }

@media (max-width: 900px) {
  .destruction-console { grid-template-columns: 1fr; gap: 20px; }
  .stage-shell { position: sticky; top: 8px; z-index: 20; }
  .stage { height: min(58vw, 470px); }
  .fates { padding: 10px 0 0; }
  .section-heading { display: flex; justify-content: space-between; align-items: end; }
  .section-heading > p { text-align: right; }
  .fate-grid { grid-template-columns: repeat(3, 1fr); }
  .fate-card { min-height: 138px; }
}

@media (max-width: 720px) {
  .site-header { height: 76px; grid-template-columns: 1fr auto; padding: 0 22px; }
  .tagline { display: none; }
  .intro { padding: 45px 4px 38px; }
  h1 { font-size: clamp(39px, 12vw, 62px); }
  .intro-copy { font-size: 13px; }
  .url-row { flex-wrap: wrap; }
  .url-row input { flex-basis: 100%; }
  .load-button { margin-left: auto; padding: 8px 2px 10px; }
  .workbench { margin-bottom: 60px; }
  .stage-shell { padding: 7px; }
  .stage { min-height: 230px; height: 56vw; }
  .fates { padding: 2px 0 0; }
  .fate-grid { grid-template-columns: repeat(2, 1fr); }
  .fate-card { min-height: 124px; padding: 13px; }
  .fate-icon { height: 40px; line-height: 40px; font-size: 32px; }
  .fate-card small { display: none; }
  .section-heading > p { display: none; }
}

@media (max-width: 420px) {
  main { width: min(100% - 28px, 1120px); }
  .fate-card { min-height: 112px; }
  .fate-icon { height: 36px; line-height: 36px; font-size: 29px; }
  .form-notes span { display: none; }
  .form-notes { justify-content: flex-end; }
}

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